CircleCI API
This describes the resources that make up the CircleCI API v2.
Version: v2
BasePath:/api/v2
MIT
http://apache.org/licenses/LICENSE-2.0.html
Access
APIKey KeyParamName:Circle-Token KeyInQuery:false KeyInHeader:true
APIKey KeyParamName:circle-token KeyInQuery:true KeyInHeader:false
HTTP Basic Authentication
[ Jump to Models ]
Table of Contents
Up
put /context/{context-id}/environment-variable/{env-var-name}
Add or update an environment variable (addEnvironmentVariableToContext )
Create or update an environment variable within a context. Returns information about the environment variable, not including its value.
Path parameters
context-id (required)
Path Parameter — ID of the context (UUID) default: null format: uuid
env-var-name (required)
Path Parameter — The name of the environment variable default: null
Consumes
This API call consumes the following media types via the request header:
Request body
Return type
anyOf
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
The new environment variable
anyOf
default
Error response.
inline_response_default
Create a new context (createContext )
Consumes
This API call consumes the following media types via the request header:
Request body
Return type
Example data
Content-Type: application/json
{
"name" : "name",
"created_at" : "2015-09-21T17:29:21.042Z",
"id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
The new context
Context
default
Error response.
inline_response_default
Up
delete /context/{context-id}
Delete a context (deleteContext )
Path parameters
context-id (required)
Path Parameter — ID of the context (UUID) default: null format: uuid
Return type
Example data
Content-Type: application/json
{
"message" : "message"
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
A confirmation message
MessageResponse
default
Error response.
inline_response_default
Up
delete /context/{context-id}/environment-variable/{env-var-name}
Remove an environment variable (deleteEnvironmentVariableFromContext )
Delete an environment variable from a context.
Path parameters
env-var-name (required)
Path Parameter — The name of the environment variable default: null
context-id (required)
Path Parameter — ID of the context (UUID) default: null format: uuid
Return type
Example data
Content-Type: application/json
{
"message" : "message"
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
A confirmation message
MessageResponse
default
Error response.
inline_response_default
Up
get /context/{context-id}
Get a context (getContext )
Returns basic information about a context.
Path parameters
context-id (required)
Path Parameter — ID of the context (UUID) default: null format: uuid
Return type
Example data
Content-Type: application/json
{
"name" : "name",
"created_at" : "2015-09-21T17:29:21.042Z",
"id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
The context
Context
default
Error response.
inline_response_default
List contexts (listContexts )
List all contexts for an owner.
Query parameters
owner-id (optional)
Query Parameter — The unique ID of the owner of the context. Specify either this or owner-slug. default: null format: uuid
owner-slug (optional)
Query Parameter — A string that represents an organization. Specify either this or owner-id. Cannot be used for accounts. default: null
owner-type (optional)
Query Parameter — The type of the owner. Defaults to "organization". Accounts are only used as context owners in server. default: null
page-token (optional)
Query Parameter — A token to retrieve the next page of results. default: null
Return type
Example data
Content-Type: application/json
{
"next_page_token" : "next_page_token",
"items" : [ {
"name" : "name",
"created_at" : "2015-09-21T17:29:21.042Z",
"id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
}, {
"name" : "name",
"created_at" : "2015-09-21T17:29:21.042Z",
"id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
} ]
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
A paginated list of contexts
inline_response_200
default
Error response.
inline_response_default
Up
get /context/{context-id}/environment-variable
List environment variables (listEnvironmentVariablesFromContext )
List information about environment variables in a context, not including their values.
Path parameters
context-id (required)
Path Parameter — ID of the context (UUID) default: null format: uuid
Return type
Example data
Content-Type: application/json
{
"next_page_token" : "next_page_token",
"items" : [ {
"variable" : "POSTGRES_USER",
"created_at" : "2015-09-21T17:29:21.042Z",
"context_id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
}, {
"variable" : "POSTGRES_USER",
"created_at" : "2015-09-21T17:29:21.042Z",
"context_id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
} ]
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
A paginated list of environment variables
inline_response_200_1
default
Error response.
inline_response_default
Up
get /insights/{project-slug}/workflows/{workflow-name}/jobs/{job-name}
Get recent runs of a workflow job (getProjectJobRuns )
Get recent runs of a job within a workflow. Runs going back at most 90 days are returned. Please note that Insights is not a real time financial reporting tool and should not be used for credit reporting. The most up to date credit information can be found in Plan Overview in the CircleCI UI.
Path parameters
project-slug (required)
Path Parameter — Project slug in the form vcs-slug/org-name/repo-name
. The /
characters may be URL-escaped. default: null
workflow-name (required)
Path Parameter — The name of the workflow. default: null
job-name (required)
Path Parameter — The name of the job. default: null
Query parameters
branch (optional)
Query Parameter — The name of a vcs branch. If not passed we will scope the API call to the default branch.
Note - Querying all branches is not supported yet. default: null
page-token (optional)
Query Parameter — A token to retrieve the next page of results. default: null
start-date (optional)
Query Parameter — Include only executions that started at or after this date. This must be specified if an end-date is provided. default: null format: date-time
end-date (optional)
Query Parameter — Include only executions that started before this date. This date can be at most 90 days after the start-date. default: null format: date-time
Return type
Example data
Content-Type: application/json
{
"next_page_token" : "next_page_token",
"items" : [ {
"duration" : 0,
"started_at" : "2000-01-23T04:56:07.000+00:00",
"id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"stopped_at" : "2000-01-23T04:56:07.000+00:00",
"credits_used" : 0,
"status" : "success"
}, {
"duration" : 0,
"started_at" : "2000-01-23T04:56:07.000+00:00",
"id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"stopped_at" : "2000-01-23T04:56:07.000+00:00",
"credits_used" : 0,
"status" : "success"
} ]
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
A paginated list of recent job runs
inline_response_200_5
default
Error response.
inline_response_default
Up
get /insights/{project-slug}/workflows/{workflow-name}/jobs
Get summary metrics for a project workflow's jobs. (getProjectWorkflowJobMetrics )
Get summary metrics for a project workflow's jobs. Job runs going back at most 90 days are included in the aggregation window. Metrics are refreshed daily, and thus may not include executions from the last 24 hours. Please note that Insights is not a real time financial reporting tool and should not be used for credit reporting. The most up to date credit information can be found in Plan Overview in the CircleCI UI.
Path parameters
project-slug (required)
Path Parameter — Project slug in the form vcs-slug/org-name/repo-name
. The /
characters may be URL-escaped. default: null
workflow-name (required)
Path Parameter — The name of the workflow. default: null
Query parameters
page-token (optional)
Query Parameter — A token to retrieve the next page of results. default: null
all-branches (optional)
Query Parameter — Whether to retrieve data for all branches combined. default: null
branch (optional)
Query Parameter — The name of a vcs branch. If not passed we will scope the API call to the default branch. default: null
reporting-window (optional)
Query Parameter — The time window used to calculate summary metrics. default: null
Return type
Example data
Content-Type: application/json
{
"next_page_token" : "next_page_token",
"items" : [ {
"window_end" : "2000-01-23T04:56:07.000+00:00",
"name" : "name",
"window_start" : "2000-01-23T04:56:07.000+00:00",
"metrics" : {
"total_runs" : 0,
"successful_runs" : 0,
"failed_runs" : 0,
"total_credits_used" : 0,
"duration_metrics" : {
"min" : 0,
"median" : 0,
"max" : 0,
"mean" : 0,
"standard_deviation" : 7.386282,
"p95" : 0
},
"throughput" : 5.637377,
"success_rate" : 0.8008282
}
}, {
"window_end" : "2000-01-23T04:56:07.000+00:00",
"name" : "name",
"window_start" : "2000-01-23T04:56:07.000+00:00",
"metrics" : {
"total_runs" : 0,
"successful_runs" : 0,
"failed_runs" : 0,
"total_credits_used" : 0,
"duration_metrics" : {
"min" : 0,
"median" : 0,
"max" : 0,
"mean" : 0,
"standard_deviation" : 7.386282,
"p95" : 0
},
"throughput" : 5.637377,
"success_rate" : 0.8008282
}
} ]
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
A paginated list of summary metrics by workflow job.
inline_response_200_4
default
Error response.
inline_response_default
Up
get /insights/{project-slug}/workflows
Get summary metrics for a project's workflows (getProjectWorkflowMetrics )
Get summary metrics for a project's workflows. Workflow runs going back at most 90 days are included in the aggregation window. Metrics are refreshed daily, and thus may not include executions from the last 24 hours. Please note that Insights is not a real time financial reporting tool and should not be used for credit reporting. The most up to date credit information can be found in Plan Overview in the CircleCI UI.
Path parameters
project-slug (required)
Path Parameter — Project slug in the form vcs-slug/org-name/repo-name
. The /
characters may be URL-escaped. default: null
Query parameters
page-token (optional)
Query Parameter — A token to retrieve the next page of results. default: null
all-branches (optional)
Query Parameter — Whether to retrieve data for all branches combined. default: null
branch (optional)
Query Parameter — The name of a vcs branch. If not passed we will scope the API call to the default branch. default: null
reporting-window (optional)
Query Parameter — The time window used to calculate summary metrics. default: null
Return type
Example data
Content-Type: application/json
{
"next_page_token" : "next_page_token",
"items" : [ {
"window_end" : "2000-01-23T04:56:07.000+00:00",
"name" : "build-and-test",
"window_start" : "2000-01-23T04:56:07.000+00:00",
"metrics" : {
"total_runs" : 0,
"successful_runs" : 0,
"total_recoveries" : 0,
"mttr" : 0,
"total_credits_used" : 0,
"failed_runs" : 0,
"duration_metrics" : {
"min" : 0,
"median" : 0,
"max" : 0,
"mean" : 0,
"standard_deviation" : 7.386282,
"p95" : 0
},
"throughput" : 1.0246457,
"success_rate" : 2.302136
}
}, {
"window_end" : "2000-01-23T04:56:07.000+00:00",
"name" : "build-and-test",
"window_start" : "2000-01-23T04:56:07.000+00:00",
"metrics" : {
"total_runs" : 0,
"successful_runs" : 0,
"total_recoveries" : 0,
"mttr" : 0,
"total_credits_used" : 0,
"failed_runs" : 0,
"duration_metrics" : {
"min" : 0,
"median" : 0,
"max" : 0,
"mean" : 0,
"standard_deviation" : 7.386282,
"p95" : 0
},
"throughput" : 1.0246457,
"success_rate" : 2.302136
}
} ]
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
A paginated list of summary metrics by workflow
inline_response_200_2
default
Error response.
inline_response_default
Up
get /insights/{project-slug}/workflows/{workflow-name}
Get recent runs of a workflow (getProjectWorkflowRuns )
Get recent runs of a workflow. Runs going back at most 90 days are returned. Please note that Insights is not a real time financial reporting tool and should not be used for credit reporting. The most up to date credit information can be found in Plan Overview in the CircleCI UI.
Path parameters
project-slug (required)
Path Parameter — Project slug in the form vcs-slug/org-name/repo-name
. The /
characters may be URL-escaped. default: null
workflow-name (required)
Path Parameter — The name of the workflow. default: null
Query parameters
all-branches (optional)
Query Parameter — Whether to retrieve data for all branches combined. default: null
branch (optional)
Query Parameter — The name of a vcs branch. If not passed we will scope the API call to the default branch. default: null
page-token (optional)
Query Parameter — A token to retrieve the next page of results. default: null
start-date (optional)
Query Parameter — Include only executions that started at or after this date. This must be specified if an end-date is provided. default: null format: date-time
end-date (optional)
Query Parameter — Include only executions that started before this date. This date can be at most 90 days after the start-date. default: null format: date-time
Return type
Example data
Content-Type: application/json
{
"next_page_token" : "next_page_token",
"items" : [ {
"duration" : 0,
"created_at" : "2000-01-23T04:56:07.000+00:00",
"id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"stopped_at" : "2000-01-23T04:56:07.000+00:00",
"branch" : "main",
"credits_used" : 0,
"status" : "success"
}, {
"duration" : 0,
"created_at" : "2000-01-23T04:56:07.000+00:00",
"id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"stopped_at" : "2000-01-23T04:56:07.000+00:00",
"branch" : "main",
"credits_used" : 0,
"status" : "success"
} ]
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
A paginated list of recent workflow runs
inline_response_200_3
default
Error response.
inline_response_default
Up
get /insights/{project-slug}/workflows/{workflow-name}/test-metrics
Get test metrics for a project's workflows (getProjectWorkflowTestMetrics )
Get test metrics for a project's workflows. Currently tests metrics are calculated based on 10 most recent workflow runs.
Path parameters
project-slug (required)
Path Parameter — Project slug in the form vcs-slug/org-name/repo-name
. The /
characters may be URL-escaped. default: null
workflow-name (required)
Path Parameter — The name of the workflow. default: null
Query parameters
branch (optional)
Query Parameter — The name of a vcs branch. If not passed we will scope the API call to the default branch. default: null
all-branches (optional)
Query Parameter — Whether to retrieve data for all branches combined. default: null
Return type
Example data
Content-Type: application/json
{
"slowest_tests_extra" : 0,
"most_failed_tests_extra" : 0,
"total_test_runs" : 0,
"slowest_tests" : [ {
"total_runs" : 0,
"job_name" : "job_name",
"p95_duration" : 1.4658129805029452,
"flaky" : true,
"failed_runs" : 0,
"test_name" : "test_name"
}, {
"total_runs" : 0,
"job_name" : "job_name",
"p95_duration" : 1.4658129805029452,
"flaky" : true,
"failed_runs" : 0,
"test_name" : "test_name"
} ],
"average_test_count" : 0,
"test_runs" : [ {
"workflow_id" : "",
"test_counts" : {
"total" : 0,
"failure" : 0,
"success" : 0,
"error" : 0,
"skipped" : 0
},
"pipeline_number" : 0,
"success_rate" : 3.6160767
}, {
"workflow_id" : "",
"test_counts" : {
"total" : 0,
"failure" : 0,
"success" : 0,
"error" : 0,
"skipped" : 0
},
"pipeline_number" : 0,
"success_rate" : 3.6160767
} ],
"most_failed_tests" : [ {
"total_runs" : 0,
"job_name" : "job_name",
"p95_duration" : 1.4658129805029452,
"flaky" : true,
"failed_runs" : 0,
"test_name" : "test_name"
}, {
"total_runs" : 0,
"job_name" : "job_name",
"p95_duration" : 1.4658129805029452,
"flaky" : true,
"failed_runs" : 0,
"test_name" : "test_name"
} ]
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
A list of test metrics by workflow
inline_response_200_6
default
Error response.
inline_response_default
Up
post /project/{project-slug}/job/{job-number}/cancel
Cancel job (cancelJob )
Cancel job with a given job number.
Path parameters
job-number (required)
Path Parameter — The number of the job. default: null
project-slug (required)
Path Parameter — Project slug in the form vcs-slug/org-name/repo-name
. The /
characters may be URL-escaped. default: null
Return type
Example data
Content-Type: application/json
{
"message" : "message"
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
202
MessageResponse
default
Error response.
inline_response_default
Up
get /project/{project-slug}/{job-number}/artifacts
Get a job's artifacts (getJobArtifacts )
Returns a job's artifacts.
Path parameters
job-number (required)
Path Parameter — The number of the job. default: null
project-slug (required)
Path Parameter — Project slug in the form vcs-slug/org-name/repo-name
. The /
characters may be URL-escaped. default: null
Return type
Example data
Content-Type: application/json
{
"next_page_token" : "next_page_token",
"items" : [ {
"path" : "path",
"node_index" : 0,
"url" : "url"
}, {
"path" : "path",
"node_index" : 0,
"url" : "url"
} ]
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
A paginated list of the job's artifacts.
ArtifactListResponse
default
Error response.
inline_response_default
Up
get /project/{project-slug}/job/{job-number}
Get job details (getJobDetails )
Returns job details.
Path parameters
job-number (required)
Path Parameter — The number of the job. default: null
project-slug (required)
Path Parameter — Project slug in the form vcs-slug/org-name/repo-name
. The /
characters may be URL-escaped. default: null
Return type
Example data
Content-Type: application/json
{
"latest_workflow" : {
"name" : "build-and-test",
"id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
},
"queued_at" : "2000-01-23T04:56:07.000+00:00",
"parallelism" : 6,
"project" : {
"external_url" : "https://github.com/CircleCI-Public/api-preview-docs",
"name" : "api-preview-docs",
"slug" : "gh/CircleCI-Public/api-preview-docs"
},
"created_at" : "2000-01-23T04:56:07.000+00:00",
"contexts" : [ {
"name" : "name"
}, {
"name" : "name"
} ],
"pipeline" : {
"id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
},
"duration" : 5,
"number" : 1,
"web_url" : "web_url",
"executor" : {
"resource_class" : "resource_class",
"type" : "type"
},
"organization" : {
"name" : "name"
},
"name" : "name",
"started_at" : "2000-01-23T04:56:07.000+00:00",
"messages" : [ {
"reason" : "reason",
"type" : "type",
"message" : "message"
}, {
"reason" : "reason",
"type" : "type",
"message" : "message"
} ],
"parallel_runs" : [ {
"index" : 0,
"status" : "status"
}, {
"index" : 0,
"status" : "status"
} ],
"stopped_at" : "2000-01-23T04:56:07.000+00:00",
"status" : ""
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
Job details.
Job_Details
default
Error response.
inline_response_default
Up
get /project/{project-slug}/{job-number}/tests
Get test metadata (getTests )
Get test metadata for a build.
Path parameters
job-number (required)
Path Parameter — The number of the job. default: null
project-slug (required)
Path Parameter — Project slug in the form vcs-slug/org-name/repo-name
. The /
characters may be URL-escaped. default: null
Return type
Example data
Content-Type: application/json
{
"next_page_token" : "next_page_token",
"items" : [ {
"result" : "result",
"file" : "file",
"run_time" : 0.8008281904610115,
"classname" : "classname",
"name" : "name",
"source" : "source",
"message" : "message"
}, {
"result" : "result",
"file" : "file",
"run_time" : 0.8008281904610115,
"classname" : "classname",
"name" : "name",
"source" : "source",
"message" : "message"
} ]
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
A paginated list of test results.
TestsResponse
default
Error response.
inline_response_default
Up
post /pipeline/continue
Continue a pipeline (Preview) (continuePipeline )
Continue a pipeline from the setup phase.
Consumes
This API call consumes the following media types via the request header:
Request body
Return type
Example data
Content-Type: application/json
{
"message" : "message"
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
A confirmation message.
MessageResponse
default
Error response.
inline_response_default
Up
get /pipeline/{pipeline-id}
Get a pipeline (getPipelineById )
Returns a pipeline by ID.
Path parameters
pipeline-id (required)
Path Parameter — The unique ID of the pipeline. default: null format: uuid
Return type
Example data
Content-Type: application/json
{
"project_slug" : "gh/CircleCI-Public/api-preview-docs",
"number" : 0,
"updated_at" : "2000-01-23T04:56:07.000+00:00",
"vcs" : {
"review_id" : "123",
"target_repository_url" : "https://github.com/CircleCI-Public/api-preview-docs",
"review_url" : "https://github.com/CircleCI-Public/api-preview-docs/pull/123",
"commit" : {
"subject" : "subject",
"body" : "body"
},
"tag" : "v3.1.4159",
"provider_name" : "GitHub",
"branch" : "feature/design-new-api",
"origin_repository_url" : "https://github.com/CircleCI-Public/api-preview-docs",
"revision" : "f454a02b5d10fcccfd7d9dd7608a76d6493a98b4"
},
"created_at" : "2000-01-23T04:56:07.000+00:00",
"id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"state" : "created",
"trigger" : {
"actor" : {
"avatar_url" : "avatar_url",
"login" : "login"
},
"received_at" : "2000-01-23T04:56:07.000+00:00",
"type" : "explicit"
},
"errors" : [ {
"type" : "config",
"message" : "message"
}, {
"type" : "config",
"message" : "message"
} ]
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
A pipeline object.
Pipeline
default
Error response.
inline_response_default
Up
get /project/{project-slug}/pipeline/{pipeline-number}
Get a pipeline (getPipelineByNumber )
Returns a pipeline by number.
Path parameters
project-slug (required)
Path Parameter — Project slug in the form vcs-slug/org-name/repo-name
. The /
characters may be URL-escaped. default: null
pipeline-number (required)
Path Parameter — The number of the pipeline. default: null
Return type
Example data
Content-Type: application/json
{
"project_slug" : "gh/CircleCI-Public/api-preview-docs",
"number" : 0,
"updated_at" : "2000-01-23T04:56:07.000+00:00",
"vcs" : {
"review_id" : "123",
"target_repository_url" : "https://github.com/CircleCI-Public/api-preview-docs",
"review_url" : "https://github.com/CircleCI-Public/api-preview-docs/pull/123",
"commit" : {
"subject" : "subject",
"body" : "body"
},
"tag" : "v3.1.4159",
"provider_name" : "GitHub",
"branch" : "feature/design-new-api",
"origin_repository_url" : "https://github.com/CircleCI-Public/api-preview-docs",
"revision" : "f454a02b5d10fcccfd7d9dd7608a76d6493a98b4"
},
"created_at" : "2000-01-23T04:56:07.000+00:00",
"id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"state" : "created",
"trigger" : {
"actor" : {
"avatar_url" : "avatar_url",
"login" : "login"
},
"received_at" : "2000-01-23T04:56:07.000+00:00",
"type" : "explicit"
},
"errors" : [ {
"type" : "config",
"message" : "message"
}, {
"type" : "config",
"message" : "message"
} ]
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
A pipeline object.
Pipeline
default
Error response.
inline_response_default
Up
get /pipeline/{pipeline-id}/config
Get a pipeline's configuration (getPipelineConfigById )
Returns a pipeline's configuration by ID.
Path parameters
pipeline-id (required)
Path Parameter — The unique ID of the pipeline. default: null format: uuid
Return type
Example data
Content-Type: application/json
{
"compiled" : "compiled",
"setup-config" : "setup-config",
"compiled-setup-config" : "compiled-setup-config",
"source" : "source"
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
The configuration strings for the pipeline.
PipelineConfig
default
Error response.
inline_response_default
Up
get /project/{project-slug}/pipeline/mine
Get your pipelines (listMyPipelines )
Returns a sequence of all pipelines for this project triggered by the user.
Path parameters
project-slug (required)
Path Parameter — Project slug in the form vcs-slug/org-name/repo-name
. The /
characters may be URL-escaped. default: null
Query parameters
page-token (optional)
Query Parameter — A token to retrieve the next page of results. default: null
Return type
Example data
Content-Type: application/json
{
"next_page_token" : "next_page_token",
"items" : [ {
"project_slug" : "gh/CircleCI-Public/api-preview-docs",
"number" : 0,
"updated_at" : "2000-01-23T04:56:07.000+00:00",
"vcs" : {
"review_id" : "123",
"target_repository_url" : "https://github.com/CircleCI-Public/api-preview-docs",
"review_url" : "https://github.com/CircleCI-Public/api-preview-docs/pull/123",
"commit" : {
"subject" : "subject",
"body" : "body"
},
"tag" : "v3.1.4159",
"provider_name" : "GitHub",
"branch" : "feature/design-new-api",
"origin_repository_url" : "https://github.com/CircleCI-Public/api-preview-docs",
"revision" : "f454a02b5d10fcccfd7d9dd7608a76d6493a98b4"
},
"created_at" : "2000-01-23T04:56:07.000+00:00",
"id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"state" : "created",
"trigger" : {
"actor" : {
"avatar_url" : "avatar_url",
"login" : "login"
},
"received_at" : "2000-01-23T04:56:07.000+00:00",
"type" : "explicit"
},
"errors" : [ {
"type" : "config",
"message" : "message"
}, {
"type" : "config",
"message" : "message"
} ]
}, {
"project_slug" : "gh/CircleCI-Public/api-preview-docs",
"number" : 0,
"updated_at" : "2000-01-23T04:56:07.000+00:00",
"vcs" : {
"review_id" : "123",
"target_repository_url" : "https://github.com/CircleCI-Public/api-preview-docs",
"review_url" : "https://github.com/CircleCI-Public/api-preview-docs/pull/123",
"commit" : {
"subject" : "subject",
"body" : "body"
},
"tag" : "v3.1.4159",
"provider_name" : "GitHub",
"branch" : "feature/design-new-api",
"origin_repository_url" : "https://github.com/CircleCI-Public/api-preview-docs",
"revision" : "f454a02b5d10fcccfd7d9dd7608a76d6493a98b4"
},
"created_at" : "2000-01-23T04:56:07.000+00:00",
"id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"state" : "created",
"trigger" : {
"actor" : {
"avatar_url" : "avatar_url",
"login" : "login"
},
"received_at" : "2000-01-23T04:56:07.000+00:00",
"type" : "explicit"
},
"errors" : [ {
"type" : "config",
"message" : "message"
}, {
"type" : "config",
"message" : "message"
} ]
} ]
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
A sequence of pipelines.
PipelineListResponse
default
Error response.
inline_response_default
Get a list of pipelines (listPipelines )
Returns all pipelines for the most recently built projects (max 250) you follow in an organization.
Query parameters
org-slug (optional)
Query Parameter — Org slug in the form vcs-slug/org-name
default: null
page-token (optional)
Query Parameter — A token to retrieve the next page of results. default: null
mine (optional)
Query Parameter — Only include entries created by your user. default: null
Return type
Example data
Content-Type: application/json
{
"next_page_token" : "next_page_token",
"items" : [ {
"project_slug" : "gh/CircleCI-Public/api-preview-docs",
"number" : 0,
"updated_at" : "2000-01-23T04:56:07.000+00:00",
"vcs" : {
"review_id" : "123",
"target_repository_url" : "https://github.com/CircleCI-Public/api-preview-docs",
"review_url" : "https://github.com/CircleCI-Public/api-preview-docs/pull/123",
"commit" : {
"subject" : "subject",
"body" : "body"
},
"tag" : "v3.1.4159",
"provider_name" : "GitHub",
"branch" : "feature/design-new-api",
"origin_repository_url" : "https://github.com/CircleCI-Public/api-preview-docs",
"revision" : "f454a02b5d10fcccfd7d9dd7608a76d6493a98b4"
},
"created_at" : "2000-01-23T04:56:07.000+00:00",
"id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"state" : "created",
"trigger" : {
"actor" : {
"avatar_url" : "avatar_url",
"login" : "login"
},
"received_at" : "2000-01-23T04:56:07.000+00:00",
"type" : "explicit"
},
"errors" : [ {
"type" : "config",
"message" : "message"
}, {
"type" : "config",
"message" : "message"
} ]
}, {
"project_slug" : "gh/CircleCI-Public/api-preview-docs",
"number" : 0,
"updated_at" : "2000-01-23T04:56:07.000+00:00",
"vcs" : {
"review_id" : "123",
"target_repository_url" : "https://github.com/CircleCI-Public/api-preview-docs",
"review_url" : "https://github.com/CircleCI-Public/api-preview-docs/pull/123",
"commit" : {
"subject" : "subject",
"body" : "body"
},
"tag" : "v3.1.4159",
"provider_name" : "GitHub",
"branch" : "feature/design-new-api",
"origin_repository_url" : "https://github.com/CircleCI-Public/api-preview-docs",
"revision" : "f454a02b5d10fcccfd7d9dd7608a76d6493a98b4"
},
"created_at" : "2000-01-23T04:56:07.000+00:00",
"id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"state" : "created",
"trigger" : {
"actor" : {
"avatar_url" : "avatar_url",
"login" : "login"
},
"received_at" : "2000-01-23T04:56:07.000+00:00",
"type" : "explicit"
},
"errors" : [ {
"type" : "config",
"message" : "message"
}, {
"type" : "config",
"message" : "message"
} ]
} ]
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
A sequence of pipelines.
PipelineListResponse
default
Error response.
inline_response_default
Up
get /project/{project-slug}/pipeline
Get all pipelines (listPipelinesForProject )
Returns all pipelines for this project.
Path parameters
project-slug (required)
Path Parameter — Project slug in the form vcs-slug/org-name/repo-name
. The /
characters may be URL-escaped. default: null
Query parameters
branch (optional)
Query Parameter — The name of a vcs branch. default: null
page-token (optional)
Query Parameter — A token to retrieve the next page of results. default: null
Return type
Example data
Content-Type: application/json
{
"next_page_token" : "next_page_token",
"items" : [ {
"project_slug" : "gh/CircleCI-Public/api-preview-docs",
"number" : 0,
"updated_at" : "2000-01-23T04:56:07.000+00:00",
"vcs" : {
"review_id" : "123",
"target_repository_url" : "https://github.com/CircleCI-Public/api-preview-docs",
"review_url" : "https://github.com/CircleCI-Public/api-preview-docs/pull/123",
"commit" : {
"subject" : "subject",
"body" : "body"
},
"tag" : "v3.1.4159",
"provider_name" : "GitHub",
"branch" : "feature/design-new-api",
"origin_repository_url" : "https://github.com/CircleCI-Public/api-preview-docs",
"revision" : "f454a02b5d10fcccfd7d9dd7608a76d6493a98b4"
},
"created_at" : "2000-01-23T04:56:07.000+00:00",
"id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"state" : "created",
"trigger" : {
"actor" : {
"avatar_url" : "avatar_url",
"login" : "login"
},
"received_at" : "2000-01-23T04:56:07.000+00:00",
"type" : "explicit"
},
"errors" : [ {
"type" : "config",
"message" : "message"
}, {
"type" : "config",
"message" : "message"
} ]
}, {
"project_slug" : "gh/CircleCI-Public/api-preview-docs",
"number" : 0,
"updated_at" : "2000-01-23T04:56:07.000+00:00",
"vcs" : {
"review_id" : "123",
"target_repository_url" : "https://github.com/CircleCI-Public/api-preview-docs",
"review_url" : "https://github.com/CircleCI-Public/api-preview-docs/pull/123",
"commit" : {
"subject" : "subject",
"body" : "body"
},
"tag" : "v3.1.4159",
"provider_name" : "GitHub",
"branch" : "feature/design-new-api",
"origin_repository_url" : "https://github.com/CircleCI-Public/api-preview-docs",
"revision" : "f454a02b5d10fcccfd7d9dd7608a76d6493a98b4"
},
"created_at" : "2000-01-23T04:56:07.000+00:00",
"id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"state" : "created",
"trigger" : {
"actor" : {
"avatar_url" : "avatar_url",
"login" : "login"
},
"received_at" : "2000-01-23T04:56:07.000+00:00",
"type" : "explicit"
},
"errors" : [ {
"type" : "config",
"message" : "message"
}, {
"type" : "config",
"message" : "message"
} ]
} ]
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
A sequence of pipelines.
PipelineListResponse
default
Error response.
inline_response_default
Up
get /pipeline/{pipeline-id}/workflow
Get a pipeline's workflows (listWorkflowsByPipelineId )
Returns a paginated list of workflows by pipeline ID.
Path parameters
pipeline-id (required)
Path Parameter — The unique ID of the pipeline. default: null format: uuid
Query parameters
page-token (optional)
Query Parameter — A token to retrieve the next page of results. default: null
Return type
Example data
Content-Type: application/json
{
"next_page_token" : "next_page_token",
"items" : [ {
"project_slug" : "gh/CircleCI-Public/api-preview-docs",
"canceled_by" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"pipeline_number" : 0,
"pipeline_id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"name" : "build-and-test",
"created_at" : "2000-01-23T04:56:07.000+00:00",
"id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"tag" : "setup",
"errored_by" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"stopped_at" : "2000-01-23T04:56:07.000+00:00",
"started_by" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"status" : "success"
}, {
"project_slug" : "gh/CircleCI-Public/api-preview-docs",
"canceled_by" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"pipeline_number" : 0,
"pipeline_id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"name" : "build-and-test",
"created_at" : "2000-01-23T04:56:07.000+00:00",
"id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"tag" : "setup",
"errored_by" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"stopped_at" : "2000-01-23T04:56:07.000+00:00",
"started_by" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"status" : "success"
} ]
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
A paginated list of workflow objects.
WorkflowListResponse
default
Error response.
inline_response_default
Up
post /project/{project-slug}/pipeline
Trigger a new pipeline (triggerPipeline )
Triggers a new pipeline on the project.
Path parameters
project-slug (required)
Path Parameter — Project slug in the form vcs-slug/org-name/repo-name
. The /
characters may be URL-escaped. default: null
Consumes
This API call consumes the following media types via the request header:
Request body
Request headers
x-attribution-login (optional)
Header Parameter — The login or user-readable identifier for the pipeline's triggerer. Internal use only. default: null
x-attribution-actor-id (optional)
Header Parameter — The id the integration uses to identify the pipeline's triggerer. Internal use only. default: null
Return type
Example data
Content-Type: application/json
{
"number" : 0,
"created_at" : "2000-01-23T04:56:07.000+00:00",
"id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"state" : "created"
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
201
The created pipeline.
PipelineCreation
default
Error response.
inline_response_default
Up
post /project/{project-slug}/checkout-key
Create a new checkout key (createCheckoutKey )
Creates a new checkout key. This API request is only usable with a user API token.
Path parameters
project-slug (required)
Path Parameter — Project slug in the form vcs-slug/org-name/repo-name
. The /
characters may be URL-escaped. default: null
Consumes
This API call consumes the following media types via the request header:
Request body
Return type
Example data
Content-Type: application/json
{
"fingerprint" : "c9:0b:1c:4f:d5:65:56:b9:ad:88:f9:81:2b:37:74:2f",
"public-key" : "ssh-rsa ...",
"created-at" : "2015-09-21T17:29:21.042Z",
"type" : "deploy-key",
"preferred" : true
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
201
The checkout key.
CheckoutKey
default
Error response.
inline_response_default
Up
post /project/{project-slug}/envvar
Create an environment variable (createEnvVar )
Creates a new environment variable.
Path parameters
project-slug (required)
Path Parameter — Project slug in the form vcs-slug/org-name/repo-name
. The /
characters may be URL-escaped. default: null
Consumes
This API call consumes the following media types via the request header:
Request body
Return type
Example data
Content-Type: application/json
{
"name" : "foo",
"value" : "xxxx1234"
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
201
The environment variable.
EnvironmentVariablePair
default
Error response.
inline_response_default
Up
delete /project/{project-slug}/checkout-key/{fingerprint}
Delete a checkout key (deleteCheckoutKey )
Deletes the checkout key.
Path parameters
project-slug (required)
Path Parameter — Project slug in the form vcs-slug/org-name/repo-name
. The /
characters may be URL-escaped. default: null
fingerprint (required)
Path Parameter — An SSH key fingerprint. default: null
Return type
Example data
Content-Type: application/json
{
"message" : "message"
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
A confirmation message.
MessageResponse
default
Error response.
inline_response_default
Up
delete /project/{project-slug}/envvar/{name}
Delete an environment variable (deleteEnvVar )
Deletes the environment variable named :name.
Path parameters
project-slug (required)
Path Parameter — Project slug in the form vcs-slug/org-name/repo-name
. The /
characters may be URL-escaped. default: null
name (required)
Path Parameter — The name of the environment variable. default: null
Return type
Example data
Content-Type: application/json
{
"message" : "message"
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
A confirmation message.
MessageResponse
default
Error response.
inline_response_default
Up
get /project/{project-slug}/checkout-key/{fingerprint}
Get a checkout key (getCheckoutKey )
Returns an individual checkout key.
Path parameters
project-slug (required)
Path Parameter — Project slug in the form vcs-slug/org-name/repo-name
. The /
characters may be URL-escaped. default: null
fingerprint (required)
Path Parameter — An SSH key fingerprint. default: null
Return type
Example data
Content-Type: application/json
{
"fingerprint" : "c9:0b:1c:4f:d5:65:56:b9:ad:88:f9:81:2b:37:74:2f",
"public-key" : "ssh-rsa ...",
"created-at" : "2015-09-21T17:29:21.042Z",
"type" : "deploy-key",
"preferred" : true
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
The checkout key.
CheckoutKey
default
Error response.
inline_response_default
Up
get /project/{project-slug}/envvar/{name}
Get a masked environment variable (getEnvVar )
Returns the masked value of environment variable :name.
Path parameters
project-slug (required)
Path Parameter — Project slug in the form vcs-slug/org-name/repo-name
. The /
characters may be URL-escaped. default: null
name (required)
Path Parameter — The name of the environment variable. default: null
Return type
Example data
Content-Type: application/json
{
"name" : "foo",
"value" : "xxxx1234"
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
The environment variable.
EnvironmentVariablePair
default
Error response.
inline_response_default
Up
get /project/{project-slug}
Get a project (getProjectBySlug )
Retrieves a project by project slug.
Path parameters
project-slug (required)
Path Parameter — Project slug in the form vcs-slug/org-name/repo-name
. The /
characters may be URL-escaped. default: null
Return type
Example data
Content-Type: application/json
{
"name" : "api-preview-docs",
"vcs_info" : {
"provider" : "Bitbucket",
"vcs_url" : "https://github.com/CircleCI-Public/api-preview-docs",
"default_branch" : "master"
},
"organization_name" : "CircleCI-Public",
"slug" : "gh/CircleCI-Public/api-preview-docs"
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
A project object
Project
default
Error response.
inline_response_default
Up
get /project/{project-slug}/checkout-key
Get all checkout keys (listCheckoutKeys )
Returns a sequence of checkout keys for :project
.
Path parameters
project-slug (required)
Path Parameter — Project slug in the form vcs-slug/org-name/repo-name
. The /
characters may be URL-escaped. default: null
Return type
Example data
Content-Type: application/json
{
"next_page_token" : "next_page_token",
"items" : [ {
"fingerprint" : "c9:0b:1c:4f:d5:65:56:b9:ad:88:f9:81:2b:37:74:2f",
"public-key" : "ssh-rsa ...",
"created-at" : "2015-09-21T17:29:21.042Z",
"type" : "deploy-key",
"preferred" : true
}, {
"fingerprint" : "c9:0b:1c:4f:d5:65:56:b9:ad:88:f9:81:2b:37:74:2f",
"public-key" : "ssh-rsa ...",
"created-at" : "2015-09-21T17:29:21.042Z",
"type" : "deploy-key",
"preferred" : true
} ]
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
A sequence of checkout keys.
CheckoutKeyListResponse
default
Error response.
inline_response_default
Up
get /project/{project-slug}/envvar
List all environment variables (listEnvVars )
Returns four 'x' characters, in addition to the last four ASCII characters of the value, consistent with the display of environment variable values on the CircleCI website.
Path parameters
project-slug (required)
Path Parameter — Project slug in the form vcs-slug/org-name/repo-name
. The /
characters may be URL-escaped. default: null
Return type
Example data
Content-Type: application/json
{
"next_page_token" : "next_page_token",
"items" : [ {
"name" : "foo",
"value" : "xxxx1234"
}, {
"name" : "foo",
"value" : "xxxx1234"
} ]
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
A sequence of environment variables.
EnvironmentVariableListResponse
default
Error response.
inline_response_default
Up
get /me/collaborations
Collaborations (getCollaborations )
Provides the set of organizations of which a user is a member or a collaborator.
The set of organizations that a user can collaborate on is composed of:
Organizations that the current user belongs to across VCS types (e.g. BitBucket, GitHub)
The parent organization of repository that the user can collaborate on, but is not necessarily a member of
The organization of the current user's account
Return type
Example data
Content-Type: application/json
{
"vcs-type" : "vcs-type",
"avatar_url" : "avatar_url",
"name" : "name"
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
Collaborations
default
Error response.
inline_response_default
User Information (getCurrentUser )
Provides information about the user that is currently signed in.
Return type
Example data
Content-Type: application/json
{
"name" : "name",
"id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"login" : "login"
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
User login information.
User
default
Error response.
inline_response_default
User Information (getUser )
Provides information about the user with the given ID.
Path parameters
id (required)
Path Parameter — The unique ID of the user. default: null format: uuid
Return type
Example data
Content-Type: application/json
{
"name" : "name",
"id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"login" : "login"
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
User login information.
User
default
Error response.
inline_response_default
Up
post /workflow/{id}/approve/{approval_request_id}
Approve a job (approvePendingApprovalJobById )
Approves a pending approval job in a workflow.
Path parameters
approval_request_id (required)
Path Parameter — The ID of the job being approved. default: null format: uuid
id (required)
Path Parameter — The unique ID of the workflow. default: null format: uuid
Return type
Example data
Content-Type: application/json
{
"message" : "message"
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
202
A confirmation message.
MessageResponse
default
Error response.
inline_response_default
Up
post /workflow/{id}/cancel
Cancel a workflow (cancelWorkflow )
Cancels a running workflow.
Path parameters
id (required)
Path Parameter — The unique ID of the workflow. default: null format: uuid
Return type
Example data
Content-Type: application/json
{
"message" : "message"
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
202
A confirmation message.
MessageResponse
default
Error response.
inline_response_default
Get a workflow (getWorkflowById )
Returns summary fields of a workflow by ID.
Path parameters
id (required)
Path Parameter — The unique ID of the workflow. default: null format: uuid
Return type
Example data
Content-Type: application/json
{
"project_slug" : "gh/CircleCI-Public/api-preview-docs",
"canceled_by" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"pipeline_number" : 0,
"pipeline_id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"name" : "build-and-test",
"created_at" : "2000-01-23T04:56:07.000+00:00",
"id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"tag" : "setup",
"errored_by" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"stopped_at" : "2000-01-23T04:56:07.000+00:00",
"started_by" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"status" : "success"
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
A workflow object.
Workflow
default
Error response.
inline_response_default
Up
get /workflow/{id}/job
Get a workflow's jobs (listWorkflowJobs )
Returns a sequence of jobs for a workflow.
Path parameters
id (required)
Path Parameter — The unique ID of the workflow. default: null format: uuid
Return type
Example data
Content-Type: application/json
{
"next_page_token" : "next_page_token",
"items" : [ {
"project_slug" : "gh/CircleCI-Public/api-preview-docs",
"canceled_by" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"approved_by" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"approval_request_id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"name" : "name",
"started_at" : "2000-01-23T04:56:07.000+00:00",
"job_number" : 0,
"id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"type" : "build",
"stopped_at" : "2000-01-23T04:56:07.000+00:00",
"dependencies" : [ "046b6c7f-0b8a-43b9-b35d-6489e6daee91", "046b6c7f-0b8a-43b9-b35d-6489e6daee91" ],
"status" : ""
}, {
"project_slug" : "gh/CircleCI-Public/api-preview-docs",
"canceled_by" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"approved_by" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"approval_request_id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"name" : "name",
"started_at" : "2000-01-23T04:56:07.000+00:00",
"job_number" : 0,
"id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"type" : "build",
"stopped_at" : "2000-01-23T04:56:07.000+00:00",
"dependencies" : [ "046b6c7f-0b8a-43b9-b35d-6489e6daee91", "046b6c7f-0b8a-43b9-b35d-6489e6daee91" ],
"status" : ""
} ]
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
A paginated sequence of jobs.
WorkflowJobListResponse
default
Error response.
inline_response_default
Up
post /workflow/{id}/rerun
Rerun a workflow (rerunWorkflow )
Reruns a workflow.
Path parameters
id (required)
Path Parameter — The unique ID of the workflow. default: null format: uuid
Consumes
This API call consumes the following media types via the request header:
Request body
Return type
Example data
Content-Type: application/json
{
"message" : "message"
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
202
A confirmation message.
MessageResponse
default
Error response.
inline_response_default
[ Jump to Methods ]
Table of Contents
Artifact
-
ArtifactListResponse
-
CheckoutKey
-
CheckoutKeyInput
- CheckoutKeyInput
CheckoutKeyListResponse
-
Collaboration
-
Context
-
EnvironmentVariableListResponse
-
EnvironmentVariablePair
-
EnvironmentVariablePair_1
- EnvironmentVariablePair
Job
-
Job_Details
-
Job_Details_contexts
-
Job_Details_executor
-
Job_Details_latest_workflow
-
Job_Details_messages
-
Job_Details_organization
-
Job_Details_parallel_runs
-
Job_Details_pipeline
-
Job_Details_project
-
MessageResponse
-
Pipeline
-
PipelineConfig
-
PipelineCreation
-
PipelineListResponse
-
PipelineListResponse_errors
-
PipelineListResponse_trigger
-
PipelineListResponse_trigger_actor
-
PipelineListResponse_vcs
-
PipelineListResponse_vcs_commit
-
Project
-
Project_vcs_info
-
RerunWorkflowParameters
- RerunWorkflowParameters
TestsResponse
-
TestsResponse_items
-
TriggerPipelineParameters
- TriggerPipelineParameters
User
-
Workflow
-
WorkflowJobListResponse
-
WorkflowListResponse
-
inline_object
-
inline_object_1
-
inline_object_2
-
inline_response_200
-
inline_response_200_1
-
inline_response_200_1_items
-
inline_response_200_2
-
inline_response_200_2_items
-
inline_response_200_2_metrics
-
inline_response_200_2_metrics_duration_metrics
-
inline_response_200_3
-
inline_response_200_3_items
-
inline_response_200_4
-
inline_response_200_4_items
-
inline_response_200_4_metrics
-
inline_response_200_4_metrics_duration_metrics
-
inline_response_200_5
-
inline_response_200_5_items
-
inline_response_200_6
-
inline_response_200_6_most_failed_tests
-
inline_response_200_6_test_counts
-
inline_response_200_6_test_runs
-
inline_response_default
-
An artifact
path
node_index
Long The index of the node that stored the artifact. format: int64
url
String The URL to download the artifact contents.
items
next_page_token
String A token to pass as a
page-token
query parameter to return the next page of results.
publicMinuskey
type
String The type of checkout key. This may be either
deploy-key
or
github-user-key
.
deploy-key
github-user-key
fingerprint
String An SSH key fingerprint.
preferred
Boolean A boolean value that indicates if this key is preferred.
createdMinusat
Date The date and time the checkout key was created. format: date-time
type
String The type of checkout key to create. This may be either
deploy-key
or
user-key
.
user-key
deploy-key
items
next_page_token
String A token to pass as a
page-token
query parameter to return the next page of results.
vcsMinustype
name
String The name of the organization
avatar_url
String URL to the user's avatar on the VCS
id
UUID The unique ID of the context. format: uuid
name
String The user defined name of the context.
created_at
Date The date and time the context was created. format: date-time
items
next_page_token
String A token to pass as a
page-token
query parameter to return the next page of results.
name
String The name of the environment variable.
value
String The value of the environment variable.
name
String The name of the environment variable.
value
String The value of the environment variable.
Job
canceled_by (optional)
UUID The unique ID of the user. format: uuid
dependencies
array[UUID] A sequence of the unique job IDs for the jobs that this job depends upon in the workflow. format: uuid
job_number (optional)
Long The number of the job. format: int64
id
UUID The unique ID of the job. format: uuid
started_at
Date The date and time the job started. format: date-time
name
approved_by (optional)
UUID The unique ID of the user. format: uuid
project_slug
String The project-slug for the job.
status
Object The current status of the job.
type
build
approval
stopped_at (optional)
Date The time when the job stopped. format: date-time
approval_request_id (optional)
UUID The unique ID of the job. format: uuid
Job Details
web_url
String URL of the job in CircleCI Web UI.
project
parallel_runs
started_at
Date The date and time the job started. format: date-time
latest_workflow
name
executor
parallelism
Long A number of parallel runs the job has. format: int64
status
Object The current status of the job.
number
Long The number of the job. format: int64
pipeline
duration
Long Duration of a job in milliseconds. format: int64
created_at
Date The time when the job was created. format: date-time
messages
contexts
organization
queued_at
Date The time when the job was placed in a queue. format: date-time
stopped_at (optional)
Date The time when the job stopped. format: date-time
Information about the context.
name
String The name of the context.
Information about executor used for a job.
Info about the latest workflow the job was a part of.
id
UUID The unique ID of the workflow. format: uuid
name
String The name of the workflow.
Message from CircleCI execution platform.
type
message
String Information describing message.
reason (optional)
String Value describing the reason for message to be added to the job.
Information about an organization.
name
String The name of the organization.
Info about a status of the parallel run.
index
Long Index of the parallel run. format: int64
status
String Status of the parallel run.
Info about a pipeline the job is a part of.
id
UUID The unique ID of the pipeline. format: uuid
Information about a project.
slug
String Project slug in the form
vcs-slug/org-name/repo-name
. The
/
characters may be URL-escaped.
name
String The name of the project
external_url
String URL to the repository hosting the project's code
message response
message
String A human-readable message
A pipeline response.
id
UUID The unique ID of the pipeline. format: uuid
errors
project_slug
String The project-slug for the pipeline.
updated_at (optional)
Date The date and time the pipeline was last updated. format: date-time
number
Long The number of the pipeline. format: int64
state
String The current state of the pipeline.
created
errored
setup-pending
setup
pending
created_at
Date The date and time the pipeline was created. format: date-time
trigger
vcs (optional)
The configuration strings for the pipeline.
source
String The source configuration for the pipeline, before any config compilation has been performed. If there is no config, then this field will be empty.
compiled
String The compiled configuration for the pipeline, after all orb expansion has been performed. If there were errors processing the pipeline's configuration, then this field may be empty.
setupMinusconfig (optional)
String The setup configuration for the pipeline used for Setup Workflows. If there were errors processing the pipeline's configuration or if setup workflows are not enabled, then this field should not exist
compiledMinussetupMinusconfig (optional)
String The compiled setup configuration for the pipeline, after all orb expansion has been performed. If there were errors processing the pipeline's setup workflows, then this field may be empty.
A pipeline creation response.
id
UUID The unique ID of the pipeline. format: uuid
state
String The current state of the pipeline.
created
errored
setup-pending
setup
pending
number
Long The number of the pipeline. format: int64
created_at
Date The date and time the pipeline was created. format: date-time
List of pipelines
items
next_page_token
String A token to pass as a
page-token
query parameter to return the next page of results.
An error with a type and message.
type
config
plan
message
String A human-readable error message.
A summary of the trigger.
type
explicit
api
webhook
received_at
Date The date and time the trigger was received. format: date-time
actor
The user who triggered the Pipeline.
login
String The login information for the user on the VCS.
avatar_url
String URL to the user's avatar on the VCS
VCS information for the pipeline.
provider_name
String Name of the VCS provider (e.g. GitHub, Bitbucket).
target_repository_url
String URL for the repository the trigger targets (i.e. the repository where the PR will be merged). For fork-PR pipelines, this is the URL to the parent repo. For other pipelines, the
origin_
and
target_repository_url
s will be the same.
branch (optional)
String The branch where the pipeline ran. The HEAD commit on this branch was used for the pipeline. Note that
branch
and
tag
are mutually exclusive. To trigger a pipeline for a PR by number use
pull/<number>/head
for the PR ref or
pull/<number>/merge
for the merge ref (GitHub only).
review_id (optional)
review_url (optional)
revision
String The code revision the pipeline ran.
tag (optional)
String The tag used by the pipeline. The commit that this tag points to was used for the pipeline. Note that
branch
and
tag
are mutually exclusive.
commit (optional)
origin_repository_url
String URL for the repository where the trigger originated. For fork-PR pipelines, this is the URL to the fork. For other pipelines the
origin_
and
target_repository_url
s will be the same.
The latest commit in the pipeline.
subject
String The subject of the commit message.
body
String The body of the commit message.
NOTE: The definition of Project is subject to change.
slug
String Project slug in the form
vcs-slug/org-name/repo-name
. The
/
characters may be URL-escaped.
name
String The name of the project
organization_name
String The name of the organization the project belongs to
vcs_info
Information about the VCS that hosts the project source code.
vcs_url
String URL to the repository hosting the project's code
provider
Bitbucket
CircleCI
GitHub
default_branch
The information you can supply when rerunning a workflow.
jobs (optional)
from_failed (optional)
Boolean Whether to rerun the workflow from the failed job. Mutually exclusive with the jobs parameter.
sparse_tree (optional)
Boolean Completes rerun using sparse trees logic, an optimization for workflows that have disconnected subgraphs. Requires jobs parameter and so is mutually exclusive with the from_failed parameter.
items
next_page_token
String A token to pass as a
page-token
query parameter to return the next page of results.
message
String The failure message associated with the test.
source
String The program that generated the test results
run_time
Double The time it took to run the test in seconds format: double
file
String The file in which the test is defined.
result
String Indication of whether the test succeeded.
name
classname
String The programmatic location of the test.
The information you can supply when triggering a pipeline.
branch (optional)
String The branch where the pipeline ran. The HEAD commit on this branch was used for the pipeline. Note that
branch
and
tag
are mutually exclusive. To trigger a pipeline for a PR by number use
pull/<number>/head
for the PR ref or
pull/<number>/merge
for the merge ref (GitHub only).
tag (optional)
String The tag used by the pipeline. The commit that this tag points to was used for the pipeline. Note that
branch
and
tag
are mutually exclusive.
parameters (optional)
id
UUID The unique ID of the user. format: uuid
login
String The login information for the user on the VCS.
name
A workflow
pipeline_id
UUID The ID of the pipeline this workflow belongs to. format: uuid
canceled_by (optional)
id
UUID The unique ID of the workflow. format: uuid
name
String The name of the workflow.
project_slug
String The project-slug for the pipeline this workflow belongs to.
errored_by (optional)
tag (optional)
String Tag used for the workflow
setup
status
String The current status of the workflow.
success
running
not_run
failed
error
failing
on_hold
canceled
unauthorized
started_by
pipeline_number
Long The number of the pipeline this workflow belongs to. format: int64
created_at
Date The date and time the workflow was created. format: date-time
stopped_at
Date The date and time the workflow stopped. format: date-time
items
next_page_token
String A token to pass as a
page-token
query parameter to return the next page of results.
A list of workflows and associated pagination token.
items
next_page_token
String A token to pass as a
page-token
query parameter to return the next page of results.
name
String The user defined name of the context.
owner
value
String The value of the environment variable
continuationMinuskey
String A pipeline continuation key.
configuration
String A configuration string for the pipeline.
parameters (optional)
items
next_page_token
String A token to pass as a
page-token
query parameter to return the next page of results.
items
next_page_token
String A token to pass as a
page-token
query parameter to return the next page of results.
variable
String The name of the environment variable
created_at
Date The date and time the environment variable was created. format: date-time
context_id
UUID ID of the context (UUID) format: uuid
Paginated workflow summary metrics.
items
next_page_token
String A token to pass as a
page-token
query parameter to return the next page of results.
name
String The name of the workflow.
window_start
Date The start of the aggregation window for workflow metrics. format: date-time
window_end
Date The end of the aggregation window for workflow metrics. format: date-time
metrics
Metrics relating to a workflow's runs.
total_runs
Long The total number of runs. format: int64
successful_runs
Long The number of successful runs. format: int64
mttr
Long The mean time to recovery (mean time between failures and their next success) in seconds. format: int64
total_credits_used
Long The total credits consumed by the workflow in the aggregation window. Note that Insights is not a real time financial reporting tool and should not be used for credit reporting. format: int64
failed_runs
Long The number of failed runs. format: int64
success_rate
duration_metrics
total_recoveries
Long The number of recovered workflow executions per day. format: int64
throughput
Float The average number of runs per day. format: float
Metrics relating to the duration of runs for a workflow.
min
Long The minimum duration, in seconds, among a group of runs. format: int64
mean
Long The mean duration, in seconds, among a group of runs. format: int64
median
Long The median duration, in seconds, among a group of runs. format: int64
p95
Long The 95th percentile duration, in seconds, among a group of runs. format: int64
max
Long The max duration, in seconds, among a group of runs. format: int64
standard_deviation
Float The standard deviation, in seconds, among a group of runs. format: float
Paginated recent workflow runs.
items
next_page_token
String A token to pass as a
page-token
query parameter to return the next page of results.
id
UUID The unique ID of the workflow. format: uuid
branch
String The VCS branch of a Workflow's trigger.
duration
Long The duration in seconds of a run. format: int64
created_at
Date The date and time the workflow was created. format: date-time
stopped_at
Date The date and time the workflow stopped. format: date-time
credits_used
Long The number of credits used during execution. Note that Insights is not a real time financial reporting tool and should not be used for credit reporting. format: int64
status
success
failed
error
canceled
unauthorized
Paginated workflow job summary metrics.
items
next_page_token
String A token to pass as a
page-token
query parameter to return the next page of results.
name
window_start
Date The start of the aggregation window for job metrics. format: date-time
window_end
Date The end of the aggregation window for job metrics. format: date-time
metrics
Metrics relating to a workflow job's runs.
success_rate
total_runs
Long The total number of runs. format: int64
failed_runs
Long The number of failed runs. format: int64
successful_runs
Long The number of successful runs. format: int64
throughput
Float The average number of runs per day. format: float
total_credits_used
Long The total credits consumed by the job in the aggregation window. Note that Insights is not a real time financial reporting tool and should not be used for credit reporting. format: int64
duration_metrics
Metrics relating to the duration of runs for a workflow job.
min
Long The minimum duration, in seconds, among a group of runs. format: int64
mean
Long The mean duration, in seconds, among a group of runs. format: int64
median
Long The median duration, in seconds, among a group of runs. format: int64
p95
Long The 95th percentile duration, in seconds, among a group of runs. format: int64
max
Long The max duration, in seconds, among a group of runs. format: int64
standard_deviation
Float The standard deviation, in seconds, among a group of runs. format: float
Paginated recent job runs.
items
next_page_token
String A token to pass as a
page-token
query parameter to return the next page of results.
id
UUID The unique ID of the job. format: uuid
started_at
Date The date and time the job started. format: date-time
stopped_at
Date The time when the job stopped. format: date-time
status
success
not_run
failed
canceled
unauthorized
duration
Long The duration in seconds of a run. format: int64
credits_used
Long The number of credits used during execution. Note that Insights is not a real time financial reporting tool and should not be used for credit reporting. format: int64
Project level test metrics response
average_test_count
Long The average number of tests executed per run format: int64
most_failed_tests
most_failed_tests_extra
Long The number of tests with the same success rate being omitted from most_failed_tests format: int64
slowest_tests
slowest_tests_extra
Long The number of tests with the same duration rate being omitted from slowest_tests format: int64
total_test_runs
Long The total number of test runs format: int64
test_runs
failed_runs
Long The number of times the test failed format: int64
job_name
p95_duration
Double The 95th percentile duration, in seconds, among a group of test runs. format: double
test_name
total_runs
Long The total number of times the test was run. format: int64
flaky
Test counts for a given pipeline number
error
Long The number of tests with the error status format: int64
failure
Long The number of tests with the failure status format: int64
skipped
Long The number of tests with the skipped status format: int64
success
Long The number of tests with the success status format: int64
total
Long The total number of tests format: int64
pipeline_number
Long The number of the pipeline associated with the provided test counts format: int64
workflow_id
Object The ID of the workflow associated with the provided test counts
success_rate
Float The success rate calculated from test counts format: float
test_counts