Add query parameters

You can add query parameters as required by using the following instructions.


Sorting the results

Use the query parameters orderMetric and order to sort entries of a result set.
orderMetric


order=ASC|DESC

Example:

tm:ts:all&orderMetric=TAG_SPACE_COUNT_NAME&order=ASC

This returns a feed that contains all available tag spaces, that is all available tags and their names and counts. The results are sorted in ascending order, first by tag count, and, if counts are equal, by tags name.


Limiting the results

You can use the query parameters start-index and max-results to limit the query results in the feed to a subset.
start-index


max-results


Examples:

  1. This example returns a feed that contains at the most the first 10 elements of the result.

      uri=tos:typeahead&term=A&start-index=20&max-results=10

  2. This example returns a feed that contains at the most 10 elements, starting with the 20th element from the result.

      tm:name:tag_name&start-index=5&max-results=5

  3. This example returns a feed that contains 5 tag entries of the overall result set that match the name tag_name, leaving out the first four results, and returning the following 5 tag entries.


Use scopes

Users can apply both tags and ratings as community tags or personal tags, either public or private. For details refer to the topic about how tagging and rating works in the portal. To control whether you query only community or personal tags or ratings, or both types of tags or ratings, use the parameter scope. Valid values are as follows:
For tagging:


For rating:

Example:

tm:ts:all&scope=COMMUNITY&scope=PERSONAL_PUBLIC 

This returns a feed that contains all available tag spaces with community tags and the public tags of the current user.


Locale sensitive queries

You can specify that you want to search only a specific locale or set of locales. This can be useful when you work with URIs that address tags by their name locales. To do this, use the parameter locale. Examples:

tm:name:tag_name&locale=de

This returns a feed that contains all tags that match the name tag_name in the locale de.

tm:name:tag_name&locale=de&locale=en

This returns a feed that contains all tags that match the name tag_name in the locale de or en.


Parent

The REST API
How tagging and rating works in the portal

 


+

Search Tips   |   Advanced Search