Update CPU and memory requests for a database
PATCH
/databases/{id}/resources
const url = 'https://example.com/databases/example/resources';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"cpuRequestMilli":1,"memoryRequestBytes":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://example.com/databases/example/resources \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "cpuRequestMilli": 1, "memoryRequestBytes": 1 }'Auth: authenticated (scope: deploy)
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Request Body
Section titled “Request Body”Media typeapplication/json
object
cpuRequestMilli
integer | null
memoryRequestBytes
integer | null
Example generated
{ "cpuRequestMilli": 1, "memoryRequestBytes": 1}Responses
Section titled “Responses”OK
Media typeapplication/json
object
backupScheduleCron
string | null
clusterName
string | null
containerName
string | null
cpuRequestMilli
number | null
createdAt
required
string
createdBy
string | null
creator
object
email
string | null
firstName
string | null
id
required
string
lastName
string | null
username
string | null
key
additional properties
dbName
required
string
dbPassword
required
string | null
dbUser
required
string
environmentId
string | null
host
required
string
id
required
string
importBoosted
required
boolean
installedExtensions
liveStatus
object
conditions
Array<object>
object
key
additional properties
connections
number
currentPrimary
string
exists
boolean
lastTerminationAt
string
lastTerminationExitCode
number
lastTerminationReason
string
message
string
phase
string
ready
boolean
readyReplicas
number
replicas
number
restartCount
number
size
string
key
additional properties
mode
required
string
name
required
string
namespace
string | null
pgParameters
object | null
port
required
number
projectId
required
string
publicEnabled
required
boolean
publicIp
string | null
publicPort
number | null
r2ProxyAccessKey
string | null
r2ProxySecret
string | null
sharedPreloadLibs
Array<string> | null
status
required
string
storageSize
string | null
templateInstanceId
string | null
updatedAt
required
string
key
additional properties
Example generated
{ "backupScheduleCron": "example", "clusterName": "example", "containerName": "example", "cpuRequestMilli": 1, "createdAt": "example", "createdBy": "example", "creator": { "email": "example", "firstName": "example", "id": "example", "lastName": "example", "username": "example" }, "dbName": "example", "dbPassword": "example", "dbUser": "example", "environmentId": "example", "host": "example", "id": "example", "importBoosted": true, "installedExtensions": "example", "liveStatus": { "conditions": [ { "additionalProperty": "example" } ], "connections": 1, "currentPrimary": "example", "exists": true, "lastTerminationAt": "example", "lastTerminationExitCode": 1, "lastTerminationReason": "example", "message": "example", "phase": "example", "ready": true, "readyReplicas": 1, "replicas": 1, "restartCount": 1, "size": "example" }, "memoryRequestBytes": "example", "mode": "example", "name": "example", "namespace": "example", "pgParameters": "example", "port": 1, "projectId": "example", "publicEnabled": true, "publicIp": "example", "publicPort": 1, "r2ProxyAccessKey": "example", "r2ProxySecret": "example", "sharedPreloadLibs": [ "example" ], "status": "example", "storageSize": "example", "templateInstanceId": "example", "updatedAt": "example"}