---
title: "Get a pipeline by pipeline number"
method: GET
path: "/project/{project-slug}/pipeline/{pipeline-number}"
tags: ["Pipeline"]
---

# Get a pipeline by pipeline number

`GET /project/{project-slug}/pipeline/{pipeline-number}`

## Request

- Base URL: `https://circleci.com/api/v2`
- URL: `https://circleci.com/api/v2/project/{project-slug}/pipeline/{pipeline-number}`
- Auth: one of:
  - API key in header `Circle-Token`
  - HTTP bearer
  - HTTP basic
  - API key in query parameter `circle-token`

Returns a pipeline by the pipeline number.

## Path parameters

- `project-slug` string, required
- `pipeline-number` unknown, required

## Response `200`

A pipeline object.

- object: A pipeline response.
  - `id` string, uuid, required: The unique ID of the pipeline.
  - `errors` object[], required: A sequence of errors that have occurred within the pipeline.
    - `type` 'config' | 'invalid-trigger-setup' | 'config-fetch' | 'timeout' | 'permission' | 'other' | 'trigger-rule' | 'plan', required: The type of error.
    - `message` string, required: A human-readable error message.
  - `project_slug` string, required: The project-slug for the pipeline.
  - `updated_at` string, date-time: The date and time the pipeline was last updated.
  - `number` integer, required: The number of the pipeline.
  - `trigger_parameters` object
  - `state` 'created' | 'errored' | 'setup-pending' | 'setup' | 'pending', required: The current state of the pipeline.
  - `created_at` string, date-time, required: The date and time the pipeline was created.
  - `warnings` object[], required: A sequence of warnings that have occurred within the pipeline.
    - `type` 'config-deprecated-syntax', required: The type of warning.
    - `message` string, required: A human-readable warning message.
  - `trigger` object, required: A summary of the trigger.
    - `type` 'scheduled_pipeline' | 'explicit' | 'api' | 'webhook', required: The type of trigger.
    - `received_at` string, date-time, required: The date and time the trigger was received.
    - `actor` object, required: The user who triggered the Pipeline.
      - `login` string, required: The login information for the user on the VCS.
      - `avatar_url` string, required: URL to the user's avatar on the VCS
  - `vcs` object: VCS information for the pipeline.
    - `provider_name` string, required: Name of the VCS provider (e.g. GitHub, Bitbucket).
    - `target_repository_url` string, required: 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` 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` string: The code review id.
    - `review_url` string: The code review URL.
    - `revision` string, required: The code revision the pipeline ran.
    - `tag` 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` object: The latest commit in the pipeline.
      - `subject` string, required: The subject of the commit message.
      - `body` string, required: The body of the commit message.
    - `origin_repository_url` string, required: 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.

## Other responses

- `default`: Error response.

---

[API](https://skmtc.dev/circleci/apis/circleci-api.md) - [All operations](https://skmtc.dev/circleci/apis/circleci-api/llms.txt) - [OpenAPI document](https://skmtc.dev/circleci/apis/circleci-api/revisions/b9c0e0c24058?raw)
