Quick Start with APIs
This document outlines the steps required to gain access to the Enterprise API and obtain an access token.
Quick Start
- Authentication: Make a call to get either an access (bearer) token or a refresh token.
- API Calls: Use the token from step 1 to initiate your API calls.
To make this easy, we've provided a library of queries and mutations within this portal. Here's what you need to do:
- Find the query you want to run in the documentation.
- Configure it using your Client ID and the bearer/refresh token (you'll get this from the authentication call).
- Start making your API calls. You can use the code editor tabs to generate code snippets in many languages once you've made your API calls.
APIs
We use GraphQL for our Search and Management APIs, so you can customize how much data you get with each call. We use REST for our Ingestion API, so you can upload, modify, and delete content using the Ingestion API. You can find our Swagger documentation here.
Obtaining an Access Token
Calling the Auth Endpoint
To call the auth API with the correct client credentials and obtain an access token, use the following CURL command. This token needs to be refreshed every 24 hours:
curl --location --request POST 'https://{CLIENT_DOMAIN}/auth' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=password' \
--data-urlencode 'username={USERNAME}' \
--data-urlencode 'password={PASSWORD}' \
--data-urlencode 'client_id=as-api-{CLIENT_NAME}' \
--data-urlencode 'client_secret={CLIENT_SECRET}'
Ensure to replace placeholders like USERNAME, PASSWORD, CLIENT_NAME, and CLIENT_SECRET with
the actual values.