Skip to Content
kosemdocs
ReferenceAPIEnvironments

Resolve environment access request

Approves or denies a pending access request on a standalone environment. Requires environments.environments.update on the environment, plus issue or access permission on the target when approving. Enforces environments.maxGrantTtl and flushes the environment's credential cache immediately when approved.

POST
/v1/projects/{project}/environments/{environment}/accessRequests/{request}

Approves or denies a pending access request on a standalone environment.

Requires environments.environments.update on the environment, plus issue or access permission on the target when approving. Enforces environments.maxGrantTtl and flushes the environment's credential cache immediately when approved.

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

The environment's ID.

Match^env_[0-7][0-9a-hjkmnp-tv-z]{25}$
request*string

The access request's ID.

Formatuuid

Request Body

application/json
  1. body
approve*boolean

Whether to approve the request.

expireTime?string

Optional grant expiry time, bounded by the environments.maxGrantTtl policy.

Formatdate-time
note?string

Optional note returned to the environment.

Lengthlength <= 1000
scope?

Optional narrowing scope for an access profile grant.

target?string

Required when approving: resource name of the project access profile or secret to grant.

Response Body

OK

application/json
  1. response
createTime*string

When the request was created.

Formatdate-time
environment*string

The environment's resource name.

expireTime*string

When a pending request expires if unresolved.

Formatdate-time
grantId?string

ID of the grant created or updated when approved.

id*string

The access request's ID.

note?string

Optional note from the person who resolved the request.

reason*string

Why the process inside the environment asked for access.

requestedProvider?string

Optional provider requested by the environment, such as providers/github.

requestedScope?

Optional narrowing scope requested by the environment.

requestedTarget?string

Optional alias, ID or resource name requested by the environment.

resolveTime?string

When the request was approved or denied.

Formatdate-time
resolvedAlias?string

Alias of the access profile or secret granted when approved.

resolvedExpireTime?string

Grant expiry time set when approved.

Formatdate-time
resolvedProvider?string

Provider of the access profile granted when approved.

resolvedScope?

Effective narrowing scope granted when approved.

resolvedTarget?string

Resource name of the access profile or secret granted when approved.

resolver?string

Who approved or denied the request.

state*string

Current state of the request.

Value in"PENDING""APPROVED""DENIED""EXPIRED"
targetKind?string

Optional target kind requested by the environment.

Value in"""ACCESS_PROFILE""SECRET"
Example Request
curl -X POST 'https://api.kosem.ai/v1/projects/string/environments/string/accessRequests/497f6eca-6276-4993-bfeb-53cbbbba6f08' \
  -H 'Content-Type: application/json' \
  -d '{
  "approve": true
}'
Example Response
{
  "createTime": "2019-08-24T14:15:22Z",
  "environment": "string",
  "expireTime": "2019-08-24T14:15:22Z",
  "grantId": "string",
  "id": "string",
  "note": "string",
  "reason": "string",
  "requestedProvider": "string",
  "requestedScope": {
    "property1": null,
    "property2": null
  },
  "requestedTarget": "string",
  "resolveTime": "2019-08-24T14:15:22Z",
  "resolvedAlias": "string",
  "resolvedExpireTime": "2019-08-24T14:15:22Z",
  "resolvedProvider": "string",
  "resolvedScope": {
    "property1": null,
    "property2": null
  },
  "resolvedTarget": "string",
  "resolver": "string",
  "state": "PENDING",
  "targetKind": ""
}