Stacks API¶
This page documents the client wrapper functions and raw HTTP interface for the Stacks segment of the Utho Cloud API.
Endpoints¶
POST `/stacks`¶
Summary: Add Stacks
Request Body
- application/json
Responses
| Status | Description |
|---|---|
| 200 | Successful response |
Example (CLI)
# Using the generic call command
utho call POST /stacks -k $CLOUD_API_KEY
Example (TypeScript)
import { ApiClient } from 'utho-cdk';
const client = new ApiClient({ baseUrl: "https://api.utho.com/v2", apiKey: process.env.CLOUD_API_KEY });
const res = await client.request({ method: 'POST', path: '/stacks' });
console.log(res);
GET `/stacks`¶
Summary: Get Stack Details
Responses
| Status | Description |
|---|---|
| 200 | Successful response |
Example (CLI)
# Using the generic call command
utho call GET /stacks -k $CLOUD_API_KEY
Example (TypeScript)
import { ApiClient } from 'utho-cdk';
const client = new ApiClient({ baseUrl: "https://api.utho.com/v2", apiKey: process.env.CLOUD_API_KEY });
const res = await client.request({ method: 'GET', path: '/stacks' });
console.log(res);
PUT `/stacks/{id}`¶
Summary: Update Stacks
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | string | yes |
Request Body
- application/json
Responses
| Status | Description |
|---|---|
| 200 | Successful response |
Example (CLI)
# Using the generic call command
utho call PUT /stacks/{id} -k $CLOUD_API_KEY
Example (TypeScript)
import { ApiClient } from 'utho-cdk';
const client = new ApiClient({ baseUrl: "https://api.utho.com/v2", apiKey: process.env.CLOUD_API_KEY });
const res = await client.request({ method: 'PUT', path: '/stacks/{id}' });
console.log(res);
DELETE `/stacks/{id}`¶
Summary: Delete Stack
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | string | yes |
Responses
| Status | Description |
|---|---|
| 200 | Successful response |
Example (CLI)
# Using the generic call command
utho call DELETE /stacks/{id} -k $CLOUD_API_KEY
Example (TypeScript)
import { ApiClient } from 'utho-cdk';
const client = new ApiClient({ baseUrl: "https://api.utho.com/v2", apiKey: process.env.CLOUD_API_KEY });
const res = await client.request({ method: 'DELETE', path: '/stacks/{id}' });
console.log(res);