Access Metadata
You can use the GET method to retrieve metadata about REST API resources using the Catalog resource. Each REST API resource's metadata contains a comprehensive description, including the object resource URIs, attributes, supported actions, child resources, and supported mediatypes.
Retrieving Metadata for a Specific Resource
Perform the GET operation on the resource using the following request URL syntax:
https://<REST_API_HOST>/<api category>/api/<version>/metadata-catalog/<resource>
Let's say you want to get the metadata for the content resource. Perform the GET operation using the following request URL:
https://<IM_REST_API_HOST>/km/api/latest/metadata-catalog/content
You can also use this cURL command to complete the operation:
curl -X GET https://site.example.com/km/api/latest/metadata-catalog/content -H 'Accept: application/json' -H 'kmauthtoken: {"localeId":"en_US","siteName":"site_name","userToken":"user_token_value"}'
Retrieving Metadata for All Resources
To access the metadata for all resources, perform the GET operation using the following request URL syntax:
https://<REST_API_HOST>/<api category>/api/<version>/metadata-catalog
Let's say you want to get the metadata for all km resources. Perform the GET operation using the following URL:
https://<IM_REST_API_HOST>/km/api/latest/metadata-catalog
You can also use this cURL command to complete the operation:
curl -X GET https://site.example.com/km/api/latest/metadata-catalog -H 'Accept: application/json' -H 'kmauthtoken: {"localeId":"en_US","siteName":"site_name","userToken":"user_token_value"}'