Skip to Content
kosemdocs
ReferenceAPIPolicies

List policies in project

Lists the policies of an organization or a project: one of each constraint, set there or not, with what applies. To change one, get it alone, for its ETag.

GET
/v1/projects/{project}/policies

Lists the policies of an organization or a project: one of each constraint, set there or not, with what applies.

To change one, get it alone, for its ETag.

Authorization

bearer
headerAuthorizationBearer <token>

An access token, or an API key.

Path Parameters

project*string

The project's ID.

Match^prj_[0-7][0-9a-hjkmnp-tv-z]{25}$

Query Parameters

pageSize?integer

Maximum number to return. Defaults to 50; values above 500 are treated as 500.

Formatint32
Range0 <= value
pageToken?string

Page token from a previous response.

Response Body

OK

application/json
  1. response
nextPageToken*string

Token for the next page; empty on the last page.

policies*array<>

A policy of each constraint, set here or not, ordered by constraint.

Example Request
curl -X GET 'https://api.kosem.ai/v1/projects/string/policies'
Example Response
{
  "nextPageToken": "string",
  "policies": [
    {
      "constraint": "string",
      "effective": {
        "allowedValues": [
          "string"
        ],
        "enforced": true,
        "max": 0,
        "requiredPlan": "PRO",
        "source": "organization"
      },
      "inherited": {
        "allowedValues": [
          "string"
        ],
        "enforced": true,
        "max": 0,
        "requiredPlan": "PRO",
        "source": "organization"
      },
      "name": "string",
      "spec": {
        "allowedValues": [
          "string"
        ],
        "enforced": true,
        "max": 0
      },
      "updateTime": "2019-08-24T14:15:22Z"
    }
  ]
}