@itentialopensource/adapter-bitbucket
Version:
This adapter integrates with system described as: bitbucket.
1,648 lines • 505 kB
JSON
{
"openapi": "3.0.0",
"info": {
"title": "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.",
"contact": {
"name": "Bitbucket Support",
"url": "https://support.atlassian.com/bitbucket",
"email": "support@bitbucket.org"
},
"version": "2.0"
},
"servers": [
{
"url": "https://api.bitbucket.org/2.0",
"variables": {}
},
{
"url": "https://bitbucket.org/site/oauth2",
"variables": {}
}
],
"paths": {
"/teams/{username}/repositories": {
"get": {
"tags": [
"users",
"teams"
],
"summary": "TeamsRepositoriesByUsername_GET",
"description": "All repositories owned by a user/team. This includes private\nrepositories, but filtered down to the ones that the calling user has\naccess to.",
"operationId": "TeamsRepositoriesByUsername_GET",
"parameters": [
{
"name": "username",
"in": "path",
"description": "",
"required": true,
"style": "simple",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"headers": {}
},
"default": {
"description": "Unexpected error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
}
}
},
"deprecated": false,
"security": [
{
"oauth2": [
"repository"
]
}
]
}
},
"/user": {
"get": {
"tags": [
"users"
],
"summary": "User_GET",
"description": "Returns the currently logged in user.",
"operationId": "User_GET",
"parameters": [],
"responses": {
"200": {
"description": "The current user.",
"headers": {},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/user"
}
}
}
},
"401": {
"description": "When the request wasn't authenticated.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
}
}
},
"deprecated": false,
"security": [
{
"oauth2": [
"account"
]
}
]
}
},
"/user/emails": {
"get": {
"tags": [
"users"
],
"summary": "UserEmails_GET",
"description": "Returns all the authenticated user's email addresses. Both\nconfirmed and unconfirmed.",
"operationId": "UserEmails_GET",
"parameters": [],
"responses": {
"200": {
"description": "",
"headers": {}
},
"default": {
"description": "Unexpected error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
}
}
},
"deprecated": false,
"security": [
{
"oauth2": [
"email"
]
}
]
}
},
"/user/emails/{email}": {
"get": {
"tags": [
"users"
],
"summary": "UserEmailsByEmail_GET",
"description": "Returns details about a specific one of the authenticated user's\nemail addresses.\nDetails describe whether the address has been confirmed by the user and\nwhether it is the user's primary address or not.",
"operationId": "UserEmailsByEmail_GET",
"parameters": [
{
"name": "email",
"in": "path",
"description": "",
"required": true,
"style": "simple",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"headers": {}
},
"default": {
"description": "Unexpected error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
}
}
},
"deprecated": false,
"security": [
{
"oauth2": [
"email"
]
}
]
}
},
"/users/{username}": {
"get": {
"tags": [
"users"
],
"summary": "UsersByUsername_GET",
"description": "Gets the public information associated with a user account.\nIf the user's profile is private, `location`, `website` and\n`created_on` elements are omitted.",
"operationId": "UsersByUsername_GET",
"parameters": [
{
"name": "username",
"in": "path",
"description": "The account's username or UUID.",
"required": true,
"style": "simple",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "The user object",
"headers": {},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/user"
}
}
}
},
"404": {
"description": "If no user exists for the specified name or UUID, or if the specified account is a team account, not a personal account.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
}
}
},
"deprecated": false
}
},
"/users/{username}/followers": {
"get": {
"tags": [
"users"
],
"summary": "UsersFollowersByUsername_GET",
"description": "Returns the list of accounts that are following this team.",
"operationId": "UsersFollowersByUsername_GET",
"parameters": [
{
"name": "username",
"in": "path",
"description": "The account's username",
"required": true,
"style": "simple",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "A paginated list of user objects.",
"headers": {},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/paginated_users"
}
}
}
},
"404": {
"description": "If no account exists for the specified name, or if the specified account is a team account, not a personal account.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
}
}
},
"deprecated": false
}
},
"/users/{username}/following": {
"get": {
"tags": [
"users"
],
"summary": "UsersFollowingByUsername_GET",
"description": "Returns the list of accounts this user is following.",
"operationId": "UsersFollowingByUsername_GET",
"parameters": [
{
"name": "username",
"in": "path",
"description": "The user's username",
"required": true,
"style": "simple",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "A paginated list of user objects.",
"headers": {},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/paginated_users"
}
}
}
},
"404": {
"description": "If no user exists for the specified name, or if the specified account is a team account, not a personal account.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
}
}
},
"deprecated": false,
"security": [
{
"oauth2": [
"account"
]
}
]
}
},
"/users/{username}/hooks": {
"get": {
"tags": [
"users",
"webhooks"
],
"summary": "UsersHooksByUsername_GET",
"description": "Returns a paginated list of webhooks installed on this user account.",
"operationId": "UsersHooksByUsername_GET",
"parameters": [
{
"name": "username",
"in": "path",
"description": "",
"required": true,
"style": "simple",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "The paginated list of installed webhooks.",
"headers": {},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/paginated_webhook_subscriptions"
}
}
}
},
"403": {
"description": "If the authenticated user is accessing an account other than their own.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
}
},
"404": {
"description": "If the specified account does not exist.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
}
}
},
"deprecated": false,
"security": [
{
"oauth2": [
"webhook"
]
}
]
},
"post": {
"tags": [
"users",
"webhooks"
],
"summary": "UsersHooksByUsername_POST",
"description": "Creates a new webhook on the specified user account.\nAccount-level webhooks are fired for events from all repositories\nbelonging to that account.\nNote that one can only register webhooks on one's own account, not that\nof others.",
"operationId": "UsersHooksByUsername_POST",
"parameters": [
{
"name": "username",
"in": "path",
"description": "",
"required": true,
"style": "simple",
"schema": {
"type": "string"
}
}
],
"responses": {
"201": {
"description": "The newly installed webhook.",
"headers": {
"Location": {
"description": "The URL of new newly created webhook.",
"content": {
"text/plain": {
"schema": {
"type": "string"
}
}
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/webhook_subscription"
}
}
}
},
"403": {
"description": "If the authenticated user is accessing an account other than their own.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
}
},
"404": {
"description": "If the specified account does not exist.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
}
}
},
"deprecated": false,
"security": [
{
"oauth2": [
"webhook"
]
}
]
}
},
"/users/{username}/hooks/{uid}": {
"delete": {
"tags": [
"users",
"webhooks"
],
"summary": "UsersHooksByUsernameAndUid_DELETE",
"description": "Deletes the specified webhook subscription from the given user\naccount.",
"operationId": "UsersHooksByUsernameAndUid_DELETE",
"parameters": [
{
"name": "uid",
"in": "path",
"description": "The installed webhook's id",
"required": true,
"style": "simple",
"schema": {
"type": "string"
}
},
{
"name": "username",
"in": "path",
"description": "",
"required": true,
"style": "simple",
"schema": {
"type": "string"
}
}
],
"responses": {
"204": {
"description": "When the webhook was deleted successfully",
"headers": {}
},
"403": {
"description": "If the authenticated user does not have permission to delete the webhook.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
}
},
"404": {
"description": "If the webhook or user does not exist.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
}
}
},
"deprecated": false,
"security": [
{
"oauth2": [
"webhook"
]
}
]
},
"get": {
"tags": [
"users",
"webhooks"
],
"summary": "UsersHooksByUsernameAndUid_GET",
"description": "Returns the webhook with the specified id installed on the given\nuser account.",
"operationId": "UsersHooksByUsernameAndUid_GET",
"parameters": [
{
"name": "uid",
"in": "path",
"description": "The installed webhook's id.",
"required": true,
"style": "simple",
"schema": {
"type": "string"
}
},
{
"name": "username",
"in": "path",
"description": "",
"required": true,
"style": "simple",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "The webhook subscription object.",
"headers": {},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/webhook_subscription"
}
}
}
},
"404": {
"description": "If the webhook or user does not exist.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
}
}
},
"deprecated": false,
"security": [
{
"oauth2": [
"webhook"
]
}
]
},
"put": {
"tags": [
"users",
"webhooks"
],
"summary": "UsersHooksByUsernameAndUid_PUT",
"description": "Updates the specified webhook subscription.\nThe following properties can be mutated:\n* `description`\n* `url`\n* `active`\n* `events`",
"operationId": "UsersHooksByUsernameAndUid_PUT",
"parameters": [
{
"name": "uid",
"in": "path",
"description": "The installed webhook's id",
"required": true,
"style": "simple",
"schema": {
"type": "string"
}
},
{
"name": "username",
"in": "path",
"description": "",
"required": true,
"style": "simple",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "The webhook subscription object.",
"headers": {},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/webhook_subscription"
}
}
}
},
"403": {
"description": "If the authenticated user does not have permission to update the webhook.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
}
},
"404": {
"description": "If the webhook or user does not exist.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
}
}
},
"deprecated": false,
"security": [
{
"oauth2": [
"webhook"
]
}
]
}
},
"/users/{username}/repositories": {
"get": {
"tags": [
"users",
"teams"
],
"summary": "UsersRepositoriesByUsername_GET",
"description": "All repositories owned by a user/team. This includes private\nrepositories, but filtered down to the ones that the calling user has\naccess to.",
"operationId": "UsersRepositoriesByUsername_GET",
"parameters": [
{
"name": "username",
"in": "path",
"description": "",
"required": true,
"style": "simple",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"headers": {}
},
"default": {
"description": "Unexpected error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
}
}
},
"deprecated": false,
"security": [
{
"oauth2": [
"repository"
]
}
]
}
},
"/teams": {
"get": {
"tags": [
"teams"
],
"summary": "Teams_GET",
"description": "Returns all the teams that the authenticated user is associated\nwith.",
"operationId": "Teams_GET",
"parameters": [
{
"name": "role",
"in": "query",
"description": "Filters the teams based on the authenticated user's role on each team.\n* **member**: returns a list of all the teams which the caller is a member of\n at least one team group or repository owned by the team\n* **contributor**: returns a list of teams which the caller has write access\n to at least one repository owned by the team\n* **admin**: returns a list teams which the caller has team administrator access",
"style": "form",
"explode": true,
"schema": {
"$ref": "#/components/schemas/role4"
}
}
],
"responses": {
"200": {
"description": "A paginated list of teams.",
"headers": {},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/paginated_teams"
}
}
}
},
"401": {
"description": "When the request wasn't authenticated.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
}
}
},
"deprecated": false,
"security": [
{
"oauth2": [
"team"
]
}
]
}
},
"/teams/{username}": {
"get": {
"tags": [
"teams"
],
"summary": "TeamsByUsername_GET",
"description": "Gets the public information associated with a team.\nIf the team's profile is private, `location`, `website` and\n`created_on` elements are omitted.",
"operationId": "TeamsByUsername_GET",
"parameters": [
{
"name": "username",
"in": "path",
"description": "The team's username or UUID.",
"required": true,
"style": "simple",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "The team object",
"headers": {},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/account"
}
}
}
},
"404": {
"description": "If no team exists for the specified name or UUID, or if the specified account is a personal account, not a team account.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
}
}
},
"deprecated": false
}
},
"/teams/{username}/followers": {
"get": {
"tags": [
"teams"
],
"summary": "TeamsFollowersByUsername_GET",
"description": "Returns the list of accounts that are following this team.",
"operationId": "TeamsFollowersByUsername_GET",
"parameters": [
{
"name": "username",
"in": "path",
"description": "The team's username",
"required": true,
"style": "simple",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "A paginated list of user objects.",
"headers": {},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/paginated_users"
}
}
}
},
"404": {
"description": "If no team exists for the specified name, or if the specified account is a personal account, not a team account.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
}
}
},
"deprecated": false
}
},
"/teams/{username}/following": {
"get": {
"tags": [
"teams"
],
"summary": "TeamsFollowingByUsername_GET",
"description": "Returns the list of accounts this team is following.",
"operationId": "TeamsFollowingByUsername_GET",
"parameters": [
{
"name": "username",
"in": "path",
"description": "The team's username",
"required": true,
"style": "simple",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "A paginated list of user objects.",
"headers": {},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/paginated_users"
}
}
}
},
"404": {
"description": "If no team exists for the specified name, or if the specified account is a personal account, not a team account.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
}
}
},
"deprecated": false,
"security": [
{
"oauth2": [
"account"
]
}
]
}
},
"/teams/{username}/hooks": {
"get": {
"tags": [
"teams",
"webhooks"
],
"summary": "TeamsHooksByUsername_GET",
"description": "Returns a paginated list of webhooks installed on this team.",
"operationId": "TeamsHooksByUsername_GET",
"parameters": [
{
"name": "username",
"in": "path",
"description": "",
"required": true,
"style": "simple",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "The paginated list of installed webhooks.",
"headers": {},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/paginated_webhook_subscriptions"
}
}
}
},
"403": {
"description": "If the authenticated user is not an admin on the specified team.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
}
},
"404": {
"description": "If the specified team does not exist.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
}
}
},
"deprecated": false,
"security": [
{
"oauth2": [
"webhook"
]
}
]
},
"post": {
"tags": [
"teams",
"webhooks"
],
"summary": "TeamsHooksByUsername_POST",
"description": "Creates a new webhook on the specified team.\nTeam webhooks are fired for events from all repositories belonging to\nthat team account.\nNote that only admins can install webhooks on teams.",
"operationId": "TeamsHooksByUsername_POST",
"parameters": [
{
"name": "username",
"in": "path",
"description": "",
"required": true,
"style": "simple",
"schema": {
"type": "string"
}
}
],
"responses": {
"201": {
"description": "The newly installed webhook.",
"headers": {
"Location": {
"description": "The URL of new newly created webhook.",
"content": {
"text/plain": {
"schema": {
"type": "string"
}
}
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/webhook_subscription"
}
}
}
},
"403": {
"description": "If the authenticated user is not an admin on the specified team.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
}
},
"404": {
"description": "If the specified team does not exist.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
}
}
},
"deprecated": false,
"security": [
{
"oauth2": [
"webhook"
]
}
]
}
},
"/teams/{username}/hooks/{uid}": {
"delete": {
"tags": [
"teams",
"webhooks"
],
"summary": "TeamsHooksByUsernameAndUid_DELETE",
"description": "Deletes the specified webhook subscription from the given team\naccount.",
"operationId": "TeamsHooksByUsernameAndUid_DELETE",
"parameters": [
{
"name": "uid",
"in": "path",
"description": "The installed webhook's id",
"required": true,
"style": "simple",
"schema": {
"type": "string"
}
},
{
"name": "username",
"in": "path",
"description": "",
"required": true,
"style": "simple",
"schema": {
"type": "string"
}
}
],
"responses": {
"204": {
"description": "When the webhook was deleted successfully",
"headers": {}
},
"403": {
"description": "If the authenticated user does not have permission to delete the webhook.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
}
},
"404": {
"description": "If the webhook or team does not exist.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
}
}
},
"deprecated": false,
"security": [
{
"oauth2": [
"webhook"
]
}
]
},
"get": {
"tags": [
"teams",
"webhooks"
],
"summary": "TeamsHooksByUsernameAndUid_GET",
"description": "Returns the webhook with the specified id installed on the given\nteam account.",
"operationId": "TeamsHooksByUsernameAndUid_GET",
"parameters": [
{
"name": "uid",
"in": "path",
"description": "The installed webhook's id.",
"required": true,
"style": "simple",
"schema": {
"type": "string"
}
},
{
"name": "username",
"in": "path",
"description": "",
"required": true,
"style": "simple",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "The webhook subscription object.",
"headers": {},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/webhook_subscription"
}
}
}
},
"404": {
"description": "If the webhook or team does not exist.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
}
}
},
"deprecated": false,
"security": [
{
"oauth2": [
"webhook"
]
}
]
},
"put": {
"tags": [
"teams",
"webhooks"
],
"summary": "TeamsHooksByUsernameAndUid_PUT",
"description": "Updates the specified webhook subscription.\nThe following properties can be mutated:\n* `description`\n* `url`\n* `active`\n* `events`",
"operationId": "TeamsHooksByUsernameAndUid_PUT",
"parameters": [
{
"name": "uid",
"in": "path",
"description": "The installed webhook's id",
"required": true,
"style": "simple",
"schema": {
"type": "string"
}
},
{
"name": "username",
"in": "path",
"description": "",
"required": true,
"style": "simple",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "The webhook subscription object.",
"headers": {},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/webhook_subscription"
}
}
}
},
"403": {
"description": "If the authenticated user does not have permission to update the webhook.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
}
},
"404": {
"description": "If the webhook or team does not exist.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
}
}
},
"deprecated": false,
"security": [
{
"oauth2": [
"webhook"
]
}
]
}
},
"/teams/{username}/members": {
"get": {
"tags": [
"teams"
],
"summary": "TeamsMembersByUsername_GET",
"description": "All members of a team.\nReturns all members of the specified team. Any member of any of the\nteam's groups is considered a member of the team. This includes users\nin groups that may not actually have access to any of the team's\nrepositories.\nNote that members using the \"private profile\" feature are not included.",
"operationId": "TeamsMembersByUsername_GET",
"parameters": [
{
"name": "username",
"in": "path",
"description": "",
"required": true,
"style": "simple",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "All members",
"headers": {},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/user"
}
}
}
},
"404": {
"description": "When the team does not exist, or multiple teams with the same name exist that differ only in casing and the URL did not match the exact casing of a particular one.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
}
}
},
"deprecated": false,
"security": [
{
"oauth2": [
"account"
]
}
]
}
},
"/repositories": {
"get": {
"tags": [
"repositories"
],
"summary": "Repositories_GET",
"description": "Returns a paginated list of all public repositories.\nThis endpoint also supports filtering and sorting of the results. See\n[filtering and sorting](../meta/filtering) for more details.",
"operationId": "Repositories_GET",
"parameters": [
{
"name": "after",
"in": "query",
"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`",
"style": "form",
"explode": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "All public repositories.",
"headers": {},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/paginated_repositories"
}
}
}
}
},
"deprecated": false,
"security": [
{
"oauth2": [
"repository"
]
}
]
}
},
"/repositories/{username}": {
"get": {
"tags": [
"repositories"
],
"summary": "RepositoriesByUsername_GET",
"description": "Returns a paginated list of all repositories owned by the specified\naccount or UUID.\nThe result can be narrowed down based on the authenticated user's role.\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).\nThis endpoint also supports filtering and sorting of the results. See\n[filtering and sorting](../../meta/filtering) for more details.",
"operationId": "RepositoriesByUsername_GET",
"parameters": [
{
"name": "username",
"in": "path",
"description": "This can either be the username or the UUID of the user,\nsurrounded by curly-braces, for example: `{user UUID}`.",
"required": true,
"style": "simple",
"schema": {
"type": "string"
}
},
{
"name": "role",
"in": "query",
"description": "Filters the result based on the authenticated user's role on each repository.\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",
"style": "form",
"explode": true,
"schema": {
"$ref": "#/components/schemas/role1"
}
}
],
"responses": {
"200": {
"description": "The repositories owned by the specified account.",
"headers": {},
"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"
}
}
}
}
},
"deprecated": false,
"security": [
{
"oauth2": [
"repository"
]
}
]
}
},
"/repositories/{username}/{repo_slug}": {
"delete": {
"tags": [
"repositories"
],
"summary": "RepositoriesByUsernameAndRepoSlug_DELETE",
"description": "Deletes the repository. This is an irreversible operation.\nThis does not affect its forks.",
"operationId": "RepositoriesByUsernameAndRepoSlug_DELETE",
"parameters": [
{
"name": "username",
"in": "path",
"description": "This can either be the username or the UUID of the user,\nsurrounded by curly-braces, for example: `{user UUID}`.",
"required": true,
"style": "simple",
"schema": {
"type": "string"
}
},
{
"name": "repo_slug",
"in": "path",
"description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.",
"required": true,
"style": "simple",
"schema": {
"type": "string"
}
}
],
"responses": {
"204": {
"description": "Indicates successful deletion.",
"headers": {}
},
"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"
}
}
}
}
},
"deprecated": false,
"security": [
{
"oauth2": [
"repository:delete"
]
}
]
},
"get": {
"tags": [
"repositories"
],
"summary": "RepositoriesByUsernameAndRepoSlug_GET",
"description": "Returns the object describing this repository.",
"operationId": "RepositoriesByUsernameAndRepoSlug_GET",
"parameters": [
{
"name": "username",
"in": "path",
"description": "This can either be the username or the UUID of the user,\nsurrounded by curly-braces, for example: `{user UUID}`.",
"required": true,
"style": "simple",
"schema": {
"type": "string"
}
},
{
"name": "repo_slug",
"in": "path",
"description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.",
"required": true,
"style": "simple",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "The repository object.",
"headers": {},
"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"
}
}
}
}
},
"deprecated": false,
"security": [
{
"oauth2": [
"repository"
]
}
]
},
"post": {
"tags": [
"repositories"
],
"summary": "RepositoriesByUsernameAndRepoSlug_POST",
"description": "Creates a new repository.\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$ 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```\nor\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```\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.\nNote: In the examples above, the username `teamsinspace`,\nand/or the repository name `hablanding` can be replaced by UUIDs.",
"operationId": "RepositoriesByUsernameAndRepoSlug_POST",
"parameters": [
{
"name": "username",
"in": "path",
"description": "This can either be the username or the UUID of the user,\nsurrounded by curly-braces, for example: `{user UUID}`.",
"required": true,
"style": "simple",
"schema": {
"type": "string"
}
},
{
"name": "repo_slug",
"in": "path",
"description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.",
"required": true,
"style": "simple",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"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.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/repository"
}
}
},
"required": false
},
"responses": {
"200": {
"description": "The newly created repository.",
"headers": {},
"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"
}
}
}
}
},
"deprecated": false,
"security": [
{
"oauth2": [
"repository:admin"
]
}
]
},
"put": {
"tags": [
"repositories"
],
"summary": "RepositoriesByUsernameAndRepoSlug_PUT",
"description": "Since this endpoint can be used to both update and to create a\nrepository, the request body depends on the intent.\n### Creation\nSee the POST documentation for the repository endpoint for an example\nof the request body.\n### Update\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.",
"operationId": "RepositoriesByUsernameAndRepoSlug_PUT",
"parameters": [
{
"name": "username",
"in": "path",
"description": "This can either be the username or the UUID of the user,\ns