Links

API Documentation

Authentication

Aviator uses basic key based authentication. You can view and manage your API key in the Aviator dashboard. We only support a single API token. Once a token is generated, you can reset it to invalidate your existing token and create a new one.
API keys that are used to fetch Aviator analytics are currently read-only, but in the future these may be used for other purposes. Please make sure to keep them secure.
Authentication to the API is performed via HTTP Basic Auth. Provide your API key as the bearer token:
curl -H "Authorization: Bearer <aviator_token>"
-H "Content-Type: application/json"
https://api.aviator.co/api/v1/...

GraphQL API (Beta)

The GraphQL API (which is currently in beta) can be accessed at https://api.aviator.co/graphql. Authorization is required as described above.
An interactive GraphQL playground is also available which uses your current login credentials.
The GraphQL API is documented as part of the GraphQL schema. For more information on GraphQL, see the official GraphQL guide.

REST API

Repository

post
https://api.aviator.co/api/v1
/repo
Pause / unpause the merging of PRs on a repository.

Branches

post
https://api.aviator.co/api/v1
/branches
Pause / unpause the merging of PRs for specific base branches.
get
https://api.aviator.co/api/v1
/branches
Get base branches and their statuses (paused / unpaused)

PullRequest

post
https://api.aviator.co/api/v1
/pull_request
Queue or Dequeue a Pull Request
post
https://api.aviator.co/api/v1
/pull_request/backport
Request to backport a PR on the specified target branch.
get
https://api.aviator.co/api/v1
/pull_request
Fetch information of a PR based on the branch name or number
get
https://api.aviator.co/api/v1/
pull_request/queued
Fetch information of PRs that are in the queued state

BotPullRequest

get
https://api.aviator.co/api/v1
/bot_pull_request
Fetch information of PRs associated with a provided Bot PullRequest

Config

get
https://api.aviator.co/api/v1
/config
Fetch the current YAML config associated with the given GitHub repository.

post
https://api.aviator.co/api/v1
/config
Change the YAML config associated with the given GitHub repository.

Config Change

get
https://api.aviator.co/api/v1
/config/history
Fetch the history of config changes associated with a given repository.
The modified_by property contains email and gh_username. If the config was modified from the Dashboard, email of the user would be present, and if the config was modified from the GitHub repo change, a gh_username would be present. commit_sha property may also be only present if the change was made from the GitHub repository.

Analytics

get
https://api.aviator.co/api
/v1/analytics
Get list of analytics objects representing statistics on a daily basis.

Queue

get
https://api.aviator.co/api
/v1/queue/stats
Get live statistics about the state of the merge queue