Authentication
To interact with the SplxAI Platform API, all users, including those on free accounts, can generate a Personal Access Token for authentication.
Generating Your Personal Access Token
To learn how to obtain your personal access token, refer to the Access Token Generation section in the documentation.
Using the Personal Access Token
Once you've obtained your personal access token, include it in the X-Api-Key header of your API requests.
Example Request:
curl -L \
--request POST \
--url '/api/v2/test-run/trigger' \
--header 'X-Api-Key: YOUR_API_KEY' \ # Replace YOUR_API_KEY with your personal access token
--header 'Content-Type: application/json-patch+json' \
--data '{"targetId":1,"probeIds":[1,2,3],"name":"SplXAI Test Run"}'
Response to Unauthorized Access
If the Authorization header is not provided, or if an invalid token is used, the API will return a 401 Unauthorized error. This response indicates that authentication is required to access the requested resource.
Example Response:
{
"error": {
"message": "Unauthorized: Authentication is required to access this resource.",
"code": "UNAUTHORIZED"
}
}
Last updated