openapi: 3.1.0 info: title: Atlassian Admin Account Snippets API description: The Atlassian Admin API provides programmatic access to manage Atlassian organizations, users, domains, policies, and events. It enables administrators to automate organization management tasks, integrate with identity providers, and ensure appropriate access to Atlassian products. version: 1.0.0 contact: name: Atlassian Developer url: https://developer.atlassian.com/cloud/admin/ license: name: Atlassian Developer Terms url: https://developer.atlassian.com/platform/marketplace/atlassian-developer-terms/ x-logo: url: https://wac-cdn.atlassian.com/assets/img/favicons/atlassian/favicon.png servers: - url: https://api.atlassian.com description: Atlassian Cloud API security: - bearerAuth: [] - oauth2: [] tags: - name: Snippets paths: /snippets/{workspace}: 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 get: tags: - Snippets description: 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 workspace. This is particularly useful for teams who want to centrally manage and access reusable code fragments, examples, or documentation stored as snippets within their Bitbucket workspace. summary: Atlassian List Snippets in Workspace responses: '200': description: A paginated list of snippets. content: application/json: schema: $ref: '#/components/schemas/paginated_snippets' examples: paginated-snippets: $ref: '#/components/examples/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: [] x-api-evangelist-processing: PascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true GenerateExampleFromOperationResponseSchema: true operationId: listSnippetsInWorkspace x-microcks-operation: delay: 0 dispatcher: FALLBACK post: tags: - Snippets description: 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 and organize reusable code fragments, documentation, or configuration examples that can be accessed by team members with appropriate permissions. summary: Atlassian Create Snippet for 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' examples: snippet: $ref: '#/components/examples/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: [] x-api-evangelist-processing: PascalCaseOperationSummaries: true CaselCaseOperationIds: true ChooseTags: true WriteDescription: true GenerateExampleFromOperationResponseSchema: true operationId: createSnippetForWorkspace x-microcks-operation: delay: 0 dispatcher: FALLBACK /snippets/{workspace}/{encoded_id}: 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 get: tags: - Snippets description: 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 including OAuth 2.0 and HTTP basic authentication. The response includes the Snippets title, description, programming language, visibility settings (public or private), and the actual code content, making it useful for integrating snippet management functionality into external applications or automating snippet retrieval workflows. summary: Atlassian Get Snippet responses: '200': description: The snippet object. content: application/json: schema: $ref: '#/components/schemas/snippet' examples: snippet_2: $ref: '#/components/examples/snippet_2' 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: [] x-api-evangelist-processing: PascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true GenerateExampleFromOperationResponseSchema: true operationId: getSnippet x-microcks-operation: delay: 0 dispatcher: FALLBACK put: tags: - Snippets description: 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 metadata like creation date, last updated timestamp, and ownership information. If the snippet doesn't exist or the user lacks permission, appropriate error responses will be returned. summary: Atlassian Update Snippet responses: '200': description: The updated snippet object. content: application/json: schema: $ref: '#/components/schemas/snippet' examples: snippet_2: $ref: '#/components/examples/snippet_2' 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: [] x-api-evangelist-processing: PascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true GenerateExampleFromOperationResponseSchema: true operationId: updateSnippet x-microcks-operation: delay: 0 dispatcher: FALLBACK 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 /snippets/{workspace}/{encoded_id}/comments: 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 get: tags: - Snippets description: 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 build interactive commenting features or analyze snippet discussions within a workspace. summary: Atlassian List Comments on Snippet responses: '200': description: A paginated list of snippet comments, ordered by creation date. content: application/json: schema: $ref: '#/components/schemas/paginated_snippet_comments' examples: paginated-snippet-comments: $ref: '#/components/examples/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: [] x-api-evangelist-processing: PascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true GenerateExampleFromOperationResponseSchema: true operationId: listCommentsOnSnippet x-microcks-operation: delay: 0 dispatcher: FALLBACK post: tags: - Snippets description: '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 the specified snippet. This functionality facilitates code review, collaboration, and feedback mechanisms within Bitbucket''s snippet sharing feature, allowing team members to provide inline commentary, suggestions, or questions about shared code fragments. The operation returns the newly created comment object upon successful execution, including metadata such as comment ID, author information, timestamp, and the comment content itself.' summary: Atlassian Create Comment on 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' examples: snippet-comment_2: $ref: '#/components/examples/snippet-comment_2' '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' examples: snippet-comment: $ref: '#/components/examples/snippet-comment' description: The contents of the new comment. required: true security: - oauth2: - snippet - basic: [] - api_key: [] x-api-evangelist-processing: PascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true GenerateExampleFromOperationRequestSchema: true GenerateExampleFromOperationResponseSchema: true operationId: createCommentOnSnippet x-microcks-operation: delay: 0 dispatcher: FALLBACK /snippets/{workspace}/{encoded_id}/comments/{comment_id}: 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 delete: tags: - Snippets description: '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 discussions, removing outdated information, or cleaning up unwanted comments on code snippets shared within your Bitbucket workspace.' summary: Atlassian Delete Comment on 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: [] x-api-evangelist-processing: PascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true operationId: deleteCommentOnSnippet x-microcks-operation: delay: 0 dispatcher: FALLBACK get: tags: - Snippets description: 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 context. summary: Atlassian Get Comment on Snippet responses: '200': description: The specified comment. content: application/json: schema: $ref: '#/components/schemas/snippet_comment' examples: snippet-comment_2: $ref: '#/components/examples/snippet-comment_2' '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: [] x-api-evangelist-processing: PascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true GenerateExampleFromOperationResponseSchema: true operationId: getCommentOnSnippet x-microcks-operation: delay: 0 dispatcher: FALLBACK put: tags: - Snippets description: 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 limited to the original comment author or workspace administrators. summary: Atlassian Update Comment on Snippet responses: '200': description: The updated comment object. content: application/json: schema: $ref: '#/components/schemas/snippet_comment' examples: snippet-comment_2: $ref: '#/components/examples/snippet-comment_2' '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' examples: snippet-comment_2: $ref: '#/components/examples/snippet-comment_2' description: The contents to update the comment to. required: true security: - oauth2: - snippet - basic: [] - api_key: [] x-api-evangelist-processing: PascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true GenerateExampleFromOperationResponseSchema: true GenerateExampleFromOperationRequestSchema: true operationId: updateCommentOnSnippet x-microcks-operation: delay: 0 dispatcher: FALLBACK /snippets/{workspace}/{encoded_id}/commits: 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 get: tags: - Snippets description: 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 evolution of code snippets, and potentially revert to previous versions if needed. This is particularly useful for teams collaborating on shared code snippets who need visibility into who changed what and when. summary: Atlassian List Snippet Changes responses: '200': description: The paginated list of snippet commits. content: application/json: schema: $ref: '#/components/schemas/paginated_snippet_commit' examples: paginated-snippet-commits: $ref: '#/components/examples/paginated-snippet-commits' '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: [] x-api-evangelist-processing: PascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true GenerateExampleFromOperationResponseSchema: true operationId: listSnippetChanges x-microcks-operation: delay: 0 dispatcher: FALLBACK /snippets/{workspace}/{encoded_id}/commits/{revision}: parameters: - name: encoded_id in: path description: The snippet id. required: true schema: type: string - name: revision in: path description: The commit's SHA1. 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 get: tags: - Snippets description: 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 about the Snippets content and metadata at the specified revision, enabling version control functionality for snippets stored within a Bitbucket workspace. summary: Atlassian Get Previous Snippet Change responses: '200': description: The specified snippet commit. content: application/json: schema: $ref: '#/components/schemas/snippet_commit' examples: snippet-commit: $ref: '#/components/examples/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 - basic: [] - api_key: [] x-api-evangelist-processing: PascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true GenerateExampleFromOperationResponseSchema: true operationId: getPreviousSnippetChange x-microcks-operation: delay: 0 dispatcher: FALLBACK /snippets/{workspace}/{encoded_id}/files/{path}: parameters: - name: encoded_id in: path description: The snippet id. required: true schema: type: string - name: path in: path description: Path to the file. 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 get: tags: - Snippets description: 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 external applications. Authentication is typically required based on the snippet's visibility settings, with private snippets requiring appropriate permissions to access the raw file content. summary: Atlassian Get Snippets Raw File at Head responses: '302': description: A redirect to the most recent revision of the specified file. headers: Location: description: The URL of the most recent file revision. schema: type: string '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: [] x-api-evangelist-processing: PascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true operationId: getSnippetsRawFileAtHead x-microcks-operation: delay: 0 dispatcher: FALLBACK /snippets/{workspace}/{encoded_id}/watch: 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 delete: tags: - Snippets description: 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 from notifications about snippets they are no longer interested in following. summary: Atlassian Stop Watching Snippet responses: '204': description: Indicates the user stopped watching the snippet successfully. '401': description: If the request was not authenticated. 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: [] x-api-evangelist-processing: PascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true operationId: stopWatchingSnippet x-microcks-operation: delay: 0 dispatcher: FALLBACK get: tags: - Snippets description: 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 tracking. summary: Atlassian Check if the Current User Is Watching Snippet responses: '204': description: If the authenticated user is watching the snippet. '404': description: If the snippet does not exist, or if the authenticated user is not watching the snippet. content: application/json: schema: $ref: '#/components/schemas/error' security: - oauth2: - snippet - basic: [] - api_key: [] x-api-evangelist-processing: PascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true operationId: checkIfTheCurrentUserIsWatchingSnippet x-microcks-operation: delay: 0 dispatcher: FALLBACK put: tags: - Snippets description: 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. summary: Atlassian Watch Snippet responses: '204': description: Indicates the authenticated user is now watching the snippet. '401': description: If the request was not authenticated. 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: [] x-api-evangelist-processing: PascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true operationId: watchSnippet x-microcks-operation: delay: 0 dispatcher: FALLBACK /snippets/{workspace}/{encoded_id}/watchers: 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 get: tags: - Snippets description: 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 the audience and engagement level of shared code snippets within a team or organization. summary: Atlassian List Users Watching Snippet responses: '200': description: The paginated list of users watching this snippet content: application/json: schema: $ref: '#/components/schemas/paginated_accounts' examples: paginated-accounts: $ref: '#/components/examples/paginated-accounts' '404': description: If the snippet does not exist. content: application/json: schema: $ref: '#/components/schemas/error' security: - oauth2: - snippet - basic: [] - api_key: [] deprecated: true x-api-evangelist-processing: PascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true GenerateExampleFromOperationResponseSchema: true operationId: listUsersWatchingSnippet x-microcks-operation: delay: 0 dispatcher: FALLBACK /snippets/{workspace}/{encoded_id}/{node_id}: parameters: - name: encoded_id in: path description: The snippet id. required: true schema: type: string - name: node_id in: path description: A commit revision (SHA1). 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 delete: tags: - Snippets description: 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 within a workspace. Authentication is required to perform this operation, and the user must have appropriate permissions to modify snippets within the specified workspace. summary: Atlassian Delete Previous Revision of 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' '405': description: If `{node_id}` is not the latest revision. content: application/json: schema: $ref: '#/components/schemas/error' security: - oauth2: - snippet:write - basic: [] - api_key: [] x-api-evangelist-processing: PascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true operationId: deletePreviousRevisionOfSnippet x-microcks-operation: delay: 0 dispatcher: FALLBACK get: tags: - Snippets description: 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 specific revision within the workspace's collection of snippets. summary: Atlassian Get Previous Revision of Snippet responses: '200': description: The snippet object. content: application/json: schema: $ref: '#/components/schemas/snippet' examples: snippet_2: $ref: '#/components/examples/snippet_2' 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, or the revision 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 - basic: [] - api_key: [] x-api-evangelist-processing: PascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true GenerateExampleFromOperationResponseSchema: true operationId: getPreviousRevisionOfSnippet x-microcks-operation: delay: 0 dispatcher: FALLBACK put: tags: - Snippets description: 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 snippet's version chain, useful for correcting errors or updating information in past revisions without affecting the current version. summary: Atlassian Update Previous Revision of Snippet responses: '200': description: The updated snippet object. content: application/json: schema: $ref: '#/components/schemas/snippet' examples: snippet_2: $ref: '#/components/examples/snippet_2' 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 or the revision 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' '405': description: If `{node_id}` is not the latest revision. 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: [] x-api-evangelist-processing: PascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true GenerateExampleFromOperationResponseSchema: true operationId: updatePreviousRevisionOfSnippet x-microcks-operation: delay: 0 dispatcher: FALLBACK /snippets/{workspace}/{encoded_id}/{node_id}/files/{path}: parameters: - name: encoded_id in: path description: The snippet id. required: true schema: type: string - name: node_id in: path description: A commit revision (SHA1). required: true schema: type: string - name: path in: path description: Path to the file. 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 get: tags: - Snippets description: 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, or further processing in your application. summary: Atlassian Get Snippets Raw File responses: '200': description: Returns the contents of the specified file. headers: Content-Type: description: The mime type as derived from the filename schema: type: string Content-Disposition: description: attachment schema: type: string '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 file or snippet does not exist. content: application/json: schema: $ref: '#/components/schemas/error' security: - oauth2: - snippet - basic: [] - api_key: [] x-api-evangelist-processing: PascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true operationId: getSnippetsRawFile x-microcks-operation: delay: 0 dispatcher: FALLBACK /snippets/{workspace}/{encoded_id}/{revision}/diff: parameters: - name: encoded_id in: path description: The snippet id. required: true schema: type: string - name: revision in: path description: A revspec expression. This can simply be a commit SHA1, a ref name, or a compare expression like `staging..production`. 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 get: tags: - Snippets description: 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, which is useful for tracking changes, reviewing edits, or understanding the evolution of a code snippet over time within a Bitbucket workspace. summary: Atlassian Get Snippet Changes Between Versions responses: '200': description: The raw diff contents. '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' parameters: - name: path in: query description: When used, only one the diff of the specified file will be returned. schema: type: string security: - oauth2: - snippet - basic: [] - api_key: [] x-api-evangelist-processing: PascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true operationId: getSnippetChangesBetweenVersions x-microcks-operation: delay: 0 dispatcher: FALLBACK /snippets/{workspace}/{encoded_id}/{revision}/patch: parameters: - name: encoded_id in: path description: The snippet id. required: true schema: type: string - name: revision in: path description: A revspec expression. This can simply be a commit SHA1, a ref name, or a compare expression like `staging..production`. 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 get: tags: - Snippets description: 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 changes, code reviews, or understanding the evolution of code snippets over time. summary: Atlassian Get Snippet Patch Between Versions responses: '200': description: The raw patch contents. '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: [] x-api-evangelist-processing: PascalCaseOperationSummaries: true CaselCaseOperationIds: true WriteDescription: true ChooseTags: true operationId: getSnippetPatchBetweenVersions x-microcks-operation: delay: 0 dispatcher: FALLBACK /snippets: parameters: [] get: tags: - Snippets description: '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 are
defined as follows:

* `owner`: all snippets owned by the current user
* `contributor`: all snippets owned by, or watched by the current user
* `member`: created in a workspaces or watched by the current user

When no role is specified, all public snippets are returned, as well as all
privately owned snippets watched or commented on.

The returned response is a normal paginated JSON list. This endpoint
only supports `application/json` responses and no
`multipart/form-data` or `multipart/related`. As a result, it is not
possible to include the file contents.' summary: Atlassian List Snippets responses: '200': description: A paginated list of snippets. content: application/json: schema: $ref: '#/components/schemas/paginated_snippets_3' '404': description: If the snippet does not exist. content: application/json: schema: $ref: '#/components/schemas/error_2' 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: atlassianListSnippets post: tags: - Snippets description: '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. Both `multipart/form-data`
and `multipart/related` are supported. Both allow the creation of
snippets with both meta data (title, etc), as well as multiple text
and binary files.

The main difference is that `multipart/related` can use rich encoding
for the meta data (currently JSON).


multipart/related (RFC-2387)
-

This is the most advanced and efficient way to create a paste.

POST /2.0/snippets/evzijst HTTP/1.1
Content-Length: 1188
Content-Type: multipart/related; start="snippet"; boundary="===============1438169132528273974=="
MIME-Version: 1.0

--===============1438169132528273974==
Content-Type: application/json; charset="utf-8"
MIME-Version: 1.0
Content-ID: snippet

{
"title": "My snippet",
"is_private": true,
"scm": "git",
"files": {
"foo.txt": {},
"image.png": {}
}
}

--===============1438169132528273974==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-ID: "foo.txt"
Content-Disposition: attachment; filename="foo.txt"

foo

--===============1438169132528273974==
Content-Type: image/png
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-ID: "image.png"
Content-Disposition: attachment; filename="image.png"

iVBORw0KGgoAAAANSUhEUgAAABQAAAAoCAYAAAD+MdrbAAABD0lEQVR4Ae3VMUoDQRTG8ccUaW2m
TKONFxArJYJamCvkCnZTaa+VnQdJSBFl2SMsLFrEWNjZBZs0JgiL/+KrhhVmJRbCLPx4O+/DT2TB
cbblJxf+UWFVVRNsEGAtgvJxnLm2H+A5RQ93uIl+3632PZyl/skjfOn9Gvdwmlcw5aPUwimG+NT5
EnNN036IaZePUuIcK533NVfal7/5yjWeot2z9ta1cAczHEf7I+3J0ws9Cgx0fsOFpmlfwKcWPuBQ
73Oc4FHzBaZ8llq4q1mr5B2mOUCt815qYR8eB1hG2VJ7j35q4RofaH7IG+Xrf/PfJhfmwtfFYoIN
AqxFUD6OMxcvkO+UfKfkOyXfKdsv/AYCHMLVkHAFWgAAAABJRU5ErkJggg==
--===============1438169132528273974==--

The request contains multiple parts and is structured as follows.

The first part is the JSON document that describes the snippet''s
properties or meta data. It either has to be the first part, or the
request''s `Content-Type` header must contain the `start` parameter to
point to it.

The remaining parts are the files of which there can be zero or more.
Each file part should contain the `Content-ID` MIME header through
which the JSON meta data''s `files` element addresses it. The value
should be the name of the file.

`Content-Disposition` is an optional MIME header. The header''s
optional `filename` parameter can be used to specify the file name
that Bitbucket should use when writing the file to disk. When present,
`filename` takes precedence over the value of `Content-ID`.

When the JSON body omits the `files` element, the remaining parts are
not ignored. Instead, each file is added to the new snippet as if its
name was explicitly linked (the use of the `files` elements is
mandatory for some operations like deleting or renaming files).


multipart/form-data
-

The use of JSON for the snippet''s meta data is optional. Meta data can
also be supplied as regular form fields in a more conventional
`multipart/form-data` request:

$ curl -X POST -u credentials https://api.bitbucket.org/2.0/snippets -F title="My snippet" -F file=@foo.txt -F file=@image.png

POST /2.0/snippets HTTP/1.1
Content-Length: 951
Content-Type: multipart/form-data; boundary=-63a4b224c59f

63a4b224c59f
Content-Disposition: form-data; name="file"; filename="foo.txt"
Content-Type: text/plain

foo

63a4b224c59f
Content-Disposition: form-data; name="file"; filename="image.png"
Content-Type: application/octet-stream

?PNG

IHDR?1??I.....
63a4b224c59f
Content-Disposition: form-data; name="title"

My snippet
63a4b224c59f--

Here the meta data properties are included as flat, top-level form
fields. The file attachments use the `file` field name. To attach
multiple files, simply repeat the field.

The advantage of `multipart/form-data` over `multipart/related` is
that it can be easier to build clients.

Essentially all properties are optional, `title` and `files` included.


Sharing and Visibility
-

Snippets can be either public (visible to anyone on Bitbucket, as well
as anonymous users), or private (visible only to members of the workspace).
This is controlled through the snippet''s `is_private` element:

* **is_private=false** -- everyone, including anonymous users can view
the snippet
* **is_private=true** -- only workspace members can view the snippet

To create the snippet under a workspace, just append the workspace ID
to the URL. See [`/2.0/snippets/{workspace}`](/cloud/bitbucket/rest/api-group-snippets/#api-snippets-workspace-post).' summary: Atlassian Create A Snippet 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_2' requestBody: $ref: '#/components/requestBodies/snippet' security: - oauth2: - snippet:write - basic: [] - api_key: [] operationId: atlassianCreateASnippet components: schemas: account: allOf: - $ref: '#/components/schemas/object' - type: object title: Account description: An account object. properties: links: $ref: '#/components/schemas/account_links' created_on: type: string format: date-time display_name: type: string username: type: string pattern: ^[a-zA-Z0-9_\-]+$ uuid: type: string additionalProperties: true error: type: object title: Error description: Base type for most resource objects. It defines the common `type` element that identifies an object's type. It also identifies the element as Swagger's `discriminator`. properties: type: type: string example: example_value error: type: object properties: message: type: string detail: type: string data: type: object description: Optional structured data that is endpoint-specific. properties: {} additionalProperties: true required: - message additionalProperties: false example: example_value required: - type additionalProperties: true author: allOf: - $ref: '#/components/schemas/object_2' - type: object title: Author description: The author of a change in a repository properties: raw: type: string description: The raw author value from the repository. This may be the only value available if the author does not match a user in Bitbucket. user: $ref: '#/components/schemas/account' additionalProperties: true paginated_accounts: type: object title: Paginated Accounts description: A paginated list of accounts. properties: size: type: integer description: Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. minimum: 0 example: 10 page: type: integer description: Page number of the current results. This is an optional element that is not provided in all responses. minimum: 1 example: 10 pagelen: type: integer description: Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. minimum: 1 example: 10 next: type: string description: Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. format: uri example: https://www.example.com previous: type: string description: Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. format: uri example: https://www.example.com values: type: object title: Account description: An account object. properties: links: $ref: '#/components/schemas/account_links' created_on: type: string format: date-time display_name: type: string username: type: string pattern: ^[a-zA-Z0-9_\-]+$ uuid: type: string additionalProperties: true example: example_value additionalProperties: false paginated_snippets: type: object title: Paginated Snippets description: A paginated list of snippets. properties: size: type: integer description: Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. minimum: 0 example: 10 page: type: integer description: Page number of the current results. This is an optional element that is not provided in all responses. minimum: 1 example: 10 pagelen: type: integer description: Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. minimum: 1 example: 10 next: type: string description: Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. format: uri example: https://www.example.com previous: type: string description: Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. format: uri example: https://www.example.com values: type: object title: Snippet description: A snippet object. properties: id: type: integer minimum: 0 title: type: string scm: type: string description: The DVCS used to store the snippet. enum: - git created_on: type: string format: date-time updated_on: type: string format: date-time owner: $ref: '#/components/schemas/account' creator: $ref: '#/components/schemas/account' is_private: type: boolean additionalProperties: true example: example_value additionalProperties: false snippet: allOf: - $ref: '#/components/schemas/object' - type: object title: Snippet description: A snippet object. properties: id: type: integer minimum: 0 title: type: string scm: type: string description: The DVCS used to store the snippet. enum: - git created_on: type: string format: date-time updated_on: type: string format: date-time owner: $ref: '#/components/schemas/account' creator: $ref: '#/components/schemas/account' is_private: type: boolean additionalProperties: true object: type: object description: Base type for most resource objects. It defines the common `type` element that identifies an object's type. It also identifies the element as Swagger's `discriminator`. properties: type: type: string example: example_value required: - type additionalProperties: true discriminator: propertyName: type account_links: type: object title: Account Links description: Links related to an Account. properties: avatar: $ref: '#/components/schemas/link' additionalProperties: true snippet_commit: allOf: - $ref: '#/components/schemas/base_commit' - type: object title: Snippet Commit description: '' properties: links: type: object properties: self: type: object title: Link description: A link to a resource related to this object. properties: href: type: string format: uri name: type: string additionalProperties: false html: type: object title: Link description: A link to a resource related to this object. properties: href: type: string format: uri name: type: string additionalProperties: false diff: type: object title: Link description: A link to a resource related to this object. properties: href: type: string format: uri name: type: string additionalProperties: false additionalProperties: false snippet: $ref: '#/components/schemas/snippet' additionalProperties: true object_2: type: object description: Base type for most resource objects. It defines the common `type` element that identifies an object's type. It also identifies the element as Swagger's `discriminator`. properties: type: type: string required: - type additionalProperties: true discriminator: propertyName: type error_2: type: object title: Error description: Base type for most resource objects. It defines the common `type` element that identifies an object's type. It also identifies the element as Swagger's `discriminator`. properties: type: type: string error: type: object properties: message: type: string detail: type: string data: type: object description: Optional structured data that is endpoint-specific. properties: {} additionalProperties: true required: - message additionalProperties: false required: - type additionalProperties: true paginated_snippet_comments: type: object title: Paginated Snippet Comments description: A paginated list of snippet comments. properties: size: type: integer description: Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. minimum: 0 example: 10 page: type: integer description: Page number of the current results. This is an optional element that is not provided in all responses. minimum: 1 example: 10 pagelen: type: integer description: Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. minimum: 1 example: 10 next: type: string description: Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. format: uri example: https://www.example.com previous: type: string description: Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. format: uri example: https://www.example.com values: type: object title: Snippet Comment description: A comment on a snippet. properties: links: type: object properties: self: type: object title: Link description: A link to a resource related to this object. properties: href: type: string format: uri name: type: string additionalProperties: false html: type: object title: Link description: A link to a resource related to this object. properties: href: type: string format: uri name: type: string additionalProperties: false additionalProperties: false snippet: $ref: '#/components/schemas/snippet' additionalProperties: true example: example_value additionalProperties: false link: type: object title: Link description: A link to a resource related to this object. properties: href: type: string format: uri name: type: string additionalProperties: false base_commit: allOf: - $ref: '#/components/schemas/object' - type: object title: Base Commit description: The common base type for both repository and snippet commits. properties: hash: type: string pattern: '[0-9a-f]{7,}?' date: type: string format: date-time author: $ref: '#/components/schemas/author' message: type: string summary: type: object properties: raw: type: string description: The text as it was typed by a user. markup: type: string description: The type of markup language the raw content is to be interpreted in. enum: - markdown - creole - plaintext html: type: string description: The user's content rendered as HTML. additionalProperties: false parents: type: array items: $ref: '#/components/schemas/base_commit' minItems: 0 additionalProperties: true paginated_snippets_3: type: object title: Paginated Snippets description: A paginated list of snippets. properties: size: type: integer description: Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. minimum: 0 page: type: integer description: Page number of the current results. This is an optional element that is not provided in all responses. minimum: 1 pagelen: type: integer description: Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. minimum: 1 next: type: string description: Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. format: uri previous: type: string description: Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. format: uri values: type: array items: $ref: '#/components/schemas/snippet' minItems: 0 uniqueItems: true additionalProperties: false paginated_snippet_commit: type: object title: Paginated Snippet Commits description: A paginated list of snippet commits. properties: size: type: integer description: Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. minimum: 0 example: 10 page: type: integer description: Page number of the current results. This is an optional element that is not provided in all responses. minimum: 1 example: 10 pagelen: type: integer description: Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. minimum: 1 example: 10 next: type: string description: Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. format: uri example: https://www.example.com previous: type: string description: Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. format: uri example: https://www.example.com values: type: object title: Snippet Commit description: '' properties: links: type: object properties: self: type: object title: Link description: A link to a resource related to this object. properties: href: type: string format: uri name: type: string additionalProperties: false html: type: object title: Link description: A link to a resource related to this object. properties: href: type: string format: uri name: type: string additionalProperties: false diff: type: object title: Link description: A link to a resource related to this object. properties: href: type: string format: uri name: type: string additionalProperties: false additionalProperties: false snippet: $ref: '#/components/schemas/snippet' additionalProperties: true example: example_value additionalProperties: false snippet_comment: allOf: - $ref: '#/components/schemas/object' - type: object title: Snippet Comment description: A comment on a snippet. properties: links: type: object properties: self: type: object title: Link description: A link to a resource related to this object. properties: href: type: string format: uri name: type: string additionalProperties: false html: type: object title: Link description: A link to a resource related to this object. properties: href: type: string format: uri name: type: string additionalProperties: false additionalProperties: false snippet: $ref: '#/components/schemas/snippet' additionalProperties: true examples: snippet-comment: links: self: href: https://api.example.com/snippets/123/comments/456 name: self html: href: https://example.com/snippets/123/comments/456 name: html snippet: {} paginated-accounts: size: 42 page: 1 pagelen: 10 next: https://api.example.com/accounts?page=2 previous: https://api.example.com/accounts?page=0 values: created_on: '2023-11-15T10:30:00Z' display_name: John Doe username: john_doe-123 uuid: a1b2c3d4-e5f6-7890-abcd-ef1234567890 paginated-snippet-commits: size: 42 page: 1 pagelen: 10 next: https://api.bitbucket.org/2.0/snippets/commits?page=2 previous: https://api.bitbucket.org/2.0/snippets/commits?page=0 values: links: self: href: https://api.bitbucket.org/2.0/snippets/workspace/snippet_id/commits/commit_hash name: Snippet Commit html: href: https://bitbucket.org/workspace/snippet_id/commits/commit_hash name: HTML View diff: href: https://api.bitbucket.org/2.0/snippets/workspace/snippet_id/commits/commit_hash/diff name: Diff snippet: {} snippet: id: 12345 title: Example Code Snippet scm: git created_on: '2024-01-15T10:30:00Z' updated_on: '2024-01-20T14:45:00Z' owner: username: johndoe display_name: John Doe creator: username: johndoe display_name: John Doe is_private: true snippet-comment_2: links: self: href: https://api.bitbucket.org/2.0/snippets/example/comments/1 name: Self Link html: href: https://bitbucket.org/snippets/example/comments/1 name: HTML Link snippet: {} snippet_2: id: 12345 title: Example Code Snippet scm: git created_on: '2024-01-15T10:30:00Z' updated_on: '2024-01-15T14:45:00Z' owner: username: john_doe display_name: John Doe creator: username: jane_smith display_name: Jane Smith is_private: true paginated-snippets: size: 42 page: 1 pagelen: 10 next: https://api.bitbucket.org/2.0/snippets?page=2 previous: https://api.bitbucket.org/2.0/snippets?page=0 values: id: 12345 title: Example Code Snippet scm: git created_on: '2023-11-15T10:30:00Z' updated_on: '2023-11-16T14:45:30Z' owner: {} creator: {} is_private: true paginated-snippet-comments: size: 42 page: 1 pagelen: 10 next: https://api.bitbucket.org/2.0/snippets/comments?page=2 previous: https://api.bitbucket.org/2.0/snippets/comments?page=0 values: links: self: href: https://api.bitbucket.org/2.0/snippets/workspace/snippet-id/comments/1 name: Self Link html: href: https://bitbucket.org/workspace/snippet-id#comment-1 name: HTML Link snippet: {} snippet-commit: links: self: href: https://api.bitbucket.org/2.0/snippets/myworkspace/abc123/commits/def456 name: self html: href: https://bitbucket.org/snippets/myworkspace/abc123/commits/def456 name: html diff: href: https://api.bitbucket.org/2.0/snippets/myworkspace/abc123/commits/def456/diff name: diff snippet: id: abc123 title: Example Snippet created_on: '2023-01-15T10:30:00Z' requestBodies: snippet: content: application/json: schema: $ref: '#/components/schemas/snippet' description: The new snippet object. required: true securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: API Key description: Use an Atlassian API key as a Bearer token. Create API keys at https://admin.atlassian.com. oauth2: type: oauth2 description: OAuth 2.0 authorization for Atlassian Cloud APIs. flows: authorizationCode: authorizationUrl: https://auth.atlassian.com/authorize tokenUrl: https://auth.atlassian.com/oauth/token scopes: read:org:admin: Read organization information. write:org:admin: Modify organization settings. read:user:admin: Read user information. write:user:admin: Modify user accounts. read:policy:admin: Read organization policies. write:policy:admin: Modify organization policies. read:event:admin: Read organization events. externalDocs: description: Atlassian Admin REST API Documentation url: https://developer.atlassian.com/cloud/admin/organization/rest/intro/