Stacks
AuthorizationBearer <token>Stacks
application/json- response
stacks*array<>curl -X GET "https://example.com/stacks"{ "stacks": [ { "id": 0, "name": "string", "description": "string", "location": "string", "status": "draft", "spec": {}, "applied_spec": {}, "resources": [ { "key": "string", "type": "string", "id": 0, "name": "string", "status": "string" } ], "errors": [ { "key": "string", "code": "string", "message": "string" } ], "labels": { "property1": "string", "property2": "string" }, "created": "2019-08-24T14:15:22Z", "updated": "2019-08-24T14:15:22Z" } ]}AuthorizationBearer <token>application/json- body
name*string1 <= length <= 64description?stringlength <= 1000location*stringspec?Stack document; see the Stacks tag for the format
labels?Up to 64 key/value pairs; keys and values up to 63 characters
Created
application/json- response
stack*curl -X POST "https://example.com/stacks" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "location": "string" }'{ "stack": { "id": 0, "name": "string", "description": "string", "location": "string", "status": "draft", "spec": {}, "applied_spec": {}, "resources": [ { "key": "string", "type": "string", "id": 0, "name": "string", "status": "string" } ], "errors": [ { "key": "string", "code": "string", "message": "string" } ], "labels": { "property1": "string", "property2": "string" }, "created": "2019-08-24T14:15:22Z", "updated": "2019-08-24T14:15:22Z" }}The project's resources in a location as a stack document, for the canvas. Nothing is linked to a stack.
AuthorizationBearer <token>location*stringTopology
application/json- response
spec*Stack document; see the Stacks tag for the format
resources*array<>curl -X GET "https://example.com/stacks/topology?location=string"{ "spec": {}, "resources": [ { "key": "string", "type": "string", "id": 0, "name": "string", "status": "string" } ]}AuthorizationBearer <token>Assistant
application/json- response
enabled*booleancurl -X GET "https://example.com/stacks/assistant"{ "enabled": true}Describe the setup in plain language; the assistant writes a new
version of the document (nothing is created). Send the document on the
canvas and the earlier turns to refine it. The answer takes up to a
couple of minutes: the request returns a draft at once; poll
GET /stacks/assistant/drafts/{id} until its status is done or failed.
AuthorizationBearer <token>application/json- body
location*stringprompt*string1 <= length <= 4000spec?Stack document; see the Stacks tag for the format
history?array<>items <= 20Draft started
application/json- response
draft*curl -X POST "https://example.com/stacks/assistant" \ -H "Content-Type: application/json" \ -d '{ "location": "string", "prompt": "string" }'{ "draft": { "id": 0, "status": "running", "message": "string", "spec": {}, "problems": [ "string" ], "error": { "code": "string", "message": "string" }, "created": "2019-08-24T14:15:22Z" }}AuthorizationBearer <token>id*integerint64Draft
application/json- response
draft*curl -X GET "https://example.com/stacks/assistant/drafts/0"{ "draft": { "id": 0, "status": "running", "message": "string", "spec": {}, "problems": [ "string" ], "error": { "code": "string", "message": "string" }, "created": "2019-08-24T14:15:22Z" }}AuthorizationBearer <token>id*integerint64Stack
application/json- response
stack*curl -X GET "https://example.com/stacks/0"{ "stack": { "id": 0, "name": "string", "description": "string", "location": "string", "status": "draft", "spec": {}, "applied_spec": {}, "resources": [ { "key": "string", "type": "string", "id": 0, "name": "string", "status": "string" } ], "errors": [ { "key": "string", "code": "string", "message": "string" } ], "labels": { "property1": "string", "property2": "string" }, "created": "2019-08-24T14:15:22Z", "updated": "2019-08-24T14:15:22Z" }}Deletes every resource of the stack, then the stack. With keep_resources the resources stay and only the stack goes.
AuthorizationBearer <token>id*integerint64keep_resources?booleanfalseDeletion started (or done, with keep_resources)
application/json- response
stack*plan?curl -X DELETE "https://example.com/stacks/0"{ "stack": { "id": 0, "name": "string", "description": "string", "location": "string", "status": "draft", "spec": {}, "applied_spec": {}, "resources": [ { "key": "string", "type": "string", "id": 0, "name": "string", "status": "string" } ], "errors": [ { "key": "string", "code": "string", "message": "string" } ], "labels": { "property1": "string", "property2": "string" }, "created": "2019-08-24T14:15:22Z", "updated": "2019-08-24T14:15:22Z" }, "plan": { "items": [ { "key": "string", "base_key": "string", "type": "string", "name": "string", "action": "create", "changes": [ "string" ], "resource_id": 0, "price_monthly": { "net": "0.0064000000", "gross": "0.0064000000", "currency": "EUR" } } ], "errors": [ "string" ], "warnings": [ "string" ], "monthly_before": { "net": "0.0064000000", "gross": "0.0064000000", "currency": "EUR" }, "monthly_after": { "net": "0.0064000000", "gross": "0.0064000000", "currency": "EUR" } }}AuthorizationBearer <token>id*integerint64application/json- body
name?string1 <= length <= 64description?stringlength <= 1000spec?Stack document; see the Stacks tag for the format
labels?Up to 64 key/value pairs; keys and values up to 63 characters
Updated
application/json- response
stack*curl -X PUT "https://example.com/stacks/0" \ -H "Content-Type: application/json" \ -d '{}'{ "stack": { "id": 0, "name": "string", "description": "string", "location": "string", "status": "draft", "spec": {}, "applied_spec": {}, "resources": [ { "key": "string", "type": "string", "id": 0, "name": "string", "status": "string" } ], "errors": [ { "key": "string", "code": "string", "message": "string" } ], "labels": { "property1": "string", "property2": "string" }, "created": "2019-08-24T14:15:22Z", "updated": "2019-08-24T14:15:22Z" }}AuthorizationBearer <token>id*integerint64Plan
application/json- response
plan*curl -X POST "https://example.com/stacks/0/plan"{ "plan": { "items": [ { "key": "string", "base_key": "string", "type": "string", "name": "string", "action": "create", "changes": [ "string" ], "resource_id": 0, "price_monthly": { "net": "0.0064000000", "gross": "0.0064000000", "currency": "EUR" } } ], "errors": [ "string" ], "warnings": [ "string" ], "monthly_before": { "net": "0.0064000000", "gross": "0.0064000000", "currency": "EUR" }, "monthly_after": { "net": "0.0064000000", "gross": "0.0064000000", "currency": "EUR" } }}Starts creating, updating and deleting resources so they match the document. Follow progress through the stack's status and resources.
AuthorizationBearer <token>id*integerint64Apply started
application/json- response
stack*plan*curl -X POST "https://example.com/stacks/0/apply"{ "stack": { "id": 0, "name": "string", "description": "string", "location": "string", "status": "draft", "spec": {}, "applied_spec": {}, "resources": [ { "key": "string", "type": "string", "id": 0, "name": "string", "status": "string" } ], "errors": [ { "key": "string", "code": "string", "message": "string" } ], "labels": { "property1": "string", "property2": "string" }, "created": "2019-08-24T14:15:22Z", "updated": "2019-08-24T14:15:22Z" }, "plan": { "items": [ { "key": "string", "base_key": "string", "type": "string", "name": "string", "action": "create", "changes": [ "string" ], "resource_id": 0, "price_monthly": { "net": "0.0064000000", "gross": "0.0064000000", "currency": "EUR" } } ], "errors": [ "string" ], "warnings": [ "string" ], "monthly_before": { "net": "0.0064000000", "gross": "0.0064000000", "currency": "EUR" }, "monthly_after": { "net": "0.0064000000", "gross": "0.0064000000", "currency": "EUR" } }}