{
"opencollection": "1.0.0",
"info": {
"name": "Atlassian Admin Account Snippets API",
"version": "1.0.0"
},
"request": {
"auth": {
"type": "bearer",
"token": "{{bearerToken}}"
}
},
"items": [
{
"info": {
"name": "Snippets",
"type": "folder"
},
"items": [
{
"info": {
"name": "Atlassian List Snippets in Workspace",
"type": "http"
},
"http": {
"method": "GET",
"url": "https://api.atlassian.com/snippets/:workspace",
"params": [
{
"name": "workspace",
"value": "",
"type": "path",
"description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n"
},
{
"name": "role",
"value": "",
"type": "query",
"description": "Filter down the result based on the authenticated user's role (`owner`, `contributor`, or `member`)."
}
],
"auth": {
"type": "oauth2",
"flow": "authorization_code",
"authorizationUrl": "https://auth.atlassian.com/authorize",
"accessTokenUrl": "https://auth.atlassian.com/oauth/token",
"credentials": {
"clientId": "{{clientId}}",
"clientSecret": "{{clientSecret}}"
}
}
},
"docs": "This API operation retrieves a paginated list of all code snippets that belong to a specific workspace in Bitbucket. By making a GET request to the endpoint with a workspace identifier, users can access all snippets created within that workspace, regardless of their owner or visibility settings. The response typically includes snippet metadata such as titles, descriptions, creation dates, and file information, allowing developers to browse and discover code snippets shared within their team's wo"
},
{
"info": {
"name": "Atlassian Create Snippet for Workspace",
"type": "http"
},
"http": {
"method": "POST",
"url": "https://api.atlassian.com/snippets/:workspace",
"params": [
{
"name": "workspace",
"value": "",
"type": "path",
"description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n"
}
],
"body": {
"type": "json",
"data": "{}"
},
"auth": {
"type": "oauth2",
"flow": "authorization_code",
"authorizationUrl": "https://auth.atlassian.com/authorize",
"accessTokenUrl": "https://auth.atlassian.com/oauth/token",
"credentials": {
"clientId": "{{clientId}}",
"clientSecret": "{{clientSecret}}"
}
}
},
"docs": "This API operation creates a new code snippet within a specified Atlassian Bitbucket workspace by sending a POST request to the /snippets/{workspace} endpoint, where {workspace} is replaced with the unique identifier or name of the target workspace. The operation allows authenticated users to programmatically submit code snippets, which can include multiple files, descriptions, and metadata, to be stored and shared within the designated workspace, making it useful for developers who want to save"
},
{
"info": {
"name": "Atlassian Get Snippet",
"type": "http"
},
"http": {
"method": "GET",
"url": "https://api.atlassian.com/snippets/:workspace/:encoded_id",
"params": [
{
"name": "encoded_id",
"value": "",
"type": "path",
"description": "The snippet id."
},
{
"name": "workspace",
"value": "",
"type": "path",
"description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n"
}
],
"auth": {
"type": "oauth2",
"flow": "authorization_code",
"authorizationUrl": "https://auth.atlassian.com/authorize",
"accessTokenUrl": "https://auth.atlassian.com/oauth/token",
"credentials": {
"clientId": "{{clientId}}",
"clientSecret": "{{clientSecret}}"
}
}
},
"docs": "The Get Snippet operation retrieves a specific snippet from Atlassian Bitbucket by providing the workspace identifier and the encoded snippet ID in the request path. This API endpoint returns detailed information about a single code snippet, including its content, metadata, creation date, author information, and any associated files or comments. Users must have appropriate read permissions for the workspace to access the snippet, and the operation supports various authentication methods includin"
},
{
"info": {
"name": "Atlassian Update Snippet",
"type": "http"
},
"http": {
"method": "PUT",
"url": "https://api.atlassian.com/snippets/:workspace/:encoded_id",
"params": [
{
"name": "encoded_id",
"value": "",
"type": "path",
"description": "The snippet id."
},
{
"name": "workspace",
"value": "",
"type": "path",
"description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n"
}
],
"auth": {
"type": "oauth2",
"flow": "authorization_code",
"authorizationUrl": "https://auth.atlassian.com/authorize",
"accessTokenUrl": "https://auth.atlassian.com/oauth/token",
"credentials": {
"clientId": "{{clientId}}",
"clientSecret": "{{clientSecret}}"
}
}
},
"docs": "Updates an existing snippet in Bitbucket under a specified workspace. This PUT operation requires both the workspace identifier and the encoded snippet ID in the path parameters. The request allows modification of snippet properties such as title, description, files, and visibility settings. Authentication is required to perform this operation, and the user must have appropriate permissions to edit the snippet. The endpoint returns the updated snippet object with all its properties, including me"
},
{
"info": {
"name": "Atlassian Delete A Snippet",
"type": "http"
},
"http": {
"method": "DELETE",
"url": "https://api.atlassian.com/snippets/:workspace/:encoded_id",
"params": [
{
"name": "encoded_id",
"value": "",
"type": "path",
"description": "The snippet id."
},
{
"name": "workspace",
"value": "",
"type": "path",
"description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n"
}
],
"auth": {
"type": "oauth2",
"flow": "authorization_code",
"authorizationUrl": "https://auth.atlassian.com/authorize",
"accessTokenUrl": "https://auth.atlassian.com/oauth/token",
"credentials": {
"clientId": "{{clientId}}",
"clientSecret": "{{clientSecret}}"
}
}
},
"docs": "Deletes a snippet and returns an empty response."
},
{
"info": {
"name": "Atlassian List Comments on Snippet",
"type": "http"
},
"http": {
"method": "GET",
"url": "https://api.atlassian.com/snippets/:workspace/:encoded_id/comments",
"params": [
{
"name": "encoded_id",
"value": "",
"type": "path",
"description": "The snippet id."
},
{
"name": "workspace",
"value": "",
"type": "path",
"description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n"
}
],
"auth": {
"type": "oauth2",
"flow": "authorization_code",
"authorizationUrl": "https://auth.atlassian.com/authorize",
"accessTokenUrl": "https://auth.atlassian.com/oauth/token",
"credentials": {
"clientId": "{{clientId}}",
"clientSecret": "{{clientSecret}}"
}
}
},
"docs": "The Get Comments endpoint retrieves all comments associated with a specific snippet in Bitbucket by providing the workspace identifier and the encoded snippet ID in the URL path. This operation returns a paginated list of comments that users have added to the snippet, allowing developers to display discussion threads, feedback, or collaborative notes related to the code snippet. The response includes comment metadata such as the author, timestamp, and comment content, enabling applications to bu"
},
{
"info": {
"name": "Atlassian Create Comment on Snippet",
"type": "http"
},
"http": {
"method": "POST",
"url": "https://api.atlassian.com/snippets/:workspace/:encoded_id/comments",
"params": [
{
"name": "encoded_id",
"value": "",
"type": "path",
"description": "The snippet id."
},
{
"name": "workspace",
"value": "",
"type": "path",
"description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n"
}
],
"body": {
"type": "json",
"data": "{}"
},
"auth": {
"type": "oauth2",
"flow": "authorization_code",
"authorizationUrl": "https://auth.atlassian.com/authorize",
"accessTokenUrl": "https://auth.atlassian.com/oauth/token",
"credentials": {
"clientId": "{{clientId}}",
"clientSecret": "{{clientSecret}}"
}
}
},
"docs": "The Atlassian Bitbucket Snippets API POST operation to /snippets/{workspace}/{encoded_id}/comments allows authenticated users to create a new comment on a specific code snippet within a designated workspace. This endpoint requires two path parameters: the workspace identifier and the encoded snippet ID, enabling precise targeting of the snippet to be commented on. When invoked, it accepts comment content in the request body and creates a new comment thread or adds to an existing discussion on th"
},
{
"info": {
"name": "Atlassian Get Comment on Snippet",
"type": "http"
},
"http": {
"method": "GET",
"url": "https://api.atlassian.com/snippets/:workspace/:encoded_id/comments/:comment_id",
"params": [
{
"name": "comment_id",
"value": "",
"type": "path",
"description": "The id of the comment."
},
{
"name": "encoded_id",
"value": "",
"type": "path",
"description": "The snippet id."
},
{
"name": "workspace",
"value": "",
"type": "path",
"description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n"
}
],
"auth": {
"type": "oauth2",
"flow": "authorization_code",
"authorizationUrl": "https://auth.atlassian.com/authorize",
"accessTokenUrl": "https://auth.atlassian.com/oauth/token",
"credentials": {
"clientId": "{{clientId}}",
"clientSecret": "{{clientSecret}}"
}
}
},
"docs": "This API operation retrieves a specific comment from a snippet in Atlassian Bitbucket by providing the workspace identifier, the encoded snippet ID, and the comment ID as path parameters. It performs a GET request to access the detailed information about an individual comment that was previously posted on a snippet, allowing users to view the comment's content, author details, timestamps, and other metadata associated with that particular comment within the specified workspace and snippet contex"
},
{
"info": {
"name": "Atlassian Update Comment on Snippet",
"type": "http"
},
"http": {
"method": "PUT",
"url": "https://api.atlassian.com/snippets/:workspace/:encoded_id/comments/:comment_id",
"params": [
{
"name": "comment_id",
"value": "",
"type": "path",
"description": "The id of the comment."
},
{
"name": "encoded_id",
"value": "",
"type": "path",
"description": "The snippet id."
},
{
"name": "workspace",
"value": "",
"type": "path",
"description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n"
}
],
"body": {
"type": "json",
"data": "{}"
},
"auth": {
"type": "oauth2",
"flow": "authorization_code",
"authorizationUrl": "https://auth.atlassian.com/authorize",
"accessTokenUrl": "https://auth.atlassian.com/oauth/token",
"credentials": {
"clientId": "{{clientId}}",
"clientSecret": "{{clientSecret}}"
}
}
},
"docs": "This API operation allows you to update an existing comment on a specific snippet within a Bitbucket workspace. By sending a PUT request to the endpoint with the workspace identifier, encoded snippet ID, and comment ID, you can modify the content of a previously posted comment. This is useful for correcting mistakes, adding additional information, or clarifying previous feedback on code snippets. The operation requires appropriate authentication and permissions to modify comments, typically limi"
},
{
"info": {
"name": "Atlassian Delete Comment on Snippet",
"type": "http"
},
"http": {
"method": "DELETE",
"url": "https://api.atlassian.com/snippets/:workspace/:encoded_id/comments/:comment_id",
"params": [
{
"name": "comment_id",
"value": "",
"type": "path",
"description": "The id of the comment."
},
{
"name": "encoded_id",
"value": "",
"type": "path",
"description": "The snippet id."
},
{
"name": "workspace",
"value": "",
"type": "path",
"description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n"
}
],
"auth": {
"type": "oauth2",
"flow": "authorization_code",
"authorizationUrl": "https://auth.atlassian.com/authorize",
"accessTokenUrl": "https://auth.atlassian.com/oauth/token",
"credentials": {
"clientId": "{{clientId}}",
"clientSecret": "{{clientSecret}}"
}
}
},
"docs": "This API operation allows you to delete a specific comment from a snippet in a Bitbucket workspace. The endpoint requires three path parameters: the workspace identifier where the snippet resides, the encoded ID of the snippet itself, and the unique comment ID that you want to remove. When invoked with a DELETE HTTP method, it permanently removes the specified comment from the snippet, requiring appropriate authentication and permissions to execute successfully. This is useful for moderating dis"
},
{
"info": {
"name": "Atlassian List Snippet Changes",
"type": "http"
},
"http": {
"method": "GET",
"url": "https://api.atlassian.com/snippets/:workspace/:encoded_id/commits",
"params": [
{
"name": "encoded_id",
"value": "",
"type": "path",
"description": "The snippet id."
},
{
"name": "workspace",
"value": "",
"type": "path",
"description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n"
}
],
"auth": {
"type": "oauth2",
"flow": "authorization_code",
"authorizationUrl": "https://auth.atlassian.com/authorize",
"accessTokenUrl": "https://auth.atlassian.com/oauth/token",
"credentials": {
"clientId": "{{clientId}}",
"clientSecret": "{{clientSecret}}"
}
}
},
"docs": "This API operation retrieves a paginated list of commits that have been made to a specific snippet within an Atlassian Bitbucket workspace. By providing the workspace identifier and the encoded snippet ID in the endpoint path, users can track the revision history and changes made to the snippet over time. The GET request returns commit information including details such as commit hashes, authors, timestamps, and commit messages, allowing developers to audit modifications, understand the evolutio"
},
{
"info": {
"name": "Atlassian Get Previous Snippet Change",
"type": "http"
},
"http": {
"method": "GET",
"url": "https://api.atlassian.com/snippets/:workspace/:encoded_id/commits/:revision",
"params": [
{
"name": "encoded_id",
"value": "",
"type": "path",
"description": "The snippet id."
},
{
"name": "revision",
"value": "",
"type": "path",
"description": "The commit's SHA1."
},
{
"name": "workspace",
"value": "",
"type": "path",
"description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n"
}
],
"auth": {
"type": "oauth2",
"flow": "authorization_code",
"authorizationUrl": "https://auth.atlassian.com/authorize",
"accessTokenUrl": "https://auth.atlassian.com/oauth/token",
"credentials": {
"clientId": "{{clientId}}",
"clientSecret": "{{clientSecret}}"
}
}
},
"docs": "This API endpoint retrieves a specific previous version of a snippet by accessing its commit history in Atlassian Bitbucket. By providing the workspace identifier, the Snippets encoded ID, and a specific revision hash, users can fetch the exact state of a snippet as it existed at that particular commit. This is useful for tracking changes over time, reviewing historical versions of code snippets, auditing modifications, or restoring previous content. The endpoint returns detailed information abo"
},
{
"info": {
"name": "Atlassian Get Snippets Raw File at Head",
"type": "http"
},
"http": {
"method": "GET",
"url": "https://api.atlassian.com/snippets/:workspace/:encoded_id/files/:path",
"params": [
{
"name": "encoded_id",
"value": "",
"type": "path",
"description": "The snippet id."
},
{
"name": "path",
"value": "",
"type": "path",
"description": "Path to the file."
},
{
"name": "workspace",
"value": "",
"type": "path",
"description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n"
}
],
"auth": {
"type": "oauth2",
"flow": "authorization_code",
"authorizationUrl": "https://auth.atlassian.com/authorize",
"accessTokenUrl": "https://auth.atlassian.com/oauth/token",
"credentials": {
"clientId": "{{clientId}}",
"clientSecret": "{{clientSecret}}"
}
}
},
"docs": "Retrieves the raw, unrendered content of a specific file from a snippet at its latest HEAD revision in Atlassian Bitbucket. This endpoint requires specifying the workspace identifier, the encoded snippet ID, and the full path to the file within the snippet's file structure. The operation returns the file's content in its original format without any Bitbucket rendering or formatting applied, making it useful for programmatically accessing snippet files for download, processing, or display in exte"
},
{
"info": {
"name": "Atlassian Check if the Current User Is Watching Snippet",
"type": "http"
},
"http": {
"method": "GET",
"url": "https://api.atlassian.com/snippets/:workspace/:encoded_id/watch",
"params": [
{
"name": "encoded_id",
"value": "",
"type": "path",
"description": "The snippet id."
},
{
"name": "workspace",
"value": "",
"type": "path",
"description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n"
}
],
"auth": {
"type": "oauth2",
"flow": "authorization_code",
"authorizationUrl": "https://auth.atlassian.com/authorize",
"accessTokenUrl": "https://auth.atlassian.com/oauth/token",
"credentials": {
"clientId": "{{clientId}}",
"clientSecret": "{{clientSecret}}"
}
}
},
"docs": "Used to check whether the authenticated user is watching a specific code snippet in a Bitbucket workspace. This endpoint accepts the workspace identifier and the encoded snippet ID as path parameters, returning the watch status for the current user. When called, it indicates if the user has subscribed to notifications for changes or updates to that particular snippet, helping users manage their snippet subscriptions and stay informed about modifications to code snippets they're interested in tra"
},
{
"info": {
"name": "Atlassian Watch Snippet",
"type": "http"
},
"http": {
"method": "PUT",
"url": "https://api.atlassian.com/snippets/:workspace/:encoded_id/watch",
"params": [
{
"name": "encoded_id",
"value": "",
"type": "path",
"description": "The snippet id."
},
{
"name": "workspace",
"value": "",
"type": "path",
"description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n"
}
],
"auth": {
"type": "oauth2",
"flow": "authorization_code",
"authorizationUrl": "https://auth.atlassian.com/authorize",
"accessTokenUrl": "https://auth.atlassian.com/oauth/token",
"credentials": {
"clientId": "{{clientId}}",
"clientSecret": "{{clientSecret}}"
}
}
},
"docs": "Used to start watching a specific snippet in a Bitbucket workspace, enabling the authenticated user to receive notifications about changes or updates to that snippet. The operation requires the workspace identifier and the encoded snippet ID as path parameters, and when executed successfully, the user will be subscribed to notifications for activities related to that particular snippet, such as comments, modifications, or other relevant events."
},
{
"info": {
"name": "Atlassian Stop Watching Snippet",
"type": "http"
},
"http": {
"method": "DELETE",
"url": "https://api.atlassian.com/snippets/:workspace/:encoded_id/watch",
"params": [
{
"name": "encoded_id",
"value": "",
"type": "path",
"description": "The snippet id."
},
{
"name": "workspace",
"value": "",
"type": "path",
"description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n"
}
],
"auth": {
"type": "oauth2",
"flow": "authorization_code",
"authorizationUrl": "https://auth.atlassian.com/authorize",
"accessTokenUrl": "https://auth.atlassian.com/oauth/token",
"credentials": {
"clientId": "{{clientId}}",
"clientSecret": "{{clientSecret}}"
}
}
},
"docs": "Removes the authenticated user's watch status from a specific code snippet in Bitbucket. This DELETE operation requires the workspace identifier and the encoded snippet ID as path parameters. Once executed, the user will no longer receive notifications or updates related to changes made to the snippet. Authentication is required to perform this action, and the user must have previously been watching the snippet for this operation to have any effect. This is useful when users want to unsubscribe "
},
{
"info": {
"name": "Atlassian List Users Watching Snippet",
"type": "http"
},
"http": {
"method": "GET",
"url": "https://api.atlassian.com/snippets/:workspace/:encoded_id/watchers",
"params": [
{
"name": "encoded_id",
"value": "",
"type": "path",
"description": "The snippet id."
},
{
"name": "workspace",
"value": "",
"type": "path",
"description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n"
}
],
"auth": {
"type": "oauth2",
"flow": "authorization_code",
"authorizationUrl": "https://auth.atlassian.com/authorize",
"accessTokenUrl": "https://auth.atlassian.com/oauth/token",
"credentials": {
"clientId": "{{clientId}}",
"clientSecret": "{{clientSecret}}"
}
}
},
"docs": "This API endpoint retrieves a paginated list of all users who are currently watching a specific snippet in Bitbucket. By making a GET request to /snippets/{workspace}/{encoded_id}/watchers, you can access information about the watchers of a snippet identified by its encoded ID within a particular workspace. The endpoint returns user details for each watcher, allowing snippet owners and authorized users to see who is monitoring the snippet for updates or changes. This is useful for understanding "
},
{
"info": {
"name": "Atlassian Get Previous Revision of Snippet",
"type": "http"
},
"http": {
"method": "GET",
"url": "https://api.atlassian.com/snippets/:workspace/:encoded_id/:node_id",
"params": [
{
"name": "encoded_id",
"value": "",
"type": "path",
"description": "The snippet id."
},
{
"name": "node_id",
"value": "",
"type": "path",
"description": "A commit revision (SHA1)."
},
{
"name": "workspace",
"value": "",
"type": "path",
"description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n"
}
],
"auth": {
"type": "oauth2",
"flow": "authorization_code",
"authorizationUrl": "https://auth.atlassian.com/authorize",
"accessTokenUrl": "https://auth.atlassian.com/oauth/token",
"credentials": {
"clientId": "{{clientId}}",
"clientSecret": "{{clientSecret}}"
}
}
},
"docs": "This API operation retrieves a specific previous revision of a snippet in Atlassian Bitbucket by providing the workspace identifier, the encoded snippet ID, and the node ID representing the particular revision you want to access. It allows users to view historical versions of code snippets, enabling them to track changes, compare different iterations, or restore earlier versions of their snippet content. The endpoint requires three path parameters to uniquely identify both the snippet and its sp"
},
{
"info": {
"name": "Atlassian Update Previous Revision of Snippet",
"type": "http"
},
"http": {
"method": "PUT",
"url": "https://api.atlassian.com/snippets/:workspace/:encoded_id/:node_id",
"params": [
{
"name": "encoded_id",
"value": "",
"type": "path",
"description": "The snippet id."
},
{
"name": "node_id",
"value": "",
"type": "path",
"description": "A commit revision (SHA1)."
},
{
"name": "workspace",
"value": "",
"type": "path",
"description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n"
}
],
"auth": {
"type": "oauth2",
"flow": "authorization_code",
"authorizationUrl": "https://auth.atlassian.com/authorize",
"accessTokenUrl": "https://auth.atlassian.com/oauth/token",
"credentials": {
"clientId": "{{clientId}}",
"clientSecret": "{{clientSecret}}"
}
}
},
"docs": "Updates the content and metadata of a specific previous revision of a snippet in Bitbucket by targeting a particular node ID within the snippet's version history. This PUT operation allows users to modify an existing historical version of a snippet within a specified workspace, identified by the workspace slug, the snippet's encoded ID, and the specific node ID representing that revision. The operation enables retroactive changes to snippet content, properties, or metadata while maintaining the "
},
{
"info": {
"name": "Atlassian Delete Previous Revision of Snippet",
"type": "http"
},
"http": {
"method": "DELETE",
"url": "https://api.atlassian.com/snippets/:workspace/:encoded_id/:node_id",
"params": [
{
"name": "encoded_id",
"value": "",
"type": "path",
"description": "The snippet id."
},
{
"name": "node_id",
"value": "",
"type": "path",
"description": "A commit revision (SHA1)."
},
{
"name": "workspace",
"value": "",
"type": "path",
"description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n"
}
],
"auth": {
"type": "oauth2",
"flow": "authorization_code",
"authorizationUrl": "https://auth.atlassian.com/authorize",
"accessTokenUrl": "https://auth.atlassian.com/oauth/token",
"credentials": {
"clientId": "{{clientId}}",
"clientSecret": "{{clientSecret}}"
}
}
},
"docs": "This API operation allows you to delete a specific previous revision of a snippet in Atlassian Bitbucket by providing the workspace identifier, the encoded snippet ID, and the node ID of the particular revision you want to remove. The deletion is permanent and removes only the specified historical version while preserving other revisions and the current state of the snippet. This is useful for managing snippet history, removing outdated or incorrect versions, or cleaning up revision clutter with"
},
{
"info": {
"name": "Atlassian Get Snippets Raw File",
"type": "http"
},
"http": {
"method": "GET",
"url": "https://api.atlassian.com/snippets/:workspace/:encoded_id/:node_id/files/:path",
"params": [
{
"name": "encoded_id",
"value": "",
"type": "path",
"description": "The snippet id."
},
{
"name": "node_id",
"value": "",
"type": "path",
"description": "A commit revision (SHA1)."
},
{
"name": "path",
"value": "",
"type": "path",
"description": "Path to the file."
},
{
"name": "workspace",
"value": "",
"type": "path",
"description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n"
}
],
"auth": {
"type": "oauth2",
"flow": "authorization_code",
"authorizationUrl": "https://auth.atlassian.com/authorize",
"accessTokenUrl": "https://auth.atlassian.com/oauth/token",
"credentials": {
"clientId": "{{clientId}}",
"clientSecret": "{{clientSecret}}"
}
}
},
"docs": "This API operation retrieves the raw content of a specific file within a particular revision of a Bitbucket snippet. By providing the workspace identifier, the encoded snippet ID, a specific node ID (representing a commit or revision), and the file path, you can access the unprocessed file content directly. This is particularly useful when you need to programmatically fetch the exact contents of a snippet file at a specific point in its version history, whether for display purposes, downloading,"
},
{
"info": {
"name": "Atlassian Get Snippet Changes Between Versions",
"type": "http"
},
"http": {
"method": "GET",
"url": "https://api.atlassian.com/snippets/:workspace/:encoded_id/:revision/diff",
"params": [
{
"name": "encoded_id",
"value": "",
"type": "path",
"description": "The snippet id."
},
{
"name": "revision",
"value": "",
"type": "path",
"description": "A revspec expression. This can simply be a commit SHA1, a ref name, or a compare expression like `staging..production`."
},
{
"name": "workspace",
"value": "",
"type": "path",
"description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n"
},
{
"name": "path",
"value": "",
"type": "query",
"description": "When used, only one the diff of the specified file will be returned."
}
],
"auth": {
"type": "oauth2",
"flow": "authorization_code",
"authorizationUrl": "https://auth.atlassian.com/authorize",
"accessTokenUrl": "https://auth.atlassian.com/oauth/token",
"credentials": {
"clientId": "{{clientId}}",
"clientSecret": "{{clientSecret}}"
}
}
},
"docs": "This API endpoint retrieves the differences between two versions of a snippet in Atlassian Bitbucket by comparing a specified revision against its parent or another revision. It accepts the workspace identifier, the encoded snippet ID, and a revision hash as path parameters, allowing users to view what content has changed between versions of a code snippet. The response typically returns a unified diff format showing the additions, deletions, and modifications made to the snippet's content, whic"
},
{
"info": {
"name": "Atlassian Get Snippet Patch Between Versions",
"type": "http"
},
"http": {
"method": "GET",
"url": "https://api.atlassian.com/snippets/:workspace/:encoded_id/:revision/patch",
"params": [
{
"name": "encoded_id",
"value": "",
"type": "path",
"description": "The snippet id."
},
{
"name": "revision",
"value": "",
"type": "path",
"description": "A revspec expression. This can simply be a commit SHA1, a ref name, or a compare expression like `staging..production`."
},
{
"name": "workspace",
"value": "",
"type": "path",
"description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n"
}
],
"auth": {
"type": "oauth2",
"flow": "authorization_code",
"authorizationUrl": "https://auth.atlassian.com/authorize",
"accessTokenUrl": "https://auth.atlassian.com/oauth/token",
"credentials": {
"clientId": "{{clientId}}",
"clientSecret": "{{clientSecret}}"
}
}
},
"docs": "This API endpoint retrieves a unified diff or patch representation of changes made to a specific snippet between different revisions in Atlassian Bitbucket. By providing the workspace identifier, encoded snippet ID, and a revision specifier, users can obtain a detailed comparison showing the line-by-line differences between the specified revision and its predecessor, formatted as a standard patch file that can be applied using tools like git or diff utilities, making it useful for tracking chang"
},
{
"info": {
"name": "Atlassian List Snippets",
"type": "http"
},
"http": {
"method": "GET",
"url": "https://api.atlassian.com/snippets",
"params": [
{
"name": "role",
"value": "",
"type": "query",
"description": "Filter down the result based on the authenticated user's role (`owner`, `contributor`, or `member`)."
}
],
"auth": {
"type": "oauth2",
"flow": "authorization_code",
"authorizationUrl": "https://auth.atlassian.com/authorize",
"accessTokenUrl": "https://auth.atlassian.com/oauth/token",
"credentials": {
"clientId": "{{clientId}}",
"clientSecret": "{{clientSecret}}"
}
}
},
"docs": "Returns all snippets. Like pull requests, repositories and workspaces, the
full set of snippets is defined by what the current user has access to.
This includes all snippets owned by any of the workspaces the user is a member of,
or snippets by other users that the current user is either watching or has collaborated
on (for instance by commenting on it).
To limit the set of returned snippets, apply the
`?role=[owner|contributor|member]` query parameter where the roles a"
},
{
"info": {
"name": "Atlassian Create A Snippet",
"type": "http"
},
"http": {
"method": "POST",
"url": "https://api.atlassian.com/snippets",
"body": {
"type": "json",
"data": "{}"
},
"auth": {
"type": "oauth2",
"flow": "authorization_code",
"authorizationUrl": "https://auth.atlassian.com/authorize",
"accessTokenUrl": "https://auth.atlassian.com/oauth/token",
"credentials": {
"clientId": "{{clientId}}",
"clientSecret": "{{clientSecret}}"
}
}
},
"docs": "Creates a new snippet under the authenticated user's account.
Snippets can contain multiple files. Both text and binary files are
supported.
The simplest way to create a new snippet from a local file:
$ curl -u username:password -X POST https://api.bitbucket.org/2.0/snippets -F file=@image.png
Creating snippets through curl has a few limitations and so let's look
at a more complicated scenario.
Snippets are created with a multipart POST."
}
]
}
],
"bundled": true
}