Skip to content

Commit

Permalink
Merge pull request #2474 from buildkite/job-uuid-graphql-cookbook-add…
Browse files Browse the repository at this point in the history
…ition

Adds a query to find UUIDs of jobs in a build
  • Loading branch information
MelissaKaulfuss authored Sep 20, 2023
2 parents 9df9585 + 47633ee commit 332dafd
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions pages/apis/graphql/cookbooks/jobs.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,27 @@ query GetJobRunTimeByBuild{
}
}
```

## Get a job's UUID

To get UUIDs of the jobs in a build, you can use the following query.

```graphql
query GetJobsUUID {
build(slug: "org-slug/build-slug/build-number") {
jobs(first: 1) {
edges {
node {
... on JobTypeCommand {
uuid
}
}
}
}
}
}
```

## Cancel a job

If you need to cancel a job, you can use the following call with the job's ID:
Expand Down

0 comments on commit 332dafd

Please sign in to comment.