Skip to content
English
  • There are no suggestions because the search field is empty.

List project policies

GET /api/v1/projects/{projectId}/policies Select code sample Fetch cURL
const url = 'https://localhost:10001/api/v1/projects/1/policies';const options = {method: 'GET', headers: {Authorization: '
  
   '}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}
  
curl --request GET \  --url https://localhost:10001/api/v1/projects/1/policies \  --header 'Authorization: 
  
   '
  

List all policies applied to a specific project

Authorizations

Section titled “Authorizations ”

Parameters

Section titled “ Parameters ”

Path Parameters

Section titled “Path Parameters ” projectId required integer

Project ID

Responses

Section titled “ Responses ”

200

Section titled “200 ”

Project policies

Media type application/json Array 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"  }]

400

Section titled “400 ”

Bad request - Invalid project ID

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

401

Section titled “401 ”

Unauthorized - Authentication required

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

403

Section titled “403 ”

Forbidden - No project access

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

404

Section titled “404 ”

Project not found

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

500

Section titled “500 ”

Internal server error

Media type application/json object key additional properties string
Example generated
{  "additionalProperty": "example"}
Previous
Get project by UUID
Next
Apply policy to a project