User Community Service Desk Downloads

API Authentication

The REST API is currently in Early Access Preview. The API specification and endpoints might change before being marked as stable.

We recommend testing thoroughly and being prepared to adapt to potential changes in future releases.

The Ataccama ONE REST API uses OAuth 2.0 Bearer token authentication to secure API requests. All API endpoints require a valid access token to be included in the request headers.

Before you start

Ensure you have admin access to the Ataccama Cloud Portal administration interface.

Create an API client

The client secret is displayed only once during creation. Copy and securely store the client ID and client secret immediately.

If you lose the client secret, you need to create a new API client.

To create an API client:

  1. Log in to the Ataccama Cloud Portal.

  2. Go to your environment.

  3. Go to the Settings tab.

  4. Locate the API Clients section.

    API Clients Section
  5. Select Create API Client.

    Create API Client
  6. Provide a name for your API client.

  7. Select Create.

  8. Copy and securely store the generated credentials.

    Client Credentials

Obtain an access token

After creating your API client, use the OAuth 2.0 Client Credentials flow to obtain an access token.

Token request

Send a POST request to the token endpoint with your client credentials:

POST https://{your-environment}.ataccama.one/auth/realms/{realm}/protocol/openid-connect/token
Content-Type: application/x-www-form-urlencoded

grant_type=client_credentials
&client_id={your-client-id}
&client_secret={your-client-secret}
Parameter Description

your-environment

Domain as stated in the Cloud Portal.

realm

Tenant name as stated in the Cloud Portal.

your-client-id

The client ID from your API client.

your-client-secret

The client secret from your API client.

Token response

The token endpoint returns a JSON response containing the access token:

{
  "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
  "expires_in": 300,
  "token_type": "Bearer",
  ...
}
Field Description

access_token

The JWT bearer token for API requests.

expires_in

Token expiration time in seconds.

token_type

Always Bearer for this authentication method.

Use the access token

Include the access token in the Authorization header of your API requests using the Bearer authentication scheme:

GET https://{your-environment}.ataccama.one/api/reference-data/v1/tables
Authorization: Bearer {access_token}

Token expiration and renewal

Access tokens expire after the time specified in the expires_in field. When a token expires, you will receive a 401 Unauthorized response.

To continue making API requests, obtain a new access token by repeating the token request.

Implement token refresh logic in your application to automatically obtain a new token before the current one expires. This ensures uninterrupted API access.

Best practices

  • Secure storage: Store client credentials securely using environment variables, secrets management systems, or secure configuration files. Never commit credentials to version control.

  • Token reuse: Reuse access tokens until they expire rather than requesting a new token for each API call.

  • Error handling: Implement proper error handling for authentication failures and token expiration.

  • Least privilege: Use API clients with only the necessary permissions for your use case.

Example: Complete authentication flow

Here’s a complete example using cURL to authenticate and make an API request:

Obtain an access token
curl -X POST "https://{your-environment}.ataccama.one/auth/realms/{your-realm}/protocol/openid-connect/token" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "grant_type=client_credentials" \
  -d "client_id={your-client-id}" \
  -d "client_secret={your-client-secret}"
Use the token in an API request
curl -X GET "https://{your-environment}.ataccama.one/api/reference-data/v1/tables" \
  -H "Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..."

Troubleshooting

401 Unauthorized error

If you receive a 401 Unauthorized error, verify the following:

  • The access token is valid and has not expired.

  • The Authorization header is properly formatted with the Bearer prefix.

  • Your API client has the necessary permissions.

Invalid client credentials

If token requests fail with "invalid client credentials," verify:

  • The client ID and client secret are correct.

  • The API client exists and is enabled.

  • The realm identifier in the token URL matches your environment.

  • There are no copy/paste errors or trailing spaces.

Token endpoint URL

Make sure to use the correct token endpoint URL for your environment. The URL format is:

https://{your-environment}.ataccama.one/auth/realms/{realm}/protocol/openid-connect/token

You can find your environment identifier in the Cloud Portal URL when logged in to your environment.

Was this page useful?