Skip to content

Get a resource's code mapping

GET
/api/v1/resources/{id}/mapping
curl --request GET \
--url https://api.aletheia-ops.com/api/v1/resources/example/mapping \
--header 'Authorization: Bearer <token>'
id
required
string

OK

Media typeapplication/json

Current resource-to-code mapping (plan 10 §2.2)

object
resource_id
string
management_state
string
management_system
string
confidence
string
origin
string
repository_id
string
repository_full_name
string
iac_project_id
string
iac_project_path
string
code_address
string
file_path
string
start_line
integer
scm_url
string
last_commit_sha
string
evidence
object
key
additional properties
any
computed_at
string format: date-time
Examplegenerated
{
"resource_id": "example",
"management_state": "example",
"management_system": "example",
"confidence": "example",
"origin": "example",
"repository_id": "example",
"repository_full_name": "example",
"iac_project_id": "example",
"iac_project_path": "example",
"code_address": "example",
"file_path": "example",
"start_line": 1,
"scm_url": "example",
"last_commit_sha": "example",
"evidence": {},
"computed_at": "2026-04-15T12:00:00Z"
}

No valid credential was presented, or it has expired.

Media typeapplication/json
object
code
required

Stable, machine-readable identifier. Branch on this.

string
message
required

Human-readable explanation. Safe to display; do not parse.

string
Examples
{
"code": "unauthorized",
"message": "authentication required"
}

Authenticated, but not permitted to perform this action.

Media typeapplication/json
object
code
required

Stable, machine-readable identifier. Branch on this.

string
message
required

Human-readable explanation. Safe to display; do not parse.

string
Examples
{
"code": "forbidden",
"message": "you do not have permission to perform this action"
}

The resource does not exist, or belongs to another organization. The two are deliberately indistinguishable.

Media typeapplication/json
object
code
required

Stable, machine-readable identifier. Branch on this.

string
message
required

Human-readable explanation. Safe to display; do not parse.

string
Examples
Examplenot_found
{
"code": "not_found",
"message": "resource not found"
}

An unexpected failure. Diagnostic detail is logged server-side and deliberately not returned. Quote the X-Request-Id response header when reporting one.

Media typeapplication/json
object
code
required

Stable, machine-readable identifier. Branch on this.

string
message
required

Human-readable explanation. Safe to display; do not parse.

string
Examples
Exampleinternal_error
{
"code": "internal_error",
"message": "internal server error"
}