Bitbucket Snippets API — create, read, update, delete, and inspect snippets, their comments, commits, diffs, and watchers.
Bitbucket Snippets API — create, read, update, delete, and inspect snippets, their comments, commits, diffs, and watchers.
(create-comments client workspace encoded-id body)(create-comments client workspace encoded-id body opts)Create a comment on a snippet. POST /2.0/snippets/{workspace}/{encoded_id}/comments Path params: workspace, encoded-id. Body: snippet_comment.
Create a comment on a snippet.
POST /2.0/snippets/{workspace}/{encoded_id}/comments
Path params: workspace, encoded-id.
Body: snippet_comment.(create-snippets client body)(create-snippets client body opts)Create a snippet. POST /2.0/snippets Body: snippet (multipart/form-data or JSON).
Create a snippet. POST /2.0/snippets Body: snippet (multipart/form-data or JSON).
(create-snippets-by-workspace client workspace body)(create-snippets-by-workspace client workspace body opts)Create a snippet for a workspace. POST /2.0/snippets/{workspace} Path params: workspace. Body: snippet.
Create a snippet for a workspace.
POST /2.0/snippets/{workspace}
Path params: workspace.
Body: snippet.(delete-comments client workspace encoded-id comment-id)Delete a comment on a snippet. DELETE /2.0/snippets/{workspace}/{encoded_id}/comments/{comment_id} Path params: workspace, encoded-id, comment-id.
Delete a comment on a snippet.
DELETE /2.0/snippets/{workspace}/{encoded_id}/comments/{comment_id}
Path params: workspace, encoded-id, comment-id.(delete-snippets-by-workspace-encoded-id client workspace encoded-id)Delete a snippet. DELETE /2.0/snippets/{workspace}/{encoded_id} Path params: workspace, encoded-id.
Delete a snippet.
DELETE /2.0/snippets/{workspace}/{encoded_id}
Path params: workspace, encoded-id.(delete-snippets-by-workspace-encoded-id-node-id client
workspace
encoded-id
node-id)Delete a previous revision of a snippet. DELETE /2.0/snippets/{workspace}/{encoded_id}/{node_id} Path params: workspace, encoded-id, node-id.
Delete a previous revision of a snippet.
DELETE /2.0/snippets/{workspace}/{encoded_id}/{node_id}
Path params: workspace, encoded-id, node-id.(delete-watch client workspace encoded-id)Stop watching a snippet. DELETE /2.0/snippets/{workspace}/{encoded_id}/watch Path params: workspace, encoded-id.
Stop watching a snippet.
DELETE /2.0/snippets/{workspace}/{encoded_id}/watch
Path params: workspace, encoded-id.(get-comments client workspace encoded-id comment-id)(get-comments client workspace encoded-id comment-id opts)Get a comment on a snippet. GET /2.0/snippets/{workspace}/{encoded_id}/comments/{comment_id} Path params: workspace, encoded-id, comment-id. Query opts: passed through as query params (e.g. fields).
Get a comment on a snippet.
GET /2.0/snippets/{workspace}/{encoded_id}/comments/{comment_id}
Path params: workspace, encoded-id, comment-id.
Query opts: passed through as query params (e.g. fields).(get-commits client workspace encoded-id revision)(get-commits client workspace encoded-id revision opts)Get a previous snippet change. GET /2.0/snippets/{workspace}/{encoded_id}/commits/{revision} Path params: workspace, encoded-id, revision. Query opts: passed through as query params (e.g. fields).
Get a previous snippet change.
GET /2.0/snippets/{workspace}/{encoded_id}/commits/{revision}
Path params: workspace, encoded-id, revision.
Query opts: passed through as query params (e.g. fields).(get-files-by-workspace-encoded-id-node-id-path client
workspace
encoded-id
node-id
path)(get-files-by-workspace-encoded-id-node-id-path client
workspace
encoded-id
node-id
path
opts)Get a snippet's raw file at a specific revision. GET /2.0/snippets/{workspace}/{encoded_id}/{node_id}/files/{path} Path params: workspace, encoded-id, node-id, path. Query opts: passed through as query params (e.g. fields).
Get a snippet's raw file at a specific revision.
GET /2.0/snippets/{workspace}/{encoded_id}/{node_id}/files/{path}
Path params: workspace, encoded-id, node-id, path.
Query opts: passed through as query params (e.g. fields).(get-files-by-workspace-encoded-id-path client workspace encoded-id path)(get-files-by-workspace-encoded-id-path client workspace encoded-id path opts)Get a snippet's raw file at HEAD. GET /2.0/snippets/{workspace}/{encoded_id}/files/{path} Path params: workspace, encoded-id, path. Query opts: passed through as query params (e.g. fields).
Get a snippet's raw file at HEAD.
GET /2.0/snippets/{workspace}/{encoded_id}/files/{path}
Path params: workspace, encoded-id, path.
Query opts: passed through as query params (e.g. fields).(get-snippets-by-workspace client workspace)(get-snippets-by-workspace client workspace opts)List snippets in a workspace. GET /2.0/snippets/{workspace} Path params: workspace. Query params: role (owner|contributor|member).
List snippets in a workspace.
GET /2.0/snippets/{workspace}
Path params: workspace.
Query params: role (owner|contributor|member).(get-snippets-by-workspace-encoded-id client workspace encoded-id)(get-snippets-by-workspace-encoded-id client workspace encoded-id opts)Get a snippet. GET /2.0/snippets/{workspace}/{encoded_id} Path params: workspace, encoded-id. Query opts: passed through as query params (e.g. fields).
Get a snippet.
GET /2.0/snippets/{workspace}/{encoded_id}
Path params: workspace, encoded-id.
Query opts: passed through as query params (e.g. fields).(get-snippets-by-workspace-encoded-id-node-id client
workspace
encoded-id
node-id)(get-snippets-by-workspace-encoded-id-node-id client
workspace
encoded-id
node-id
opts)Get a previous revision of a snippet. GET /2.0/snippets/{workspace}/{encoded_id}/{node_id} Path params: workspace, encoded-id, node-id. Query opts: passed through as query params (e.g. fields).
Get a previous revision of a snippet.
GET /2.0/snippets/{workspace}/{encoded_id}/{node_id}
Path params: workspace, encoded-id, node-id.
Query opts: passed through as query params (e.g. fields).(list-comments client workspace encoded-id)(list-comments client workspace encoded-id opts)List comments on a snippet. GET /2.0/snippets/{workspace}/{encoded_id}/comments Path params: workspace, encoded-id.
List comments on a snippet.
GET /2.0/snippets/{workspace}/{encoded_id}/comments
Path params: workspace, encoded-id.(list-commits client workspace encoded-id)(list-commits client workspace encoded-id opts)List snippet changes. GET /2.0/snippets/{workspace}/{encoded_id}/commits Path params: workspace, encoded-id.
List snippet changes.
GET /2.0/snippets/{workspace}/{encoded_id}/commits
Path params: workspace, encoded-id.(list-diff client workspace encoded-id revision)(list-diff client workspace encoded-id revision opts)Get snippet changes between versions. GET /2.0/snippets/{workspace}/{encoded_id}/{revision}/diff Path params: workspace, encoded-id, revision. Query params: path (limit diff to a specific file).
Get snippet changes between versions.
GET /2.0/snippets/{workspace}/{encoded_id}/{revision}/diff
Path params: workspace, encoded-id, revision.
Query params: path (limit diff to a specific file).(list-patch client workspace encoded-id revision)(list-patch client workspace encoded-id revision opts)Get snippet patch between versions. GET /2.0/snippets/{workspace}/{encoded_id}/{revision}/patch Path params: workspace, encoded-id, revision. Query opts: passed through as query params (e.g. fields).
Get snippet patch between versions.
GET /2.0/snippets/{workspace}/{encoded_id}/{revision}/patch
Path params: workspace, encoded-id, revision.
Query opts: passed through as query params (e.g. fields).(list-snippets client)(list-snippets client opts)List snippets. GET /2.0/snippets Query params: role (owner|contributor|member). DEPRECATED.
List snippets. GET /2.0/snippets Query params: role (owner|contributor|member). DEPRECATED.
(list-watch client workspace encoded-id)(list-watch client workspace encoded-id opts)Check if the current user is watching a snippet. GET /2.0/snippets/{workspace}/{encoded_id}/watch Path params: workspace, encoded-id. Query opts: passed through as query params (e.g. fields).
Check if the current user is watching a snippet.
GET /2.0/snippets/{workspace}/{encoded_id}/watch
Path params: workspace, encoded-id.
Query opts: passed through as query params (e.g. fields).(list-watchers client workspace encoded-id)(list-watchers client workspace encoded-id opts)List users watching a snippet. GET /2.0/snippets/{workspace}/{encoded_id}/watchers Path params: workspace, encoded-id. DEPRECATED.
List users watching a snippet.
GET /2.0/snippets/{workspace}/{encoded_id}/watchers
Path params: workspace, encoded-id.
DEPRECATED.(update-comments client workspace encoded-id comment-id body)(update-comments client workspace encoded-id comment-id body opts)Update a comment on a snippet. PUT /2.0/snippets/{workspace}/{encoded_id}/comments/{comment_id} Path params: workspace, encoded-id, comment-id. Body: snippet_comment.
Update a comment on a snippet.
PUT /2.0/snippets/{workspace}/{encoded_id}/comments/{comment_id}
Path params: workspace, encoded-id, comment-id.
Body: snippet_comment.(update-snippets-by-workspace-encoded-id client workspace encoded-id body)(update-snippets-by-workspace-encoded-id client workspace encoded-id body opts)Update a snippet. PUT /2.0/snippets/{workspace}/{encoded_id} Path params: workspace, encoded-id. Body: updated snippet fields.
Update a snippet.
PUT /2.0/snippets/{workspace}/{encoded_id}
Path params: workspace, encoded-id.
Body: updated snippet fields.(update-snippets-by-workspace-encoded-id-node-id client
workspace
encoded-id
node-id
body)(update-snippets-by-workspace-encoded-id-node-id client
workspace
encoded-id
node-id
body
opts)Update a previous revision of a snippet. PUT /2.0/snippets/{workspace}/{encoded_id}/{node_id} Path params: workspace, encoded-id, node-id. Body: snippet fields.
Update a previous revision of a snippet.
PUT /2.0/snippets/{workspace}/{encoded_id}/{node_id}
Path params: workspace, encoded-id, node-id.
Body: snippet fields.(update-watch client workspace encoded-id)Watch a snippet. PUT /2.0/snippets/{workspace}/{encoded_id}/watch Path params: workspace, encoded-id.
Watch a snippet.
PUT /2.0/snippets/{workspace}/{encoded_id}/watch
Path params: workspace, encoded-id.cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |