Retrieve details of accounts
GET https://{controlplane_path}api/1/rest/public/catalog/{env_org}/accounts Retrieves list of accounts in the environment.
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 |
|---|---|---|
page |
An integer specifying the page of results to return (zero-based). Default is 0. | No |
size |
An integer specifying the number of items per page. Default is 50. | No |
name |
A string to search and filter accounts by name. | No |
sort_property |
A string specifying the field name to sort by (for example, name, created_at, updated_at). |
No |
sort_direction |
A string specifying the sort direction: ASC (ascending) or DESC (descending). |
No |
pipeline_id |
A string specifying the pipeline asset ID to filter accounts. Returns only accounts used in the specified pipeline. Note: This is the pipeline's asset ID (the pipeline_id field from the pipeline list response), not the snode ID. |
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
Code 200 OK where: list: The list of accounts.page: The current page of results.content: Each JSON object contains the account.
{
"size": 0,
"page": 0,
"total_pages": 0,
"total_elements": 0,
"sync_status": "",
"table_last_upd_time": "",
"content": [
{
"id": "json1"
},
{
"id": "json2"
},
{
"id": "json3"
}
]
}
Example 1: Basic request
Assuming a request for a development environment:
https://elastic.snaplogicdev.com/api/1/rest/public/catalog/DEV/accounts
{
"size": 2,
"page": 0,
"total_pages": 6,
"total_elements": 112,
"sync_status": "finished",
"table_last_upd_time": "1970-01-01T00:00:00.000Z",
"content": [
{
"id": "70042634-8dbf-4655-8ec0-c1d10a1cbc54_1",
"name": "Azure Synapse Acc",
"path": "shared",
"class_label": "Azure Synapse SQL Account",
"created_by": "[email protected]",
"updated_at": "2024-06-10T15:10:52.791Z",
"created_at": "2024-06-10T15:10:52.791Z",
"pipelines_count": 11
},
{
"id": "77cdc516-5026-412c-8753-8d7ef4767c62_2",
"name": "Azure Synapse Acc2",
"path": "shared",
"class_label": "Azure Synapse SQL Account",
"created_by": "[email protected]",
"updated_at": "2024-06-20T22:35:36.428Z",
"created_at": "2024-06-20T22:35:36.428Z",
"pipelines_count": 0
}
]
}
Example 2: With pagination and search
Request with pagination (page 1, 25 items per page) and name search in a development environment:
https://elastic.snaplogicdev.com/api/1/rest/public/catalog/DEV/accounts?page=1&size=25&name=Azure
Example 3: With sorting
Request sorted by updated date (descending) in a development environment:
https://elastic.snaplogicdev.com/api/1/rest/public/catalog/DEV/accounts?sort_property=updated_at&sort_direction=DESC
Example 4: Filter by pipeline
Request to retrieve all accounts used in a specific pipeline in a development environment:
https://elastic.snaplogicdev.com/api/1/rest/public/catalog/DEV/accounts?pipeline_id=a1b2c3d4-e5f6-7890-abcd-ef1234567890