Skip to Content
kosemdocs
ReferenceAPIPolicies

Get policy in project

Gets a policy of an organization or a project. What this level sets, absent while unset; what applies, in `effective`, with where it comes from; and what the level above makes apply, in `inherited`. The ETag header is the policy's revision.

GET
/v1/projects/{project}/policies/{constraint}

Gets a policy of an organization or a project.

What this level sets, absent while unset; what applies, in effective, with where it comes from; and what the level above makes apply, in inherited. The ETag header is the policy's revision.

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}$
constraint*string

The constraint's ID, such as environments.maxDiskGib.

Match^[a-z][a-zA-Z0-9]*(\.[a-z][a-zA-Z0-9]*)+$

Response Body

OK

application/json
  1. response
constraint*string

The constraint's ID, such as environments.maxDiskGib.

effective*

What the level above makes apply: for a project, its organization's effective policy; for an organization, its plan limit when lower than kosem's limit, else kosem's default.

inherited*

What the level above makes apply: for a project, its organization's effective policy; for an organization, its plan limit when lower than kosem's limit, else kosem's default.

name*string

Resource name, organizations/{organization_id}/policies/{constraint_id} or projects/{project_id}/policies/{constraint_id}.

spec?

What this level sets; absent while unset, where what the level above makes apply applies.

updateTime?string

When this level's policy last changed; absent if it never did.

Formatdate-time
Example Request
curl -X GET 'https://api.kosem.ai/v1/projects/string/policies/string'
Example Response
{
  "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"
}