๐Ÿš€Quick Start

In order to make your first request, you must follow the steps below:

Creating an Account

Firstly, you need to open an account on Perculus. If you have an account, you can skip this step.

We will name the โ€˜Account Titleโ€™ field in your account settings as a domain in the document, and it is essential to note this field as we will use it when sending requests.

Creating API User

To use the Perculus API, you need to create an API user. You can follow the steps below for this process;

  1. Login to your Perculus account from here

  1. After logging in, click on the โ€˜New Userโ€™ button in the โ€˜Usersโ€™ section to open the new user creation screen.

At this stage, we will use the information you will write in the email and password fields in the user creation form when sending requests to the API. Therefore, remember that this user should not be deleted.

Authorization

Before sending our request to the API, we need to get an ACCESS_TOKEN for our previously created API user.

To get ACCESS_TOKEN, you must attach ACCOUNT_ID data in the request.

For ACCOUNT_ID data, you can contact your customer success manager and get the โ€˜ACCOUNT_IDโ€™ belonging to your account.

You can see a sample CURL structure with the parameters you need to get ACCESS_TOKEN below:

  • DOMAIN: The data in the โ€˜Account Titleโ€™ field above

  • EMAIL: The email address of the user we created for the API

  • PASSWORD: The password of the user we created for the API

  • ACCOUNT_ID

curl --location 'https://<DOMAIN>/connect/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'username=<EMAIL>' \
--data-urlencode 'password=<PASSWORD>' \
--data-urlencode 'client_id=api' \
--data-urlencode 'grant_type=password' \
--data-urlencode 'account_id=<ACCOUNT_ID>'

You will get a response like the one below if you set your parameters correctly.

{
    "access_token": "<ACCESS_TOKEN>",
    "expires_in": 36000,
    "token_type": "Bearer",
    "scope": "api"
}

The ACCESS_TOKEN will be required for all future services. Therefore, remember to keep your ACCESS_TOKEN in a safe place.

First Request ๐Ÿš€

We have outlined all the steps necessary to make your first request to PerculusAPI above. You are now ready to make your first request.

We will use the CURL method to make a request. We will illustrate this with the /session endpoint where you can list all your sessions on the system.

Requirements

  • Domain

  • Access Token

For our example service, session list, you can now see the CURL structure:

curl --location 'https://<DOMAIN>/xapi/session' \
--header 'Authorization: Bearer <ACCESS_TOKEN>'

You can list all your sessions in the response when you send the sample request above.

It's that easy to send requests in Perculus. ๐Ÿš€

Last updated