Compliance
Append one approval and return it.
A failure here is answered with 503, never a cheerful 2xx: the engineer has to know their sign-off was not recorded. Reporting success for a record that did not persist is the exact failure this ledger exists to prevent.
BearerAuthAuthorizationBearer <token>JWT access token. Obtain via POST /v1/auth/login.
application/json- body
approved_by*Approved ByThe reviewer's identity as shown to them. An approval nobody signed is not an approval.
1 <= length <= 320drawing_sha256*Drawing Sha256The content-addressed drawing hash the approval is about.
^[a-f0-9]{64}$64 <= length <= 64organisation_id?|Set for org-paid workspaces so colleagues can read the record.
patch_ids*array<string>The proposed fixes the engineer accepted. Never empty — an approval of nothing is not a judgement, and the database CHECK rejects it too.
1 <= itemsrevokes_id?|The approval this one supersedes. The ledger is append-only; a correction is a new row.
Successful Response
application/json- response
approved_at*Approved Atdate-timeapproved_by*Approved Bydrawing_sha256*Drawing Sha256id*Iduuidpatch_ids*array<string>revokes_id*|nullcurl -X POST 'https://api.aisc.sa/v1/compliance/approvals' \ -H 'Content-Type: application/json' \ -d '{ "approved_by": "string", "drawing_sha256": "stringstringstringstringstringstringstringstringstringstringstri", "patch_ids": [ "string" ]}'{ "approved_at": "2019-08-24T14:15:22Z", "approved_by": "string", "drawing_sha256": "string", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "patch_ids": [ "string" ], "revokes_id": "5ee1678e-5453-40a5-9986-afa80c46f7b9"}The whole chain, not a computed current state.
A revocation only means something next to what it revoked, and an audit seven years from now needs the sequence a human actually produced.
BearerAuthAuthorizationBearer <token>JWT access token. Obtain via POST /v1/auth/login.
drawing_sha256*Drawing Sha256Successful Response
application/json- response
[index: integer]?curl -X GET 'https://api.aisc.sa/v1/compliance/approvals/string'[ { "approved_at": "2019-08-24T14:15:22Z", "approved_by": "string", "drawing_sha256": "string", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "patch_ids": [ "string" ], "revokes_id": "5ee1678e-5453-40a5-9986-afa80c46f7b9" }]