{"files":{"SKILL.md":"---\nname: circleci-rest-api\ndescription: \"CircleCI REST API skill. Use when working with CircleCI REST for me, projects, project. Covers 22 endpoints.\"\nversion: 1.0.0\ngenerator: lapsh\n---\n\n# CircleCI REST API\nAPI version: v1\n\n## Auth\nApiKey circle-token in query\n\n## Base URL\nhttps://circleci.com/api/v1\n\n## Setup\n1. Set your API key in the appropriate header\n2. GET /me -- provides information about the signed in user.\n3. POST /project/{username}/{project} -- create first project\n\n## Endpoints\n22 endpoints across 5 groups. See references/api-spec.lap for full details.\n\n### Me\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /me | Provides information about the signed in user. |\n\n### Projects\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /projects | List of all the projects you're following on CircleCI, with build information organized by branch. |\n\n### Project\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /project/{username}/{project} | Build summary for each of the last 30 builds for a single git repo. |\n| POST | /project/{username}/{project} | Triggers a new build, returns a summary of the build. |\n| GET | /project/{username}/{project}/{build_num} | Full details for a single build. The response includes all of the fields from the build summary. |\n| GET | /project/{username}/{project}/{build_num}/artifacts | List the artifacts produced by a given build. |\n| POST | /project/{username}/{project}/{build_num}/retry | Retries the build, returns a summary of the new build. |\n| POST | /project/{username}/{project}/{build_num}/cancel | Cancels the build, returns a summary of the build. |\n| GET | /project/{username}/{project}/{build_num}/tests | Provides test metadata for a build |\n| POST | /project/{username}/{project}/tree/{branch} | Triggers a new build, returns a summary of the build. |\n| POST | /project/{username}/{project}/ssh-key | Create an ssh key used to access external systems that require SSH key-based authentication |\n| GET | /project/{username}/{project}/checkout-key | Lists checkout keys. |\n| POST | /project/{username}/{project}/checkout-key | Creates a new checkout key. |\n| GET | /project/{username}/{project}/checkout-key/{fingerprint} | Get a checkout key. |\n| DELETE | /project/{username}/{project}/checkout-key/{fingerprint} | Delete a checkout key. |\n| DELETE | /project/{username}/{project}/build-cache | Clears the cache for a project. |\n| GET | /project/{username}/{project}/envvar | Lists the environment variables for :project |\n| POST | /project/{username}/{project}/envvar | Creates a new environment variable |\n| GET | /project/{username}/{project}/envvar/{name} | Gets the hidden value of environment variable :name |\n| DELETE | /project/{username}/{project}/envvar/{name} | Deletes the environment variable named ':name' |\n\n### Recent-builds\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /recent-builds | Build summary for each of the last 30 recent builds, ordered by build_num. |\n\n### User\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /user/heroku-key | Adds your Heroku API key to CircleCI, takes apikey as form param name. |\n\n## Common Questions\nMatch user requests to endpoints in references/api-spec.lap. Key patterns:\n- \"List all me?\" -> GET /me\n- \"List all projects?\" -> GET /projects\n- \"Get project details?\" -> GET /project/{username}/{project}\n- \"List all recent-builds?\" -> GET /recent-builds\n- \"List all artifacts?\" -> GET /project/{username}/{project}/{build_num}/artifacts\n- \"Create a retry?\" -> POST /project/{username}/{project}/{build_num}/retry\n- \"Create a cancel?\" -> POST /project/{username}/{project}/{build_num}/cancel\n- \"List all tests?\" -> GET /project/{username}/{project}/{build_num}/tests\n- \"Create a ssh-key?\" -> POST /project/{username}/{project}/ssh-key\n- \"List all checkout-key?\" -> GET /project/{username}/{project}/checkout-key\n- \"Create a checkout-key?\" -> POST /project/{username}/{project}/checkout-key\n- \"Get checkout-key details?\" -> GET /project/{username}/{project}/checkout-key/{fingerprint}\n- \"Delete a checkout-key?\" -> DELETE /project/{username}/{project}/checkout-key/{fingerprint}\n- \"List all envvar?\" -> GET /project/{username}/{project}/envvar\n- \"Create a envvar?\" -> POST /project/{username}/{project}/envvar\n- \"Get envvar details?\" -> GET /project/{username}/{project}/envvar/{name}\n- \"Delete a envvar?\" -> DELETE /project/{username}/{project}/envvar/{name}\n- \"Create a heroku-key?\" -> POST /user/heroku-key\n- \"How to authenticate?\" -> See Auth section above\n\n## Response Tips\n- Check response schemas in references/api-spec.lap for field details\n- Paginated endpoints accept limit/offset or cursor parameters\n- Create/update endpoints return the modified resource on success\n- Error responses include status codes and descriptions in the spec\n\n## References\n- Full spec: See references/api-spec.lap for complete endpoint details, parameter tables, and response schemas\n\n> Generated from the official API spec by [LAP](https://lap.sh)\n","references/api-spec.lap":"@lap v0.3\n# Machine-readable API spec. Each @endpoint block is one API call.\n@api CircleCI REST API\n@base https://circleci.com/api/v1\n@version v1\n@auth ApiKey circle-token in query\n@endpoints 22\n@hint download_for_search\n@toc me(1), projects(1), project(18), recent-builds(1), user(1)\n\n@group me\n@endpoint GET /me\n@desc Provides information about the signed in user.\n@returns(200) signed in user\n\n@endgroup\n\n@group projects\n@endpoint GET /projects\n@desc List of all the projects you're following on CircleCI, with build information organized by branch.\n@returns(200) List of all the projects you're following on CircleCI\n\n@endgroup\n\n@group project\n@endpoint GET /project/{username}/{project}\n@desc Build summary for each of the last 30 builds for a single git repo.\n@optional {limit: any # The number of builds to return. Maximum 100, defaults to 30., offset: any # The API returns builds starting from this offset, defaults to 0., filter: any # Restricts which builds are returned. Set to \"completed\", \"successful\", \"failed\", \"running\", or defaults to no filter.}\n@returns(200) Build summary for each of the last 30 builds\n\n@endpoint POST /project/{username}/{project}\n@desc Triggers a new build, returns a summary of the build.\n@optional {body: map}\n@returns(201) returns a summary of the build\n\n@endgroup\n\n@group recent-builds\n@endpoint GET /recent-builds\n@desc Build summary for each of the last 30 recent builds, ordered by build_num.\n@optional {limit: any # The number of builds to return. Maximum 100, defaults to 30., offset: any # The API returns builds starting from this offset, defaults to 0.}\n@returns(200) Build summary for each of the last 30 recent builds\n\n@endgroup\n\n@group project\n@endpoint GET /project/{username}/{project}/{build_num}\n@desc Full details for a single build. The response includes all of the fields from the build summary.\n@returns(200) Full details for a single build\n\n@endpoint GET /project/{username}/{project}/{build_num}/artifacts\n@desc List the artifacts produced by a given build.\n@returns(200) List the artifacts produced by a given build\n\n@endpoint POST /project/{username}/{project}/{build_num}/retry\n@desc Retries the build, returns a summary of the new build.\n@returns(200) returns a summary of the new build\n\n@endpoint POST /project/{username}/{project}/{build_num}/cancel\n@desc Cancels the build, returns a summary of the build.\n@returns(200) returns a summary of the build\n\n@endpoint GET /project/{username}/{project}/{build_num}/tests\n@desc Provides test metadata for a build\n@returns(200) test metadata for a build\n\n@endpoint POST /project/{username}/{project}/tree/{branch}\n@desc Triggers a new build, returns a summary of the build.\n@optional {body: map}\n@returns(201) returns a summary of the build\n\n@endpoint POST /project/{username}/{project}/ssh-key\n@desc Create an ssh key used to access external systems that require SSH key-based authentication\n@required {Content-Type: any, body: map}\n\n@endpoint GET /project/{username}/{project}/checkout-key\n@desc Lists checkout keys.\n@returns(200) checkout keys\n\n@endpoint POST /project/{username}/{project}/checkout-key\n@desc Creates a new checkout key.\n@optional {type: str(deploy-key/github-user-key) # The type of key to create. Can be 'deploy-key' or 'github-user-key'.}\n@returns(200) checkout key\n\n@endpoint GET /project/{username}/{project}/checkout-key/{fingerprint}\n@desc Get a checkout key.\n@returns(200) checkout key\n\n@endpoint DELETE /project/{username}/{project}/checkout-key/{fingerprint}\n@desc Delete a checkout key.\n@returns(200) status message\n\n@endpoint DELETE /project/{username}/{project}/build-cache\n@desc Clears the cache for a project.\n@returns(200) status message\n\n@endpoint GET /project/{username}/{project}/envvar\n@desc Lists the environment variables for :project\n@returns(200) XXX\n\n@endpoint POST /project/{username}/{project}/envvar\n@desc Creates a new environment variable\n@returns(200) XXX\n\n@endpoint GET /project/{username}/{project}/envvar/{name}\n@desc Gets the hidden value of environment variable :name\n@returns(200) XXX\n\n@endpoint DELETE /project/{username}/{project}/envvar/{name}\n@desc Deletes the environment variable named ':name'\n@returns(200) Deletes the environment variable named ':name'\n\n@endgroup\n\n@group user\n@endpoint POST /user/heroku-key\n@desc Adds your Heroku API key to CircleCI, takes apikey as form param name.\n@errors {403: Your Heroku API key is invalid.}\n\n@endgroup\n\n@end\n"}}