Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add REST API docs for creating annotations #2546

Merged
merged 4 commits into from
Feb 8, 2024

Conversation

timriley
Copy link
Member

@timriley timriley commented Nov 2, 2023

Document a new POST /v2/organizations/{org.slug}/pipelines/{pipeline.slug}/builds/{build.number}/annotations endpoint for creating build annotations.

While here:

  • Update the REST API jobs output to include recently added attributes: parallel_group_index, parallel_group_total, matrix, cluster_id, cluster_url, cluster_queue_id, cluster_queue_url
  • Fix an odd-one-out casing issue for our 201 Created status cods

- parallel_group_index
- parallel_group_total
- matrix
- cluster_id
- cluster_url
- cluster_queue_id
- cluster_queue_url
@buildkite-docs-bot
Copy link
Contributor

Preview URL: https://2546--bk-docs-preview.netlify.app

Copy link
Contributor

@mbelton-buildkite mbelton-buildkite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few small suggestions, but looking good in general 😊

pages/apis/rest_api/annotations.md Show resolved Hide resolved
pages/apis/rest_api/annotations.md Outdated Show resolved Hide resolved
pages/apis/rest_api/annotations.md Outdated Show resolved Hide resolved
pages/apis/rest_api/annotations.md Outdated Show resolved Hide resolved
Comment on lines +112 to +121
"retried_in_job_id": null,
"retries_count": null,
"retry_type": null,
"parallel_group_index": null,
"parallel_group_total": null,
"matrix": null,
"cluster_id": null,
"cluster_url": null,
"cluster_queue_id": null,
"cluster_queue_url": null
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the any meaningful values we could use here instead of null? We're not the best at including example values for fields so these responses do a lot of heavy lifting for us.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could definitely look to expand on some of these in the future, but in this case I want to get this (long overdue!) API doc update out, so I'm merging this now (after applying all of your other feedback, thank you!)

@timriley timriley requested a review from gilesgas as a code owner February 8, 2024 05:02
@timriley timriley enabled auto-merge (squash) February 8, 2024 05:05
@timriley timriley merged commit 0d48805 into main Feb 8, 2024
3 checks passed
@timriley timriley deleted the update-rest-api-cluster-ids-and-post-annotations branch February 8, 2024 05:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants