Skip to main content
NICE CXone Expert
Expert Success Center

pages/{pageid}/tags (PUT)


Sets the tags on a page.

  • REST Method: PUT
  • Method Access: public

Uri Parameters

Name Type Description
pageid string either an integer page ID, "home", or "=" followed by a double uri-encoded page path

Query Parameters

Name Type Description
authenticate bool? Force authentication for request (default: false)
redirects int? If zero, do not follow page redirects.

Return Codes

Name Value Description
OK 200 The request completed successfully
Bad Request 400 Invalid input parameter or request body
Forbidden 403 Update access to the page is required
Not Found 404 The requested page could not be found

Message Format


    <tag value="{text}" />


<tags count="{int}" href="{uri}">
    <tag value="{text}">
        <related count="{int}">
            <page id="{int}" href="{uri}">

C# Sample: Set Tags

The following code example sets the tags on the page called "Page Title".  A tag of each type is used (date, define, and text):

Sample Code

Plug p = Plug.New("http://deki-hayes/@api/deki");
p.At("users", "authenticate").WithCredentials("admin", "password").Get();
XDoc tagsDoc = new XDoc("tags")
    .Start("tag").Attr("value", "date:2007-08-29").End()
    .Start("tag").Attr("value", "define:this tag is a define").End();
    .Start("tag").Attr("value", "text tag").End()
p.At("pages", "=Page_Title", "tags").Put(tagsDoc);

Sample Response from executing Code

<tags count="3" href="http://deki-hayes/@api/deki/pages/31/tags">
    <tag value="text tag">
        <title>text tag</title> 
    <tag value="date:2007-08-29">
        <title>Wednesday, August 29, 2007</title> 
    <tag value="define:this tag is a define">
        <title>this tag is a define</title> 
        <related count="1">
            <page id="29" href="http://deki-hayes/@api/deki/pages/29">
                <title>DekiWiki (Hayes)</title> 
                <path /> 

Curl Sample: Set Tags

The following command attaches the list of tags defined in "tags.xml" to page "test".

Sample Code

curl -u username:password -H "Content-Type: application/xml" -T tags.xml -i http://mindtouch.address/@api/deki/pages/=test/tags

Implementation notes

curl flags

Basic HTTP authentication. Sends a username and password to server so it can verify whether a user is of privilege to perform specific operation.
Sends a file using the PUT command.
Overwrites or appends to HTTP header. In this case, the Content-Type needs to be set to "application/xml" for the server to process the request.
Includes the HTTP response header in the output. Useful for debugging.


We want to attach some tags of popular memes to page "Meme". The file memes.xml contains a list of meme tags.


Content-Type: application/xml

	<tag value="rick roll"/>
	<tag value="star wars kid"/>
	<tag value="chocolate rain"/>

Sample Code

curl -u username:password -H "Content-Type: text/xml" -T memes.xml -i

HTTP Response Headers

HTTP/1.1 200 OK
Date: Mon, 11 Jan 2010 21:47:29 GMT
Server: Dream-HTTPAPI/
X-Deki-Site: id="default"
Content-Type: application/xml; charset=utf-8
Content-Length: 671
Via: 1.1 dekiwiki

HTTP Response Body

Content-Type: application/xml

<?xml version="1.0"?>
<tags count="3" href="">
  <tag value="chocolate rain" id="4" href="">
    <title>chocolate rain</title>
  <tag value="rick roll" id="5" href="">
    <title>rick roll</title>
  <tag value="star wars kid" id="6" href="">
    <title>star wars kid</title>


  • Running the curl command again with a different list of tags will overwrite the existing list.


  • Was this article helpful?