Delete a custom audit area
DELETE
/projects/{projectId}/repositories/{repositoryId}/audit-areas/{areaKey}
const url = 'https://zkao.io/api/v1/projects/example/repositories/example/audit-areas/example';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://zkao.io/api/v1/projects/example/repositories/example/audit-areas/example \ --header 'Authorization: Bearer <token>'Requires scope: guidance:write. Only an area with source: custom can be deleted; a discovered one is the map’s own account of the repository and is refused with 409. Scans that already ran keep the scope they ran with.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”projectId
required
string
repositoryId
required
string
areaKey
required
string
Responses
Section titled “ Responses ”OK
Media typeapplication/json
object
repositoryId
required
string
key
required
string
deleted
required
boolean
Examplegenerated
{ "repositoryId": "example", "key": "example", "deleted": true}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" }}
