Part of the Lyons release will include improvments to the tagging API.
NOTE: this spec is a work in progress
public. Retrieve all tags on the wiki (with permissions applied)
| Name | Type | Description |
| type | string? | type of the tag (text | date | user | define) (default: all types) |
| to | string? | For type = date, limit the results by date. If only to but no from is specified, show tags from curent time through to. Ex: 2008-12-30 |
| from | string? | For type = date, limit the results by date. If only from but no to is specified, show tags for from through from + 30 days |
| pages | bool? | Display pages tagged with given tag. |
| Name | Value | Description |
| BadRequest | 400 | Invalid input parameter or request body |
| NotFound | 404 | Requested page could not be found |
| Ok | 200 | The request completed successfully |
Output: with ?pages=0
<tags count="4">
<tag value="define:tagtest" href="http://dekidev/@api/deki/site/tags/5" count="1">
<type>define</type>
<uri>http://dekidev/User:Admin/Tag_Test</uri>
<title>tagtest</title>
</tag>
<tag value="blah" href="http://dekidev/@api/deki/site/tags/6" count="2">
<type>text</type>
<uri>http://dekidev/Special:Tags?tag=blah</uri>
<title>blah</title>
</tag>
<tag value="date:2008-11-12" href="http://dekidev/@api/deki/site/tags/7" count="1">
<type>date</type>
<uri>http://dekidev/Special:Events?from=2008-11-12</uri>
<title>Wednesday, November 12, 2008</title>
</tag>
<tag value="date:2008-11-21" href="http://dekidev/@api/deki/site/tags/8" count="2">
<type>date</type>
<uri>http://dekidev/Special:Events?from=2008-11-21</uri>
<title>Friday, November 21, 2008</title>
</tag>
</tags>
Output: with ?pages=1&type=date&from=2008-1-1&to=2009-1-1
<tags count="2">
<tag value="date:2008-11-12" href="http://dekidev/@api/deki/site/tags/7" count="1">
<type>date</type>
<uri>http://dekidev/Special:Events?from=2008-11-12</uri>
<title>Wednesday, November 12, 2008</title>
<pages count="1">
<page id="35" href="http://dekidev/@api/deki/pages/35?redirects=0">
<title>User:Admin</title>
<path>User:Admin</path>
<namespace>user</namespace>
</page>
</pages>
</tag>
<tag value="date:2008-11-21" href="http://dekidev/@api/deki/site/tags/8" count="2">
<type>date</type>
<uri>http://dekidev/Special:Events?from=2008-11-21</uri>
<title>Friday, November 21, 2008</title>
<pages count="2">
<page id="34" href="http://dekidev/@api/deki/pages/34?redirects=0">
<title>Deki Wiki</title>
<path></path>
<namespace>main</namespace>
</page>
<page id="35" href="http://dekidev/@api/deki/pages/35?redirects=0">
<title>User:Admin</title>
<path>User:Admin</path>
<namespace>user</namespace>
</page>
</pages>
</tag>
</tags>
This feature can be used to generate a tag cloud as well as displaying chronotags. Displaying all tags with page information is an expensive operation since page permissions are applied.
The following code example retrieves all tags for a site
Plug p = Plug.New("http://deki-hayes/@api/deki");
p.At("users", "authenticate").WithCredentials("admin", "password").Get();
p.At("site", "tags").Get();
public. Retrieve pages for a given tag
| Name | Type | Description |
| tagid | string | either an integer tag ID or "=" followed by a double uri-encoded tag title |
| Name | Type | Description |
| Name | Value | Description |
| BadRequest | 400 | Invalid input parameter or request body |
| NotFound | 404 | Requested page could not be found |
| Ok | 200 | The request completed successfully |
Output:
<tag value="define:tagtest" href="http://dekidev/@api/deki/site/tags/5" count="1">
<type>define</type>
<uri>http://dekidev/User:Admin/Tag_Test</uri>
<title>tagtest</title>
<pages count="1">
<page id="1691" href="http://dekidev/@api/deki/pages/1691?redirects=0">
<title>Tag Test</title>
<path>User:Admin/Tag_Test</path>
<namespace>user</namespace>
</page>
</pages>
</tag>