Create review with attachment
const url = 'https://localhost:10001/api/v1/projects/example/policies/example/controls/example/reviews/with-file';const form = new FormData();form.append('review', 'example');
const options = {method: 'POST', headers: {Authorization: '<Authorization>'}};
options.body = form;
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://localhost:10001/api/v1/projects/example/policies/example/controls/example/reviews/with-file \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: multipart/form-data' \ --form review=exampleSubmit a review for a specific control with file attachment(s) and return the review with stored attachments
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Project ID, UUID (urn:uuid optional), or slug:my-project
Applied policy ID, slug:my-policy, or urn:cid:bafy…
Applied policy control ID, code:AC-1, or urn:cid:bafy…
FormData Parameters
Section titled “FormData Parameters ”Review JSON string
Attachment files
Attachment description
Whether the file is public
Retention policy
Responses
Section titled “ Responses ”Created review with attachments
A newly created review together with the attachments uploaded alongside it
object
A file stored against a declaration or review, with its CID and retention window
object
Verifiable actor; uploadedBy is the label
A reviewer’s verdict on a control, recording the outcome and any supporting evidence
object
Taken from the path on create
Derived from the uploaded bytes; not stored
Assigned by the integrity service
Only used when outcome is COMMENT
Hashed into the CID; not stored
object
Upload via the with-file endpoint
A file stored against a declaration or review, with its CID and retention window
object
Verifiable actor; uploadedBy is the label
Defaults to the caller identity
Verifiable actor; submittedBy is the label
Example
{ "review": { "commentType": "GENERAL", "outcome": "NON_COMPLIANT" }}Bad request - Invalid IDs or review data
Error body returned by the governance endpoints; the message is human-readable and not a stable identifier
object
Example
{ "error": "Invalid request body"}Unauthorized - Authentication required
Error body returned by the governance endpoints; the message is human-readable and not a stable identifier
object
Example
{ "error": "Invalid request body"}Forbidden - Insufficient permissions for this review outcome
Error body returned by the governance endpoints; the message is human-readable and not a stable identifier
object
Example
{ "error": "Invalid request body"}No matching control found in applied policy
Error body returned by the governance endpoints; the message is human-readable and not a stable identifier
object
Example
{ "error": "Invalid request body"}Internal server error
Error body returned by the governance endpoints; the message is human-readable and not a stable identifier
object
Example
{ "error": "Invalid request body"}