Retrieving a list of tags for public files or wikis
Added by IBM contributorElizabeth Bowling | Edited by IBM contributorPaul Bastide on October 1, 2015
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

You can retrieve a feed of the tags assigned to all public files or for all wikis.

This method does not require authentication to retrieve public resources. If authentication is provided, the user must have authority to view the specified resources.

Input
Method URI Description
GET /files/{auth}/api/tags/feed Get a feed of tags assigned to public files.
GET /wikis/{auth}/api/tags/feed Get a feed of tags assigned to public wikis.
Name Type Optional Description
auth
enumerated Yes The authorization protocol being used by your application to access Connections Cloud.
Authorized values:
  • basic
  • oauth
Name Type Optional Description
scope
enumerated No String. Specifies whether to retrieve the tags for files or for wikis:
- documents: Get the tags for all public documents in all the libraries.
- libraries: Get the tags for all the wiki libraries.
Authorized values:
  • documents
  • libraries
tag
string Yes String. Returns only the tags that begin with the specified value. Specify the tag value as a string with no spaces or commas.
This parameter can be used for type ahead.
format
enumerated Yes String. Specifies the return format: JSON or XML.
Authorized values:
  • json
  • xml
includeCount
enumerated Yes Boolean. Specifies whether the total number of tags is also returned.
Authorized values:
  • true
  • false
pageSize
int Yes Number. Specifies the number of items to include in a paged request.
page
int Yes Number. Specifies page to be retrieved, assuming a constant page size was specified with the pageSize parameter.
sK
enumerated Yes String. Specifies the value to use for sorting the returned tags:
- weight: Sort by tag weight using the specified sort order (defaults to descending order).
- name: Sort by tag weight using the specified sort order (defaults to ascending order).
- cloud: Sort by tag weight, then subsort by tag name, using the specified sort order (defaults to ascending order).
Authorized values:
  • weight
  • name
  • cloud
sO
enumerated Yes String. Specifies the order of the sorted tags as either ascending or descending. If sK is "name", the default sort order is asc; If sK is "weight", the default sort order is dsc. When sK is not provided, the tags will be sorted by name in ascending order (sK=name & sO=asc).
- asc: Sort the returned tags in ascending order.
- dsc Sort the returned tags in descending order.
Authorized values:
  • asc
  • dsc
Name Type Optional Description
Authentication
enumerated No The authentication mechanism selected by your application to access the API.
Basic is the Base64 encoding of the IBM Connections Cloud username and password: Base64(username:password). For example, Base64(twatson@us.ibm.com:password).
Bearer is the oauth 2.0 access token that is generated when the user grants your application access to IBM Connections Cloud services.
See the reference topic "OAuth 2.0 APIs for web server flow" for more information.
Authorized values:
  • bearer
  • basic
Output
Code Description
403
Forbidden. The server refuses to fulfill a request, typically because the request was for an object that you don't have permission to access.
503
Service is unavailable
401
Unauthorized. Returned when no authenticated user or no userid, email, or key parameter are provided on the request.
Examples
The results are returned in the default JSON format.
{ dataSrc: "unbound",
  render: "code",
  dataSrcObj: {},
  obj: {
    body: "GET: files/basic/api/tags/feed\r\nHTTP: 1.1\r\n{"
  },
  renderObj: {
    style: "border: 1px solid #88c; border-radius: 6px; width: 80%; background-color: #ddf; white-space: pre; font-family: courier;"
  },
  id: "ii0"
}

GET: files/basic/api/tags/feed
HTTP: 1.1
{ 

Response returned by the server
{"identifier":"name","label":"tag","pageSize":10,"page":1,"totalSize":"200", "items":[ {"name":"tag1", "weight":"1"}, {"name":"tag2", "weight":"2"}, ..... {"name":"tag3", "weight":"3"} ]} {