Skip to content

Set project policy archived state

PUT
/api/v1/projects/{projectId}/policies/{projectPolicyId}/archived
curl --request PUT \
--url https://localhost:10001/api/v1/projects/1/policies/1/archived \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: application/json' \
--data '{ "archived": true }'

Archive or unarchive a specific policy applied to a project

projectId
required
integer

Project ID

projectPolicyId
required
integer

Project Policy ID

Archived state

Media type application/json
object
archived
boolean
Example generated
{
"archived": true
}

Updated project policy

Media type application/json
object
appliedAt
string
appliedBy
string
archivedAt
string
archivedBy
string
cid
string
createdAt
string
id
integer
isArchived
boolean
isReapplied
boolean
name
string
policyId
integer
projectId
integer
slug
string
status
string
subjectCid
string
updatedAt
string
Example generated
{
"appliedAt": "example",
"appliedBy": "example",
"archivedAt": "example",
"archivedBy": "example",
"cid": "example",
"createdAt": "example",
"id": 1,
"isArchived": true,
"isReapplied": true,
"name": "example",
"policyId": 1,
"projectId": 1,
"slug": "example",
"status": "example",
"subjectCid": "example",
"updatedAt": "example"
}

Bad request - Invalid IDs or missing archived flag

Media type application/json
object
key
additional properties
string
Example generated
{
"additionalProperty": "example"
}

Unauthorized - Authentication required

Media type application/json
object
key
additional properties
string
Example generated
{
"additionalProperty": "example"
}

Forbidden - No project access or insufficient permissions

Media type application/json
object
key
additional properties
string
Example generated
{
"additionalProperty": "example"
}

Project policy not found

Media type application/json
object
key
additional properties
string
Example generated
{
"additionalProperty": "example"
}

Internal server error

Media type application/json
object
key
additional properties
string
Example generated
{
"additionalProperty": "example"
}