Getting Started
This page describes how to get started with the Intelligence API in a simple way using Postman.
Prerequisites
- You need to have a team in Celonis EMS.
- You need to have a Knowledge Model available in your team.
- You must request the activation of the API in your EMS Team to the account team.
Before starting
Determine the URL for your team
First you need to determine what is the URL for your team and cluster.
-
The base URL for the Celonis API is
https://<team>.<cluster>.celonis.cloud/intelligence/api
To find the team and the cluster, please check the URL you use to access the Celonis EMS and retrieve the team and cluster from it.
For example, the base URL for dev team in US-2 cluster would be:
https://dev.us-2.celonis.cloud/intelligence/api
Install a REST client
Since the Intelligence API is a REST API, you will need to have a way to interact with it. There are multiple ways to do this, but to make things simple, we will use Postman, which is a very popular free REST client.
If you already have a REST client, you can ignore this section.
Otherwise, go to the Postman Download page and download it for your Operating System. Once it's downloaded, install it.
Once installed, it should look like something like this:
To start using it, create an account or click on "Skip and go to the app".
Authentication
Each request to the API must be authenticated with a Celonis EMS API key. There are two ways of doing this:
Using a User API key.
You can find out how to create an user API key by following our User API Keys guide.
The Celonis API uses Bearer Token Authentication for verifying consumer access. The credentials must be sent in an Authorization header in the HTTP request. Credentials sent in the URL or body of the request will be ignored.
To authenticate using Bearer Token Authentication:
-
Create the token in the EMS:
MDg5MGVkNDktNjMwZC00ODdiLTkyNGItMjNmMzMxNjRmM2IwOkhNUVRMUis4SGh6NHhBY21Vck9GaWdkem5rYzBrb3p0N056WUM0bGlqczMM
-
Include the string in the HTTP Authorization header formatted like this:
Authorization: Bearer MDg5MGVkNDktNjMwZC00ODdiLTkyNGItMjNmMzMxNjRmM2IwOkhNUVRMUis4SGh6NHhBY21Vck9GaWdkem5rYzBrb3p0N056WUM0bGlqczMM
Using an Application API key (user independent one).
You can find out how to create an AppKey by following our Application API Keys guide.
To authenticate using AppKey Authentication:
-
Create the AppKey in the EMS:
MzgyZDEzYjItNjI1MS00NTIwLTk1YTItY2ZjYzMzZTllOTNmOkE3a1dvYnpYQ0c3aUtUdTNRNC9UNzFLUXZmY0E2ZjVXUUROajFoN1R5UzIr
-
Include the string in the HTTP Authorization header formatted like this:
Authorization: AppKey MzgyZDEzYjItNjI1MS00NTIwLTk1YTItY2ZjYzMzZTllOTNmOkE3a1dvYnpYQ0c3aUtUdTNRNC9UNzFLUXZmY0E2ZjVXUUROajFoN1R5UzIr
IMPORTANT: For production solutions, we strongly recommend using Application keys instead of User API keys. User API keys should be used for testing purposes only.
Authorization
You must set the right permissions and ensure the User API Key or the Application API Key leveraged for authorization purposes has access to the Celonis EMS Studio package containing the Knowledge Model(s) you would like to access through Intelligence APIs.
You can grant access permissions by following these steps:
- Go to the Studio package.
-
Click on the three dots and select
Permissions
from the pop-up menu. -
Search for the User (in case you are using a
Bearer token
) or AppKey (in case you are using an
AppKey
) and grant at least
USE PACKAGE
rights.
Consuming the Intelligence API
Once we have completed the previous steps, we can start making requests to the API. For that we will use Postman (or any other REST client), which we should already have installed in our system.
- Go to File > New... and select HTTP Request. Once you do this, you should see something like this:
- Enter the request URL next to the Send button. For this URL we will use the one we got from the "Determine the URL for your team" section. In our example, the URL was https://dev.us-2.celonis.cloud/intelligence/api .
- Now we need to set our API or Application Key in order to authenticate our requests. To do this, click on the "Headers" tab beneath the URL we just entered. In key, type "Authorization" and for value, put:
-
Bearer <YOUR_KEY>
if you have a User API Key -
AppKey <YOUR_KEY>
if you have a AppKey
In the following example, we have an AppKey:
Getting the list of Knowledge Models
Once we have completed the steps above, we should now be able to start getting some data. We will start getting the full list of Knowledge Models that our API token has access to.
First, start appending "/knowledge-models" to the URL we got from previous steps: https://dev.us-2.celonis.cloud/intelligence/api/knowledge-models.
After that, click on the "Send" button next to the URL. You should get something like this:
Inside the content section, you will see a list of all your Knowledge Models. The Knowledge Models will be divided in pages. By default, the page size will be 50. If you happen to have more than 50 Knowledge Models, you can navigate to the following page, adding a "page" query parameter. The pages start at 0, so you can display the second page by setting a page value of 1.
In our example, this is not needed, as we only have 13 Knowledge Models. However, you might want to specify other query parameters like:
- pageSize: Sets the size of each page.
- sort: Sort the results by id or name.
You can check the full list of parameters and possible responses you can get in this page.
You can also check the full list of possible errors you can get in the API, in case you need to troubleshoot any issue.
In this quick guide, we managed to create our first request to Intelligence API. If you would like to do more advanced
requests, we recommend you to check the
full list of capabilities of our API or take a look at
this other guide that walks you through the rest of schema endpoints.