Skip to Content
kosemdocs
ReferenceAPIAccess profiles

Issue access profile credential in organization

Issues a short-lived credential from an access profile, optionally narrowed by scope. Every issue is recorded in the Data Access audit log.

POST
/v1/organizations/{organization}/accessProfiles/{accessProfile}/credentials

Issues a short-lived credential from an access profile, optionally narrowed by scope. Every issue is recorded in the Data Access audit log.

Authorization

bearer
headerAuthorizationBearer <token>

An access token, or an API key.

Path Parameters

organization*string

The organization's ID.

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

The access profile's ID.

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

Request Body

application/json
  1. body
scope?

Narrows the credential below the access profile's config, as its provider reads it; unset, the credential reaches all that the profile does. GitHub's: {"repositories": ["api"], "permissions": {"contents": "read"}}, either field of which may be left out.

Response Body

OK

application/json
  1. response
accessProfile*string

Resource name of the access profile that issued this credential.

credential*

Short-lived credential fields.

expireTime*string

When the credential expires.

Formatdate-time
hint*string

Guidance on what the credential reaches and how tools use it.

provider*string

Provider type, such as providers/github.

scope*

Effective scope reached by the credential.

Example Request
curl -X POST 'https://api.kosem.ai/v1/organizations/string/accessProfiles/string/credentials' \
  -H 'Content-Type: application/json' \
  -d '{}'
Example Response
{
  "accessProfile": "string",
  "credential": {
    "property1": "string",
    "property2": "string"
  },
  "expireTime": "2019-08-24T14:15:22Z",
  "hint": "string",
  "provider": "string",
  "scope": {
    "property1": null,
    "property2": null
  }
}