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:
|
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
Basic authentication
To use basic authentication, specify Basic for authorization in the request
header, add your credentials (email and password for your SnapLogic user or service account), and
specify application/json for content type. For example:
Authorization: Basic {base64_encoded <email>:<password>}
Content-Type: application/json
Example of basic authentication using Postman:
Learn more about the basic authentication header in REST API requests.
JWT authentication
When using JWT authentication, the API request 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.
Authorization: Bearer Token {token}
Content-Type: application/json
Example of JWT authentication using Postman:
Response
A successful response includes a Code 200 OK and the values:
{
"customField1": "value",
"customField2": "value",
"customField3": "value"
}
Example
curl example: - In the URI, replace DEV with your environment name.
- Replace the query
uidparameter 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=ASCorsort=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"
}