Overview
public. Retrieve the tags on a page.
Uri Parameters
| Name | Type | Description |
| pageid | string | either an integer page ID, "home", or "=" followed by a double uri-encoded page title |
Query Parameters
| Name | Type | Description |
| redirects | int? | If zero, do not follow page redirects. |
Return Codes
| Name | Value | Description |
| BadRequest | 400 | Invalid input parameter or request body |
| Forbidden | 403 | Read access to the page is required |
| NotFound | 404 | The requested page could not be found |
| Ok | 200 | The request completed successfully |
Message Format
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
The following code example retrieves the tags on the page called "Page Title":
Plug p = Plug.New("http://deki-hayes/@api/deki");
p.At("users", "authenticate").WithCredentials("admin", "password").Get();
p.At("pages", "=Page_Title", "tags").Get(); Sample response indicating that there are three tags on the page:
<tags count="3" href="http://deki-hayes/@api/deki/pages/31/tags">
<tag value="text tag">
<type>text</type>
<uri>http://deki-hayes/Special:Tags?tag=text+tag</uri>
<title>text tag</title>
</tag>
<tag value="date:2007-08-29">
<type>date</type>
<uri>http://deki-hayes/Special:Events?from=2007-08-29</uri>
<title>Wednesday, August 29, 2007</title>
</tag>
<tag value="define:this tag is a define">
<type>define</type>
<uri>http://deki-hayes/Page_Title</uri>
<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 />
</page>
</related>
</tag>
</tags>