Retrieve custom metadata values

GET https://{controlplane_path}/api/2/{env_id}/public/catalog/custom-metadata?{uid}
Retrieve all custom metadata values for an Asset catalog task record.

Prerequisites

  • Environment (Org) admin permissions

Path parameters

Parameter Description Required
env_id The environment ID, which is available from the Environment details field in Admin Manager. Yes

Query parameters

Parameter Description Required
uid The task ID in the form of path/task_name, where the path includes environment-name, project-space, and project-name. For example, MY-ENV/projects/My-project/My-task. Yes
sort One of: ASC to sort the values in ascending order or DESC to sort in descending order. No
column A custom column name to restrict results. The API match is case-insensitive and includes substrings. For example, NewKey matches newkey, newkeyy, and myNewkey1. No

Response

A successful response includes a Code 200 OK and the values:

{
 "customField1": "value",
 "customField2": "value",
 "customField3": "value"
}

Example

To use the following curl example:
  • In the URI, replace 555d444c777d99e22e9b9e99 with your environment ID.
  • Replace the query uid parameter MY-ENV/projects/My-project/My-task with the path to your task. Encode the slashes in the query parameter path.
  • Optionally sort the results by adding sort=ASC or sort=DESC

curl -X 'GET' \
          'http://elastic.snaplogic.com/api/2/555d444c777d99e22e9b9e99/public/catalog/custom-metadata?uid=MY-DEV%2Fprojects%2FMy-project%2My-task&sort=ASC'
          \ -H 'accept: */*'

The successful response includes all custom fields and their values sorted A-Z:

{
  "NewKey": "123",
  "my_custom_id": "null",
  "my_custom_col": "my_custom_val"
}