コンテンツにスキップ

Replace database connection credential

PUT
/api/admin/database-connections/{id}/credentials
Code sample: Shell / cURL
curl --request PUT \
--url https://auth.example.com/api/admin/database-connections/example/credentials \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "credential": { "username": "authrim", "password": "REDACTED" } }'

Replaces the encrypted credential for a database connection. This is high-risk and requires credential write permission plus elevation approval.

id
required
string

Database connection ID.

Media type application/json
object
credential
required
key
additional properties
Example
{
"credential": {
"username": "authrim",
"password": "REDACTED"
}
}

Database connection.

Media type application/json
object
id
string
name
string
display_name
string
description
One of:
string
provider
string
Allowed values: d1 hyperdrive postgres mysql custom
config
object
key
additional properties
managed_by
string
read_only
boolean
has_credential
boolean
credential_key_version
One of:
integer
credential_updated_at
One of:
integer
credential_updated_by
One of:
string
status
string
Allowed values: active disabled
created_by
One of:
string
updated_by
One of:
string
created_at
integer
updated_at
integer
tenant_assignments
Array<object>
object
id
required
string
name
required
string
kind
required
string
Allowed values: tenant platform
key
additional properties
key
additional properties
Example
{
"id": "dbc_123",
"name": "tenant-pii-postgres",
"display_name": "Tenant PII PostgreSQL",
"description": "External PostgreSQL database for tenant PII workloads.",
"provider": "postgres",
"config": {
"host": "db.example.com",
"port": 5432,
"database": "authrim_pii",
"ssl": true
},
"managed_by": "admin",
"read_only": false,
"has_credential": true,
"credential_key_version": 1,
"credential_updated_at": 1770000000000,
"credential_updated_by": "admin_123",
"status": "active",
"created_by": "admin_123",
"updated_by": "admin_123",
"created_at": 1770000000000,
"updated_at": 1770000000000,
"tenant_assignments": [
{
"id": "tenant_123",
"name": "Tenant",
"kind": "tenant"
}
]
}

Error response.

Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{
"error": "example",
"message": "example",
"error_description": "example"
}

Error response.

Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{
"error": "example",
"message": "example",
"error_description": "example"
}