List a repository's audit areas
const url = 'https://zkao.io/api/v1/projects/example/repositories/example/audit-areas';const options = {method: 'GET', 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 GET \ --url https://zkao.io/api/v1/projects/example/repositories/example/audit-areas \ --header 'Authorization: Bearer <token>'Requires scope: read. Audit areas are the named subsystems a scan can be scoped to (auditAreaKeys on launch). Each scan that maps the repository keeps the list current; sizes come from one branch’s map, so an area that map no longer names is returned without one.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”Branch whose map the sizes come from. Defaults to the repository’s default branch.
Responses
Section titled “ Responses ”OK
object
Branch the sizes were read from.
Whether that branch has a stored map at all.
The map’s own audit order first, then the areas it no longer names.
object
Stable slug, unique per repository. Pass it in auditAreaKeys when launching a scan.
discovered was named by a scan’s map of the repository; custom was added through this API or the app.
Whether the branch’s latest map still names this area.
Files this area covers at that map. Null when the map does not name it.
Lines this area covers at that map. Null when the map does not name it.
Example
{ "areas": [ { "source": "discovered" } ]}Missing, malformed, expired, or revoked token
object
object
Example
{ "error": { "code": "unauthorized" }}The token lacks the required scope
object
object
Example
{ "error": { "code": "unauthorized" }}Resource not in this token’s project or repo allowlist
object
object
Example
{ "error": { "code": "unauthorized" }}
