curl --request GET \
--url https://api.cnap.tech/v1/snippets \
--header 'Authorization: Bearer <token>'{
"data": [
{
"id": "j572abc123def456",
"name": "Cluster Resource Audit",
"description": "Checks resource requests and limits",
"code": "async () => { ... }",
"display_type": "table",
"workspace_id": "j572abc123def456",
"created_by": "<string>",
"created_at": 123
}
],
"pagination": {
"cursor": "<string>",
"has_more": true
}
}Returns all snippets belonging to the workspace specified in the X-Workspace-Id header.
curl --request GET \
--url https://api.cnap.tech/v1/snippets \
--header 'Authorization: Bearer <token>'{
"data": [
{
"id": "j572abc123def456",
"name": "Cluster Resource Audit",
"description": "Checks resource requests and limits",
"code": "async () => { ... }",
"display_type": "table",
"workspace_id": "j572abc123def456",
"created_by": "<string>",
"created_at": 123
}
],
"pagination": {
"cursor": "<string>",
"has_more": true
}
}Personal Access Token (cnap_pat_...) or OAuth2 JWT. Create tokens at https://cnap.tech/account/tokens
Pagination cursor from previous response
Items per page (1-100)
1 <= x <= 10050