Run a built-in item action on a workspace item
Runs one of the server-side item actions offered for a workspace item; today that is `save_as_template`, which snapshots the item and its descendants into a reusable workspace template. Requires read access to the item, and an action key that is not offered for that item (including the browser-only print action) is rejected with a validation error. Send an `Idempotency-Key` header to make retries safe; a replay within the window returns the original response.
Authorization
apiKey Workspace API key created in Workspace settings → API keys. Scopes on the key bound what it can read and write.
In: header
Path Parameters
Value in
- "save_as_template"
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/v1/workspaces/string/items/string/actions/save_as_template/run" \ -H "Content-Type: application/json" \ -d '{ "name": "string" }'{ "data": { "id": "string", "workspaceId": "string", "name": "string", "description": "string", "cover": "string", "icon": "string", "kind": "folder", "sourceItemId": "string", "scope": "builtin", "visibility": "private", "reviewStatus": "draft", "installCount": 0, "author": { "workspaceId": "string", "name": "string", "icon": "string" }, "category": "string", "tags": [ "string" ], "inputs": [ { "id": "string", "kind": "database", "label": "string", "description": "string", "placeholder": "string", "required": true, "dependsOn": "string", "choices": [ { "value": "string", "label": "string" } ], "default": "string" } ], "version": 0, "manifest": { "version": 2, "inputs": [ { "id": "string", "kind": "database", "label": "string", "description": "string", "placeholder": "string", "required": true, "dependsOn": "string", "choices": [ { "value": "string", "label": "string" } ], "default": "string" } ], "rootSourceItemId": "string", "rootKind": "folder", "operations": [ { "type": "item.create", "sourceItemId": "string", "parentSourceItemId": "string", "title": "string", "icon": "string", "color": "string", "order": 0, "accessMode": "open", "locked": true, "archived": true, "metadata": {}, "kind": "folder", "sourceTargetId": "string" } ] }, "publishedAt": "string", "curatedAt": "string", "submittedAt": "string", "reviewNote": "string", "createdBy": "string", "createdAt": "string", "updatedAt": "string" }}{ "_tag": "ApiNotFound", "error": "not_found", "message": "That item does not exist, or this key cannot see it.", "status": 404}{ "_tag": "ApiNotFound", "error": "not_found", "message": "That item does not exist, or this key cannot see it.", "status": 404}Delete a timeline dependency
Removes one dependency edge from the database and records the deletion on the workspace event ledger. Requires `databases:write` on the database; an edge that does not exist in this database returns not-found.
List connector operations available to actions
Returns the registry of connector operations an action can call, with the input fields each one takes. Requires the `actions:read` permission in the workspace.