v2

latestOpenAPI 3.0.02026-08-013312111.4 MB
Reports
Commits

Get an annotation

Returns a single Annotation matching the provided ID.

get/repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId}/annotations/{annotationId}

Path parameters

workspacestring required

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

repo_slugstring required

The repository.

commitstring required

The commit the report belongs to.

reportIdstring required

Either the uuid or external-id of the report.

annotationIdstring required

Either the uuid or external-id of the annotation.

Response

OK

typestring required
external_idstring

ID of the annotation provided by the annotation creator. It can be used to identify the annotation as an alternative to it's generated uuid. It is not used by Bitbucket, but only by the annotation creator for updating or deleting this specific annotation. Needs to be unique.

uuidstring

The UUID that can be used to identify the annotation.

annotation_type'VULNERABILITY' | 'CODE_SMELL' | 'BUG'

The type of the report.

pathstring

The path of the file on which this annotation should be placed. This is the path of the file relative to the git repository. If no path is provided, then it will appear in the overview modal on all pull requests where the tip of the branch is the given commit, regardless of which files were modified.

lineinteger

The line number that the annotation should belong to. If no line number is provided, then it will default to 0 and in a pull request it will appear at the top of the file specified by the path field.

summarystring

The message to display to users.

detailsstring

The details to show to users when clicking on the annotation.

result'PASSED' | 'FAILED' | 'SKIPPED' | 'IGNORED'

The state of the report. May be set to PENDING and later updated.

severity'CRITICAL' | 'HIGH' | 'MEDIUM' | 'LOW'

The severity of the annotation.

linkstring uri

A URL linking to the annotation in an external tool.

created_onstring date-time

The timestamp when the report was created.

updated_onstring date-time

The timestamp when the report was updated.