Authentication
The PullRule API uses [Bearer tokens] to authenticate requests. Go to Settings > Administration > API to view and manage your API keys. Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth. If you believe your API key has been compromised, you should revoke it immediately. All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.Responses
The PullRule API will always respond with a HTTP status code. The code informs you about the outcome of the API call. The API can return the following HTTP status codes:
After reading the HTTP status code, you can determine if the request body should be parsed. The body is in JSON format.
Most non-success error codes provide extra details in the body. Make sure to process this body, because they will
provide valuable information while debugging your application.
Pagination
Most API endpoints return a paginated list of resources. The default page size is 20 items, and you can specify thepage[size] query parameter to change the page size. The maximum page size is 100 items.
The API uses cursor-based pagination. The response will include a links object with next and prev links to navigate
through the pages. The next link will be null if there are no more pages.
Rate Limiting
The PullRule API uses rate limiting to ensure fair usage and prevent abuse. The default rate limit is 60 requests per minute per authenticated request. If you exceed the rate limit, you will receive a429 Too Many Requests response with a
Retry-After header indicating when you can retry the request.
