cml_api
Authenticate and execute HTTP requests (GET, POST, PUT, PATCH, DELETE) against the CML2 API. Specify the path after /api/v0 and optional JSON body to interact with CML2 resources.
Instructions
Authenticated CML2 REST call.
Args: method: HTTP method (GET/POST/PUT/PATCH/DELETE). path: Path AFTER /api/v0, must start with '/'. Example: '/labs'. body: Optional JSON-serializable value (object/array/string/etc.). Sent as the request body with Content-Type: application/json.
Returns the raw response body as text (callers should json.parse if needed). Re-authenticates and retries once on HTTP 401. Raises on non-2xx.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| method | Yes | ||
| path | Yes | ||
| body | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |