openapi-directory
Version:
Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS
1 lines • 410 kB
JSON
{"openapi":"3.0.0","info":{"contact":{"email":"support@bitbucket.org","name":"Bitbucket Support","url":"https://support.atlassian.com/bitbucket"},"description":"Code against the Bitbucket API to automate simple tasks, embed Bitbucket data into your own site, build mobile or desktop apps, or even add custom UI add-ons into Bitbucket itself using the Connect framework.","termsOfService":"https://www.atlassian.com/legal/customer-agreement","title":"Bitbucket","version":"2.0","x-apisguru-categories":["developer_tools","collaboration"],"x-logo":{"url":"https://d301sr5gafysq2.cloudfront.net/0c55837759e5/img/homepage/bitbucket-logo-blue.svg"},"x-origin":[{"format":"swagger","url":"https://bitbucket.org/api/swagger.json","version":"2.0"}],"x-providerName":"bitbucket.org","x-tags":["code repository","code collaboration","git"]},"externalDocs":{"url":"https://bitbucket.org/api"},"tags":[{"description":"","name":"users"},{"description":"","name":"teams"},{"description":"","name":"repositories"},{"description":"Browse the source code in the repository and\n create new commits by uploading.","name":"source"},{"description":"","name":"refs"},{"description":"","name":"commits"},{"description":"","name":"pullrequests"},{"description":"The issue resources provide functionality for getting information on\nissues in an issue tracker, creating new issues, updating them and deleting\nthem.\n\nYou can access public issues without authentication, but you can't gain access\nto private repositories' issues. By authenticating, you will get the ability\nto create issues, as well as access to updating data or deleting issues you\nhave access to.","name":"issue_tracker"},{"description":"","name":"wiki"},{"description":"","name":"downloads"},{"description":"","name":"snippets"},{"description":"Webhooks provide a way to configure Bitbucket Cloud to make requests to\nyour server (or another external service) whenever certain events occur in\nBitbucket Cloud.\n\nA webhook consists of:\n\n* A subject -- The resource that generates the events. Currently, this resource\n is the repository, user account, or team where you create the webhook.\n* One or more event -- The default event is a repository push, but you can\n select multiple events that can trigger the webhook.\n* A URL -- The endpoint where you want Bitbucket to send the event payloads\n when a matching event happens.\n\nThere are two parts to getting a webhook to work: creating the webhook and\ntriggering the webhook. After you create a webhook for an event, every time\nthat event occurs, Bitbucket sends a payload request that describes the event\nto the specified URL. Thus, you can think of webhooks as a kind of\nnotification system.\n\nUse webhooks to integrate applications with Bitbucket Cloud. The following\nuse cases provides examples of when you would want to use webhooks:\n\n* Every time a user pushes commits in a repository, you may want to notify\n your CI server to start a build.\n* Every time a user pushes commits or creates a pull request, you may want to\n display a notification in your application.\n","name":"webhooks"},{"description":"Commit statuses provide a way to tag commits with meta data,\nlike automated build results.\n","name":"commitstatuses"},{"description":"Repository owners and administrators can set branch management\nrules on a repository that control what can be pushed by whom.\nThrough these rules, you can enforce a project or team\nworkflow. For example, owners or administrators can:\n\n* Limit push powers\n* Prevent branch (bookmark) deletion\n* Prevent history re-writes (Git only)\n","name":"branchrestrictions"},{"description":"Bitbucket Cloud projects make it easier for teams to focus on\na goal, product, or process by organizing their repositories.\n","name":"projects"},{"description":"Bitbucket Pipelines brings continuous delivery to Bitbucket\nCloud, empowering teams with full branching to deployment\nvisibility and faster feedback loops.\n","name":"pipelines"}],"paths":{"/addon":{"delete":{"description":"","responses":{"default":{"description":"Unexpected error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"security":[{"oauth2":[]},{"basic":[]},{"api_key":[]}],"tags":["addon"]},"parameters":[],"put":{"description":"","responses":{"default":{"description":"Unexpected error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"security":[{"oauth2":[]},{"basic":[]},{"api_key":[]}],"tags":["addon"]}},"/addon/linkers":{"get":{"description":"","responses":{"default":{"description":"Unexpected error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"security":[{"oauth2":[]},{"basic":[]},{"api_key":[]}],"tags":["addon"]},"parameters":[]},"/addon/linkers/{linker_key}":{"get":{"description":"","responses":{"default":{"description":"Unexpected error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"security":[{"oauth2":[]},{"basic":[]},{"api_key":[]}],"tags":["addon"]},"parameters":[{"in":"path","name":"linker_key","required":true,"schema":{"type":"string"}}]},"/addon/linkers/{linker_key}/values":{"delete":{"description":"","responses":{"default":{"description":"Unexpected error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"security":[{"oauth2":[]},{"basic":[]},{"api_key":[]}],"tags":["addon"]},"get":{"description":"","responses":{"default":{"description":"Unexpected error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"security":[{"oauth2":[]},{"basic":[]},{"api_key":[]}],"tags":["addon"]},"parameters":[{"in":"path","name":"linker_key","required":true,"schema":{"type":"string"}}],"post":{"description":"","responses":{"default":{"description":"Unexpected error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"security":[{"oauth2":[]},{"basic":[]},{"api_key":[]}],"tags":["addon"]},"put":{"description":"","responses":{"default":{"description":"Unexpected error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"security":[{"oauth2":[]},{"basic":[]},{"api_key":[]}],"tags":["addon"]}},"/addon/linkers/{linker_key}/values/":{"delete":{"description":"","responses":{"default":{"description":"Unexpected error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"security":[{"oauth2":[]},{"basic":[]},{"api_key":[]}],"tags":["addon"]},"get":{"description":"","responses":{"default":{"description":"Unexpected error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"security":[{"oauth2":[]},{"basic":[]},{"api_key":[]}],"tags":["addon"]},"parameters":[{"in":"path","name":"linker_key","required":true,"schema":{"type":"string"}}]},"/hook_events":{"get":{"description":"Returns the webhook resource or subject types on which webhooks can\nbe registered.\n\nEach resource/subject type contains an `events` link that returns the\npaginated list of specific events each individual subject type can\nemit.\n\nThis endpoint is publicly accessible and does not require\nauthentication or scopes.\n\nExample:\n\n```\n$ curl https://api.bitbucket.org/2.0/hook_events\n\n{\n \"repository\": {\n \"links\": {\n \"events\": {\n \"href\": \"https://api.bitbucket.org/2.0/hook_events/repository\"\n }\n }\n },\n \"team\": {\n \"links\": {\n \"events\": {\n \"href\": \"https://api.bitbucket.org/2.0/hook_events/team\"\n }\n }\n },\n \"user\": {\n \"links\": {\n \"events\": {\n \"href\": \"https://api.bitbucket.org/2.0/hook_events/user\"\n }\n }\n }\n}\n```","responses":{"200":{"description":"A mapping of resource/subject types pointing to their individual event types.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/subject_types"}}}}},"security":[{"oauth2":[]},{"basic":[]},{"api_key":[]}],"tags":["webhooks"]},"parameters":[]},"/hook_events/{subject_type}":{"get":{"description":"Returns a paginated list of all valid webhook events for the\nspecified entity.\n\nThis is public data that does not require any scopes or authentication.\n\nExample:\n\nNOTE: The following example is a truncated response object for the `team` `subject_type`.\nWe return the same structure for the other `subject_type` objects.\n\n```\n$ curl https://api.bitbucket.org/2.0/hook_events/team\n{\n \"page\": 1,\n \"pagelen\": 30,\n \"size\": 21,\n \"values\": [\n {\n \"category\": \"Repository\",\n \"description\": \"Whenever a repository push occurs\",\n \"event\": \"repo:push\",\n \"label\": \"Push\"\n },\n {\n \"category\": \"Repository\",\n \"description\": \"Whenever a repository fork occurs\",\n \"event\": \"repo:fork\",\n \"label\": \"Fork\"\n },\n ...\n {\n \"category\": \"Repository\",\n \"description\": \"Whenever a repository import occurs\",\n \"event\": \"repo:imported\",\n \"label\": \"Import\"\n }\n ]\n}\n```","parameters":[{"description":"A resource or subject type.","in":"path","name":"subject_type","required":true,"schema":{"type":"string","enum":["user","repository","team"]}}],"responses":{"200":{"description":"A paginated list of webhook types available to subscribe on.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/paginated_hook_events"}}}},"404":{"description":"If an invalid `{subject_type}` value was specified.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"security":[{"oauth2":[]},{"basic":[]},{"api_key":[]}],"tags":["webhooks"]},"parameters":[{"in":"path","name":"subject_type","required":true,"schema":{"type":"string"}}]},"/repositories":{"get":{"description":"Returns a paginated list of all public repositories.\n\nThis endpoint also supports filtering and sorting of the results. See\n[filtering and sorting](../meta/filtering) for more details.","parameters":[{"description":"Filter the results to include only repositories create on or\nafter this [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601)\n timestamp. Example: `YYYY-MM-DDTHH:mm:ss.sssZ`","in":"query","name":"after","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"All public repositories.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/paginated_repositories"}}}}},"security":[{"oauth2":["repository"]},{"basic":[]},{"api_key":[]}],"tags":["repositories"]},"parameters":[]},"/repositories/{username}":{"get":{"description":"Returns a paginated list of all repositories owned by the specified\naccount or UUID.\n\nThe result can be narrowed down based on the authenticated user's role.\n\nE.g. with `?role=contributor`, only those repositories that the\nauthenticated user has write access to are returned (this includes any\nrepo the user is an admin on, as that implies write access).\n\nThis endpoint also supports filtering and sorting of the results. See\n[filtering and sorting](../../meta/filtering) for more details.","parameters":[{"description":"This can either be the username or the UUID of the user,\nsurrounded by curly-braces, for example: `{user UUID}`.\n","in":"path","name":"username","required":true,"schema":{"type":"string"}},{"description":"\nFilters the result based on the authenticated user's role on each repository.\n\n* **member**: returns repositories to which the user has explicit read access\n* **contributor**: returns repositories to which the user has explicit write access\n* **admin**: returns repositories to which the user has explicit administrator access\n* **owner**: returns all repositories owned by the current user\n","in":"query","name":"role","required":false,"schema":{"type":"string","enum":["admin","contributor","member","owner"]}}],"responses":{"200":{"description":"The repositories owned by the specified account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/paginated_repositories"}}}},"404":{"description":"If the specified account does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"security":[{"oauth2":["repository"]},{"basic":[]},{"api_key":[]}],"tags":["repositories"]},"parameters":[{"in":"path","name":"username","required":true,"schema":{"type":"string"}}]},"/repositories/{username}/{repo_slug}":{"delete":{"description":"Deletes the repository. This is an irreversible operation.\n\nThis does not affect its forks.","parameters":[{"description":"This can either be the username or the UUID of the user,\nsurrounded by curly-braces, for example: `{user UUID}`.\n","in":"path","name":"username","required":true,"schema":{"type":"string"}},{"description":"This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n","in":"path","name":"repo_slug","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Indicates successful deletion."},"403":{"description":"If the caller either does not have admin access to the repository, or the repository is set to read-only.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"404":{"description":"If the repository does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"security":[{"oauth2":["repository:delete"]},{"basic":[]},{"api_key":[]}],"tags":["repositories"]},"get":{"description":"Returns the object describing this repository.","parameters":[{"description":"This can either be the username or the UUID of the user,\nsurrounded by curly-braces, for example: `{user UUID}`.\n","in":"path","name":"username","required":true,"schema":{"type":"string"}},{"description":"This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n","in":"path","name":"repo_slug","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The repository object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/repository"}}}},"403":{"description":"If the repository is private and the authenticated user does not have access to it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"404":{"description":"If no repository exists at this location.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"security":[{"oauth2":["repository"]},{"basic":[]},{"api_key":[]}],"tags":["repositories"]},"parameters":[{"in":"path","name":"username","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo_slug","required":true,"schema":{"type":"string"}}],"post":{"description":"Creates a new repository.\n\nNote: In order to set the project for the newly created repository,\npass in either the project key or the project UUID as part of the\nrequest body as shown in the examples below:\n\n```\n$ curl -X POST -H \"Content-Type: application/json\" -d '{\n \"scm\": \"git\",\n \"project\": {\n \"key\": \"MARS\"\n }\n}' https://api.bitbucket.org/2.0/repositories/teamsinspace/hablanding\n```\n\nor\n\n```\n$ curl -X POST -H \"Content-Type: application/json\" -d '{\n \"scm\": \"git\",\n \"project\": {\n \"key\": \"{ba516952-992a-4c2d-acbd-17d502922f96}\"\n }\n}' https://api.bitbucket.org/2.0/repositories/teamsinspace/hablanding\n```\n\nThe project must only be assigned for repositories belonging to a team.\nIf the repository owner is a team and the project is not provided, the\nrepository is automatically assigned to the oldest project in the team.\n\nNote: In the examples above, the username `teamsinspace`,\nand/or the repository name `hablanding` can be replaced by UUIDs.","parameters":[{"description":"This can either be the username or the UUID of the user,\nsurrounded by curly-braces, for example: `{user UUID}`.\n","in":"path","name":"username","required":true,"schema":{"type":"string"}},{"description":"This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n","in":"path","name":"repo_slug","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/repository"}}},"description":"The repository that is to be created. Note that most object elements are optional. Elements \"owner\" and \"full_name\" are ignored as the URL implies them."},"responses":{"200":{"description":"The newly created repository.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/repository"}}}},"400":{"description":"If the input document was invalid, or if the caller lacks the privilege to create repositories under the targeted account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"401":{"description":"If the request was not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"security":[{"oauth2":["repository:admin"]},{"basic":[]},{"api_key":[]}],"tags":["repositories"]},"put":{"description":"Since this endpoint can be used to both update and to create a\nrepository, the request body depends on the intent.\n\n### Creation\n\nSee the POST documentation for the repository endpoint for an example\nof the request body.\n\n### Update\n\nNote: Changing the `name` of the repository will cause the location to\nbe changed. This is because the URL of the repo is derived from the\nname (a process called slugification). In such a scenario, it is\npossible for the request to fail if the newly created slug conflicts\nwith an existing repository's slug. But if there is no conflict,\nthe new location will be returned in the `Location` header of the\nresponse.","parameters":[{"description":"This can either be the username or the UUID of the user,\nsurrounded by curly-braces, for example: `{user UUID}`.\n","in":"path","name":"username","required":true,"schema":{"type":"string"}},{"description":"This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n","in":"path","name":"repo_slug","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/repository"}}},"description":"The repository that is to be updated.\n\nNote that the elements \"owner\" and \"full_name\" are ignored since the\nURL implies them.\n"},"responses":{"200":{"description":"The existing repository has been updated","headers":{"Location":{"description":"The location of the repository. This header is only\nprovided when the repository's name is changed.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/repository"}}}},"201":{"description":"A new repository has been created","headers":{"Location":{"description":"The location of the newly created repository","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/repository"}}}},"400":{"description":"If the input document was invalid, or if the caller lacks the privilege to create repositories under the targeted account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"401":{"description":"If the request was not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"security":[{"oauth2":["repository:admin"]},{"basic":[]},{"api_key":[]}],"tags":["repositories"]}},"/repositories/{username}/{repo_slug}/branch-restrictions":{"get":{"description":"Returns a paginated list of all branch restrictions on the\nrepository.","responses":{"200":{"description":"A paginated list of branch restrictions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/paginated_branchrestrictions"}}}},"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 admin access to the repository","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"404":{"description":"If the repository does not exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"security":[{"oauth2":["repository:admin"]},{"basic":[]},{"api_key":[]}],"tags":["branchrestrictions"]},"parameters":[{"in":"path","name":"username","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo_slug","required":true,"schema":{"type":"string"}}],"post":{"description":"Creates a new branch restriction rule for a repository.\n\n`kind` describes what will be restricted. Allowed values are: `push`,\n`force`, `delete`, and `restrict_merges`.\n\nDifferent kinds of branch restrictions have different requirements:\n\n* `push` and `restrict_merges` require `users` and `groups` to be\n specified. Empty lists are allowed, in which case permission is\n denied for everybody.\n* `force` can not be specified in a Mercurial repository.\n\n`pattern` is used to determine which branches will be restricted.\n\nA `'*'` in `pattern` will expand to match zero or more characters, and\nevery other character matches itself. For example, `'foo*'` will match\n`'foo'` and `'foobar'`, but not `'barfoo'`. `'*'` will match all\nbranches.\n\n`users` and `groups` are lists of user names and group names.\n\n`kind` and `pattern` must be unique within a repository; adding new\nusers or groups to an existing restriction should be done via `PUT`.\n\nNote that branch restrictions with overlapping patterns are allowed,\nbut the resulting behavior may be surprising.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/branchrestriction"}}},"description":"The new rule","required":true},"responses":{"201":{"description":"A paginated list of branch restrictions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/branchrestriction"}}}},"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 admin access to the repository","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"404":{"description":"If the repository does not exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"security":[{"oauth2":["repository:admin"]},{"basic":[]},{"api_key":[]}],"tags":["branchrestrictions"]}},"/repositories/{username}/{repo_slug}/branch-restrictions/{id}":{"delete":{"description":"Deletes an existing branch restriction rule.","parameters":[{"description":"The restriction rule's id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":""},"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 admin access to the repository","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"404":{"description":"If the repository or branch restriction id does not exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"security":[{"oauth2":["repository:admin"]},{"basic":[]},{"api_key":[]}],"tags":["branchrestrictions"]},"get":{"description":"Returns a specific branch restriction rule.","parameters":[{"description":"The restriction rule's id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The branch restriction rule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/branchrestriction"}}}},"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 admin access to the repository","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"404":{"description":"If the repository or branch restriction id does not exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"security":[{"oauth2":["repository:admin"]},{"basic":[]},{"api_key":[]}],"tags":["branchrestrictions"]},"parameters":[{"in":"path","name":"username","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo_slug","required":true,"schema":{"type":"string"}}],"put":{"description":"Updates an existing branch restriction rule.\n\nFields not present in the request body are ignored.\n\nSee [`POST`](../../branch-restrictions#post) for details.","parameters":[{"description":"The restriction rule's id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/branchrestriction"}}},"description":"The new version of the existing rule","required":true},"responses":{"200":{"description":"The updated branch restriction rule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/branchrestriction"}}}},"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 admin access to the repository","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"404":{"description":"If the repository or branch restriction id does not exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"security":[{"oauth2":["repository:admin"]},{"basic":[]},{"api_key":[]}],"tags":["branchrestrictions"]}},"/repositories/{username}/{repo_slug}/commit/{node}/approve":{"delete":{"description":"Redact the authenticated user's approval of the specified commit.\n\nThis operation is only available to users that have explicit access to\nthe repository. In contrast, just the fact that a repository is\npublicly accessible to users does not give them the ability to approve\ncommits.","parameters":[{"description":"The commit's SHA1.","in":"path","name":"node","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"An empty response indicating the authenticated user's approval has been withdrawn."},"404":{"description":"If the specified commit, or the repository does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"security":[{"oauth2":["repository:write"]},{"basic":[]},{"api_key":[]}],"tags":["commits"]},"parameters":[{"in":"path","name":"username","required":true,"schema":{"type":"string"}},{"in":"path","name":"node","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo_slug","required":true,"schema":{"type":"string"}}],"post":{"description":"Approve the specified commit as the authenticated user.\n\nThis operation is only available to users that have explicit access to\nthe repository. In contrast, just the fact that a repository is\npublicly accessible to users does not give them the ability to approve\ncommits.","parameters":[{"description":"The commit's SHA1.","in":"path","name":"node","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The `participant` object recording that the authenticated user approved the commit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/participant"}}}},"404":{"description":"If the specified commit, or the repository does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"security":[{"oauth2":["repository:write"]},{"basic":[]},{"api_key":[]}],"tags":["commits"]}},"/repositories/{username}/{repo_slug}/commit/{node}/statuses":{"get":{"description":"Returns all statuses (e.g. build results) for a specific commit.","parameters":[{"description":"The commit's SHA1","in":"path","name":"node","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A paginated list of all commit statuses for this commit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/paginated_commitstatuses"}}}},"401":{"description":"If the repository is private and the request was not authenticated."},"404":{"description":"If the repository or commit does not exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"security":[{"oauth2":["repository"]},{"basic":[]},{"api_key":[]}],"tags":["repositories","commitstatuses"]},"parameters":[{"in":"path","name":"username","required":true,"schema":{"type":"string"}},{"in":"path","name":"node","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo_slug","required":true,"schema":{"type":"string"}}]},"/repositories/{username}/{repo_slug}/commit/{node}/statuses/build":{"parameters":[{"in":"path","name":"username","required":true,"schema":{"type":"string"}},{"in":"path","name":"node","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo_slug","required":true,"schema":{"type":"string"}}],"post":{"description":"Creates a new build status against the specified commit.\n\nIf the specified key already exists, the existing status object will\nbe overwritten.\n\nWhen creating a new commit status, you can use a URI template for the URL.\nTemplates are URLs that contain variable names that Bitbucket will\nevaluate at runtime whenever the URL is displayed anywhere similar to\nparameter substitution in\n[Bitbucket Connect](https://developer.atlassian.com/bitbucket/concepts/context-parameters.html).\nFor example, one could use `https://foo.com/builds/{repository.full_name}`\nwhich Bitbucket will turn into `https://foo.com/builds/foo/bar` at render time.\nThe context variables available are `repository` and `commit`.","parameters":[{"description":"The commit's SHA1","in":"path","name":"node","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"The newly created build status object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitstatus"}}}},"401":{"description":"If the repository is private and the request was not authenticated."},"404":{"description":"If the repository, commit, or build status key does not exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"security":[{"oauth2":["repository"]},{"basic":[]},{"api_key":[]}],"tags":["repositories","commitstatuses"]}},"/repositories/{username}/{repo_slug}/commit/{node}/statuses/build/{key}":{"get":{"description":"Returns the specified build status for a commit.","parameters":[{"description":"The commit's SHA1","in":"path","name":"node","required":true,"schema":{"type":"string"}},{"description":"The build status' unique key","in":"path","name":"key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The build status object with the specified key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitstatus"}}}},"401":{"description":"If the repository is private and the request was not authenticated."},"404":{"description":"If the repository, commit, or build status key does not exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"security":[{"oauth2":["repository"]},{"basic":[]},{"api_key":[]}],"tags":["repositories","commitstatuses"]},"parameters":[{"in":"path","name":"username","required":true,"schema":{"type":"string"}},{"in":"path","name":"node","required":true,"schema":{"type":"string"}},{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo_slug","required":true,"schema":{"type":"string"}}],"put":{"description":"Used to update the current status of a build status object on the\nspecific commit.\n\nThis operation can also be used to change other properties of the\nbuild status:\n\n* `state`\n* `name`\n* `description`\n* `url`\n* `refname`\n\nThe `key` cannot be changed.","parameters":[{"description":"The commit's SHA1","in":"path","name":"node","required":true,"schema":{"type":"string"}},{"description":"The commit status' unique key","in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitstatus"}}},"description":"The updated build status object"},"responses":{"200":{"description":"The updated build status object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitstatus"}}}},"401":{"description":"If the repository is private and the request was not authenticated."},"404":{"description":"If the repository or build does not exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"security":[{"oauth2":["repository"]},{"basic":[]},{"api_key":[]}],"tags":["repositories","commitstatuses"]}},"/repositories/{username}/{repo_slug}/commit/{revision}":{"get":{"description":"Returns the specified commit.","parameters":[{"description":"The commit's SHA1.","in":"path","name":"revision","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The commit object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commit"}}}},"404":{"description":"If the specified commit or repository does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"security":[{"oauth2":["repository"]},{"basic":[]},{"api_key":[]}],"tags":["commits"]},"parameters":[{"in":"path","name":"username","required":true,"schema":{"type":"string"}},{"in":"path","name":"revision","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo_slug","required":true,"schema":{"type":"string"}}]},"/repositories/{username}/{repo_slug}/commit/{sha}/comments":{"get":{"description":"Returns the commit's comments.\n\nThis includes both global and inline comments.\n\nThe default sorting is oldest to newest and can be overridden with\nthe `sort` query parameter.","responses":{"default":{"description":"Unexpected error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"security":[{"oauth2":["repository"]},{"basic":[]},{"api_key":[]}],"tags":["commits"]},"parameters":[{"in":"path","name":"username","required":true,"schema":{"type":"string"}},{"in":"path","name":"sha","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo_slug","required":true,"schema":{"type":"string"}}]},"/repositories/{username}/{repo_slug}/commit/{sha}/comments/{comment_id}":{"get":{"description":"Returns the specified commit comment.","responses":{"default":{"description":"Unexpected error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"security":[{"oauth2":["repository"]},{"basic":[]},{"api_key":[]}],"tags":["commits"]},"parameters":[{"in":"path","name":"username","required":true,"schema":{"type":"string"}},{"in":"path","name":"sha","required":true,"schema":{"type":"string"}},{"in":"path","name":"comment_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo_slug","required":true,"schema":{"type":"string"}}]},"/repositories/{username}/{repo_slug}/commits":{"get":{"description":"These are the repository's commits. They are paginated and returned\nin reverse chronological order, similar to the output of `git log` and\n`hg log`. Like these tools, the DAG can be filtered.\n\n## GET /repositories/{username}/{repo_slug}/commits/\n\nReturns all commits in the repo in topological order (newest commit\nfirst). All branches and tags are included (similar to\n`git log --all` and `hg log`).\n\n## GET /repositories/{username}/{repo_slug}/commits/master\n\nReturns all commits on rev `master` (similar to `git log master`,\n`hg log master`).\n\n## GET /repositories/{username}/{repo_slug}/commits/dev?exclude=master\n\nReturns all commits on ref `dev`, except those that are reachable on\n`master` (similar to `git log dev ^master`).\n\n## GET /repositories/{username}/{repo_slug}/commits/?exclude=master\n\nReturns all commits in the repo that are not on master\n(similar to `git log --all ^master`).\n\n## GET /repositories/{username}/{repo_slug}/commits/?include=foo&include=bar&exclude=fu&exclude=fubar\n\nReturns all commits that are on refs `foo` or `bar`, but not on `fu` or\n`fubar` (similar to `git log foo bar ^fu ^fubar`).\n\nBecause the response could include a very large number of commits, it\nis paginated. Follow the 'next' link in the response to navigate to the\nnext page of commits. As with other paginated resources, do not\nconstruct your own links.\n\nWhen the include and exclude parameters are more than can fit in a\nquery string, clients can use a `x-www-form-urlencoded` POST instead.","responses":{"default":{"description":"Unexpected error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"security":[{"oauth2":["repository"]},{"basic":[]},{"api_key":[]}],"tags":["commits"]},"parameters":[{"in":"path","name":"username","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo_slug","required":true,"schema":{"type":"string"}}],"post":{"description":"Identical to `GET /repositories/{username}/{repo_slug}/commits`,\nexcept that POST allows clients to place the include and exclude\nparameters in the request body to avoid URL length issues.\n\n**Note that this resource does NOT support new commit creation.**","responses":{"default":{"description":"Unexpected error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"security":[{"oauth2":["repository"]},{"basic":[]},{"api_key":[]}],"tags":["commits"]}},"/repositories/{username}/{repo_slug}/commits/{revision}":{"get":{"description":"These are the repository's commits. They are paginated and returned\nin reverse chronological order, similar to the output of `git log` and\n`hg log`. Like these tools, the DAG can be filtered.\n\n## GET /repositories/{username}/{repo_slug}/commits/\n\nReturns all commits in the repo in topological order (newest commit\nfirst). All branches and tags are included (similar to\n`git log --all` and `hg log`).\n\n## GET /repositories/{username}/{repo_slug}/commits/master\n\nReturns all commits on rev `master` (similar to `git log master`,\n`hg log master`).\n\n## GET /repositories/{username}/{repo_slug}/commits/dev?exclude=master\n\nReturns all commits on ref `dev`, except those that are reachable on\n`master` (similar to `git log dev ^master`).\n\n## GET /repositories/{username}/{repo_slug}/commits/?exclude=master\n\nReturns all commits in the repo that are not on master\n(similar to `git log --all ^master`).\n\n## GET /repositories/{username}/{repo_slug}/commits/?include=foo&include=bar&exclude=fu&exclude=fubar\n\nReturns all commits that are on refs `foo` or `bar`, but not on `fu` or\n`fubar` (similar to `git log foo bar ^fu ^fubar`).\n\nBecause the response could include a very large number of commits, it\nis paginated. Follow the 'next' link in the response to navigate to the\nnext page of commits. As with other paginated resources, do not\nconstruct your own links.\n\nWhen the include and exclude parameters are more than can fit in a\nquery string, clients can use a `x-www-form-urlencoded` POST instead.","responses":{"default":{"description":"Unexpected error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"security":[{"oauth2":["repository"]},{"basic":[]},{"api_key":[]}],"tags":["commits"]},"parameters":[{"in":"path","name":"username","required":true,"schema":{"type":"string"}},{"in":"path","name":"revision","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo_slug","required":true,"schema":{"type":"string"}}],"post":{"description":"Identical to `GET /repositories/{username}/{repo_slug}/commits`,\nexcept that POST allows clients to place the include and exclude\nparameters in the request body to avoid URL length issues.\n\n**Note that this resource does NOT support new commit creation.**","responses":{"default":{"description":"Unexpected error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"security":[{"oauth2":["repository"]},{"basic":[]},{"api_key":[]}],"tags":["commits"]}},"/repositories/{username}/{repo_slug}/components":{"get":{"description":"Returns the components that have been defined in the issue tracker.\n\nThis resource is only available on repositories that have the issue\ntracker enabled.","responses":{"200":{"description":"The components that have been defined in the issue tracker.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/paginated_components"}}}},"404":{"description":"If the specified repository does not exist, or if the repository doesn't have the issue tracker enabled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"security":[{"oauth2":["issue"]},{"basic":[]},{"api_key":[]}],"tags":["issue_tracker"]},"parameters":[{"in":"path","name":"username","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo_slug","required":true,"schema":{"type":"string"}}]},"/repositories/{username}/{repo_slug}/components/{component_id}":{"get":{"description":"Returns the specified issue tracker component object.","parameters":[{"description":"The component's id","in":"path","name":"component_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"The specified component object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/component"}}}},"404":{"description":"If the specified repository or component does not exist, or if the repository doesn't have the issue tracker enabled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"security":[{"oauth2":["issue"]},{"basic":[]},{"api_key":[]}],"tags":["issue_tracker"]},"parameters":[{"in":"path","name":"username","required":true,"schema":{"type":"string"}},{"in":"path","name":"component_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo_slug","required":true,"schema":{"type":"string"}}]},"/repositories/{username}/{repo_slug}/default-reviewers":{"get":{"description":"Returns the repository's default reviewers.\n\nThese are the users that are automatically added as reviewers on every\nnew pull request that is created.","responses":{"200":{"description":"The paginated list of default reviewers"}},"security":[{"oauth2":["repository:admin"]},{"basic":[]},{"api_key":[]}],"tags":["pullrequests"]},"parameters":[{"in":"path","name":"username","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo_slug","required":true,"schema":{"type":"string"}}]},"/repositories/{username}/{repo_slug}/default-reviewers/{target_username}":{"delete":{"description":"Removes a default reviewer from the repository.","responses":{"default":{"description":"Unexpected error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"security":[{"oauth2":["repository:admin"]},{"basic":[]},{"api_key":[]}],"tags":["pullrequests"]},"get":{"description":"Returns the specified reviewer.\n\nThis can be used to test whether a user is among the repository's\ndefault reviewers list. A 404 indicates that that specified user is not\na default reviewer.","responses":{"default":{"description":"Unexpected error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"security":[{"oauth2":["repository:admin"]},{"basic":[]},{"api_key":[]}],"tags":["pullrequests"]},"parameters":[{"in":"path","name":"username","required":true,"schema":{"type":"string"}},{"in":"path","name":"target_username","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo_slug","required":true,"schema":{"type":"string"}}],"put":{"description":"Adds the specified user to the repository's list of default\nreviewers.\n\nThis method is idempotent. Adding a user a second time has no effect.","responses":{"default":{"description":"Unexpected error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"security":[{"oauth2":["repository:admin"]},{"basic":[]},{"api_key":[]}],"tags":["pullrequests"]}},"/repositories/{username}/{repo_slug}/diff/{spec}":{"get":{"description":"Produces a raw, git-style diff for either a single commit (diffed\nagainst its first parent), or a revspec of 2 commits (e.g.\n`3a8b42..9ff173` where the first commit represents the source and the\nsecond commit the destination).\n\nIn case of the latter (diffing a revspec), a 3-way diff, or merge diff,\nis computed. This shows the changes introduced by the left branch\n(`3a8b42` in our example) as compared againt the right branch\n(`9ff173`).\n\nThis is equivalent to merging the left branch into the right branch and\nthen computing the diff of the merge commit against its first parent\n(the right branch). This follows the same behavior as pull requests\nthat also show this style of 3-way, or merge diff.\n\nWhile similar to patches, diffs:\n\n* Don't have a commit header (username, commit message, etc)\n* Support the optional `path=foo/bar.py` query param to filter\n the diff to just that one file diff\n\nThe raw diff is returned as-is, in whatever encoding the files in the\nrepository use. It is not decoded into unicode. As such, the\ncontent-type is `text/plain`.","parameters":[{"description":"Generate diffs with <n> lines of context instead of the usual three","in":"query","name":"context","required":false,"schema":{"type":"integer"}},{"description":"Limit the diff to a single file","in":"query","name":"path","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The raw diff"},"555":{"description":"If the diff was too large and timed out.\n\nSince this endpoint does not employ any form of pagination, but\ninstead returns the diff as a single document, it can run into\ntrouble on very large diffs. If Bitbucket times out in cases\nlike these, a 555 status code is returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"security":[{"oauth2":["repository"]},{"basic":[]},{"api_key":[]}],"tags":["commits"]},"parameters":[{"in":"path","name":"username","required":true,"schema":{"type":"string"}},{"in":"path","name":"spec","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo_slug","required":true,"schema":{"type":"string"}}]},"/repositories/{username}/{repo_slug}/downloads":{"get":{"description":"Returns a list of download links associated with the repository.","responses":{"default":{"description":"Unexpected error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"security":[{"oauth2":["repository"]},{"basic":[]},{"api_key":[]}],"tags":["downloads"]},"parameters":[{"in":"path","name":"username","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo_slug","required":true,"schema":{"type":"string"}}],"post":{"description":"Upload new download artifacts.\n\nTo upload files, perform a `multipart/form-data` POST containing one\nor more `files` fields:\n\n $ echo Hello World > hello.txt\n $ curl -s -u evzijst -X POST https://api.bitbucket.org/2.0/repositories/evzijst/git-tests/downloads -F files=@hello.txt\n\nWhen a file is uploaded with the same name as an existing artifact,\nthen the existing file will be replaced.","responses":{"default":{"description":"Unexpected error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"security":[{"oauth2":["repository:write"]},{"basic":[]},{"api_key":[]}],"tags":["downloads"]}},"/repositories/{username}/{repo_slug}/downloads/{filename}":{"delete":{"description":"Deletes the specified download artifact from the repository.","responses":{"default":{"description":"Unexpected error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"security":[{"oauth2":["repository:write"]},{"basic":[]},{"api_key":[]}],"tags":["downloads"]},"get":{"description":"Return a redirect to the contents of a download artifact.\n\nThis endpoint returns the actual file contents and not the artifact's\nmetadata.\n\n $ curl -s -L https://api.bitbucket.org/2.0/repositories/evzijst/git-tests/downloads/hello.txt\n Hello World","responses":{"default":{"description":"Unexpected error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"security":[{"oauth2":["repository"]},{"basic":[]},{"api_key":[]}],"tags":["downloads"]},"parameters":[{"in":"path","name":"username","required":true,"schema":{"type":"string"}},{"in":"path","name":"filename","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo_slug","required":true,"schema":{"type":"string"}}]},"/repositories/{username}/{repo_slug}/forks":{"get":{"description":"Returns a paginated list of all the forks of the specified\nrepository.","responses":{"200":{"description":"All forks.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/paginated_repositories"}}}}},"security":[{"oauth2":["repository"]},{"basic":[]},{"api_key":[]}],"tags":["repositories"]},"parameters":[{"in":"path","name":"username","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo_slug","required":true,"schema":{"type":"string"}}]},"/repositories/{username}/{repo_slug}/hooks":{"get":{"description":"Returns a paginated list of webhooks installed on this repository.","responses":{"200":{"description":"The paginated list of installed webhooks.","content":{"application/json":{"schema":{"$ref