POST
/
organizations
/
{organization}
/
databases
/
{database}
/
branches
/
{branch}
/
roles
/
{id}
/
renew
Renew role expiration
curl --request POST \
  --url https://api.planetscale.com/v1/organizations/{organization}/databases/{database}/branches/{branch}/roles/{id}/renew \
  --header 'Authorization: <api-key>'
{
  "id": "<string>",
  "name": "<string>",
  "access_host_url": "<string>",
  "username": "<string>",
  "password": "<string>",
  "database_name": "<string>",
  "created_at": "<string>",
  "updated_at": "<string>",
  "deleted_at": "<string>",
  "expires_at": "<string>",
  "dropped_at": "<string>",
  "drop_failed": "<string>",
  "expired": true,
  "default": true,
  "ttl": 123,
  "inherited_roles": [
    "pg_checkpoint"
  ],
  "branch": {},
  "actor": {}
}

Authorizations

Authorization
string
header
required

Path Parameters

organization
string
required

The name of the organization that owns this resource

database
string
required

The name of the database that owns this resource

branch
string
required

The name of the branch that owns this resource

id
string
required

The ID of the role

Response

Returns the renewed role

id
string
required

The ID of the role

name
string
required

The name of the role

access_host_url
string
required

The database connection string

username
string
required

The database user name

password
string
required

The plain text password, available only after create

database_name
string
required

The database name

created_at
string
required

When the role was created

updated_at
string
required

When the role was updated

deleted_at
string
required

When the role was deleted

expires_at
string
required

When the role expires

dropped_at
string
required

When the role was dropped

drop_failed
string
required

Error message available when dropping the role fails

expired
boolean
required

True if the credentials are expired

default
boolean
required

Whether the role is the default postgres user

ttl
number
required

Number of seconds before the credentials expire

inherited_roles
enum<string>[]
required

Database roles these credentials inherit

branch
object
required
actor
object
required