Was this page helpful?

PUT:pages/{pageid}/tags

    Overview

    public. Sets the tags on a page.

    Uri Parameters
    NameTypeDescription
    pageidstringeither an integer page ID, "home", or "=" followed by a double uri-encoded page title
    Query Parameters
    NameTypeDescription
    authenticatebool?Force authentication for request (default: false)
    redirectsint?If zero, do not follow page redirects.
    Return Codes
    NameValueDescription
    BadRequest400Invalid input parameter or request body
    Forbidden403Update access to the page is required
    NotFound404The requested page could not be found
    Ok200The request completed successfully

    Message Format

    Input:

    <tags>
        <tag value="{text}" />
        ...
    </tags>

    Output:

    <tags count="{int}" href="{uri}">
        <tag value="{text}">
            <type>{text|date|define}</type> 
            <uri>{text}</uri> 
            <title>{text}</title> 
            <related count="{int}">
                <page id="{int}" href="{uri}">
                    <title>{text}</title> 
                    <path>{text}</path> 
                </page>
            </related>
        </tag>
        ...
    </tags>

    Implementation Notes

    Tagging is a means of categorizing pages.  There are currently three types of supported tags:

    • Date: Defines a date or date range for the page.
    • Define: Indicates that this is a defining tag.  All other pages with a text tag having the same name will be marked as related to the page.
    • Text: Standard tag type.

    Code Samples

    C# Samples

     

    Curl Samples

     

    PHP Samples

     

    Other Code Samples

     

    Was this page helpful?
    Tag page
    Viewing 1 of 1 comments: view all
    I had a really hard time getting this to work...so here is how I did it with curl, where {xxx} is the page.id of the page you want to add it to.
    NOTE: When you do it this way, it will OVERWRITE all other tags on your page. You may want to do a GET first to get all your tags and append them to my.xml

    curl -b cookies.txt -d @my.xml -X PUT -H "Content-type: text/xml" "http://myserver/@api/deki/pages/{xxx}/tags/?"

    my.xml contains the following text:
    <tags><tag value="MY TAG" /></tags> edited 23:57, 21 Feb 2008
    Posted 23:44, 21 Feb 2008
    Viewing 1 of 1 comments: view all
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by