Read Repository Assigned Taxonomy's category

get

/content/management/api/v1.1/repositories/{id}/assignedTaxonomies/{taxonomyId}/categories/{categoryId}

Read a category of an assigned taxonomy under a repository.

Request

Path Parameters
Query Parameters
  • This parameter is used to control the returned fields of the assigned category. This parameter accepts a comma-separated list of field names. These fields will be returned for the assigned category. All the field names are case-sensitive. Each assigned category can have these fields: id, name, description, apiName, position, isSiteCategory, parent, ancestors, allowedActions, descendantsAllowedActions. This parameter is optional. If it is not present, the default fields would be returned in the response: id, name, description, apiName, position, isSiteCategory.

    Example: ?fields=id,name,apiName,ancestors,allowedActions,descendantsAllowedActions
    This returns id, name, apiName, ancestors, allowedActions, and descendantsAllowedActions fields for the assigned category.
Back to Top

Response

Supported Media Types

200 Response

OK.
Body ()
Root Schema : AssignedCategory
Type: object
AssignedCategory
Show Source
Nested Schema : allowedActions
Type: array
The allowed actions of an assigned category. The actions can be "ASSET_CATEGORIZE" and "SITE_CREATE".
Show Source
Nested Schema : ancestors
Type: array
The ancestors of an assigned category, listing in a top-down order from the root category to the immediate parent category.
Show Source
Nested Schema : descendantsAllowedActions
Type: array
The aggregated allowed actions of the descendants of an assigned category. The actions can be "ASSET_CATEGORIZE" and "SITE_CREATE". If the category has no child, the actions would be an empty array.
Show Source
Nested Schema : CategoryAncestorBean
Type: object
Show Source

304 Response

Not modified.

400 Response

Bad request.

403 Response

Forbidden.

404 Response

Not found.

500 Response

Internal server error.
Back to Top

Examples

The following example shows how to read a category of an assigned taxonomy under a repository by submitting a GET request using cURL.

curl -X GET -H 'Accept: application/json' 'https://host:port/content/management/api/v1.1/repositories/{id}/assignedTaxonomies/{taxonomyId}/categories/{categoryId}'

Example 1:

This reads category 8A34CF67453E4BDE94505476C03B1066 of taxonomy FB8240D6DC70407F87ED111325D06F89 that is assigned to the repository 720E2B7391E64FB9A1EB5FA6DEA8F4C7.

/content/management/api/v1.1/repositories/720E2B7391E64FB9A1EB5FA6DEA8F4C7/assignedTaxonomies/FB8240D6DC70407F87ED111325D06F89/categories/8A34CF67453E4BDE94505476C03B1066?fields=id,name,description,apiName,position,isSiteCategory,parent,ancestors,allowedActions,descendantsAllowedActions

Response Body

{
  "id": "8A34CF67453E4BDE94505476C03B1066",
  "name": "IT East",
  "description": "",
  "apiName": "org-r-i",
  "position": 2,
  "isSiteCategory": false,
  "parent": {
    "id": "03C2AB780DDD442CAC90328A0CA6687E",
    "name": "Region East",
    "apiName": "org-r"
  },
  "ancestors": [
    {
      "id": "03C2AB780DDD442CAC90328A0CA6687E",
      "name": "Region East",
      "apiName": "org-r"
    }
  ],
  "allowedActions": [
    "ASSET_CATEGORIZE",
    "SITE_CREATE"
  ],
  "descendantsAllowedActions": [],
  "links": [
    {
      "href": "http://{hostname}/content/management/api/v1.1/repositories/720E2B7391E64FB9A1EB5FA6DEA8F4C7/assignedTaxonomies/FB8240D6DC70407F87ED111325D06F89/categories/8A34CF67453E4BDE94505476C03B1066?fields=id,name,description,apiName,position,isSiteCategory,parent,ancestors,allowedActions,descendantsAllowedActions",
      "rel": "self",
      "method": "GET",
      "mediaType": "application/json"
    },
    {
      "href": "http://{hostname}/content/management/api/v1.1/repositories/720E2B7391E64FB9A1EB5FA6DEA8F4C7/assignedTaxonomies/FB8240D6DC70407F87ED111325D06F89/categories/8A34CF67453E4BDE94505476C03B1066?fields=id,name,description,apiName,position,isSiteCategory,parent,ancestors,allowedActions,descendantsAllowedActions",
      "rel": "canonical",
      "method": "GET",
      "mediaType": "application/json"
    },
    {
      "href": "http://{hostname}/content/management/api/v1.1/metadata-catalog/repositories/720E2B7391E64FB9A1EB5FA6DEA8F4C7/assignedTaxonomies/FB8240D6DC70407F87ED111325D06F89/categories/8A34CF67453E4BDE94505476C03B1066",
      "rel": "describedby",
      "method": "GET",
      "mediaType": "application/json"
    }
  ]
}
Back to Top