Override (or clear) a finding's severity
PATCH
/projects/{projectId}/findings/{findingId}/severity
const url = 'https://zkao.io/api/v1/projects/example/findings/example/severity';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"severity":"CRITICAL"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://zkao.io/api/v1/projects/example/findings/example/severity \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "severity": "CRITICAL" }'Requires scope: findings:write. Set severity to null to clear the override.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”projectId
required
string
findingId
required
string
The finding id, or the ZK- label shown on the finding page (the id’s last eight characters, prefix optional). A label that matches more than one finding in the project is refused with 409 conflict; use the full id.
Request Bodyrequired
Section titled “Request Bodyrequired”Responses
Section titled “ Responses ”OK
Invalid request
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
Example
{ "error": { "code": "unauthorized" }}Missing, malformed, expired, or revoked token
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
Example
{ "error": { "code": "unauthorized" }}The token lacks the required scope
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
Example
{ "error": { "code": "unauthorized" }}Resource not in this token’s project or repo allowlist
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
Example
{ "error": { "code": "unauthorized" }}A compare-and-set (expectedContent) missed: the guidance changed since it was read. Re-read the current guidance and retry.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
Example
{ "error": { "code": "unauthorized" }}
