AppDataResource
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}/archive |
create |
Success |
POST |
/api/v1/hosting/apps/{app_id}/data_resources/{id}/refresh |
create |
Updated app data resource |
POST |
/api/v1/hosting/apps/{app_id}/data_resources/{id}/restore |
create |
Restored app data resource created |
POST |
/api/v1/hosting/apps/{app_id}/data_resources/{id}/resume |
create |
Success |
POST |
/api/v1/hosting/apps/{app_id}/data_resources/{id}/suspend |
create |
Success |
POST |
/api/v1/hosting/apps/{app_id}/data_resources |
create |
App data resource created |
GET |
/api/v1/hosting/apps/{app_id}/data_resources/{id} |
load |
Success |
GET |
/api/v1/hosting/apps/{app_id}/data_resources |
load |
Success |
PATCH |
/api/v1/hosting/apps/{app_id}/data_resources/{id} |
patch |
Success |
DELETE |
/api/v1/hosting/apps/{app_id}/data_resources/{id} |
remove |
Success |
PUT |
/api/v1/hosting/apps/{app_id}/data_resources/{id} |
update |
Success |
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:
app_data_resource, err := client.AppDataResource(nil).Load(map[string]any{"app_id": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(app_data_resource)
created, err := client.AppDataResource(nil).Create(map[string]any{"app_id": "example", "engine": "example", "kind": "example", "name": "example", "slug": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(created)
updated, err := client.AppDataResource(nil).Update(map[string]any{"id": "example_id", "app_id": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(updated)
patched, err := client.AppDataResource(nil).Patch(map[string]any{"id": "example_id", "app_id": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(patched)
removed, err := client.AppDataResource(nil).Remove(map[string]any{"app_id": "example", "id": "example_id"}, nil)
if err != nil {
panic(err)
}
fmt.Println(removed)
Lua
Construct client as shown in the Lua setup, then call the operations:
local app_data_resource, err = client:AppDataResource():load({ app_id = "example" })
local created, err = client:AppDataResource():create({ app_id = "example", engine = "example", kind = "example", name = "example", slug = "example" })
local updated, err = client:AppDataResource():update({ id = "example_id", app_id = "example" })
local patched, err = client:AppDataResource():patch({ id = "example_id", app_id = "example" })
local removed, err = client:AppDataResource():remove({ app_id = "example", id = "example_id" })
PHP
Construct client as shown in the PHP setup, then call the operations:
$app_data_resource = $client->AppDataResource()->load(["app_id" => "example"]);
$created = $client->AppDataResource()->create(["app_id" => "example", "engine" => "example", "kind" => "example", "name" => "example", "slug" => "example"]);
$updated = $client->AppDataResource()->update(["id" => "example_id", "app_id" => "example"]);
$patched = $client->AppDataResource()->patch(["id" => "example_id", "app_id" => "example"]);
$client->AppDataResource()->remove(["app_id" => "example", "id" => "example_id"]);
Python
Construct client as shown in the Python setup, then call the operations:
app_data_resource = client.AppDataResource().load({"app_id": "example"})
created = client.AppDataResource().create({ "app_id": "example", "engine": "example", "kind": "example", "name": "example", "slug": "example" })
updated = client.AppDataResource().update({"id": "example_id", "app_id": "example"})
patched = client.AppDataResource().patch({"id": "example_id", "app_id": "example"})
client.AppDataResource().remove({"app_id": "example", "id": "example_id"})
Ruby
Construct client as shown in the Ruby setup, then call the operations:
app_data_resource = client.AppDataResource.load({ "app_id" => "example" })
created = client.AppDataResource.create({ "app_id" => "example", "engine" => "example", "kind" => "example", "name" => "example", "slug" => "example" })
updated = client.AppDataResource.update({ "id" => "example_id", "app_id" => "example" })
patched = client.AppDataResource.patch({ "id" => "example_id", "app_id" => "example" })
client.AppDataResource.remove({ "app_id" => "example", "id" => "example_id" })
TypeScript
Construct client as shown in the TypeScript setup, then call the operations:
const app_data_resource = await client.AppDataResource().load({ app_id: "example" })
const created = await client.AppDataResource().create({ app_id: "example", engine: "example", kind: "example", name: "example", slug: "example" })
const updated = await client.AppDataResource().update({ id: "example_id", app_id: "example" })
const patched = await client.AppDataResource().patch({ id: "example_id", app_id: "example" })
await client.AppDataResource().remove({ app_id: "example", id: "example_id" })
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}/archive
Operation ID: archive_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: Success
application/json
The response is object.
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway
POST /api/v1/hosting/apps/{app_id}/data_resources/{id}/refresh
Operation ID: refresh_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 |
POST /api/v1/hosting/apps/{app_id}/data_resources/{id}/restore
Operation ID: restore_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
| Property | Type | Required | Description |
|---|---|---|---|
app_environment_id |
string |
No | |
backup_id |
string |
No | |
branch_name |
string |
No | |
high_availability |
boolean |
No | |
name |
string |
No | |
plan |
string |
No | |
region |
string |
No | |
restore_point |
string |
No | |
slug |
string |
No | |
storage_gb |
integer |
No |
Responses
200: Restored app data resource created
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 |
201: Restored app data resource created
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: Infrastructure request failed validation
application/json
| Property | Type | Required | Description |
|---|---|---|---|
details |
array of string |
No | |
error |
string |
Yes |
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 |
POST /api/v1/hosting/apps/{app_id}/data_resources/{id}/resume
Operation ID: resume_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: Success
application/json
The response is object.
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway
POST /api/v1/hosting/apps/{app_id}/data_resources/{id}/suspend
Operation ID: suspend_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: Success
application/json
The response is object.
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway
POST /api/v1/hosting/apps/{app_id}/data_resources
Operation ID: post_api_v1_hosting_apps_app_id_data_resources.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
app_id |
path |
string |
Yes |
Request body
application/json
| Property | Type | Required | Description |
|---|---|---|---|
app_environment_id |
string |
No | |
engine |
enum: postgres, mysql, valkey |
Yes | |
high_availability |
boolean |
No | |
kind |
enum: database, cache, queue, search, vector |
Yes | |
name |
string |
Yes | |
plan |
string |
No | |
region |
string |
No | |
slug |
string |
Yes | |
storage_gb |
integer |
No | |
version |
string |
No |
Responses
200: App data resource created
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 |
201: App data resource created
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: Infrastructure request failed validation
application/json
| Property | Type | Required | Description |
|---|---|---|---|
details |
array of string |
No | |
error |
string |
Yes |
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 |
load
GET /api/v1/hosting/apps/{app_id}/data_resources/{id}
Operation ID: api_v1_app_data_resource.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
app_id |
path |
string |
Yes | |
id |
path |
string |
Yes |
Responses
200: Success
application/json
The response is object.
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway
GET /api/v1/hosting/apps/{app_id}/data_resources
Operation ID: api_v1_app_data_resources.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
app_id |
path |
string |
Yes |
Responses
200: Success
application/json
The response is object.
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway
patch
PATCH /api/v1/hosting/apps/{app_id}/data_resources/{id}
Operation ID: patch_api_v1_hosting_apps_app_id_data_resources_id_.
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: Success
application/json
The response is object.
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway
remove
DELETE /api/v1/hosting/apps/{app_id}/data_resources/{id}
Operation ID: delete_api_v1_hosting_apps_app_id_data_resources_id_.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
app_id |
path |
string |
Yes | |
id |
path |
string |
Yes |
Responses
200: Success
application/json
The response is object.
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway
update
PUT /api/v1/hosting/apps/{app_id}/data_resources/{id}
Operation ID: put_api_v1_hosting_apps_app_id_data_resources_id_.
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: Success
application/json
The response is object.