Dismiss or acknowledge a finding
PATCH/api/v1/audits/{id}/findings/{findingId}
Needs the findings:write scope. About scopes
A dismissed finding stays dismissed in later audits of the same site. Scores aren't changed: they're a record of the audit as it ran.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | Audit id |
findingId required | path | string (uuid) |
Request body
JSON: a FindingStatus object.
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | OK | Finding |
| 400 | The request isn't valid (invalid_request, invalid_body) | Error |
| 401 | No key, or the key is invalid, expired or revoked (key_required, key_invalid) | Error |
| 403 | The key lacks a scope, or the plan doesn't allow it (missing_scope, plan_no_api, plan_limit) | Error |
| 404 | Not found, or not yours (not_found) | Error |
| 409 | The site already has an audit running, or the audit has finished (audit_running, audit_finished) | Error |
| 422 | The site isn't verified and consent wasn't given (consent_required) | Error |
| 429 | Over the rate limit (rate_limited, rate_limited_daily) | Error |
Examples
curl
curl -X PATCH "https://app.kritano.com/api/v1/audits/0193f1b2-7c4e-7a1d-9b2a-3c5d6e7f8a9b/findings/0193f1b2-7c4e-7a1d-9b2a-3c5d6e7f8a9b" \
-H "Authorization: Bearer $KRITANO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"status": "active"
}'
JavaScript
const res = await fetch("https://app.kritano.com/api/v1/audits/0193f1b2-7c4e-7a1d-9b2a-3c5d6e7f8a9b/findings/0193f1b2-7c4e-7a1d-9b2a-3c5d6e7f8a9b", {
method: "PATCH",
headers: {
Authorization: `Bearer ${process.env.KRITANO_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"status": "active"
}),
});
const data = await res.json();
Python
import os
import requests
res = requests.patch(
"https://app.kritano.com/api/v1/audits/0193f1b2-7c4e-7a1d-9b2a-3c5d6e7f8a9b/findings/0193f1b2-7c4e-7a1d-9b2a-3c5d6e7f8a9b",
headers={"Authorization": f"Bearer {os.environ['KRITANO_API_KEY']}"},
json={
"status": "active"
},
)
res.raise_for_status()
data = res.json()
Go
body := strings.NewReader(`{
"status": "active"
}`)
req, _ := http.NewRequest("PATCH", "https://app.kritano.com/api/v1/audits/0193f1b2-7c4e-7a1d-9b2a-3c5d6e7f8a9b/findings/0193f1b2-7c4e-7a1d-9b2a-3c5d6e7f8a9b", body)
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer "+os.Getenv("KRITANO_API_KEY"))
res, err := http.DefaultClient.Do(req)