Retrieve custom metadata values

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

Prerequisites

  • Environment (Org) admin permissions

Path parameters

Parameter Description Required
controlplane_path The path to the SnapLogic control plane: elastic.snaplogic.com
For the UAT or EMEA control plane, substitute the name for elastic. For example:
  • uat.elastic.snaplogic.com
  • emea.snaplogic.com
Yes
env_org The name of the SnapLogic Environment/Org. 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

Request header

In the request header, specify Basic for authorization, add your credentials (Login and password of your SnapLogic user or service account), and specify application/json for content type. For more details on accounts refer to Manage accounts.


Authorization: Basic {base64_encoded <email>:<password>}
Content-Type: application/json
          

Example of Basic authentication using Postman

When using JWT authentication, the API requests includes specific headers. In the request header, specify Bearer Token for authorization, add the token, and specify application/json for content type. These headers are automatically added when you configure bearer token authentication in your API client. The authorization header contains the word Bearer followed by a space and your JWT token.


Authorization: Bearer Token {token}
Content-Type: application/json
          

Example of JWT authenthication using Postman

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 DEV with your environment name.
  • 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/1/rest/public/catalog/DEV/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"
}