Atlassian Bitbucket Snippets API
The Atlassian Bitbucket Snippets API allows users to create, manage, and share code snippets within Bitbucket repositories for collaboration.
The Atlassian Bitbucket Snippets API allows users to create, manage, and share code snippets within Bitbucket repositories for collaboration.
openapi: 3.0.0
info:
title: 'Atlassian snippets/'
description: Needs description.
version: '2.0'
termsOfService: https://www.atlassian.com/legal/customer-agreement
contact:
name: Bitbucket Support
url: https://support.atlassian.com/bitbucket-cloud/
email: [email protected]
paths:
/snippets/{workspace}:
get:
tags:
- Snippets
description: >-
Identical to
[`/snippets`](/cloud/bitbucket/rest/api-group-snippets/#api-snippets-get),
except that the result is further filtered<br>by the snippet owner and
only those that are owned by `{workspace}` are<br>returned.
summary: Atlassian List Snippets In A Workspace
responses:
'200':
description: A paginated list of snippets.
content:
application/json:
schema:
$ref: '#/components/schemas/paginated_snippets'
'404':
description: If the user does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
parameters:
- name: role
in: query
description: >-
Filter down the result based on the authenticated user's role
(`owner`, `contributor`, or `member`).
required: false
schema:
type: string
enum:
- owner
- contributor
- member
security:
- oauth2:
- snippet
- basic: []
- api_key: []
operationId: atlassianListSnippetsInAWorkspace
post:
tags:
- Snippets
description: >-
Identical to
[`/snippets`](/cloud/bitbucket/rest/api-group-snippets/#api-snippets-post),
except that the new snippet will be<br>created under the workspace
specified in the path parameter<br>`{workspace}`.
summary: Atlassian Create A Snippet For A Workspace
responses:
'201':
description: The newly created snippet object.
headers:
Location:
description: The URL of the newly created snippet.
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/snippet'
'401':
description: If the request was not authenticated
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'403':
description: >-
If the authenticated user does not have permission to create
snippets in the specified workspace.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
requestBody:
$ref: '#/components/requestBodies/snippet'
security:
- oauth2:
- snippet:write
- basic: []
- api_key: []
operationId: atlassianCreateASnippetForAWorkspace
parameters:
- name: workspace
in: path
description: |
This can either be the workspace ID (slug) or the workspace UUID
surrounded by curly-braces, for example: `{workspace UUID}`.
required: true
schema:
type: string
/snippets/{workspace}/{encoded_id}:
delete:
tags:
- Snippets
description: Deletes a snippet and returns an empty response.
summary: Atlassian Delete A Snippet
responses:
'204':
description: If the snippet was deleted successfully.
'401':
description: If the snippet is private and the request was not authenticated.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'403':
description: >-
If authenticated user does not have permission to delete the private
snippet.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: If the snippet does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- snippet:write
- basic: []
- api_key: []
operationId: atlassianDeleteASnippet
get:
tags:
- Snippets
description: >-
Retrieves a single snippet.<br><br>Snippets support multiple content
types:<br><br>* application/json<br>* multipart/related<br>*
multipart/form-data<br><br><br>application/json<br>-<br><br>The default
content type of the response is `application/json`.<br>Since JSON is
always `utf-8`, it cannot reliably contain file contents<br>for files
that are not text. Therefore, JSON snippet documents only<br>contain the
filename and links to the file contents.<br><br>This means that in order
to retrieve all parts of a snippet, N+1<br>requests need to be made
(where N is the number of files in
the<br>snippet).<br><br><br>multipart/related<br>--<br><br>To retrieve
an entire snippet in a single response, use the<br>`Accept:
multipart/related` HTTP request header.<br><br> $ curl -H "Accept:
multipart/related"
https://api.bitbucket.org/2.0/snippets/evzijst/1<br><br>Response:<br><br> HTTP/1.1 200 OK<br> Content-Length: 2214<br> Content-Type:
multipart/related; start="snippet";
boundary="===============1438169132528273974=="<br> MIME-Version:
1.0<br><br> --===============1438169132528273974==<br> Content-Type: application/json; charset="utf-8"<br> MIME-Version:
1.0<br> Content-ID: snippet<br><br> {<br> "links":
{<br> "self": {<br> "href":
"https://api.bitbucket.org/2.0/snippets/evzijst/kypj"<br> },<br> "html": {<br> "href":
"https://bitbucket.org/snippets/evzijst/kypj"<br> },<br> "comments": {<br> "href":
"https://api.bitbucket.org/2.0/snippets/evzijst/kypj/comments"<br> },<br> "watchers": {<br> "href":
"https://api.bitbucket.org/2.0/snippets/evzijst/kypj/watchers"<br> },<br> "commits": {<br> "href":
"https://api.bitbucket.org/2.0/snippets/evzijst/kypj/commits"<br> }<br> },<br> "id": kypj,<br> "title": "My
snippet",<br> "created_on":
"2014-12-29T22:22:04.790331+00:00",<br> "updated_on":
"2014-12-29T22:22:04.790331+00:00",<br> "is_private":
false,<br> "files": {<br> "foo.txt": {<br> "links":
{<br> "self": {<br> "href":
"https://api.bitbucket.org/2.0/snippets/evzijst/kypj/files/367ab19/foo.txt"<br> },<br> "html": {<br> "href":
"https://bitbucket.org/snippets/evzijst/kypj#file-foo.txt"<br> }<br> }<br> },<br> "image.png": {<br> "links": {<br> "self": {<br> "href":
"https://api.bitbucket.org/2.0/snippets/evzijst/kypj/files/367ab19/image.png"<br> },<br> "html": {<br> "href":
"https://bitbucket.org/snippets/evzijst/kypj#file-image.png"<br> }<br> }<br> }<br> ],<br> "owner": {<br> "username": "evzijst",<br> "nickname": "evzijst",<br> "display_name": "Erik van Zijst",<br> "uuid":
"{d301aafa-d676-4ee0-88be-962be7417567}",<br> "links":
{<br> "self": {<br> "href":
"https://api.bitbucket.org/2.0/users/evzijst"<br> },<br> "html": {<br> "href":
"https://bitbucket.org/evzijst"<br> },<br> "avatar":
{<br> "href":
"https://bitbucket-staging-assetroot.s3.amazonaws.com/c/photos/2013/Jul/31/erik-avatar-725122544-0_avatar.png"<br> }<br> }<br> },<br> "creator": {<br> "username":
"evzijst",<br> "nickname": "evzijst",<br> "display_name":
"Erik van Zijst",<br> "uuid":
"{d301aafa-d676-4ee0-88be-962be7417567}",<br> "links":
{<br> "self": {<br> "href":
"https://api.bitbucket.org/2.0/users/evzijst"<br> },<br> "html": {<br> "href":
"https://bitbucket.org/evzijst"<br> },<br> "avatar":
{<br> "href":
"https://bitbucket-staging-assetroot.s3.amazonaws.com/c/photos/2013/Jul/31/erik-avatar-725122544-0_avatar.png"<br> }<br> }<br> }<br> }<br><br> --===============1438169132528273974==<br> Content-Type: text/plain;
charset="us-ascii"<br> MIME-Version: 1.0<br> Content-Transfer-Encoding: 7bit<br> Content-ID: "foo.txt"<br> Content-Disposition: attachment; filename="foo.txt"<br><br> foo<br><br> --===============1438169132528273974==<br> Content-Type: image/png<br> MIME-Version: 1.0<br> Content-Transfer-Encoding: base64<br> Content-ID: "image.png"<br> Content-Disposition: attachment; filename="image.png"<br><br> iVBORw0KGgoAAAANSUhEUgAAABQAAAAoCAYAAAD+MdrbAAABD0lEQVR4Ae3VMUoDQRTG8ccUaW2m<br> TKONFxArJYJamCvkCnZTaa+VnQdJSBFl2SMsLFrEWNjZBZs0JgiL/+KrhhVmJRbCLPx4O+/DT2TB<br> cbblJxf+UWFVVRNsEGAtgvJxnLm2H+A5RQ93uIl+3632PZyl/skjfOn9Gvdwmlcw5aPUwimG+NT5<br> EnNN036IaZePUuIcK533NVfal7/5yjWeot2z9ta1cAczHEf7I+3J0ws9Cgx0fsOFpmlfwKcWPuBQ<br> 73Oc4FHzBaZ8llq4q1mr5B2mOUCt815qYR8eB1hG2VJ7j35q4RofaH7IG+Xrf/PfJhfmwtfFYoIN<br> AqxFUD6OMxcvkO+UfKfkOyXfKdsv/AYCHMLVkHAFWgAAAABJRU5ErkJggg==<br> --===============1438169132528273974==--<br><br>multipart/form-data<br>-<br><br>As
with creating new snippets, `multipart/form-data` can be used as
an<br>alternative to `multipart/related`. However, the inherently
flat<br>structure of form-data means that only basic, root-level
properties<br>can be returned, while nested elements like `links` are
omitted:<br><br> $ curl -H "Accept: multipart/form-data"
https://api.bitbucket.org/2.0/snippets/evzijst/kypj<br><br>Response:<br><br> HTTP/1.1 200 OK<br> Content-Length: 951<br> Content-Type:
multipart/form-data; boundary=-63a4b224c59f<br><br> 63a4b224c59f<br> Content-Disposition: form-data; name="title"<br> Content-Type: text/plain; charset="utf-8"<br><br> My snippet<br> 63a4b224c59f--<br> Content-Disposition: attachment; name="file";
filename="foo.txt"<br> Content-Type: text/plain<br><br> foo<br><br> 63a4b224c59f<br> Content-Disposition: attachment;
name="file"; filename="image.png"<br> Content-Transfer-Encoding:
base64<br> Content-Type: application/octet-stream<br><br> iVBORw0KGgoAAAANSUhEUgAAABQAAAAoCAYAAAD+MdrbAAABD0lEQVR4Ae3VMUoDQRTG8ccUaW2m<br> TKONFxArJYJamCvkCnZTaa+VnQdJSBFl2SMsLFrEWNjZBZs0JgiL/+KrhhVmJRbCLPx4O+/DT2TB<br> cbblJxf+UWFVVRNsEGAtgvJxnLm2H+A5RQ93uIl+3632PZyl/skjfOn9Gvdwmlcw5aPUwimG+NT5<br> EnNN036IaZePUuIcK533NVfal7/5yjWeot2z9ta1cAczHEf7I+3J0ws9Cgx0fsOFpmlfwKcWPuBQ<br> 73Oc4FHzBaZ8llq4q1mr5B2mOUCt815qYR8eB1hG2VJ7j35q4RofaH7IG+Xrf/PfJhfmwtfFYoIN<br> AqxFUD6OMxcvkO+UfKfkOyXfKdsv/AYCHMLVkHAFWgAAAABJRU5ErkJggg==<br> 5957323a6b76--
summary: Atlassian Get A Snippet
responses:
'200':
description: The snippet object.
content:
application/json:
schema:
$ref: '#/components/schemas/snippet'
multipart/related:
schema:
$ref: '#/components/schemas/snippet'
multipart/form-data:
schema:
$ref: '#/components/schemas/snippet'
'401':
description: If the snippet is private and the request was not authenticated.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
multipart/related:
schema:
$ref: '#/components/schemas/error'
multipart/form-data:
schema:
$ref: '#/components/schemas/error'
'403':
description: If authenticated user does not have access to the private snippet.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
multipart/related:
schema:
$ref: '#/components/schemas/error'
multipart/form-data:
schema:
$ref: '#/components/schemas/error'
'404':
description: If the snippet does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
multipart/related:
schema:
$ref: '#/components/schemas/error'
multipart/form-data:
schema:
$ref: '#/components/schemas/error'
'410':
description: If the snippet marked as spam.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
multipart/related:
schema:
$ref: '#/components/schemas/error'
multipart/form-data:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- snippet
- basic: []
- api_key: []
operationId: atlassianGetASnippet
put:
tags:
- Snippets
description: >-
Used to update a snippet. Use this to add and delete files and
to<br>change a snippet's title.<br><br>To update a snippet, one can
either PUT a full snapshot, or only the<br>parts that need to be
changed.<br><br>The contract for PUT on this API is that properties
missing from the<br>request remain untouched so that snippets can be
efficiently<br>manipulated with differential payloads.<br><br>To delete
a property (e.g. the title, or a file), include its name in<br>the
request, but omit its value (use `null`).<br><br>As in Git, explicit
renaming of files is not supported. Instead, to<br>rename a file, delete
it and add it again under another name. This can<br>be done atomically
in a single request. Rename detection is left to<br>the SCM.<br><br>PUT
supports three different content types for both request and<br>response
bodies:<br><br>* `application/json`<br>* `multipart/related`<br>*
`multipart/form-data`<br><br>The content type used for the request body
can be different than that<br>used for the response. Content types are
specified using standard HTTP<br>headers.<br><br>Use the `Content-Type`
and `Accept` headers to select the desired<br>request and response
format.<br><br><br>application/json<br>-<br><br>As with creation and
retrieval, the content type determines what<br>properties can be
manipulated. `application/json` does not support<br>file contents and is
therefore limited to a snippet's meta data.<br><br>To update the title,
without changing any of its files:<br><br> $ curl -X POST -H
"Content-Type: application/json"
https://api.bitbucket.org/2.0/snippets/evzijst/kypj -d
'{"title": "Updated title"}'<br><br><br>To delete the title:<br><br> $ curl -X POST -H "Content-Type: application/json"
https://api.bitbucket.org/2.0/snippets/evzijst/kypj -d
'{"title": null}'<br><br>Not all parts of a snippet can be manipulated.
The owner and creator<br>for instance are
immutable.<br><br><br>multipart/related<br>--<br><br>`multipart/related`
can be used to manipulate all of a snippet's<br>properties. The body is
identical to a POST. properties omitted from<br>the request are left
unchanged. Since the `start` part contains JSON,<br>the mechanism for
manipulating the snippet's meta data is identical<br>to
`application/json` requests.<br><br>To update one of a snippet's file
contents, while also changing its<br>title:<br><br> PUT
/2.0/snippets/evzijst/kypj HTTP/1.1<br> Content-Length: 288<br> Content-Type: multipart/related; start="snippet";
boundary="===============1438169132528273974=="<br> MIME-Version:
1.0<br><br> --===============1438169132528273974==<br> Content-Type: application/json; charset="utf-8"<br> MIME-Version:
1.0<br> Content-ID: snippet<br><br> {<br> "title": "My
updated snippet",<br> "files": {<br> "foo.txt":
{}<br> }<br> }<br><br> --===============1438169132528273974==<br> Content-Type: text/plain;
charset="us-ascii"<br> MIME-Version: 1.0<br> Content-Transfer-Encoding: 7bit<br> Content-ID: "foo.txt"<br> Content-Disposition: attachment; filename="foo.txt"<br><br> Updated
file contents.<br><br> --===============1438169132528273974==--<br><br>Here only the parts that
are changed are included in the body. The<br>other files remain
untouched.<br><br>Note the use of the `files` list in the JSON part.
This list contains<br>the files that are being manipulated. This list
should have<br>corresponding multiparts in the request that contain the
new contents<br>of these files.<br><br>If a filename in the `files` list
does not have a corresponding part,<br>it will be deleted from the
snippet, as shown below:<br><br> PUT /2.0/snippets/evzijst/kypj
HTTP/1.1<br> Content-Length: 188<br> Content-Type:
multipart/related; start="snippet";
boundary="===============1438169132528273974=="<br> MIME-Version:
1.0<br><br> --===============1438169132528273974==<br> Content-Type: application/json; charset="utf-8"<br> MIME-Version:
1.0<br> Content-ID: snippet<br><br> {<br> "files":
{<br> "image.png": {}<br> }<br> }<br><br> --===============1438169132528273974==--<br><br>To simulate a rename,
delete a file and add the same file under<br>another name:<br><br> PUT /2.0/snippets/evzijst/kypj HTTP/1.1<br> Content-Length:
212<br> Content-Type: multipart/related; start="snippet";
boundary="===============1438169132528273974=="<br> MIME-Version:
1.0<br><br> --===============1438169132528273974==<br> Content-Type: application/json; charset="utf-8"<br> MIME-Version:
1.0<br> Content-ID: snippet<br><br> {<br> "files":
{<br> "foo.txt": {},<br> "bar.txt": {}<br> }<br> }<br><br> --===============1438169132528273974==<br> Content-Type: text/plain; charset="us-ascii"<br> MIME-Version:
1.0<br> Content-Transfer-Encoding: 7bit<br> Content-ID:
"bar.txt"<br> Content-Disposition: attachment;
filename="bar.txt"<br><br> foo<br><br> --===============1438169132528273974==--<br><br><br>multipart/form-data<br>--<br><br>Again,
one can also use `multipart/form-data` to manipulate file<br>contents
and meta data atomically.<br><br> $ curl -X PUT
http://localhost:12345/2.0/snippets/evzijst/kypj -F
title="My updated snippet" -F [email protected]<br><br> PUT
/2.0/snippets/evzijst/kypj HTTP/1.1<br> Content-Length: 351<br> Content-Type: multipart/form-data; boundary=-63a4b224c59f<br><br> 63a4b224c59f<br> Content-Disposition: form-data; name="file";
filename="foo.txt"<br> Content-Type: text/plain<br><br> foo<br><br> 63a4b224c59f<br> Content-Disposition: form-data;
name="title"<br><br> My updated snippet<br> 63a4b224c59f<br><br>To
delete a file, omit its contents while including its name in
the<br>`files` field:<br><br> $ curl -X PUT
https://api.bitbucket.org/2.0/snippets/evzijst/kypj -F
files=image.png<br><br> PUT /2.0/snippets/evzijst/kypj
HTTP/1.1<br> Content-Length: 149<br> Content-Type:
multipart/form-data; boundary=-ef8871065a86<br><br> ef8871065a86<br> Content-Disposition: form-data;
name="files"<br><br> image.png<br> ef8871065a86--<br><br>The
explicit use of the `files` element in `multipart/related`
and<br>`multipart/form-data` is only required when deleting
files.<br>The default mode of operation is for file parts to be
processed,<br>regardless of whether or not they are listed in `files`,
as a<br>convenience to the client.
summary: Atlassian Update A Snippet
responses:
'200':
description: The updated snippet object.
content:
application/json:
schema:
$ref: '#/components/schemas/snippet'
multipart/related:
schema:
$ref: '#/components/schemas/snippet'
multipart/form-data:
schema:
$ref: '#/components/schemas/snippet'
'401':
description: If the snippet is private and the request was not authenticated.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
multipart/related:
schema:
$ref: '#/components/schemas/error'
multipart/form-data:
schema:
$ref: '#/components/schemas/error'
'403':
description: >-
If authenticated user does not have permission to update the private
snippet.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
multipart/related:
schema:
$ref: '#/components/schemas/error'
multipart/form-data:
schema:
$ref: '#/components/schemas/error'
'404':
description: If the snippet does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
multipart/related:
schema:
$ref: '#/components/schemas/error'
multipart/form-data:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- snippet:write
- basic: []
- api_key: []
operationId: atlassianUpdateASnippet
parameters:
- name: encoded_id
in: path
description: The snippet id.
required: true
schema:
type: string
- name: workspace
in: path
description: |
This can either be the workspace ID (slug) or the workspace UUID
surrounded by curly-braces, for example: `{workspace UUID}`.
required: true
schema:
type: string
/snippets/{workspace}/{encoded_id}/comments:
get:
tags:
- Snippets
description: >-
Used to retrieve a paginated list of all comments for a
specific<br>snippet.<br><br>This resource works identical to commit and
pull request comments.<br><br>The default sorting is oldest to newest
and can be overridden with<br>the `sort` query parameter.
summary: Atlassian List Comments On A Snippet
responses:
'200':
description: A paginated list of snippet comments, ordered by creation date.
content:
application/json:
schema:
$ref: '#/components/schemas/paginated_snippet_comments'
'403':
description: If the authenticated user does not have access to the snippet.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: If the snippet does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- snippet
- basic: []
- api_key: []
operationId: atlassianListCommentsOnASnippet
post:
tags:
- Snippets
description: >-
Creates a new comment.<br><br>The only required field in the body is
`content.raw`.<br><br>To create a threaded reply to an existing comment,
include `parent.id`.
summary: Atlassian Create A Comment On A Snippet
responses:
'201':
description: The newly created comment.
headers:
Location:
description: The URL of the new comment
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/snippet_comment'
'403':
description: If the authenticated user does not have access to the snippet.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: If the snippet does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/snippet_comment'
description: The contents of the new comment.
required: true
security:
- oauth2:
- snippet
- basic: []
- api_key: []
operationId: atlassianCreateACommentOnASnippet
parameters:
- name: encoded_id
in: path
description: The snippet id.
required: true
schema:
type: string
- name: workspace
in: path
description: |
This can either be the workspace ID (slug) or the workspace UUID
surrounded by curly-braces, for example: `{workspace UUID}`.
required: true
schema:
type: string
/snippets/{workspace}/{encoded_id}/comments/{comment_id}:
delete:
tags:
- Snippets
description: >-
Deletes a snippet comment.<br><br>Comments can only be removed by the
comment author, snippet creator, or workspace admin.
summary: Atlassian Delete A Comment On A Snippet
responses:
'204':
description: Indicates the comment was deleted successfully.
'403':
description: If the authenticated user is not the author of the comment.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: If the comment or the snippet does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- snippet
- basic: []
- api_key: []
operationId: atlassianDeleteACommentOnASnippet
get:
tags:
- Snippets
description: Returns the specific snippet comment.
summary: Atlassian Get A Comment On A Snippet
responses:
'200':
description: The specified comment.
content:
application/json:
schema:
$ref: '#/components/schemas/snippet_comment'
'403':
description: If the authenticated user does not have access to the snippet.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: If the comment or snippet does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- snippet
- basic: []
- api_key: []
operationId: atlassianGetACommentOnASnippet
put:
tags:
- Snippets
description: >-
Updates a comment.<br><br>The only required field in the body is
`content.raw`.<br><br>Comments can only be updated by their author.
summary: Atlassian Update A Comment On A Snippet
responses:
'200':
description: The updated comment object.
content:
application/json:
schema:
$ref: '#/components/schemas/snippet_comment'
'403':
description: If the authenticated user does not have access to the snippet.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: If the comment or snippet does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/snippet_comment'
description: The contents to update the comment to.
required: true
security:
- oauth2:
- snippet
- basic: []
- api_key: []
operationId: atlassianUpdateACommentOnASnippet
parameters:
- name: comment_id
in: path
description: The id of the comment.
required: true
schema:
type: integer
- name: encoded_id
in: path
description: The snippet id.
required: true
schema:
type: string
- name: workspace
in: path
description: |
This can either be the workspace ID (slug) or the workspace UUID
surrounded by curly-braces, for example: `{workspace UUID}`.
required: true
schema:
type: string
/snippets/{workspace}/{encoded_id}/commits:
get:
tags:
- Snippets
description: Returns the changes (commits) made on this snippet.
summary: Atlassian List Snippet Changes
responses:
'200':
description: The paginated list of snippet commits.
content:
application/json:
schema:
$ref: '#/components/schemas/paginated_snippet_commit'
'403':
description: If the authenticated user does not have access to the snippet.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: If the snippet does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- snippet
- basic: []
- api_key: []
operationId: atlassianListSnippetChanges
parameters:
- name: encoded_id
in: path
description: The snippet id.
required: true
schema:
type: string
- name: workspace
in: path
description: |
This can either be the workspace ID (slug) or the workspace UUID
surrounded by curly-braces, for example: `{workspace UUID}`.
required: true
schema:
type: string
/snippets/{workspace}/{encoded_id}/commits/{revision}:
get:
tags:
- Snippets
description: Returns the changes made on this snippet in this commit.
summary: Atlassian Get A Previous Snippet Change
responses:
'200':
description: The specified snippet commit.
content:
application/json:
schema:
$ref: '#/components/schemas/snippet_commit'
'403':
description: If the authenticated user does not have access to the snippet.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: If the commit or the snippet does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- snippet
- bas
# --- truncated at 32 KB (180 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/openapi/atlassian-snippets--openapi-original.yml