List deployments

deployments(projectReference: String!, environmentId: ID, limit: Int, cursor: String, sortBy: String, sortOrder: DeploymentSortOrder): DeploymentsConnection!

Requires project.deployments.read.

Arguments

ArgumentTypeRequiredDescription
projectReferenceString!YesProject UUID, slug or configured domain.
environmentIdIDNoOnly deployments of this environment of the project.
limitIntNoDeployments per page, between 1 and 100. Defaults to 20.
cursorStringNopageInfo.endCursor of the previous page.
sortByStringNoSort field. Only created_at.
sortOrderDeploymentSortOrderNoSort direction by creation time. Defaults to desc.

Response

Returns DeploymentsConnection!. Open the type for its fields and nested types.

FieldType
data[Deployment!]!
pageInfoPageInfo!

Types marked with ! cannot be null. Lists use [Type] notation. The type index lists all published input and response types.

Example

graphql
query Deployments($projectReference: String!, $environmentId: ID, $limit: Int, $cursor: String, $sortBy: String, $sortOrder: DeploymentSortOrder) {
  deployments(projectReference: $projectReference, environmentId: $environmentId, limit: $limit, cursor: $cursor, sortBy: $sortBy, sortOrder: $sortOrder) {
    data {
      id
      createdAt
      updatedAt
      environmentId
      releaseId
    }
    pageInfo {
      hasNextPage
      endCursor
      hasPreviousPage
      startCursor
    }
  }
}
json
{
  "projectReference": "00000000-0000-4000-8000-000000000001"
}