Skip to Content
kosemdocs
ReferenceAPIConstraints

Get constraint

Gets a constraint.

GET
/v1/constraints/{constraint}

Gets a constraint.

Authorization

bearer
headerAuthorizationBearer <token>

An access token, or an API key.

Path Parameters

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
category*string

What the constraint governs: a guardrail or data retention.

Value in"guardrail""retention"
defaultMax?integer

Of a max: the most kosem itself allows where no policy sets a max, its maxValue; absent where nothing limits it then, as how long a stopped environment is kept.

Formatint64
description*string

What the constraint restricts, and how.

displayName*string

Name shown in user interfaces.

entitlement?string

Of a max bounded by plan: the feature ID whose plan value caps it.

maxValue?integer

The most that a max's policy may set.

Formatint64
minValue?integer

The least that a max's policy may set.

Formatint64
name*string

Resource name, constraints/{constraint_id}, such as constraints/environments.maxDiskGib.

organizationOnly?boolean

Set on a constraint whose policies only organizations set.

type*string

How its policies say what they allow: boolean, enforced or not; allowList, the values allowed; max, the most allowed. An organization's policy and its project's combine by the stricter.

Value in"boolean""allowList""max"
unit?string

What a max counts, such as GiB.

values?array<>

The values that an allow-list's policies may name, in kosem's order.

Example Request
curl -X GET 'https://api.kosem.ai/v1/constraints/string'
Example Response
{
  "category": "guardrail",
  "defaultMax": 0,
  "description": "string",
  "displayName": "string",
  "entitlement": "string",
  "maxValue": 0,
  "minValue": 0,
  "name": "string",
  "organizationOnly": true,
  "type": "boolean",
  "unit": "string",
  "values": [
    {
      "displayName": "string",
      "value": "string"
    }
  ]
}