Update API Client Credentials
  • 12 Dec 2023
  • 2 Minutes 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.).
Security
Http
Type bearer
For more details about Management API Authentication, check out the Management APIs Authentication Article
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
{
  "ownerId": "b0e1f961-2061-4f83-8392-b5aa19fed0c1,",
  "ownerType": "ENVIRONMENT,",
  "name": "Name7,",
  "description": "Name7 Description,",
  "tokenDuration": "PT1440M,",
  "permission": "ADMIN"
}
Sample Update environment viewer
{
  "ownerId": "b0e1f961-2061-4f83-8392-b5aa19fed0c1,",
  "ownerType": "ENVIRONMENT,",
  "name": "Name8,",
  "description": "Name8 Description,",
  "tokenDuration": "PT1440M,",
  "permission": "VIEWER"
}
Sample Update tenant admin
{
  "ownerId": "null,",
  "ownerType": "TENANT,",
  "name": "Name9,",
  "description": "Name9 Description,",
  "tokenDuration": "PT1440M,",
  "permission": "ADMIN"
}
object
name
string Required

Client Name

Max length100
description
string Required

Client Description

Max length200
tokenDuration
string (ISO-8601 duration) Required

Client Token Duration

Valid values[ "15-1440 minutes" ]
ExamplePT60M
Responses
200

Client updated

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

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

tokenDuration
string (ISO-8601 duration)
permission
string
400

Client already exists

client already exists
{
  "id": {
    "type": "string",
    "example": "EW59XA",
    "description": "ID for Error Instance"
  },
  "status": {
    "enum": [
      "400"
    ]
  },
  "name": {
    "type": "string",
    "enum": [
      "clientAlreadyExists"
    ]
  },
  "message": {
    "type": "string",
    "enum": [
      "client {name} already exists"
    ]
  }
}
Expand All
object
code
string
id
string
status
integer
name
string
message
string
args
object
path
string
403

Forbidden

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

Client not found

client not found
{
  "id": {
    "type": "string",
    "example": "EW58XA",
    "description": "ID for Error Instance"
  },
  "status": {
    "enum": [
      "404"
    ]
  },
  "name": {
    "type": "string",
    "enum": [
      "clientNotFoundError"
    ]
  },
  "message": {
    "type": "string",
    "enum": [
      "Client {name} not found"
    ]
  }
}
Expand All
object
code
string
id
string
status
integer
name
string
message
string
args
object
path
string

Was this article helpful?