# CircleCI

Manage CircleCI: pipelines, workflows, jobs, contexts, schedules, insights. Exposes **37 actions** covering the API surface an agent needs - read and write.

## What it can do

| Method | What it does |
| --- | --- |
| `circleci_me` | Get authenticated user profile - GET /me. |
| `circleci_projects_list` | List projects - GET /projects. |
| `circleci_project_get` | Get one project - GET /project/&#123;project_slug&#125;. |
| `circleci_project_create` | Create a new project - POST /project. |
| `circleci_pipelines_list` | List pipelines for a project - GET /project/&#123;project_slug&#125;/pipeline. |
| `circleci_pipeline_get` | Get one pipeline - GET /pipeline/&#123;pipeline_id&#125;. |
| `circleci_pipeline_trigger` | Trigger a new pipeline - POST /project/&#123;project_slug&#125;/pipeline. |
| `circleci_workflow_get` | Get one workflow - GET /workflow/&#123;workflow_id&#125;. |
| `circleci_workflow_cancel` | Cancel a workflow - POST /workflow/&#123;workflow_id&#125;/cancel. |
| `circleci_workflow_rerun` | Rerun a workflow - POST /workflow/&#123;workflow_id&#125;/rerun. |
| `circleci_workflow_jobs_list` | List jobs in a workflow - GET /workflow/&#123;workflow_id&#125;/job. |
| `circleci_job_get` | Get one job details - GET /job/&#123;job_id&#125;. |
| `circleci_job_cancel` | Cancel a job - POST /job/&#123;job_id&#125;/cancel. |
| `circleci_job_artifacts_list` | List artifacts for a job - GET /job/&#123;job_id&#125;/artifacts. |
| `circleci_job_logs` | Get job logs - GET /job/&#123;job_id&#125;/log. |
| `circleci_job_tests` | Get job test results - GET /job/&#123;job_id&#125;/tests. |
| `circleci_checkout_keys_list` | List checkout (deploy) keys for a project - GET /project/&#123;project_slug&#125;/checkout-key. |
| `circleci_checkout_key_get` | Get one checkout key - GET /project/&#123;project_slug&#125;/checkout-key/&#123;fingerprint&#125;. |
| `circleci_checkout_key_create` | Create a new checkout key - POST /project/&#123;project_slug&#125;/checkout-key. |
| `circleci_checkout_key_delete` | Delete a checkout key - DELETE /project/&#123;project_slug&#125;/checkout-key/&#123;fingerprint&#125;. |
| `circleci_env_vars_list` | List environment variables for a project - GET /project/&#123;project_slug&#125;/envvar. |
| `circleci_env_var_get` | Get one environment variable - GET /project/&#123;project_slug&#125;/envvar/&#123;name&#125;. |
| `circleci_env_var_create` | Create an environment variable - POST /project/&#123;project_slug&#125;/envvar. |
| `circleci_env_var_delete` | Delete an environment variable - DELETE /project/&#123;project_slug&#125;/envvar/&#123;name&#125;. |
| `circleci_contexts_list` | List contexts for an organization - GET /context. |
| `circleci_context_get` | Get one context - GET /context/&#123;context_id&#125;. |
| `circleci_context_create` | Create a new context - POST /context. |
| `circleci_context_delete` | Delete a context - DELETE /context/&#123;context_id&#125;. |
| `circleci_context_variables_list` | List environment variables in a context - GET /context/&#123;context_id&#125;/environment-variable. |
| `circleci_context_variable_create` | Create an environment variable in a context - POST /context/&#123;context_id&#125;/environment-variable. |
| `circleci_context_variable_delete` | Delete an environment variable from a context - DELETE /context/&#123;context_id&#125;/environment-variable/&#123;name&#125;. |
| `circleci_schedules_list` | List scheduled pipelines for a project - GET /project/&#123;project_slug&#125;/schedule. |
| `circleci_schedule_get` | Get one schedule - GET /schedule/&#123;schedule_id&#125;. |
| `circleci_schedule_create` | Create a new scheduled pipeline - POST /project/&#123;project_slug&#125;/schedule. |
| `circleci_schedule_delete` | Delete a schedule - DELETE /schedule/&#123;schedule_id&#125;. |
| `circleci_insights_metrics` | Get workflow metrics (insights) for a project - GET /project/&#123;project_slug&#125;/insights/metrics. |
| `circleci_insights_tests` | Get test metrics (insights) for a project - GET /project/&#123;project_slug&#125;/insights/tests. |

## How to get credentials

This connector uses an **API key / token**. Create one in the provider
dashboard, then paste it into FlyMyAI:

- **`CIRCLECI_API_TOKEN`** - CircleCI - User Settings - Personal API Tokens. (https://app.circleci.com/settings/user/tokens)

## Fields to fill in FlyMyAI

| FlyMyAI field | Where it comes from |
| --- | --- |
| `CIRCLECI_API_TOKEN` | CircleCI - User Settings - Personal API Tokens. |

## Troubleshooting

- **`401 Unauthorized` / `403 Forbidden`** - the token is wrong, expired, or missing a required scope; regenerate it.
- **`429 Too Many Requests`** - provider rate limit; retry after a short backoff.
- **Unexpected `4xx` on writes** - double-check required fields; the agent confirms before write actions.

## Links

- [CircleCI API documentation](https://circleci.com/docs/api/v2/)
