Annotations API

Annotation data model

An annotation is a snippet of Markdown uploaded by your agent during the execution of a build’s job. Annotations are created using the buildkite-agent annotate command from within a job.

id ID of the annotation
context The "context" specified when annotating the build. Only one annotation per build may have any given context value.
style The style of the annotation. Can be `success`, `info`, `warning` or `error`.
body_html Rendered HTML of the annotation's body
created_at When the annotation was first created
updated_at When the annotation was last added to or replaced

List annotations for a build

Returns a paginated list of a build’s annotations.

Note that you need the build number to retrieve annotations, not the build ID.
curl "{org.slug}/pipelines/{pipeline.slug}/builds/{build.number}/annotations"
    "id": "de0d4ab5-6360-467a-a34b-e5ef5db5320d",
    "context": "default",
    "style": "info",
    "body_html": "<h1>My Markdown Heading</h1>\n<img src=\"artifact://indy.png\" alt=\"Belongs in a museum\" height=250 />",
    "created_at": "2019-04-09T18:07:15.775Z",
    "updated_at": "2019-08-06T20:58:49.396Z"
    "id": "5b3ceff6-78cb-4fe9-88ae-51be5f145977",
    "context": "coverage",
    "style": "info",
    "body_html": "Read the <a href=\"artifact://coverage/index.html\">uploaded coverage report</a>",
    "created_at": "2019-04-09T18:07:16.320Z",
    "updated_at": "2019-04-09T18:07:16.320Z"

Required scope: read_builds

Success response: 200 OK