API

DataResourceRotateCredential

Operations

Every route this entity exposes. Each route links to its own reference on this page.

Method Route SDK operation Returns
POST /api/v1/hosting/apps/{app_id}/data_resources/{id}/rotate_credentials create Updated app data resource

Examples

One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.

Golang

Construct client as shown in the Golang setup, then call the operations:

created, err := client.DataResourceRotateCredential(nil).Create(map[string]any{"app_id": "example", "data_resource_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(created)

Lua

Construct client as shown in the Lua setup, then call the operations:

local created, err = client:DataResourceRotateCredential():create({ app_id = "example", data_resource_id = "example" })

PHP

Construct client as shown in the PHP setup, then call the operations:

$created = $client->DataResourceRotateCredential()->create(["app_id" => "example", "data_resource_id" => "example"]);

Python

Construct client as shown in the Python setup, then call the operations:

created = client.DataResourceRotateCredential().create({ "app_id": "example", "data_resource_id": "example" })

Ruby

Construct client as shown in the Ruby setup, then call the operations:

created = client.DataResourceRotateCredential.create({ "app_id" => "example", "data_resource_id" => "example" })

TypeScript

Construct client as shown in the TypeScript setup, then call the operations:

const created = await client.DataResourceRotateCredential().create({ app_id: "example", data_resource_id: "example" })

Fields

Field Type Required Description
app_environment_id one,string,null Yes App Environment Id
created_at string Yes Created At
engine string Yes Engine
failure_message one,string,null Yes Failure Message
high_availability boolean Yes High Availability
hosted_app_id string Yes Hosted App Id
id string Yes Id
kind string Yes Kind
name string Yes Name
plan one,string,null Yes Plan
provider_metadata object Yes Provider Metadata
region one,string,null Yes Region
slug string Yes Slug
status string Yes Status
storage_gb one,integer,null Yes Storage Gb
storage_label one,string,null Yes Storage Label
updated_at string Yes Updated At
version one,string,null Yes Version

create

POST /api/v1/hosting/apps/{app_id}/data_resources/{id}/rotate_credentials

Operation ID: rotate_credentials_api_v1_app_data_resource.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
app_id path string Yes
id path string Yes

Request body

application/json

The request body is object.

Responses

200: Updated app data resource

application/json

Property Type Required Description
data_resource object Yes
data_resource.app_environment_id string Yes
data_resource.created_at string (date-time) Yes
data_resource.engine enum: postgres, mysql, valkey Yes
data_resource.failure_message string Yes
data_resource.high_availability boolean Yes
data_resource.hosted_app_id string Yes
data_resource.id string Yes
data_resource.kind enum: database, cache, queue, search, vector Yes
data_resource.name string Yes
data_resource.plan string Yes
data_resource.provider_metadata object Yes
data_resource.region string Yes
data_resource.slug string Yes
data_resource.status enum: provisioning, available, updating, failed, archived Yes
data_resource.storage_gb integer Yes
data_resource.storage_label string Yes
data_resource.updated_at string (date-time) Yes
data_resource.version string Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Data resource provider request failed

application/json

Property Type Required Description
data_resource object Yes
data_resource.app_environment_id string Yes
data_resource.created_at string (date-time) Yes
data_resource.engine enum: postgres, mysql, valkey Yes
data_resource.failure_message string Yes
data_resource.high_availability boolean Yes
data_resource.hosted_app_id string Yes
data_resource.id string Yes
data_resource.kind enum: database, cache, queue, search, vector Yes
data_resource.name string Yes
data_resource.plan string Yes
data_resource.provider_metadata object Yes
data_resource.region string Yes
data_resource.slug string Yes
data_resource.status enum: provisioning, available, updating, failed, archived Yes
data_resource.storage_gb integer Yes
data_resource.storage_label string Yes
data_resource.updated_at string (date-time) Yes
data_resource.version string Yes