Snippets
Tags: content, snippets
Reusable content snippets and macros
Endpoints
GET /api/v2/w/{workspace_uuid}/snippets- ListPOST /api/v2/w/{workspace_uuid}/snippets- CreateDELETE /api/v2/w/{workspace_uuid}/snippets/{snippet_id}- Delete Snippet IdGET /api/v2/w/{workspace_uuid}/snippets/{snippet_id}- Get Snippet IdPUT /api/v2/w/{workspace_uuid}/snippets/{snippet_id}- Update Snippet Id
List
GET /api/v2/w/{workspace_uuid}/snippets
Description:
List all snippets for the workspace.
Authorization: Requires workflows:read scope
Response: List of SnippetResponse
Create
POST /api/v2/w/{workspace_uuid}/snippets
Description:
Create a new snippet.
Authorization: Requires workflows:write scope
Parameters:
request- See CreateSnippetRequest
Response: See SnippetResponse
Delete Snippet Id
DELETE /api/v2/w/{workspace_uuid}/snippets/{snippet_id}
Description:
Delete a snippet. Returns usage info for any templates referencing it.
Authorization: Requires workflows:write scope
Parameters:
snippet_id(Integer)
Get Snippet Id
GET /api/v2/w/{workspace_uuid}/snippets/{snippet_id}
Description:
Get a specific snippet by ID.
Authorization: Requires workflows:read scope
Parameters:
snippet_id(Integer)
Response: See SnippetResponse
Update Snippet Id
PUT /api/v2/w/{workspace_uuid}/snippets/{snippet_id}
Description:
Update an existing snippet.
Authorization: Requires workflows:write scope
Parameters:
snippet_id(Integer)request- See UpdateSnippetRequest
Response: See SnippetResponse