Update API Client Credentials
  • 05 Sep 2024
  • 1 Minute to read
  • Dark
    Light
  • PDF

Update API Client Credentials

  • Dark
    Light
  • PDF

Article summary

Put
/env-mgmt/1.0/api-key/clients/{id}

This API enables users to update API Client Credentials associated with a specific Tenant or Environment.

Notice

Accessing the Policy Management APIs is through a dedicated domain/URL according to your PlainID Tenant Location:
`https://api.{REGION}.plainid.io`

United States (US) - https://api.us1.plainid.io
Canada (US) - https://api.ca1.plainid.io
Europe (US) - https://api.eu1.plainid.io

Replace{REGION} with your PlainID Tenant region (e.g. us1, eu1, ca1, etc.).


cURL Sample Guidelines

In order for the relevant parameters to appear in the cURL sample, you can input the values in the interactive API console on the right. They will then appear in the cURL sample on the bottom of the page in the correct format.

Security
HTTP
Type bearer

For more details about Administration API Authentication, check out the Authentication APIs documentation. Provide your bearer token in the Authorization header when making requests to protected resources. Example: Authorization: Bearer 123

Path parameters
id
stringRequired

Client ID to update.

Body parameters
Sample Update environment admin
{
  "description": "Name7 Description",
  "name": "Name7",
  "ownerId": "b0e1f961-2061-4f83-8392-b5aa19fed0c1",
  "ownerType": "ENVIRONMENT",
  "permission": "ADMIN",
  "tokenDuration": "PT1440M"
}
Sample Update environment viewer
{
  "description": "Name8 Description",
  "name": "Name8",
  "ownerId": "b0e1f961-2061-4f83-8392-b5aa19fed0c1",
  "ownerType": "ENVIRONMENT",
  "permission": "VIEWER",
  "tokenDuration": "PT1440M"
}
Sample Update tenant admin
{
  "description": "Name9 Description",
  "name": "Name9",
  "ownerId": null,
  "ownerType": "TENANT",
  "permission": "ADMIN",
  "tokenDuration": "PT1440M"
}
object
description
string Required

Client Description

Max length200
name
string Required

Client Name

Max length100
tokenDuration
string (ISO-8601 duration) Required

Client Token Duration

ExamplePT60M
Responses
200

Client updated

description
string
id
string
name
string
ownerId
string (UUID)
ownerType
string
permission
string
secret
string

Null value. Secret not included in the response for security reasons.

tokenDuration
string (ISO-8601 duration)
400

Client already exists

client already exists
{
  "id": "EW59XA",
  "message": "client {name} already exists",
  "name": "clientAlreadyExists",
  "status": 400
}
Expand All
object
args
object
path
string
code
string
id
string
message
string
name
string
status
integer
403

Forbidden

forbidden environment
{
  "id": "EW56XA",
  "message": "operation get for resource Environment {ownerId} is not allowed because the current user does not have the appropriate permissions",
  "name": "forbiddenEnvironment",
  "status": 403
}
forbidden tenant
{
  "id": "EW57XA",
  "message": "operation get for resource Environment {ownerId} is not allowed because the current user does not have the appropriate permissions",
  "name": "forbiddenTenant",
  "status": 403
}
Expand All
object
args
object
path
string
code
string
id
string
message
string
name
string
status
integer
404

Client not found

client not found
{
  "id": "EW58XA",
  "message": "Client {name} not found",
  "name": "clientNotFoundError",
  "status": 404
}
Expand All
object
args
object
path
string
code
string
id
string
message
string
name
string
status
integer

Was this article helpful?