Download OpenAPI specification:Download
This document outlines the endpoints and resources that are a part of the CircleCI API v2.
[EXPERIMENTAL] Gets a list of project restrictions associated with a context.
context_id required | string Example: be8bb2e3-c3d6-4098-89f4-572ff976ba9a An opaque identifier of a context. |
{- "items": [
- {
- "context_id": "f31d7249-b7b1-4729-b3a4-ec0ba07b4686",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "project_id": "405d8375-3514-403b-8c43-83ae74cfe0e9",
- "name": "string",
- "restriction_type": "project",
- "restriction_value": "string"
}
], - "next_page_token": "string"
}
[EXPERIMENTAL] Creates project restriction on a context.
context_id required | string Example: be8bb2e3-c3d6-4098-89f4-572ff976ba9a An opaque identifier of a context. |
project_id | string <uuid> Deprecated Deprecated - Use "restriction_type" and "restriction_value" instead. The project ID to use for a project restriction. This is mutually exclusive with restriction_type and restriction_value and implies restriction_type is "project". |
restriction_type | string |
restriction_value | string |
{- "project_id": "405d8375-3514-403b-8c43-83ae74cfe0e9",
- "restriction_type": "project",
- "restriction_value": "405d8375-3514-403b-8c43-83ae74cfe0e9"
}
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "project_id": "405d8375-3514-403b-8c43-83ae74cfe0e9",
- "name": "string",
- "restriction_type": "project",
- "restriction_value": "string"
}
[EXPERIMENTAL] Deletes a project restriction on a context.
context_id required | string Example: be8bb2e3-c3d6-4098-89f4-572ff976ba9a An opaque identifier of a context. |
restriction_id required | string Example: 1c23d2cb-07b1-4a28-8af3-e369732050ed An opaque identifier of a context restriction. |
{- "message": "Context restriction deleted."
}
[EXPERIMENTAL] Creates a new CircleCI project, and returns a list of the default advanced settings. Can only be called on a repo with a main branch and an existing config.yml file. Not yet available to projects that use GitLab or GitHub App.
provider required | string Example: gh The |
organization required | string Example: CircleCI-Public The |
project required | string Example: api-preview-docs The |
{- "advanced": {
- "autocancel_builds": true,
- "build_fork_prs": true,
- "build_prs_only": true,
- "disable_ssh": true,
- "forks_receive_secret_env_vars": true,
- "oss": true,
- "set_github_status": true,
- "setup_workflows": true,
- "write_settings_requires_admin": true,
- "pr_only_branch_overrides": [
- "string"
]
}
}
[EXPERIMENTAL] Returns a list of the advanced settings for a CircleCI project, whether enabled (true) or not (false).
provider required | string Example: gh The |
organization required | string Example: CircleCI-Public The |
project required | string Example: api-preview-docs The |
{- "advanced": {
- "autocancel_builds": true,
- "build_fork_prs": true,
- "build_prs_only": true,
- "disable_ssh": true,
- "forks_receive_secret_env_vars": true,
- "oss": true,
- "set_github_status": true,
- "setup_workflows": true,
- "write_settings_requires_admin": true,
- "pr_only_branch_overrides": [
- "string"
]
}
}
[EXPERIMENTAL] Updates one or more of the advanced settings for a CircleCI project.
provider required | string Example: gh The |
organization required | string Example: CircleCI-Public The |
project required | string Example: api-preview-docs The |
The setting(s) to update, including one or more fields in the JSON object. Note that oss: true
will only be set on projects whose underlying repositories are actually open source.
object |
{- "advanced": {
- "autocancel_builds": false,
- "build_prs_only": true,
- "pr_only_branch_overrides": [
- "main"
]
}
}
{- "advanced": {
- "autocancel_builds": true,
- "build_fork_prs": true,
- "build_prs_only": true,
- "disable_ssh": true,
- "forks_receive_secret_env_vars": true,
- "oss": true,
- "set_github_status": true,
- "setup_workflows": true,
- "write_settings_requires_admin": true,
- "pr_only_branch_overrides": [
- "string"
]
}
}