Skip to main content
POST
Create Risk Assessment

Authorizations

Authorization
string
header
required

The API key to authenticate requests. Obtainable from the web dashboard.

Body

application/json
prUrl
string
required

The pull request or GitLab merge request URL. Accepts URLs with or without an HTTP or HTTPS scheme. Trailing paths, query parameters, and fragments are ignored when identifying the pull request or merge request.

Example:

"https://github.com/acme/backend/pull/123"

headSha
string

The full commit SHA to analyze. Defaults to the current pull request head when omitted.

Minimum string length: 40
Example:

"8a1b2c3d4e5f678901234567890123456789abcd"

Response

Accepted - The run has been queued

id
string<uuid>
required

The ID of a resource that can be retrieved from the service.

status
enum<string>
required

The status of an asynchronous run. Poll while processing. Complete and failed are terminal states.

Available options:
processing,
complete,
failed
Example:

"processing"

headSha
string
required

The head commit SHA analyzed by this risk assessment.

Example:

"8a1b2c3d4e5f678901234567890123456789abcd"

error
string

An error message present when status is failed; omitted otherwise.

Example:

"Unable to retrieve the pull request diff."

score
enum<string>

The assessed risk level, present when status is complete; omitted otherwise.

Available options:
lowest,
low,
medium,
high,
highest
Example:

"low"

rationale
string

The explanation of the risk score in Markdown, present when status is complete; omitted otherwise.

Example:

"The change is limited to a well-tested validation path."