Description of the code sample
The following command retrieves a list of all tags throughout the site:
Sample Code
curl -u username:password -i http://mindtouch.address/@api/deki/site/tags
Sample Response from executing Code
Response indicating 3 tags exist.
Content-Type: application/xml
<tags count="3">
<tag value="awesome" id="10" href="http://192.168.59.128/@api/deki/site/tags/10" count="1">
<type>text</type>
<uri>http://192.168.59.128/Special:Tags?tag=awesome</uri>
<title>awesome</title>
</tag>
<tag value="real cool" id="11" href="http://192.168.59.128/@api/deki/site/tags/11" count="1">
<type>text</type>
<uri>http://192.168.59.128/Special:Tags?tag=real+cool</uri>
<title>real cool</title>
</tag>
<tag value="groovy" id="12" href="http://192.168.59.128/@api/deki/site/tags/12" count="1">
<type>text</type>
<uri>http://192.168.59.128/Special:Tags?tag=groovy</uri>
<title>groovy</title>
</tag>
</tags>
Implementation notes
curl flags
- -u
- Provides external user authentication. Note that if anonymous access is available and authentication is not forced, this flag may be omitted.
- -i
- Outputs the HTTP response headers. Useful for debugging.