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 SnapLogic control plane host: elastic.snaplogic.com (US) or emea.snaplogic.com (EU).

Authentication

The SnapLogic Platform authenticates API calls with basic authentication over HTTPS. Future updates might include additional authentication methods. If your account is locked or your password is expired, you cannot invoke SnapLogic Public APIs.Learn more about the basic authentication header in REST API requests.

You can run these APIs regardless of the privileges or user roles assigned to you in your Environment/Org. Access to the information returned by these APIs is based on asset permissions, which are set in SnapLogic Manager.

If your account is locked or your password is expired, you cannot invoke SnapLogic Public APIs.

Attention: The response to account APIs includes some encrypted fields. Access to these files requires a private key, which is securely stored in the SnapLogic Cloud for standard encrypted Orgs and in customer environments for enhanced encrypted Orgs. Access to these keys is not easy unless the system is compromised. Therefore, including this information in the responses poses no security risk. If you remove these fields, unexpected issues can occur because of legacy code dependencies.

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:

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.

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.
    1. Export the pipeline to view its metadata. The .slp file generated by the export is a JSON-formatted file.
    2. In the JSON tree, under snap_map, go to the branch for the Snap that uses the modified Account.
      Tip: Under snap_map, the keys are the Snap asset IDs. Use the Snap's class_fqid and class_id to help you find the appropriate Snap.
    3. Under the appropriate Snap's branch, the account's asset ID is the value of property_map.account.account_ref.value.ref_id.value.
  • You can also access these APIs using the REST Get Snap with a Basic Auth account configured to access SnapLogic.