Public APIs
SnapLogic public APIs provide programmatic management for environment and integration assets. Use of the SnapLogic public APIs doesn't count against the environment limit for calling pipelines with the Cloud URL. SnapLogic public APIs time out after 15 minutes. You can change this timeout on the client-side network, but it remains 15 minutes in the SnapLogic Platform.
Limitations
- Locked accounts or accounts with expired passwords won't work for basic authentication.
- SnapLogic service accounts can't be used for authentication for any of the SnapLogic Git operation APIs.
Base URL
The base URL of SnapLogic APIs includes the path to the control plane that hosts your environment:
https://{controlplane_path}
| Key | Description |
|---|---|
controlplane_path |
Required. The path to the SnapLogic control plane:
elastic.snaplogic.com
For the UAT or EMEA control plane, substitute the name for elastic. For
example:
|
Authentication
The SnapLogic Platform authenticates public API calls with a SnapLogic username and password (basic) or JSON Web Tokens (JWTs).
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:
Required permissions
Some APIs require the caller to have administrative permission. Others, such as those that operate on tasks and runtime APIs, require read or write access to the project that contains the assets. Environment admins and project owners set project-level permissions in Project Manager. The creator of an asset has full access to that asset. The following table shows the mapping between permissions defined in Project Manager and API permissions. Each API documentation page specifies the permission required to call the API.
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:
The timeout for the Public APIs is set to 15 minutes. You can change this timeout on the client-side network, but it remains 15 minutes in the SnapLogic Platform.
Some APIs require the caller to have administrative permission. Others, such as task and runtime APIs, require read or write access to the assets. Environment admins set project-level permissions in Project Manager. The creator of an asset has full access to that asset. The following table shows the mapping between permissions defined in project manager and API permissions. Each API documentation page specifies the permission required to call the API.
| Manager Permissions | API Permissions |
|---|---|
| Full Access | ["R", "W", "X"] |
| Read & Execute | ["R", "X"] |
| Read & Write | ["R", "W"] |
| Read Only | ["R"] |
Account IDs
- If an API requires a reference to an account asset, refer to the account instance by its asset
ID, instead of its label. You can find the asset ID of an account instance from the pipeline's
metadata.
- Export the pipeline to view its metadata. The
.slpfile generated by the export is a JSON-formatted file. - In the JSON tree, under
snap_map, go to the branch for the Snap that uses the modified Account.Tip: Undersnap_map, the keys are the Snap asset IDs. Use the Snap'sclass_fqidandclass_idto help you find the appropriate Snap. - Under the appropriate Snap's branch, the account's asset ID is the value of
property_map.account.account_ref.value.ref_id.value.
- Export the pipeline to view its metadata. The
- You can also access these APIs using the REST Get Snap with a Basic Auth account configured to access SnapLogic.