Set applied policy archived state
const url = 'https://localhost:10001/api/v1/projects/example/policies/example/archived';const options = { method: 'PUT', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"archived":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://localhost:10001/api/v1/projects/example/policies/example/archived \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "archived": true }'Archive or unarchive a specific policy applied to a project
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…
Request Body
Section titled “Request Body ”Archived state
object
Example generated
{ "archived": true}Responses
Section titled “ Responses ”Updated applied policy
A policy applied to a project, tracked independently of the library template it came from
object
Verifiable actor; appliedBy is the label
Set via the archive endpoint
Set via the archive endpoint
Verifiable actor; archivedBy is the label
Assigned by the integrity service
Set via the archive endpoint
Taken from the path on create
Taken from the path on create
Derived from name
Assigned by the integrity service
Example generated
{ "name": "example"}Bad request - Invalid IDs or missing archived flag
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 - No project access or insufficient permissions
Error body returned by the governance endpoints; the message is human-readable and not a stable identifier
object
Example
{ "error": "Invalid request body"}Applied policy not found
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"}