Authentication is an essential part of integrating your applications using APIs. It’s a means of verifying the established connection between two APIs. The SuperOps.ai’s GraphQL API uses token-based authentication to verify this connection.
In this method, a user can generate a unique API token that they can use to authenticate their API requests. Once the API token has been authenticated, their access permissions and restrictions will apply in SuperOps.ai.
Generating the API token in SuperOps.ai
Click the settings icon on the pane to the left and select your name under the My Profile section.
Once you’ve opened up your profile, select the API token tab.
Click the generate token button to generate a unique API token for your profile. You can find an example of what the generated API token will look like in the image below.
4. You can copy this API token to authenticate your connection, or click the regenerate button to create a new API token if things have changed.
A user can have only one API token at any given time.
While authorizing the API, you need to include the API authentication token as the authorization header.
Authorization: Bearer <token>
Keep in mind to specify the customer subdomain to help identify the client. The customer subdomain should be specified in the HTTP header ‘CustomerSubDomain.’
You can find your customer subdomain by navigating to Settings > MSP Information under My MSP.
There is a limit on the number of API requests that can be made for each subscription plan. Here’s the API request limit for each plan in SuperOps.ai:
The Grow plan: 500 requests per minute
The Ultra plan: 800 requests per minute
Things to keep in mind
While configuring the date and time format for your API requests, ensure that the date and time in the request is in the UTC timezone, with the ISO date format. For example, if the request is being made on the 10th of April 2022 at 10:15:30, the date would be ‘2022-04-10’ and the datetime would be '2022-04-10T10:15:30'.
When the value of a single or multi-valued attribute is empty, it’s represented by ‘null’. The null value can be added as input against any attribute to reset the value of that attribute to empty.