CircleCI API

This describes the resources that make up the CircleCI API v2.
More information: https://openapi-generator.tech
Contact Info: team@openapitools.org
Version: v2
BasePath:/api/v2
MIT
http://apache.org/licenses/LICENSE-2.0.html

Access

  1. APIKey KeyParamName:Circle-Token KeyInQuery:false KeyInHeader:true
  2. APIKey KeyParamName:circle-token KeyInQuery:true KeyInHeader:false
  3. HTTP Basic Authentication

Methods

[ Jump to Models ]

Table of Contents

Context

Insights

Job

Pipeline

Project

User

Workflow

Context

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 Content-Type request header:

Request body

inline_object_1 inline_object_1 (optional)
Body Parameter

Return type

anyOf

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

The new environment variable anyOf

default

Error response. inline_response_default

Up
post /context
Create a new context (createContext)

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

inline_object inline_object (optional)
Body Parameter

Return type

Context

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 Accept request header; the media type will be conveyed by the Content-Type 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

MessageResponse

Example data

Content-Type: application/json
{
  "message" : "message"
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type 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

MessageResponse

Example data

Content-Type: application/json
{
  "message" : "message"
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type 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

Context

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 Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

The context Context

default

Error response. inline_response_default

Up
get /context
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

inline_response_200

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 Accept request header; the media type will be conveyed by the Content-Type 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

inline_response_200_1

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 Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

A paginated list of environment variables inline_response_200_1

default

Error response. inline_response_default

Insights

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

inline_response_200_5

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 Accept request header; the media type will be conveyed by the Content-Type 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

inline_response_200_4

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 Accept request header; the media type will be conveyed by the Content-Type 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

inline_response_200_2

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 Accept request header; the media type will be conveyed by the Content-Type 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

inline_response_200_3

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 Accept request header; the media type will be conveyed by the Content-Type 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

inline_response_200_6

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 Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

A list of test metrics by workflow inline_response_200_6

default

Error response. inline_response_default

Job

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

MessageResponse

Example data

Content-Type: application/json
{
  "message" : "message"
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type 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

ArtifactListResponse

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 Accept request header; the media type will be conveyed by the Content-Type 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

Job_Details

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 Accept request header; the media type will be conveyed by the Content-Type 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

TestsResponse

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 Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

A paginated list of test results. TestsResponse

default

Error response. inline_response_default

Pipeline

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 Content-Type request header:

Request body

inline_object_2 inline_object_2 (optional)
Body Parameter

Return type

MessageResponse

Example data

Content-Type: application/json
{
  "message" : "message"
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type 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

Pipeline

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 Accept request header; the media type will be conveyed by the Content-Type 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

Pipeline

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 Accept request header; the media type will be conveyed by the Content-Type 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

PipelineConfig

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 Accept request header; the media type will be conveyed by the Content-Type 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

PipelineListResponse

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 Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

A sequence of pipelines. PipelineListResponse

default

Error response. inline_response_default

Up
get /pipeline
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

PipelineListResponse

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 Accept request header; the media type will be conveyed by the Content-Type 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

PipelineListResponse

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 Accept request header; the media type will be conveyed by the Content-Type 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

WorkflowListResponse

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 Accept request header; the media type will be conveyed by the Content-Type 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 Content-Type request header:

Request body

TriggerPipelineParameters TriggerPipelineParameters (optional)
Body Parameter

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

PipelineCreation

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 Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

201

The created pipeline. PipelineCreation

default

Error response. inline_response_default

Project

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 Content-Type request header:

Request body

CheckoutKeyInput CheckoutKeyInput (optional)
Body Parameter

Return type

CheckoutKey

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 Accept request header; the media type will be conveyed by the Content-Type 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 Content-Type request header:

Request body

EnvironmentVariablePair_1 EnvironmentVariablePair_1 (optional)
Body Parameter

Return type

EnvironmentVariablePair

Example data

Content-Type: application/json
{
  "name" : "foo",
  "value" : "xxxx1234"
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type 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

MessageResponse

Example data

Content-Type: application/json
{
  "message" : "message"
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type 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

MessageResponse

Example data

Content-Type: application/json
{
  "message" : "message"
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type 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

CheckoutKey

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 Accept request header; the media type will be conveyed by the Content-Type 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

EnvironmentVariablePair

Example data

Content-Type: application/json
{
  "name" : "foo",
  "value" : "xxxx1234"
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type 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

Project

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 Accept request header; the media type will be conveyed by the Content-Type 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

CheckoutKeyListResponse

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 Accept request header; the media type will be conveyed by the Content-Type 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

EnvironmentVariableListResponse

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 Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

A sequence of environment variables. EnvironmentVariableListResponse

default

Error response. inline_response_default

User

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:

Return type

array[Collaboration]

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 Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Collaborations

default

Error response. inline_response_default

Up
get /me
User Information (getCurrentUser)
Provides information about the user that is currently signed in.

Return type

User

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 Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

User login information. User

default

Error response. inline_response_default

Up
get /user/{id}
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

User

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 Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

User login information. User

default

Error response. inline_response_default

Workflow

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

MessageResponse

Example data

Content-Type: application/json
{
  "message" : "message"
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type 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

MessageResponse

Example data

Content-Type: application/json
{
  "message" : "message"
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

202

A confirmation message. MessageResponse

default

Error response. inline_response_default

Up
get /workflow/{id}
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

Workflow

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 Accept request header; the media type will be conveyed by the Content-Type 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

WorkflowJobListResponse

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 Accept request header; the media type will be conveyed by the Content-Type 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 Content-Type request header:

Request body

RerunWorkflowParameters RerunWorkflowParameters (optional)
Body Parameter

Return type

MessageResponse

Example data

Content-Type: application/json
{
  "message" : "message"
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

202

A confirmation message. MessageResponse

default

Error response. inline_response_default

Models

[ Jump to Methods ]

Table of Contents

  1. Artifact -
  2. ArtifactListResponse -
  3. CheckoutKey -
  4. CheckoutKeyInput - CheckoutKeyInput
  5. CheckoutKeyListResponse -
  6. Collaboration -
  7. Context -
  8. EnvironmentVariableListResponse -
  9. EnvironmentVariablePair -
  10. EnvironmentVariablePair_1 - EnvironmentVariablePair
  11. Job -
  12. Job_Details -
  13. Job_Details_contexts -
  14. Job_Details_executor -
  15. Job_Details_latest_workflow -
  16. Job_Details_messages -
  17. Job_Details_organization -
  18. Job_Details_parallel_runs -
  19. Job_Details_pipeline -
  20. Job_Details_project -
  21. MessageResponse -
  22. Pipeline -
  23. PipelineConfig -
  24. PipelineCreation -
  25. PipelineListResponse -
  26. PipelineListResponse_errors -
  27. PipelineListResponse_trigger -
  28. PipelineListResponse_trigger_actor -
  29. PipelineListResponse_vcs -
  30. PipelineListResponse_vcs_commit -
  31. Project -
  32. Project_vcs_info -
  33. RerunWorkflowParameters - RerunWorkflowParameters
  34. TestsResponse -
  35. TestsResponse_items -
  36. TriggerPipelineParameters - TriggerPipelineParameters
  37. User -
  38. Workflow -
  39. WorkflowJobListResponse -
  40. WorkflowListResponse -
  41. inline_object -
  42. inline_object_1 -
  43. inline_object_2 -
  44. inline_response_200 -
  45. inline_response_200_1 -
  46. inline_response_200_1_items -
  47. inline_response_200_2 -
  48. inline_response_200_2_items -
  49. inline_response_200_2_metrics -
  50. inline_response_200_2_metrics_duration_metrics -
  51. inline_response_200_3 -
  52. inline_response_200_3_items -
  53. inline_response_200_4 -
  54. inline_response_200_4_items -
  55. inline_response_200_4_metrics -
  56. inline_response_200_4_metrics_duration_metrics -
  57. inline_response_200_5 -
  58. inline_response_200_5_items -
  59. inline_response_200_6 -
  60. inline_response_200_6_most_failed_tests -
  61. inline_response_200_6_test_counts -
  62. inline_response_200_6_test_runs -
  63. inline_response_default -

Artifact - Up

An artifact
path
String The 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.

ArtifactListResponse - Up

items
next_page_token
String A token to pass as a page-token query parameter to return the next page of results.

CheckoutKey - Up

publicMinuskey
String A public SSH key.
type
String The type of checkout key. This may be either deploy-key or github-user-key.
Enum:
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

CheckoutKeyInput - CheckoutKeyInput Up

type
String The type of checkout key to create. This may be either deploy-key or user-key.
Enum:
user-key
deploy-key

CheckoutKeyListResponse - Up

items
next_page_token
String A token to pass as a page-token query parameter to return the next page of results.

Collaboration - Up

vcsMinustype
String The VCS provider
name
String The name of the organization
avatar_url
String URL to the user's avatar on the VCS

Context - Up

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

EnvironmentVariableListResponse - Up

items
next_page_token
String A token to pass as a page-token query parameter to return the next page of results.

EnvironmentVariablePair - Up

name
String The name of the environment variable.
value
String The value of the environment variable.

EnvironmentVariablePair_1 - EnvironmentVariablePair Up

name
String The name of the environment variable.
value
String The value of the environment variable.

Job - Up

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
String The name of the job.
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
String The type of job.
Enum:
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 - Up

Job Details
web_url
String URL of the job in CircleCI Web UI.
project
parallel_runs
array[Job_Details_parallel_runs] Info about parallels runs and their status.
started_at
Date The date and time the job started. format: date-time
latest_workflow
name
String The name of the job.
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
array[Job_Details_messages] Messages from CircleCI execution platform.
contexts
array[Job_Details_contexts] List of contexts used by the job.
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

Job_Details_contexts - Up

Information about the context.
name
String The name of the context.

Job_Details_executor - Up

Information about executor used for a job.
type
String Executor type.
resource_class
String Resource class name.

Job_Details_latest_workflow - Up

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.

Job_Details_messages - Up

Message from CircleCI execution platform.
type
String Message type.
message
String Information describing message.
reason (optional)
String Value describing the reason for message to be added to the job.

Job_Details_organization - Up

Information about an organization.
name
String The name of the organization.

Job_Details_parallel_runs - Up

Info about a status of the parallel run.
index
Long Index of the parallel run. format: int64
status
String Status of the parallel run.

Job_Details_pipeline - Up

Info about a pipeline the job is a part of.
id
UUID The unique ID of the pipeline. format: uuid

Job_Details_project - Up

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

MessageResponse - Up

message response
message
String A human-readable message

Pipeline - Up

A pipeline response.
id
UUID The unique ID of the pipeline. format: uuid
errors
array[PipelineListResponse_errors] A sequence of errors that have occurred within the pipeline.
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.
Enum:
created
errored
setup-pending
setup
pending
created_at
Date The date and time the pipeline was created. format: date-time
trigger
vcs (optional)

PipelineConfig - Up

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.

PipelineCreation - Up

A pipeline creation response.
id
UUID The unique ID of the pipeline. format: uuid
state
String The current state of the pipeline.
Enum:
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

PipelineListResponse - Up

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.

PipelineListResponse_errors - Up

An error with a type and message.
type
String The type of error.
Enum:
config
plan
message
String A human-readable error message.

PipelineListResponse_trigger - Up

A summary of the trigger.
type
String The type of trigger.
Enum:
explicit
api
webhook
received_at
Date The date and time the trigger was received. format: date-time
actor

PipelineListResponse_trigger_actor - Up

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

PipelineListResponse_vcs - Up

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_urls 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)
String The code review id.
review_url (optional)
String The code review URL.
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_urls will be the same.

PipelineListResponse_vcs_commit - Up

The latest commit in the pipeline.
subject
String The subject of the commit message.
body
String The body of the commit message.

Project - Up

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

Project_vcs_info - Up

Information about the VCS that hosts the project source code.
vcs_url
String URL to the repository hosting the project's code
provider
String The VCS provider
Enum:
Bitbucket
CircleCI
GitHub
default_branch

RerunWorkflowParameters - RerunWorkflowParameters Up

The information you can supply when rerunning a workflow.
jobs (optional)
array[UUID] A list of job IDs to rerun. format: uuid
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.

TestsResponse - Up

items
next_page_token
String A token to pass as a page-token query parameter to return the next page of results.

TestsResponse_items - Up

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
String The name of the test.
classname
String The programmatic location of the test.

TriggerPipelineParameters - TriggerPipelineParameters Up

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)
map[String, anyOf] An object containing pipeline parameters and their values.

User - Up

id
UUID The unique ID of the user. format: uuid
login
String The login information for the user on the VCS.
name
String The name of the user.

Workflow - Up

A workflow
pipeline_id
UUID The ID of the pipeline this workflow belongs to. format: uuid
canceled_by (optional)
UUID format: uuid
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)
UUID format: uuid
tag (optional)
String Tag used for the workflow
Enum:
setup
status
String The current status of the workflow.
Enum:
success
running
not_run
failed
error
failing
on_hold
canceled
unauthorized
started_by
UUID format: uuid
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

WorkflowJobListResponse - Up

items
next_page_token
String A token to pass as a page-token query parameter to return the next page of results.

WorkflowListResponse - Up

A list of workflows and associated pagination token.
items
array[Workflow] A list of workflows.
next_page_token
String A token to pass as a page-token query parameter to return the next page of results.

inline_object - Up

name
String The user defined name of the context.
owner

inline_object_1 - Up

value
String The value of the environment variable

inline_object_2 - Up

continuationMinuskey
String A pipeline continuation key.
configuration
String A configuration string for the pipeline.
parameters (optional)
map[String, anyOf] An object containing pipeline parameters and their values.

inline_response_200 - Up

items
next_page_token
String A token to pass as a page-token query parameter to return the next page of results.

inline_response_200_1 - Up

items
next_page_token
String A token to pass as a page-token query parameter to return the next page of results.

inline_response_200_1_items - Up

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

inline_response_200_2 - Up

Paginated workflow summary metrics.
items
array[inline_response_200_2_items] Workflow summary metrics.
next_page_token
String A token to pass as a page-token query parameter to return the next page of results.

inline_response_200_2_items - Up

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

inline_response_200_2_metrics - Up

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
Float format: float
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

inline_response_200_2_metrics_duration_metrics - Up

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

inline_response_200_3 - Up

Paginated recent workflow runs.
items
array[inline_response_200_3_items] Recent workflow runs.
next_page_token
String A token to pass as a page-token query parameter to return the next page of results.

inline_response_200_3_items - Up

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
String Workflow status.
Enum:
success
failed
error
canceled
unauthorized

inline_response_200_4 - Up

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.

inline_response_200_4_items - Up

name
String The name of the job.
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

inline_response_200_4_metrics - Up

Metrics relating to a workflow job's runs.
success_rate
Float format: float
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

inline_response_200_4_metrics_duration_metrics - Up

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

inline_response_200_5 - Up

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.

inline_response_200_5_items - Up

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
String Job status.
Enum:
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

inline_response_200_6 - Up

Project level test metrics response
average_test_count
Long The average number of tests executed per run format: int64
most_failed_tests
array[inline_response_200_6_most_failed_tests] Metrics for the most frequently failing 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
array[inline_response_200_6_most_failed_tests] Metrics for the slowest running 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
array[inline_response_200_6_test_runs] Test counts grouped by pipeline number and workflow id

inline_response_200_6_most_failed_tests - Up

failed_runs
Long The number of times the test failed format: int64
job_name
String The name of the job.
p95_duration
Double The 95th percentile duration, in seconds, among a group of test runs. format: double
test_name
String The name of the test.
total_runs
Long The total number of times the test was run. format: int64
flaky
Boolean Whether the test is flaky.

inline_response_200_6_test_counts - Up

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

inline_response_200_6_test_runs - Up

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

inline_response_default - Up

message (optional)