List categories
/content/preview/api/v1.1/taxonomies/{id}/categories
Query expression syntax supports conditions that match the field values. Query conditions can be joined by using AND/OR operators and grouped with parenthesis. Below are general examples of queries.
Query expression | ?q=(name co "car") |
Query expression usage with this resource | /preview/api/v1.1/taxonomies/{id}/categories?q=(name co "car") |
In general one form of filtering is supported by this resource.
- Query all categories within a taxonomy: All categories of the taxonomy are queried. However, query conditions are limited to standard fields (id, name, parent.id) and/or optional fields (ancestors.id, ancestors.name, ancestors.apiName).
For example: /preview/api/v1.1/taxonomies/{id}/categories?q=(id eq "B0A39B47122C4CE88A6CD52B90C15263")
Operator | Example | Supported data types | Description |
---|---|---|---|
eq | q=(id eq "B0A39B47122C4CE88A6CD52B90C15263") q=(name eq "Cars") q=(parent.id eq "C7117D407B1845DEAABBE00526D112FB") q=(ancestors.id eq "C7117D407B1845DEAABBE00526D112FB") q=(ancestors.name eq "car") q=(ancestors.apiName eq "tax-c-c1") | text | Equals operator (eq) matches the exact value supplied in the query. The value provided with this operator is not case-sensitive (name) except for identifier fields (id, parent.id, ancestors.id). This operator considers even special characters in the value. |
co | q=(name co "car red") q=(ancestors.name co "car") | text | Contains operator (co) matches every word given in the criteria. It gives the results that have at least one of the words (in this example, car or red or both). This operator does not consider special characters in the value while searching. This operator is applicable to text in case of single-valued attributes. The value provided with this operator is not case-sensitive. |
sw | q=(name sw "Car") q=(ancestors.name sw "ca") | text | Starts With operator (sw) matches only the initial character values given in the field condition. The value provided with this operator is not case-sensitive. |
Request Headers:
Is required | Header Name | Header Value |
---|---|---|
Required | channelToken | {valid channel token value} |
Optional | Accept | application/json |
Request
-
id: string
Unique identifier (ID) of a taxonomy.
-
channelToken(optional): string
Channel token of the targeted channel. A channel token must be provided as either a query parameter or a request header.
-
fields(optional): string
The fields parameter is used to control the returned fields and values in the queried category. This parameter accepts a comma-separated list of field names or all. These fields will be returned for each queried category. As all the field names are case-sensitive, users must provide the correct field names in the search query. When fields is specified as all (case-insensitive), all the standard fields and optional fields are returned for each category. Each category has both standard fields (id, name, description, parent) and optional fields (ancestors, children). The standard field id is always returned in the response and cannot be filtered out. This parameter is optional in the query and by default query result shows only id, name and description in the response. Any incorrect or invalid field name given will result in an error.
Example: ?q=(name co "car")&fields=name,description,parent,ancestors
This returns id, name, description, parent and ancestors in the search results for a category containing "car" in the name field.
Example: ?fields=name,parent
This will return only standard fields (such as id, name and parent) for all categories within the default limit.
Example: ?fields=name,children
This will return only id, name and the children count for all categories within the default limit.
Default Value:name,description
-
limit(optional): integer(int32)
This parameter accepts a non negative integer and is used to control the size of the result. The maximum value allowed for limit is 500.Default Value:
100
-
links(optional): string
Accepts a comma-separated list of rel (relation) links, which the client requires in the results. By default, all the applicable links in a resource are included in the response. Possible values are: self, canonical, describedby, first, last, prev, next.
Example: links=self,canonical will only return the links with the rel property self or canonical. -
offset(optional): integer(int32)
Start index of response rows.Default Value:
0
-
orderBy(optional): string
The orderBy parameter is used to control the order (ascending or descending) of queried items. This parameter is optional in the query and by default there is no order of results. This parameter accepts field names separated by a colon (:), which the user wants to sort the results and sort order.
format: orderBy={fieldName}:{asc/des} (*Note: asc stands for ascending and des for descending. asc and des are always in lower case.)
In a category query, fieldName can be name or position (standard field). When sorting results by position it is important to remember that only searches by parent.id can actually benefit from it. The category position is unique only within a given level or under a given parent category. There will be different categories with the same position value at different levels of the taxonomy. The sort order is optional and by default it is ascending. Any incorrect or invalid field name given will result in an error.
Example: orderBy=name:asc
Returns all categories in ascending order of name.
Example: orderBy=name:des
Returns all categories in descending order of name.
Example: orderBy=position:asc
Returns all categories in ascending order of position.
Example: orderBy=position:des
Returns all categories in descending order of position. -
q(optional): string
This parameter accepts a query expression condition that matches the field values. Many such query conditions can be joined using AND/OR operators and grouped with parentheses. The value of query condition follows the format of {fieldName} {operator} "{fieldValue}". The only values allowed in the operator are eq (Equals), co (Contains), sw (Startswith) and mt (Matches).
Example:
https://{cecsdomain}/content/preview/api/v1.1/taxonomies/{id}/categories?q=(name eq "Furnitures")
This will return all categories matching exactly the name "Furnitures".
Example:
https://{cecsdomain}/content/preview/api/v1.1/taxonomies/{id}/categories?q=(name co "chairs" OR name co "red")
This will return all categories containing the words "chairs" or "red".
Example:
https://{cecsdomain}/content/preview/api/v1.1/taxonomies/{id}/categories?q=(name sw "cars")
This will return all categories which name start with "cars".
Example:
https://{cecsdomain}/content/preview/api/v1.1/taxonomies/{id}/categories?q=(apiName eq "cars-apiname")
This will return all categories which apiName matches "cars-apiname".
Example:
https://{cecsdomain}/content/preview/api/v1.1/taxonomies/{id}/categories?q=(id eq "B0A39B47122C4CE88A6CD52B90C15263")
This will return a category with the given identifier.
Example:
https://{cecsdomain}/content/preview/api/v1.1/taxonomies/{id}/categories?q=(ancestors.id eq "B0A39B47122C4CE88A6CD52B90C15263")
This will return the categories with an ancestor with the given identifier.
Example:
https://{cecsdomain}/content/preview/api/v1.1/taxonomies/{id}/categories?q=(ancestors.name eq "Furnitures")
This will return all categories with an ancestor matching exactly the name "Furnitures".
Example:
https://{cecsdomain}/content/preview/api/v1.1/taxonomies/{id}/categories?q=(ancestors.name co "chairs" OR ancestors.name co "red")
This will return all categories with an ancestor containing the words "chairs" or "red".
Example:
https://{cecsdomain}/content/preview/api/v1.1/taxonomies/{id}/categories?q=(ancestors.name sw "cars")
This will return all categories with an ancestor which name starts with "cars".
Example:
https://{cecsdomain}/content/preview/api/v1.1/taxonomies/{id}/categories?q=(ancestors.apiName eq "cars-apiname")
This will return all categories which apiName matches "cars-apiname".
Example:
https://{cecsdomain}/content/preview/api/v1.1/taxonomies/{id}/categories?q=(parent.id eq "C7117D407B1845DEAABBE00526D112FB")&orderBy=position:asc
This will return all children categories underneath the given parent identifier sorted by their position in ascending order.
Example:
https://{cecsdomain}/content/preview/api/v1.1/taxonomies/{id}/categories?q=(parent.id eq "C7117D407B1845DEAABBE00526D112FB" AND name co "blue")
This will return all children categories underneath the given parent identifier which contains the word "blue" in their names. -
totalResults(optional): boolean
Accepts a Boolean value. Setting it to true displays the total results field in the response.Default Value:
false
Response
- application/json
200 Response
object
-
aggregationResults(optional):
array aggregationResults
Aggregation results.
-
count(optional):
integer(int32)
Total number of records in the current response.
-
hasMore(optional):
boolean
Check whether there are more pages to fetch.
-
items(optional):
array items
Singular resources contained in the collection.
-
limit(optional):
integer(int32)
Actual page size used by the server. This might not be the same as what the client requests.
-
links(optional):
array links
Links of the resource.
-
offset(optional):
integer(int32)
The actual index from which the singular resources are returned.
-
pinned(optional):
array pinned
Pinned items. Shows items pinned at the top of search list
-
properties(optional):
object properties
Additional Properties Allowed: additionalPropertiesadditional collection properties.
-
scrollId(optional):
string
scrollId if the search resolved to a scroll search.
-
totalResults(optional):
integer(int32)
Total number of rows that satisfy the client request (excluding the paging parameters.)
array
-
Array of:
object Link
Link of the resource.
array
object
object
object
-
href(optional):
string
The target resource's URI. It could be template URI. It is a required property in the get response.
-
mediaType(optional):
string
Media type.
-
method(optional):
string
What HTTP method can be used to access the target resource.
-
profile(optional):
string
Link to the metadata that describes the target resource.
-
rel(optional):
string
Relation type. It is a required property in the get response.
-
templated(optional):
boolean
Whether the URI is a template.
object
400 Response
403 Response
500 Response
Examples
Example 1:
The following example shows how to search preview of categories by submission of a GET request on the REST resource using cURL:
curl -X GET -H 'Accept: application/json' 'https://host:port/content/preview/api/v1.1/taxonomies/027396B899EE49EE975B69D739F7B867/categories?q=( name eq \"car blue\")&totalResults=true&offset=0&orderBy=name:asc&channelToken=93cfe6b5a62e47f599d42ccccdb6f951&fields=all'
This searches published taxonomy categories within a taxonomy (id: 027396B899EE49EE975B69D739F7B867) with category name equals to 'car blue' in a channel (channelToken:93cfe6b5a62e47f599d42ccccdb6f951).
Response Body
{ "hasMore": false, "offset": 0, "count": 1, "limit": 1, "totalResults": 1, "items": [ { "id": "ACC6EE7D2C474ACBA45A4FE6EC5C9981", "name": "car blue", "description": "car description", "apiName": "tes-c-c1", "position": 1, "parent": { "id": "87A48E980CAE4861845BF0B2A348015F", "name": "car", "apiName": "tes-c" }, "ancestors": [ { "id": "87A48E980CAE4861845BF0B2A348015F", "name": "car", "apiName": "tes-c" } ], "children": { "count": 3, "links": [ { "href": "https://<hostname>/content/preview/api/v1.1/taxonomies/027396B899EE49EE975B69D739F7B867/categories/ACC6EE7D2C474ACBA45A4FE6EC5C9981?expand=children&channelToken=93cfe6b5a62e47f599d42ccccdb6f951", "rel": "child", "method": "GET", "mediaType": "application/json" } ] }, "links": [ { "href": "https://<hostname>/content/preview/api/v1.1/taxonomies/027396B899EE49EE975B69D739F7B867/categories/ACC6EE7D2C474ACBA45A4FE6EC5C9981?channelToken=93cfe6b5a62e47f599d42ccccdb6f951", "rel": "self", "method": "GET", "mediaType": "application/json" } ] } ], "links": [ { "href": "https://<hostname>/content/preview/api/v1.1/taxonomies/027396B899EE49EE975B69D739F7B867/categories?q=( name eq \"car blue\")&totalResults=true&offset=0&orderBy=name:asc&channelToken=93cfe6b5a62e47f599d42ccccdb6f951&fields=all", "rel": "self", "method": "GET", "mediaType": "application/json" }, { "href": "https://<hostname>/content/preview/api/v1.1/taxonomies/027396B899EE49EE975B69D739F7B867/categories?q=( name eq \"car blue\")&totalResults=true&offset=0&orderBy=name:asc&channelToken=93cfe6b5a62e47f599d42ccccdb6f951&fields=all", "rel": "canonical", "method": "GET", "mediaType": "application/json" }, { "href": "https://<hostname>/content/preview/api/v1.1/metadata-catalog/taxonomies/027396B899EE49EE975B69D739F7B867/categories?channelToken=93cfe6b5a62e47f599d42ccccdb6f951", "rel": "describedby", "method": "GET", "mediaType": "application/schema+json" }, { "href": "https://<hostname>/content/preview/api/v1.1/taxonomies/027396B899EE49EE975B69D739F7B867/categories?q=( name eq \"car blue\")&totalResults=true&offset=0&orderBy=name:asc&channelToken=93cfe6b5a62e47f599d42ccccdb6f951&fields=all", "rel": "first", "method": "GET", "mediaType": "application/json" }, { "href": "https://<hostname>/content/preview/api/v1.1/taxonomies/027396B899EE49EE975B69D739F7B867/categories?q=( name eq \"car blue\")&totalResults=true&offset=0&orderBy=name:asc&channelToken=93cfe6b5a62e47f599d42ccccdb6f951&fields=all", "rel": "last", "method": "GET", "mediaType": "application/json" } ] }
Example 2:
The following example shows how to search preview of categories by submission of a GET request on the REST resource using cURL:
curl -X GET -H 'Accept: application/json' 'https://host:port/content/preview/api/v1.1/taxonomies/027396B899EE49EE975B69D739F7B867/categories?totalResults=true&offset=4&limit=6&orderBy=name:asc&channelToken=93cfe6b5a62e47f599d42ccccdb6f951&fields=all'
This searches published taxonomy categories within a taxonomy (id: 027396B899EE49EE975B69D739F7B867) with offset = 4, limit = 6 and total results = true in a channel (channelToken:93cfe6b5a62e47f599d42ccccdb6f951).
Response Body
{ "hasMore": true, "offset": 4, "count": 6, "limit": 6, "totalResults": 12, "items": [ { "id": "8297FB30970E430C8F0192E69F82B0A3", "name": "car blue small", "description": "car blue small description", "apiName": "tes-c-c-c3", "position": 0, "parent": { "id": "ACC6EE7D2C474ACBA45A4FE6EC5C9981", "name": "car blue", "apiName": "tes-c-c1" }, "ancestors": [ { "id": "87A48E980CAE4861845BF0B2A348015F", "name": "car", "apiName": "tes-c" }, { "id": "ACC6EE7D2C474ACBA45A4FE6EC5C9981", "name": "car blue", "apiName": "tes-c-c1" } ], "children": { "count": 1, "links": [ { "href": "https://<hostname>/content/preview/api/v1.1/taxonomies/027396B899EE49EE975B69D739F7B867/categories/8297FB30970E430C8F0192E69F82B0A3?expand=children&channelToken=93cfe6b5a62e47f599d42ccccdb6f951", "rel": "child", "method": "GET", "mediaType": "application/json" } ] }, "links": [ { "href": "https://<hostname>/content/preview/api/v1.1/taxonomies/027396B899EE49EE975B69D739F7B867/categories/8297FB30970E430C8F0192E69F82B0A3?channelToken=93cfe6b5a62e47f599d42ccccdb6f951", "rel": "self", "method": "GET", "mediaType": "application/json" } ] }, { "id": "1F15BF49D654477A89B16D50315ECA23", "name": "car green", "description": "car description", "apiName": "tes-c-c2", "position": 2, "parent": { "id": "87A48E980CAE4861845BF0B2A348015F", "name": "car", "apiName": "tes-c" }, "ancestors": [ { "id": "87A48E980CAE4861845BF0B2A348015F", "name": "car", "apiName": "tes-c" } ], "children": { "count": 0, "links": [ { "href": "https://<hostname>/content/preview/api/v1.1/taxonomies/027396B899EE49EE975B69D739F7B867/categories/1F15BF49D654477A89B16D50315ECA23?expand=children&channelToken=93cfe6b5a62e47f599d42ccccdb6f951", "rel": "child", "method": "GET", "mediaType": "application/json" } ] }, "links": [ { "href": "https://<hostname>/content/preview/api/v1.1/taxonomies/027396B899EE49EE975B69D739F7B867/categories/1F15BF49D654477A89B16D50315ECA23?channelToken=93cfe6b5a62e47f599d42ccccdb6f951", "rel": "self", "method": "GET", "mediaType": "application/json" } ] }, { "id": "E9C985AFDBEF405C9B00D6831A5DFABB", "name": "car red", "description": "car red description", "apiName": "tes-c-c", "position": 0, "parent": { "id": "87A48E980CAE4861845BF0B2A348015F", "name": "car", "apiName": "tes-c" }, "ancestors": [ { "id": "87A48E980CAE4861845BF0B2A348015F", "name": "car", "apiName": "tes-c" } ], "children": { "count": 3, "links": [ { "href": "https://<hostname>/content/preview/api/v1.1/taxonomies/027396B899EE49EE975B69D739F7B867/categories/E9C985AFDBEF405C9B00D6831A5DFABB?expand=children&channelToken=93cfe6b5a62e47f599d42ccccdb6f951", "rel": "child", "method": "GET", "mediaType": "application/json" } ] }, "links": [ { "href": "https://<hostname>/content/preview/api/v1.1/taxonomies/027396B899EE49EE975B69D739F7B867/categories/E9C985AFDBEF405C9B00D6831A5DFABB?channelToken=93cfe6b5a62e47f599d42ccccdb6f951", "rel": "self", "method": "GET", "mediaType": "application/json" } ] }, { "id": "BC8C5F7A1B5E45B9AE593B07EB32581C", "name": "car red large", "description": "car red large description", "apiName": "tes-c-c-c2", "position": 2, "parent": { "id": "E9C985AFDBEF405C9B00D6831A5DFABB", "name": "car red", "apiName": "tes-c-c" }, "ancestors": [ { "id": "87A48E980CAE4861845BF0B2A348015F", "name": "car", "apiName": "tes-c" }, { "id": "E9C985AFDBEF405C9B00D6831A5DFABB", "name": "car red", "apiName": "tes-c-c" } ], "children": { "count": 0, "links": [ { "href": "https://<hostname>/content/preview/api/v1.1/taxonomies/027396B899EE49EE975B69D739F7B867/categories/BC8C5F7A1B5E45B9AE593B07EB32581C?expand=children&channelToken=93cfe6b5a62e47f599d42ccccdb6f951", "rel": "child", "method": "GET", "mediaType": "application/json" } ] }, "links": [ { "href": "https://<hostname>/content/preview/api/v1.1/taxonomies/027396B899EE49EE975B69D739F7B867/categories/BC8C5F7A1B5E45B9AE593B07EB32581C?channelToken=93cfe6b5a62e47f599d42ccccdb6f951", "rel": "self", "method": "GET", "mediaType": "application/json" } ] }, { "id": "1272A38E2CBE4B97BEA9467A6F7F575E", "name": "car red medium", "description": "car red medium description", "apiName": "tes-c-c-c1", "position": 1, "parent": { "id": "E9C985AFDBEF405C9B00D6831A5DFABB", "name": "car red", "apiName": "tes-c-c" }, "ancestors": [ { "id": "87A48E980CAE4861845BF0B2A348015F", "name": "car", "apiName": "tes-c" }, { "id": "E9C985AFDBEF405C9B00D6831A5DFABB", "name": "car red", "apiName": "tes-c-c" } ], "children": { "count": 0, "links": [ { "href": "https://<hostname>/content/preview/api/v1.1/taxonomies/027396B899EE49EE975B69D739F7B867/categories/1272A38E2CBE4B97BEA9467A6F7F575E?expand=children&channelToken=93cfe6b5a62e47f599d42ccccdb6f951", "rel": "child", "method": "GET", "mediaType": "application/json" } ] }, "links": [ { "href": "https://<hostname>/content/preview/api/v1.1/taxonomies/027396B899EE49EE975B69D739F7B867/categories/1272A38E2CBE4B97BEA9467A6F7F575E?channelToken=93cfe6b5a62e47f599d42ccccdb6f951", "rel": "self", "method": "GET", "mediaType": "application/json" } ] }, { "id": "49E3876A16DC41C394A70177123942DC", "name": "car red small", "description": "car red small description", "apiName": "tes-c-c-c", "position": 0, "parent": { "id": "E9C985AFDBEF405C9B00D6831A5DFABB", "name": "car red", "apiName": "tes-c-c" }, "ancestors": [ { "id": "87A48E980CAE4861845BF0B2A348015F", "name": "car", "apiName": "tes-c" }, { "id": "E9C985AFDBEF405C9B00D6831A5DFABB", "name": "car red", "apiName": "tes-c-c" } ], "children": { "count": 1, "links": [ { "href": "https://<hostname>/content/preview/api/v1.1/taxonomies/027396B899EE49EE975B69D739F7B867/categories/49E3876A16DC41C394A70177123942DC?expand=children&channelToken=93cfe6b5a62e47f599d42ccccdb6f951", "rel": "child", "method": "GET", "mediaType": "application/json" } ] }, "links": [ { "href": "https://<hostname>/content/preview/api/v1.1/taxonomies/027396B899EE49EE975B69D739F7B867/categories/49E3876A16DC41C394A70177123942DC?channelToken=93cfe6b5a62e47f599d42ccccdb6f951", "rel": "self", "method": "GET", "mediaType": "application/json" } ] } ], "links": [ { "href": "https://<hostname>/content/preview/api/v1.1/taxonomies/027396B899EE49EE975B69D739F7B867/categories?totalResults=true&offset=4&limit=6&orderBy=name:asc&channelToken=93cfe6b5a62e47f599d42ccccdb6f951&fields=all", "rel": "self", "method": "GET", "mediaType": "application/json" }, { "href": "https://<hostname>/content/preview/api/v1.1/taxonomies/027396B899EE49EE975B69D739F7B867/categories?totalResults=true&offset=4&limit=6&orderBy=name:asc&channelToken=93cfe6b5a62e47f599d42ccccdb6f951&fields=all", "rel": "canonical", "method": "GET", "mediaType": "application/json" }, { "href": "https://<hostname>/content/preview/api/v1.1/metadata-catalog/taxonomies/027396B899EE49EE975B69D739F7B867/categories?channelToken=93cfe6b5a62e47f599d42ccccdb6f951", "rel": "describedby", "method": "GET", "mediaType": "application/schema+json" }, { "href": "https://<hostname>/content/preview/api/v1.1/taxonomies/027396B899EE49EE975B69D739F7B867/categories?totalResults=true&offset=0&limit=6&orderBy=name:asc&channelToken=93cfe6b5a62e47f599d42ccccdb6f951&fields=all", "rel": "prev", "method": "GET", "mediaType": "application/json" }, { "href": "https://<hostname>/content/preview/api/v1.1/taxonomies/027396B899EE49EE975B69D739F7B867/categories?totalResults=true&offset=10&limit=6&orderBy=name:asc&channelToken=93cfe6b5a62e47f599d42ccccdb6f951&fields=all", "rel": "next", "method": "GET", "mediaType": "application/json" }, { "href": "https://<hostname>/content/preview/api/v1.1/taxonomies/027396B899EE49EE975B69D739F7B867/categories?totalResults=true&offset=0&limit=6&orderBy=name:asc&channelToken=93cfe6b5a62e47f599d42ccccdb6f951&fields=all", "rel": "first", "method": "GET", "mediaType": "application/json" }, { "href": "https://<hostname>/content/preview/api/v1.1/taxonomies/027396B899EE49EE975B69D739F7B867/categories?totalResults=true&offset=10&limit=6&orderBy=name:asc&channelToken=93cfe6b5a62e47f5599d42ccccdb6f951&fields=all", "rel": "last", "method": "GET", "mediaType": "application/json" } ] }
Example 3:
curl -X GET -H 'Accept: application/json' 'https://host:port/content/preview/api/v1.1/taxonomies/027396B899EE49EE975B69D739F7B867/categories?q=( parent.id eq \"E9C985AFDBEF405C9B00D6831A5DFABB\" AND ( name co \"small\" OR name co \"large\"))&totalResults=true&offset=0&orderBy=name:asc&channelToken=93cfe6b5a62e47f599d42ccccdb6f951&fields=all'
This searches published taxonomy categories within a taxonomy (id: 027396B899EE49EE975B69D739F7B867) with parent id equals to E9C985AFDBEF405C9B00D6831A5DFABB and name containing small or large in a channel (channelToken:93cfe6b5a62e47f599d42ccccdb6f951).
Response Body
{ "hasMore": false, "offset": 0, "count": 2, "limit": 2, "totalResults": 2, "items": [ { "id": "BC8C5F7A1B5E45B9AE593B07EB32581C", "name": "car red large", "description": "car red large description", "apiName": "tes-c-c-c2", "position": 2, "parent": { "id": "E9C985AFDBEF405C9B00D6831A5DFABB", "name": "car red", "apiName": "tes-c-c" }, "ancestors": [ { "id": "87A48E980CAE4861845BF0B2A348015F", "name": "car", "apiName": "tes-c" }, { "id": "E9C985AFDBEF405C9B00D6831A5DFABB", "name": "car red", "apiName": "tes-c-c" } ], "children": { "count": 0, "links": [ { "href": "https://<hostname>/content/preview/api/v1.1/taxonomies/027396B899EE49EE975B69D739F7B867/categories/BC8C5F7A1B5E45B9AE593B07EB32581C?expand=children&channelToken=93cfe6b5a62e47f599d42ccccdb6f951", "rel": "child", "method": "GET", "mediaType": "application/json" } ] }, "links": [ { "href": "https://<hostname>/content/preview/api/v1.1/taxonomies/027396B899EE49EE975B69D739F7B867/categories/BC8C5F7A1B5E45B9AE593B07EB32581C?channelToken=93cfe6b5a62e47f599d42ccccdb6f951", "rel": "self", "method": "GET", "mediaType": "application/json" } ] }, { "id": "49E3876A16DC41C394A70177123942DC", "name": "car red small", "description": "car red small description", "apiName": "tes-c-c-c", "position": 0, "parent": { "id": "E9C985AFDBEF405C9B00D6831A5DFABB", "name": "car red", "apiName": "tes-c-c" }, "ancestors": [ { "id": "87A48E980CAE4861845BF0B2A348015F", "name": "car", "apiName": "tes-c" }, { "id": "E9C985AFDBEF405C9B00D6831A5DFABB", "name": "car red", "apiName": "tes-c-c" } ], "children": { "count": 1, "links": [ { "href": "https://<hostname>/content/preview/api/v1.1/taxonomies/027396B899EE49EE975B69D739F7B867/categories/49E3876A16DC41C394A70177123942DC?expand=children&channelToken=93cfe6b5a62e47f599d42ccccdb6f951", "rel": "child", "method": "GET", "mediaType": "application/json" } ] }, "links": [ { "href": "https://<hostname>/content/preview/api/v1.1/taxonomies/027396B899EE49EE975B69D739F7B867/categories/49E3876A16DC41C394A70177123942DC?channelToken=93cfe6b5a62e47f599d42ccccdb6f951", "rel": "self", "method": "GET", "mediaType": "application/json" } ] } ], "links": [ { "href": "https://<hostname>/content/preview/api/v1.1/taxonomies/027396B899EE49EE975B69D739F7B867/categories?q=( parent.id eq \"E9C985AFDBEF405C9B00D6831A5DFABB\" AND ( name co \"small\" OR name co \"large\"))&totalResults=true&offset=0&orderBy=name:asc&channelToken=93cfe6b5a62e47f599d42ccccdb6f951&fields=all", "rel": "self", "method": "GET", "mediaType": "application/json" }, { "href": "https://<hostname>/content/preview/api/v1.1/taxonomies/027396B899EE49EE975B69D739F7B867/categories?q=( parent.id eq \"E9C985AFDBEF405C9B00D6831A5DFABB\" AND ( name co \"small\" OR name co \"large\"))&totalResults=true&offset=0&orderBy=name:asc&channelToken=93cfe6b5a62e47f599d42ccccdb6f951&fields=all", "rel": "canonical", "method": "GET", "mediaType": "application/json" }, { "href": "https://<hostname>/content/preview/api/v1.1/metadata-catalog/taxonomies/027396B899EE49EE975B69D739F7B867/categories?channelToken=93cfe6b5a62e47f599d42ccccdb6f951", "rel": "describedby", "method": "GET", "mediaType": "application/schema+json" }, { "href": "https://<hostname>/content/preview/api/v1.1/taxonomies/027396B899EE49EE975B69D739F7B867/categories?q=( parent.id eq \"E9C985AFDBEF405C9B00D6831A5DFABB\" AND ( name co \"small\" OR name co \"large\"))&totalResults=true&offset=0&orderBy=name:asc&channelToken=93cfe6b5a62e47f599d42ccccdb6f951&fields=all", "rel": "first", "method": "GET", "mediaType": "application/json" }, { "href": "https://<hostname>/content/preview/api/v1.1/taxonomies/027396B899EE49EE975B69D739F7B867/categories?q=( parent.id eq \"E9C985AFDBEF405C9B00D6831A5DFABB\" AND ( name co \"small\" OR name co \"large\"))&totalResults=true&offset=0&orderBy=name:asc&channelToken=93cfe6b5a62e47f599d42ccccdb6f951&fields=all", "rel": "last", "method": "GET", "mediaType": "application/json" } ] }
Example 4:
curl -X GET -H 'Accept: application/json' 'https://host:port/content/preview/api/v1.1/taxonomies/027396B899EE49EE975B69D739F7B867/categories?orderBy=name:asc&q=( name eq \"CAR BLUE\")&channelToken=93cfe6b5a62e47f599d42ccccdb6f951&totalResults=true&offset=0'
This searches published taxonomy categories within a taxonomy (id: 027396B899EE49EE975B69D739F7B867) with name equals to CAR BLUE and ordered by name in a channel (channelToken:93cfe6b5a62e47f599d42ccccdb6f951).
Response Body
{ "hasMore": false, "offset": 0, "count": 1, "limit": 1, "totalResults": 1, "items": [ { "id": "ACC6EE7D2C474ACBA45A4FE6EC5C9981", "name": "car blue", "description": "car description", "links": [ { "href": "https://<hostname>/content/preview/api/v1.1/taxonomies/027396B899EE49EE975B69D739F7B867/categories/ACC6EE7D2C474ACBA45A4FE6EC5C9981?channelToken=93cfe6b5a62e47f599d42ccccdb6f951", "rel": "self", "method": "GET", "mediaType": "application/json" } ] } ], "links": [ { "href": "https://<hostname>/content/preview/api/v1.1/taxonomies/027396B899EE49EE975B69D739F7B867/categories?orderBy=name:asc&q=( name eq \"CAR BLUE\")&channelToken=93cfe6b5a62e47f599d42ccccdb6f951&totalResults=true&offset=0", "rel": "self", "method": "GET", "mediaType": "application/json" }, { "href": "https://<hostname>/content/preview/api/v1.1/taxonomies/027396B899EE49EE975B69D739F7B867/categories?orderBy=name:asc&q=( name eq \"CAR BLUE\")&channelToken=93cfe6b5a62e47f599d42ccccdb6f951&totalResults=true&offset=0", "rel": "canonical", "method": "GET", "mediaType": "application/json" }, { "href": "https://<hostname>/content/preview/api/v1.1/metadata-catalog/taxonomies/027396B899EE49EE975B69D739F7B867/categories?channelToken=93cfe6b5a62e47f599d42ccccdb6f951", "rel": "describedby", "method": "GET", "mediaType": "application/schema+json" }, { "href": "https://<hostname>/content/preview/api/v1.1/taxonomies/027396B899EE49EE975B69D739F7B867/categories?orderBy=name:asc&q=( name eq \"CAR BLUE\")&channelToken=93cfe6b5a62e47f599d42ccccdb6f951&totalResults=true&offset=0", "rel": "first", "method": "GET", "mediaType": "application/json" }, { "href": "https://<hostname>/content/preview/api/v1.1/taxonomies/027396B899EE49EE975B69D739F7B867/categories?orderBy=name:asc&q=( name eq \"CAR BLUE\")&channelToken=93cfe6b5a62e47f599d42ccccdb6f951&totalResults=true&offset=0", "rel": "last", "method": "GET", "mediaType": "application/json" } ] } }