CircleCI REST API
The CircleCI API is a RESTful, fully-featured API that allows you to do almost anything in CircleCI. You can access all information and trigger all actions.…
Developer tools#openapi#developer-tools
Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.
Overview
The CircleCI API is a RESTful, fully-featured API that allows you to do almost anything in CircleCI.
You can access all information and trigger all actions.
The only thing we don’t provide access to is billing functions, which must be done from the CircleCI web UI.
Endpoints 22
- GETGET /me
/meProvides information about the signed in user. - GETGET /project/{username}/{project}
/project/:username/:project?limit=30&offset=0&filter=completedBuild summary for each of the last 30 builds for a single git repo. - POSTPOST /project/{username}/{project}
/project/:username/:projectTriggers a new build, returns a summary of the build. - DELETEDELETE /project/{username}/{project}/build-cache
/project/:username/:project/build-cacheClears the cache for a project. - GETGET /project/{username}/{project}/checkout-key
/project/:username/:project/checkout-keyLists checkout keys. - POSTPOST /project/{username}/{project}/checkout-key
/project/:username/:project/checkout-keyCreates a new checkout key. Only usable with a user API token. - GETGET /project/{username}/{project}/checkout-key/{fingerprint}
/project/:username/:project/checkout-key/:fingerprintGet a checkout key. - DELETEDELETE /project/{username}/{project}/checkout-key/{fingerprint}
/project/:username/:project/checkout-key/:fingerprintDelete a checkout key. - GETGET /project/{username}/{project}/envvar
/project/:username/:project/envvarLists the environment variables for :project - POSTPOST /project/{username}/{project}/envvar
/project/:username/:project/envvarCreates a new environment variable - GETGET /project/{username}/{project}/envvar/{name}
/project/:username/:project/envvar/:nameGets the hidden value of environment variable :name - DELETEDELETE /project/{username}/{project}/envvar/{name}
/project/:username/:project/envvar/:nameDeletes the environment variable named ':name' - POSTPOST /project/{username}/{project}/ssh-key
/project/:username/:project/ssh-keyCreate an ssh key used to access external systems that require SSH key-based authentication - POSTPOST /project/{username}/{project}/tree/{branch}
/project/:username/:project/tree/:branchTriggers a new build, returns a summary of the build. Optional build parameters can be set using an experimental API. Note: For more about build parameters,… - GETGET /project/{username}/{project}/{build_num}
/project/:username/:project/:build_numFull details for a single build. The response includes all of the fields from the build summary. This is also the payload for the notification webhooks, in… - GETGET /project/{username}/{project}/{build_num}/artifacts
/project/:username/:project/:build_num/artifactsList the artifacts produced by a given build. - POSTPOST /project/{username}/{project}/{build_num}/cancel
/project/:username/:project/:build_num/cancelCancels the build, returns a summary of the build. - POSTPOST /project/{username}/{project}/{build_num}/retry
/project/:username/:project/:build_num/retryRetries the build, returns a summary of the new build. - GETGET /project/{username}/{project}/{build_num}/tests
/project/:username/:project/:build_num/testsProvides test metadata for a build Note: Learn how to set up your builds to collect test metadata - GETGET /projects
/projectsList of all the projects you're following on CircleCI, with build information organized by branch. - GETGET /recent-builds
/recent-builds?limit=30&offset=0Build summary for each of the last 30 recent builds, ordered by build_num. - POSTPOST /user/heroku-key
/user/heroku-keyAdds your Heroku API key to CircleCI, takes apikey as form param name.
API details
- Base URL
https://circleci.com/api/v1- Authentication
- An API key in the circle-token query parameter
- Operations
- 22 operations on 17 pathsGET 11POST 8DELETE 3
- Response formats
application/json- Description format
- OpenAPI 3.0.0, API version
v1 - Links
- OpenAPI document
- Listed from
- APIs.guru OpenAPI Directory (CC0-1.0)
Source updated
How to test the CircleCI REST API in Swastik Codes
- Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
- Fork it into your workspaceChoose a workspace. You get your own copy of the CircleCI REST API collection, without the publisher's secrets.
- Add your credentialsThis API uses an API key in the circle-token query parameter. Add yours in the collection's variables or an environment; the requests already reference it.
- Send a requestPick an endpoint, for example “GET /me” (GET /me), and press Send. Check the response, add tests and run the whole collection with the runner.
Frequently asked questions
What is the CircleCI REST API?
The CircleCI API is a RESTful, fully-featured API that allows you to do almost anything in CircleCI. You can access all information and trigger all actions.… It is listed under Developer tools and has 22 endpoints.
Who publishes the CircleCI REST API?
It is listed from CircleCI's public API description (an OpenAPI document), not published by CircleCI on Swastik Codes. Anyone who controls circleci.com can claim the profile by adding a DNS TXT record.
What is the base URL of the CircleCI REST API?
Requests go to https://circleci.com/api/v1. Endpoint paths are added to this base URL.
How do I authenticate with the CircleCI REST API?
With an API key in the circle-token query parameter.
How many endpoints does the CircleCI REST API have?
22 operations on 17 paths (11 GET, 8 POST, 3 DELETE).
Is forking the CircleCI REST API free?
Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.