Skip to content

Correct a mapping

POST
/api/v1/resources/{id}/mapping/corrections
curl --request POST \
--url https://api.aletheia-ops.com/api/v1/resources/example/mapping/corrections \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "action": "example", "iac_project_id": "example", "state_resource_id": "example", "code_location_id": "example", "reason": "example" }'
id
required
string
Media typeapplication/json

POST /resources/{id}/mapping/corrections body (plan 10 §2.2)

object
action
required
string
iac_project_id
string
state_resource_id
string
code_location_id
string
reason
required
string
Examplegenerated
{
"action": "example",
"iac_project_id": "example",
"state_resource_id": "example",
"code_location_id": "example",
"reason": "example"
}

Created

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"
}

The request is malformed or fails validation.

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": "validation_failed",
"message": "name: must not be blank"
}

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"
}

The request conflicts with the current state.

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": "email_taken",
"message": "an account with this email already exists"
}

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"
}