Ir al contenido

Create a credential; the secret is returned once

POST
/api-credentials
curl --request POST \
--url https://acme.gravitastec.com/api/v1/api-credentials \
--header 'Content-Type: application/json' \
--cookie __Host-gravitas=<__Host-gravitas> \
--data '{ "name": "example", "environmentClass": "test", "allCompanies": false, "companyIds": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ] }'
Media typeapplication/json
object
name
required
string
<= 100 characters
environmentClass
required
string
Allowed values: test production
allCompanies
boolean
companyIds
Array<string>

Created

Media typeapplication/json
object
id
string format: uuid
clientId
string
name
string
environmentClass
string
Allowed values: test production
allCompanies
boolean
companyIds
Array<string>
status
string
Allowed values: active revoked
lastUsedAt
string | null format: date-time
clientSecret

Shown only once

string

Example

{
"environmentClass": "test",
"status": "active"
}

Limit_exceeded (plan without API access