Interlaken
API referenceComputeVirtual machines

Attach a managed database to a VM (composes its URL into a config var)

POST
/api/v1/vms/{id}/attachments/database

Requires the vms:update permission.

Authorization

AuthorizationBearer <token>

An access token from this zone's POST /oauth/token, or a session token from POST /api/v1/auth/login. Send it as Authorization: Bearer <token>.

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v1/vms/string/attachments/database" \  -H "Content-Type: application/json" \  -d '{    "database_id": "91088904-0b92-46ad-9240-e1afa0da22df",    "env_var": "string"  }'
{  "applied_live": true,  "env_var": "string"}