{ "info": { "_postman_id": "9727dd33-192c-46f0-b1fc-4d06a80ebd01", "name": "Bitbucket Server", "description": "This is the reference document for the Atlassian Bitbucket REST API. The REST API is for developers who want to: \n\n - integrate Bitbucket with other applications;\n\n - create scripts that interact with Bitbucket; or\n\n - develop plugins that enhance the Bitbucket UI, using REST to interact with the backend. \n\n You can read more about developing Bitbucket plugins in the [Bitbucket Developer Documentation](https://developer.atlassian.com/bitbucket/server/docs/latest/).", "schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json" }, "item": [ { "name": "Authentication", "item": [ { "name": "Get project HTTP tokens", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}access-tokens/latest/projects/:projectKey", "query": [ { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Get all access tokens associated with the given project." }, "response": [] }, { "name": "Create project HTTP token", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}access-tokens/latest/projects/:projectKey", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false } ] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Create an access token for the project according to the given request.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Get repository HTTP tokens", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}access-tokens/latest/projects/:projectKey/repos/:repositorySlug", "query": [ { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Get all access tokens associated with the given repository." }, "response": [] }, { "name": "Create repository HTTP token", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}access-tokens/latest/projects/:projectKey/repos/:repositorySlug", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Create an access token for the repository according to the given request.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Get HTTP token by ID", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}access-tokens/latest/projects/:projectKey/repos/:repositorySlug/:tokenId", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "tokenId", "value": "{{tokenId}}", "description": "The token id.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Get the access token identified by the given ID." }, "response": [] }, { "name": "Update HTTP token", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}access-tokens/latest/projects/:projectKey/repos/:repositorySlug/:tokenId", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "tokenId", "value": "{{tokenId}}", "description": "The token id.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Modify an access token according to the given request. Any fields not specified will not be altered.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Delete a HTTP token", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}access-tokens/latest/projects/:projectKey/repos/:repositorySlug/:tokenId", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "tokenId", "value": "{{tokenId}}", "description": "The token id.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Delete the access token identified by the given ID." }, "response": [] }, { "name": "Get HTTP token by ID", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}access-tokens/latest/projects/:projectKey/:tokenId", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "tokenId", "value": "{{tokenId}}", "description": "The token id.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Get the access token identified by the given ID." }, "response": [] }, { "name": "Update HTTP token", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}access-tokens/latest/projects/:projectKey/:tokenId", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "tokenId", "value": "{{tokenId}}", "description": "The token id.", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Modify an access token according to the given request. Any fields not specified will not be altered.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Delete a HTTP token", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}access-tokens/latest/projects/:projectKey/:tokenId", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "tokenId", "value": "{{tokenId}}", "description": "The token id.", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Delete the access token identified by the given ID." }, "response": [] }, { "name": "Get personal HTTP tokens", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}access-tokens/latest/users/:userSlug", "query": [ { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "userSlug", "value": "{{userSlug}}", "description": "The user slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Get all access tokens associated with the given user." }, "response": [] }, { "name": "Create personal HTTP token", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}access-tokens/latest/users/:userSlug", "query": [], "variable": [ { "key": "userSlug", "value": "{{userSlug}}", "description": "The user slug.", "disabled": false } ] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Create an access token for the user according to the given request.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Get HTTP token by ID", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}access-tokens/latest/users/:userSlug/:tokenId", "query": [], "variable": [ { "key": "tokenId", "value": "{{tokenId}}", "description": "The token id.", "disabled": false }, { "key": "userSlug", "value": "{{userSlug}}", "description": "The user slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Get the access token identified by the given ID." }, "response": [] }, { "name": "Update HTTP token", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}access-tokens/latest/users/:userSlug/:tokenId", "query": [], "variable": [ { "key": "tokenId", "value": "{{tokenId}}", "description": "The token id.", "disabled": false }, { "key": "userSlug", "value": "{{userSlug}}", "description": "The user slug.", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Modify an access token according to the given request. Any fields not specified will not be altered.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Delete a HTTP token", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}access-tokens/latest/users/:userSlug/:tokenId", "query": [], "variable": [ { "key": "tokenId", "value": "{{tokenId}}", "description": "The token id.", "disabled": false }, { "key": "userSlug", "value": "{{userSlug}}", "description": "The user slug.", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Delete the access token identified by the given ID." }, "response": [] }, { "name": "Get SSH keys for user", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}ssh/latest/keys", "query": [ { "key": "userName", "value": "{{userName}}", "disabled": true, "description": "the username of the user to retrieve the keys for. If no username is specified, the SSH keys will be retrieved for the current authenticated user." }, { "key": "user", "value": "{{user}}", "disabled": true }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve a page of SSH keys." }, "response": [] }, { "name": "Add SSH key for user", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}ssh/latest/keys", "query": [ { "key": "user", "value": "{{user}}", "disabled": true, "description": "the username of the user to add the SSH key for. If no username is specified, the SSH key will be added for the current authenticated user." } ], "variable": [] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" } ], "description": "Add a new SSH key to a supplied user.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Delete all user SSH key", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}ssh/latest/keys", "query": [ { "key": "userName", "value": "{{userName}}", "disabled": true, "description": "the username of the user to delete the keys for. If no username is specified, the SSH keys will be deleted for the current authenticated user." }, { "key": "user", "value": "{{user}}", "disabled": true } ], "variable": [] }, "method": "DELETE", "header": [], "description": "Delete all SSH keys for a supplied user." }, "response": [] }, { "name": "Get SSH key for user by keyId", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}ssh/latest/keys/:keyId", "query": [], "variable": [ { "key": "keyId", "value": "{{keyId}}", "description": "the ID of the key to retrieve.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve an SSH key by keyId" }, "response": [] }, { "name": "Remove SSH key", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}ssh/latest/keys/:keyId", "query": [], "variable": [ { "key": "keyId", "value": "{{keyId}}", "description": "the id of the key to delete.", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Delete an SSH key." }, "response": [] }, { "name": "Get SSH settings", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}ssh/latest/settings", "query": [], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Gets the SSH settings from the upstream." }, "response": [] }, { "name": "Update project SSH key permission", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}keys/latest/projects/:projectKey/ssh/:keyId/permission/:permission", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false }, { "key": "keyId", "value": "{{keyId}}", "description": "The newly created access key", "disabled": false }, { "key": "permission", "value": "{{permission}}", "description": "The new permission to be granted to the SSH key", "disabled": false } ] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Updates the permission granted to the specified SSH key to the project identified in the URL." }, "response": [] }, { "name": "Update repository SSH key permission", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}keys/latest/projects/:projectKey/repos/:repositorySlug/ssh/:keyId/permission/:permission", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false }, { "key": "keyId", "value": "{{keyId}}", "description": "The newly created access key", "disabled": false }, { "key": "permission", "value": "{{permission}}", "description": "The new permission to be granted to the SSH key", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug", "disabled": false } ] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Updates the permission granted to the specified SSH key to the repository identified in the URL." }, "response": [] }, { "name": "Get repository SSH key", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}keys/latest/projects/:projectKey/repos/:repositorySlug/ssh/:keyId", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false }, { "key": "keyId", "value": "{{keyId}}", "description": "The key id", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieves the access key for the SSH key with id keyId on the repository identified in the URL." }, "response": [] }, { "name": "Revoke repository SSH key", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}keys/latest/projects/:projectKey/repos/:repositorySlug/ssh/:keyId", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false }, { "key": "keyId", "value": "{{keyId}}", "description": "The key id", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Remove an existing access key for the repository identified in the URL. If the same SSH key is used as an access key for multiple projects or repositories, only the access to the repository identified in the URL will be revoked." }, "response": [] }, { "name": "Get project SSH key", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}keys/latest/projects/:projectKey/ssh/:keyId", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false }, { "key": "keyId", "value": "{{keyId}}", "description": "The key id", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieves the access key for the SSH key with id keyId on the project identified in the URL." }, "response": [] }, { "name": "Revoke project SSH key", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}keys/latest/projects/:projectKey/ssh/:keyId", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false }, { "key": "keyId", "value": "{{keyId}}", "description": "The key id", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Remove an existing access key for the project identified in the URL. If the same SSH key is used as an access key for multiple projects or repositories, only the access to the project identified in the URL will be revoked." }, "response": [] }, { "name": "Get repository SSH key", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}keys/latest/ssh/:keyId/repos", "query": [ { "key": "withRestrictions", "value": "{{withRestrictions}}", "disabled": true, "description": "Include the readOnly field. The `readOnly` field is contextual for the user making the request. `readOnly` returns true if there is a restriction and the user does not have`PROJECT_ADMIN` access for the repository the key is associated with." } ], "variable": [ { "key": "keyId", "value": "{{keyId}}", "description": "The key id", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieves all repository-related access keys for the SSH key with id keyId. If the current user is not an admin of any of the projects the key provides access to, none are returned." }, "response": [] }, { "name": "Get SSH key", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}keys/latest/projects/:projectKey/ssh", "query": [ { "key": "filter", "value": "{{filter}}", "disabled": true, "description": "If specified only SSH access keys with a label prefixed with the supplied string will be returned." }, { "key": "permission", "value": "{{permission}}", "disabled": true, "description": "If specified only SSH access keys with at least the supplied permission will be returned Default is PROJECT_READ." }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieves the access keys for the project identified in the URL." }, "response": [] }, { "name": "Add project SSH key", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}keys/latest/projects/:projectKey/ssh", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" } ], "description": "Register a new SSH key and grants access to the project identified in the URL.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Get repository SSH keys", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}keys/latest/projects/:projectKey/repos/:repositorySlug/ssh", "query": [ { "key": "filter", "value": "{{filter}}", "disabled": true, "description": "If specified only SSH access keys with a label prefixed with the supplied string will be returned" }, { "key": "effective", "value": "{{effective}}", "disabled": true, "description": "Controls whether SSH access keys configured at the project level should be included in the results or not. When set to true all keys that have access to the repository (including project level keys) are included in the results. When set to false, only access keys configured for the specified repository are considered. Default is false." }, { "key": "minimumPermission", "value": "{{minimumPermission}}", "disabled": true, "description": "If specified only SSH access keys with at least the supplied permission will be returned. Default is Permission.REPO_READ." }, { "key": "permission", "value": "{{permission}}", "disabled": true }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieves the access keys for the repository identified in the URL." }, "response": [] }, { "name": "Add repository SSH key", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}keys/latest/projects/:projectKey/repos/:repositorySlug/ssh", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" } ], "description": "Register a new SSH key and grants access to the repository identified in the URL.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Revoke project SSH key", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}keys/latest/ssh/:keyId", "query": [], "variable": [ { "key": "keyId", "value": "{{keyId}}", "description": "The identifier of the SSH key", "disabled": false } ] }, "method": "DELETE", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" } ], "description": "Remove an existing access key for the projects and repositories in the submitted entity. If the same SSH key is used as an access key for multiple projects or repositories not supplied, only the access to the projects or repositories identified will be revoked.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Get project SSH keys", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}keys/latest/ssh/:keyId/projects", "query": [], "variable": [ { "key": "keyId", "value": "{{keyId}}", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieves all project-related access keys for the SSH key with id keyId. If the current user is not an admin any of the projects the key provides access to, none are returned." }, "response": [] } ] }, { "name": "Builds and Deployments", "item": [ { "name": "Create a required builds merge check", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}required-builds/latest/projects/:projectKey/repos/:repositorySlug/condition", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project that the repository belongs to", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository being used", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "*/*" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Create a required build merge check for the given repository.\n\nThe authenticated user must have **REPO_ADMIN** permission for the target repository to register a required build merge check.\n\nThe contents of the required build merge check request are:\n\nThese fields are **required**:\n\n- **buildParentKeys**: A non-empty list of build parent keys that require green builds for this merge check to pass\n- **refMatcher.id**: The value to match refs against in the target branch\n- **refMatcher.type.id**: The type of ref matcher, one of: \"ANY_REF\", \"BRANCH\", \"PATTERN\", \"MODEL_CATEGORY\" or \"MODEL_BRANCH\"\n\n\nThese fields are optional:\n\n- **exemptRefMatcher.id** The value to exempt refs in the source branch from this check\n- **exemptRefMatcher.type.id**: The type of exempt ref matcher, one of: \"ANY_REF\", \"BRANCH\", \"PATTERN\", \"MODEL_CATEGORY\" or \"MODEL_BRANCH\"\n\n\n", "body": { "mode": "raw" } }, "response": [] }, { "name": "Update a required builds merge check", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}required-builds/latest/projects/:projectKey/repos/:repositorySlug/condition/:id", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project that the repository belongs to", "disabled": false }, { "key": "id", "value": "{{id}}", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository being used", "disabled": false } ] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "*/*" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Update the required builds merge check for the given ID.\n\nThe authenticated user must have **REPO_ADMIN** permission for the target repository to update a required build merge check.\n\nThe contents of the required build merge check request are:\n\nThese fields are **required**:\n\n- **buildParentKeys**: A non-empty list of build parent keys that require green builds for this merge check to pass\n- **refMatcher.id**: The value to match refs against in the target branch\n- **refMatcher.type.id**: The type of ref matcher, one of: \"ANY_REF\", \"BRANCH\", \"PATTERN\", \"MODEL_CATEGORY\" or \"MODEL_BRANCH\"\n\n\nThese fields are optional:\n\n- **exemptRefMatcher.id** The value to exempt refs in the source branch from this check\n- **exemptRefMatcher.type.id**: The type of exempt ref matcher, one of: \"ANY_REF\", \"BRANCH\", \"PATTERN\", \"MODEL_CATEGORY\" or \"MODEL_BRANCH\"\n\n\n", "body": { "mode": "raw" } }, "response": [] }, { "name": "Delete a required builds merge check", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}required-builds/latest/projects/:projectKey/repos/:repositorySlug/condition/:id", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project that the repository belongs to", "disabled": false }, { "key": "id", "value": "{{id}}", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository being used", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Deletes a required build existing merge check, given it's ID.\n\nThe authenticated user must have **REPO_ADMIN** permission for the target repository to delete a required build merge check." }, "response": [] }, { "name": "Get required builds merge checks", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}required-builds/latest/projects/:projectKey/repos/:repositorySlug/conditions", "query": [ { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project that the repository belongs to", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository being used", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Returns a page of required build merge checks that have been configured for this repository.\n\nThe authenticated user must have **REPO_READ** permission for the target repository to request a page of required build merge checks." }, "response": [] }, { "name": "Get build status statistics for commit", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}build-status/latest/commits/stats/:commitId", "query": [ { "key": "includeUnique", "value": "{{includeUnique}}", "disabled": true, "description": "include a unique build result if there is either only one failed build, only one in-progress build or only one successful build" } ], "variable": [ { "key": "commitId", "value": "{{commitId}}", "description": "full SHA1 of the commit", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Gets statistics regarding the builds associated with a commit" }, "response": [] }, { "name": "Get build status for multiple commits", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}build-status/latest/commits/stats", "query": [], "variable": [] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Produces a list of the build statistics for multiple commits. Commits without any builds associated with them will not be returned. For example if the commit e00cf62997a027bbf785614a93e2e55bb331d268 does not have any build statuses associated with it, it will not be present in the response.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Get Code Insights annotations for a commit", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}insights/latest/projects/:projectKey/repos/:repositorySlug/commits/:commitId/annotations", "query": [ { "key": "severity", "value": "{{severity}}", "disabled": true, "description": "Return only annotations that have one of the given severities. Can be specified more than once to filter by more than one severity. Valid severities are LOW, MEDIUM and HIGH." }, { "key": "path", "value": "{{path}}", "disabled": true, "description": "Return only annotations that appear on one of the provided paths. Can be specified more than once to filter by more than one path." }, { "key": "externalId", "value": "{{externalId}}", "disabled": true, "description": "Return only annotations that have one of the provided external IDs. Can be specified more than once to filter by more than one external ID." }, { "key": "type", "value": "{{type}}", "disabled": true, "description": "Return only annotations that have one of the given types. Can be specified more than once to filter by multiple types. Valid types are BUG, CODE_SMELL, and VULNERABILITY." }, { "key": "key", "value": "{{key}}", "disabled": true, "description": "Return only annotations that belong to one of the provided report keys. Can be specified more than once to filter by more than one report" } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "commitId", "value": "{{commitId}}", "description": "The commit ID on which to record the annotation. This must be a full 40 character commit hash.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Get annotations for the given commit ID, filtered by any query parameters given." }, "response": [] }, { "name": "Get all Code Insights reports for a commit", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}insights/latest/projects/:projectKey/repos/:repositorySlug/commits/:commitId/reports", "query": [ { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "commitId", "value": "{{commitId}}", "description": "The commit ID on which to record the annotation. This must be a full 40 character commit hash.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve all reports for the given commit." }, "response": [] }, { "name": "Get a Code Insights report", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}insights/latest/projects/:projectKey/repos/:repositorySlug/commits/:commitId/reports/:key", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "commitId", "value": "{{commitId}}", "description": "The commit ID on which to record the annotation. This must be a full 40 character commit hash.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false }, { "key": "key", "value": "{{key}}", "description": "The report key.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve the specified report." }, "response": [] }, { "name": "Create a Code Insights report", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}insights/latest/projects/:projectKey/repos/:repositorySlug/commits/:commitId/reports/:key", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "commitId", "value": "{{commitId}}", "description": "The commit ID on which to record the annotation. This must be a full 40 character commit hash.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false }, { "key": "key", "value": "{{key}}", "description": "A unique string representing the report as chosen by the reporter. This should be unique enough to not clash with other report's keys. To do this, we recommend namespacing the key using reverse DNS", "disabled": false } ] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Create a new insight report, or replace the existing one if a report already exists for the given repository, commit, and report key. A request to replace an existing report will be rejected if the authenticated user was not the creator of the specified report.\n\nThe report key should be a unique string chosen by the reporter and should be unique enough not to potentially clash with report keys from other reporters. We recommend using reverse DNS namespacing or a similar standard to ensure that collision is avoided.Report parameters Parameter Description Required? Restrictions Type title A short string representing the name of the report Yes Max length: 450 characters (but we recommend that it is shorter so that the display is nicer) String details A string to describe the purpose of the report. This string may contain escaped newlines and if it does it will display the content accordingly. No Max length: 2000 characters String result Indicates whether the report is in a passed or failed state No One of: PASS, FAIL String data An array of data fields (described below) to display information on the report No Maximum 6 data fields Array reporter A string to describe the tool or company who created the report No Max length: 450 characters String link A URL linking to the results of the report in an external tool. No Must be a valid http or https URL String logoUrl A URL to the report logo. If none is provided, the default insights logo will be used. No Must be a valid http or https URL String Data parametersThe data field on the report is an array with at most 6 data fields (JSON maps) containing information that is to be displayed on the report (see the request example). Parameter Description Type title A string describing what this data field represents String type The type of data contained in the value field. If not provided, then the value will be detected as a boolean, number or string. One of: BOOLEAN, DATE, DURATION, LINK, NUMBER, PERCENTAGE, TEXT String value A value based on the type provided. Either a raw value (string, number or boolean) or a map. See below. Type Field Value Field Type Value Field Display None/Omitted Number, String or Boolean (not an array or object) Plain text BOOLEAN Boolean The value will be read as a JSON boolean and displayed as 'Yes' or 'No'. DATE Number The value will be read as a JSON number in the form of a Unix timestamp (milliseconds) and will be displayed as a relative date if the date is less than one week ago, otherwise it will be displayed as an absolute date. DURATION Number The value will be read as a JSON number in milliseconds and will be displayed in a human readable duration format. LINK Object: {\"linktext\": \"Link text here\", \"href\": \"https://link.to.annotation/in/external/tool\"} The value will be read as a JSON object containing the fields \"linktext\" and \"href\" and will be displayed as a clickable link on the report. NUMBER Number The value will be read as a JSON number and large numbers will be displayed in a human readable format (e.g. 14.3k). PERCENTAGE Number (between 0 and 100) The value will be read as a JSON number between 0 and 100 and will be displayed with a percentage sign. TEXT String The value will be read as a JSON string and will be displayed as-is ", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Delete a Code Insights report", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}insights/latest/projects/:projectKey/repos/:repositorySlug/commits/:commitId/reports/:key", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "commitId", "value": "{{commitId}}", "description": "The commit ID on which to record the annotation. This must be a full 40 character commit hash.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false }, { "key": "key", "value": "{{key}}", "description": "The key of the report to which this annotation belongs.", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Delete a report for the given commit. Also deletes any annotations associated with this report." }, "response": [] }, { "name": "Get Code Insights annotations for a report", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}insights/latest/projects/:projectKey/repos/:repositorySlug/commits/:commitId/reports/:key/annotations", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "commitId", "value": "{{commitId}}", "description": "The commit ID on which to record the annotation. This must be a full 40 character commit hash.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false }, { "key": "key", "value": "{{key}}", "description": "The report key.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve the specified report's annotations." }, "response": [] }, { "name": "Add Code Insights annotations", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}insights/latest/projects/:projectKey/repos/:repositorySlug/commits/:commitId/reports/:key/annotations", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "commitId", "value": "{{commitId}}", "description": "The commit ID on which to record the annotation. This must be a full 40 character commit hash.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false }, { "key": "key", "value": "{{key}}", "description": "The key of the report to which this annotation belongs.", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" } ], "description": "Add annotations to the given report. The request should be a JSON object mapping the string \"annotations\" to an array of maps containing the annotation data, as described below. See also the example request.\n\nA few things to note:- Annotations are an extension of a report, so a report must first exist in order to post annotations. Annotations are posted separately from the report, and can be posted in bulk using this endpoint.\n- Only the annotations that are on lines changed in the unified diff will be displayed. This means it is likely not all annotations posted will be displayed on the pull request It also means that if the user is viewing a side-by-side diff, commit diff or iterative review diff they will not be able to view the annotations.\n- A report cannot have more than 1000 annotations by default, however this property is congurable at an instance level. If the request would result in more than the maximum number of annotations being stored then the entire request is rejected and no new annotations are stored. \n- There is no de-duplication of annotations on Bitbucket so be sure that reruns of builds will first delete the report and annotations before creating them.\n\n# Annotation parameters\n\n|Parameter|Description|Required?|Restrictions|Type|\n|--- |--- |--- |--- |--- |\n|path|The path of the file on which this annotation should be placed. This is the path of the filerelative to the git repository. If no path is provided, then it will appear in the overview modalon all pull requests where the tip of the branch is the given commit, regardless of which files weremodified.|No||String|\n|line|The line number that the annotation should belong to. If no line number is provided, then it willdefault to 0 and in a pull request it will appear at the top of the file specified by the path field.|No|Non-negative integer|Integer|\n|message|The message to display to users|Yes|The maximum length accepted is 2000 characters, however the user interface may truncate this valuefor display purposes. We recommend that the message is short and succinct, with further detailsavailable to the user if needed on the page linked to by the the annotation link.|String|\n|severity|The severity of the annotation|Yes|One of: LOW, MEDIUM, HIGH|String|\n|link|An http or https URL representing the location of the annotation in the external tool|No||String|\n|type|The type of annotation posted|No|One of: VULNERABILITY, CODE_SMELL, BUG|String|\n|externalId|If the caller requires a link to get or modify this annotation, then an ID must be provided. It isnot used or required by Bitbucket, but only by the annotation creator for updating or deleting thisspecific annotation.|No|A string value shorter than 450 characters|String|", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Delete Code Insights annotations", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}insights/latest/projects/:projectKey/repos/:repositorySlug/commits/:commitId/reports/:key/annotations", "query": [ { "key": "externalId", "value": "{{externalId}}", "disabled": true, "description": "The external IDs for the annotations that are to be deleted. Can be specified more than once to delete by more than one external ID, or can be unspecified to delete all annotations." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "commitId", "value": "{{commitId}}", "description": "The commit ID on which to record the annotation. This must be a full 40 character commit hash.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false }, { "key": "key", "value": "{{key}}", "description": "The key of the report to which this annotation belongs.", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Delete annotations for a given report that match the given external IDs, or all annotations if no external IDs are provided." }, "response": [] }, { "name": "Create or replace a Code Insights annotation", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}insights/latest/projects/:projectKey/repos/:repositorySlug/commits/:commitId/reports/:key/annotations/:externalId", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "externalId", "value": "{{externalId}}", "description": "The external ID of the annotation that is to be updated or created", "disabled": false }, { "key": "commitId", "value": "{{commitId}}", "description": "The commit ID on which to record the annotation. This must be a full 40 character commit hash.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false }, { "key": "key", "value": "{{key}}", "description": "The key of the report to which this annotation belongs", "disabled": false } ] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" } ], "description": "Create an annotation with the given external ID, or replace it if it already exists. A request to replace an existing annotation will be rejected if the authenticated user was not the creator of the specified report.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Get a specific build status", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/commits/:commitId/builds", "query": [ { "key": "key", "value": "{{key}}", "disabled": true, "description": "the key of the build status" } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "commitId", "value": "{{commitId}}", "description": "The commit.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Get a specific build status.\n\n\nThe authenticated user must have **REPO_READ** permission for the provided repository.The request can also be made with anonymous 2-legged OAuth.Since 7.14" }, "response": [] }, { "name": "Store a build status", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/commits/:commitId/builds", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "commitId", "value": "{{commitId}}", "description": "The commit.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "*/*" } ], "description": "Store a build status.\n\n\nThe authenticated user must have **REPO_READ** permission for the repository that this build status is for. The request can also be made with anonymous 2-legged OAuth.", "body": { "mode": "raw" } }, "response": [] }, { "name": "Delete a specific build status", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/commits/:commitId/builds", "query": [ { "key": "key", "value": "{{key}}", "disabled": true, "description": "the key of the build status" } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "commitId", "value": "{{commitId}}", "description": "The commit.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Delete a specific build status. \n\nThe authenticated user must have **REPO_ADMIN** permission for the provided repository." }, "response": [] }, { "name": "Get a deployment", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/commits/:commitId/deployments", "query": [ { "key": "deploymentSequenceNumber", "value": "{{deploymentSequenceNumber}}", "disabled": true, "description": "the sequence number of the deployment, as detailed by the query param" }, { "key": "key", "value": "{{key}}", "disabled": true, "description": "the key of the deployment, as detailed by the query parameter" }, { "key": "environmentKey", "value": "{{environmentKey}}", "disabled": true, "description": "the key of the environment, as detailed by the query parameter" } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false }, { "key": "commitId", "value": "{{commitId}}", "description": "the commitId that was deployed as indicated by the query parameter", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Get the deployment matching the specified Repository, key, environmentKey and deploymentSequenceNumber. \n\nThe user must have REPO_READ." }, "response": [] }, { "name": "Create or update a deployment", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/commits/:commitId/deployments", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false }, { "key": "commitId", "value": "{{commitId}}", "description": "the commitId that was deployed as indicated by the path", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "*/*" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Create or update a deployment. \n\n The authenticated user must have REPO_READ permission for the repository.", "body": { "mode": "raw" } }, "response": [] }, { "name": "Delete a deployment", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/commits/:commitId/deployments", "query": [ { "key": "deploymentSequenceNumber", "value": "{{deploymentSequenceNumber}}", "disabled": true, "description": "the sequence number of the deployment, as detailed by the query parameter" }, { "key": "key", "value": "{{key}}", "disabled": true, "description": "the key of the deployment, as detailed by the query parameter" }, { "key": "environmentKey", "value": "{{environmentKey}}", "disabled": true, "description": "the key of the environment, as detailed by the query parameter" } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false }, { "key": "commitId", "value": "{{commitId}}", "description": "the commitId that was deployed as indicated by the path", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Delete the deployment matching the specified Repository, key, environmentKey and deploymentSequenceNumber. \n\nThe user must have REPO_ADMIN." }, "response": [] } ] }, { "name": "Capabilities", "item": [ { "name": "Get build capabilities", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/build/capabilities", "query": [], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Returns the build capabilities of this instance" }, "response": [] }, { "name": "Get deployment capabilities", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/deployment/capabilities", "query": [], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Returns the Deployment capabilities of this instance" }, "response": [] } ] }, { "name": "Dashboard", "item": [ { "name": "Get pull request suggestions", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/dashboard/pull-request-suggestions", "query": [ { "key": "changesSince", "value": "{{changesSince}}", "disabled": true, "description": "restrict pull request suggestions to be based on events that occurred since some timein the past. This is expressed in seconds since \"now\". So to return suggestionsbased only on activity within the past 48 hours, pass a value of 172800." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "restricts the result set to return at most this many suggestions." } ], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieves a page of suggestions for pull requests that the currently authenticated user may wish to raise. Such suggestions are based on ref changes occurring and so contain the ref change that prompted the suggestion plus the time the change event occurred. Changes will be returned in descending order based on the time the change that prompted the suggestion occurred. \n\nNote that although the response is a page object, the interface does not support paging, however a limit can be applied to the size of the returned page." }, "response": [] }, { "name": "Get pull requests for a user", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/dashboard/pull-requests", "query": [ { "key": "closedSince", "value": "{{closedSince}}", "disabled": true, "description": "(optional, defaults to returning pull requests regardless of closed since date). Permits returning only pull requests with a closed timestamp set more recently that (now - closedSince). Units are in seconds. So for example if closed since 86400 is set only pull requests closed in the previous 24 hours will be returned." }, { "key": "role", "value": "{{role}}", "disabled": true, "description": "(optional, defaults to returning pull requests for any role). If a role is supplied only pull requests where the authenticated user is a participant in the given role will be returned. Either REVIEWER, AUTHOR or PARTICIPANT." }, { "key": "participantStatus", "value": "{{participantStatus}}", "disabled": true, "description": "(optional, defaults to returning pull requests with any participant status). A comma separated list of participant status. That is, one or more of UNAPPROVED, NEEDS_WORK, or APPROVED." }, { "key": "state", "value": "{{state}}", "disabled": true, "description": "(optional, defaults to returning pull requests in any state). If a state is supplied only pull requests in the specified state will be returned. Either OPEN, DECLINED or MERGED. Omit this parameter to return pull request in any state." }, { "key": "user", "value": "{{user}}", "disabled": true, "description": "The name of the involved user, defaults to the current user." }, { "key": "order", "value": "{{order}}", "disabled": true, "description": "(optional, defaults to NEWEST) the order to return pull requests in, either OLDEST (as in: \"oldest first\"), NEWEST, PARTICIPANT_STATUS, or CLOSED_DATE. Where CLOSED_DATE is specified and the result set includes pull requests that are not in the closed state, these pull requests will appear first in the result set, followed by most recently closed pull requests." }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve a page of pull requests where a user is involved as either a reviewer, author or a participant. The request may be filtered by pull request state, role or participant status." }, "response": [] } ] }, { "name": "Deprecated", "item": [ { "name": "Get build statuses for commit", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}build-status/latest/commits/:commitId", "query": [ { "key": "orderBy", "value": "{{orderBy}}", "disabled": true, "description": "How the results should be ordered. Options are NEWEST, OLDEST, STATUS" }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "commitId", "value": "{{commitId}}", "description": "Full SHA1 of the commit (ex: e00cf62997a027bbf785614a93e2e55bb331d268)", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Gets build statuses associated with a commit.\n\nDeprecated in 7.14, please use the repository based builds resource instead." }, "response": [] }, { "name": "Create build status for commit", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}build-status/latest/commits/:commitId", "query": [], "variable": [ { "key": "commitId", "value": "{{commitId}}", "description": "full SHA1 of the commit", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" } ], "description": "Associates a build status with a commit.The state, the key and the url fields are mandatory. The name anddescription fields are optional.All fields (mandatory or optional) are limited to 255 characters, except for the url,which is limited to 450 characters.Supported values for the state are SUCCESSFUL, FAILEDand INPROGRESS.The authenticated user must have LICENSED permission or higher to call this resource.\n\nDeprecated in 7.14, please use the repository based builds resource instead.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Get comment likes", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}comment-likes/latest/projects/:projectKey/repos/:repositorySlug/commits/:commitId/comments/:commentId/likes", "query": [ { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "commentId", "value": "{{commentId}}", "disabled": false }, { "key": "commitId", "value": "{{commitId}}", "description": "The commit id.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Get a page of users who liked a commit comment in the specified repository, identified by commitId and commentId.\n\nThe authenticated user must have the **REPO_READ** (or higher) permission for the specified repository to access this resource.\n\nDeprecated in 8.0 to be removed in 9.0." }, "response": [] }, { "name": "Like a commit comment", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}comment-likes/latest/projects/:projectKey/repos/:repositorySlug/commits/:commitId/comments/:commentId/likes", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "commentId", "value": "{{commentId}}", "disabled": false }, { "key": "commitId", "value": "{{commitId}}", "description": "The commit id.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "POST", "header": [], "description": "Like a commit comment in the specified repository, identified by commitId and commentId.\n\nThe authenticated user must have the REPO_READ (or higher) permission for the specified repository to access this resource.\n\nDeprecated in 8.0 to be removed in 9.0. Likes have been replaced with reactions. For backwards compatibility, the thumbsup reaction is treated as a like." }, "response": [] }, { "name": "Unlike a commit comment", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}comment-likes/latest/projects/:projectKey/repos/:repositorySlug/commits/:commitId/comments/:commentId/likes", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "commentId", "value": "{{commentId}}", "disabled": false }, { "key": "commitId", "value": "{{commitId}}", "description": "The commit id.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Unlike a commit comment in the specified repository, identified by commitId and commentId.\n\nThe authenticated user must have the REPO_READ (or higher) permission for the specified repository to access this resource.\n\nDeprecated in 8.0 to be removed in 9.0. Likes have been replaced with reactions. For backwards compatibility, the thumbsup reaction is treated as a like." }, "response": [] }, { "name": "Get pull request comment likes", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}comment-likes/latest/projects/:projectKey/repos/:repositorySlug/pull-requests/:pullRequestId/comments/:commentId/likes", "query": [ { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "commentId", "value": "{{commentId}}", "description": "The comment id.", "disabled": false }, { "key": "pullRequestId", "value": "{{pullRequestId}}", "description": "The pull request id.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Get a page of users who liked a pull request comment in the specified repository, identified by pullRequestId and commentId. \n\nThe authenticated user must have the REPO_READ (or higher) permission for the specified repository to access this resource.\n\n**Deprecated in 8.0 to be removed in 9.0.**" }, "response": [] }, { "name": "Like a pull request comment", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}comment-likes/latest/projects/:projectKey/repos/:repositorySlug/pull-requests/:pullRequestId/comments/:commentId/likes", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "commentId", "value": "{{commentId}}", "description": "The comment id.", "disabled": false }, { "key": "pullRequestId", "value": "{{pullRequestId}}", "description": "The pull request id.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "POST", "header": [], "description": "Like a pull request comment in the specified repository, identified by pullRequestId and commentId. The like will be recorded against the requesting user.\n\nThe authenticated user must have the REPO_READ (or higher) permission for the specified repository to access this resource.\n\n**Deprecated in 8.0 to be removed in 9.0.** Likes have been replaced with reactions. For backwards compatibility, the thumbsup reaction is treated as a like." }, "response": [] }, { "name": "Unlike a pull request comment", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}comment-likes/latest/projects/:projectKey/repos/:repositorySlug/pull-requests/:pullRequestId/comments/:commentId/likes", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "commentId", "value": "{{commentId}}", "description": "The comment id.", "disabled": false }, { "key": "pullRequestId", "value": "{{pullRequestId}}", "description": "The pull request id.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Unlike a pull request comment in the specified repository, identified by pullRequestId and commentId.\n\nThe authenticated user must have the REPO_READ (or higher) permission for the specified repository to access this resource.\n\n**Deprecated in 8.0 to be removed in 9.0.** Likes have been replaced with reactions. For backwards compatibility, the thumbsup reaction is treated as a like." }, "response": [] }, { "name": "On disable of mirror addon", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}mirroring/latest/upstreamServers/:upstreamId/addon/disabled", "query": [], "variable": [ { "key": "upstreamId", "value": "{{upstreamId}}", "description": "the upstream server ID to retrieve settings for", "disabled": false } ] }, "method": "POST", "header": [], "description": "This REST endpoint is retained for backwards compatibility only. It is a no-op. Starting from 4.6.0, mirrors no longer specify a disabled lifecycle callback in their addon descriptor. Prior to 4.6.0, this was the callback method that was called when the mirroring atlassian-connect add-on has been disabled in the upstream server identified by upstreamId." }, "response": [] }, { "name": "On enabled of mirror addon", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}mirroring/latest/upstreamServers/:upstreamId/addon/enabled", "query": [], "variable": [ { "key": "upstreamId", "value": "{{upstreamId}}", "description": "the upstream server ID to retrieve settings for", "disabled": false } ] }, "method": "POST", "header": [], "description": "This REST endpoint is retained for backwards compatibility only. It is a no-op. Starting from 4.6.0, mirrors no longer specify an enabled lifecycle callback in their addon descriptor. Prior\nto 4.6.0, this was the callback method that was called when the mirroring atlassian-connect add-on has been\nenabled in the upstream server identified by upstreamId." }, "response": [] }, { "name": "Get upstream settings", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}mirroring/latest/upstreamServers/:upstreamId/repos/:upstreamRepoId/synchronization", "query": [ { "key": "level", "value": "{{level}}", "disabled": true, "description": "the level of synchronization to perform" } ], "variable": [ { "key": "upstreamRepoId", "value": "{{upstreamRepoId}}", "disabled": false }, { "key": "upstreamId", "value": "{{upstreamId}}", "description": "the upstream server ID to retrieve settings for", "disabled": false } ] }, "method": "POST", "header": [], "description": "This method is no longer supported" }, "response": [] }, { "name": "Change upstream settings", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}mirroring/latest/upstreamServers/:upstreamId/synchronization", "query": [ { "key": "level", "value": "{{level}}", "disabled": true } ], "variable": [ { "key": "upstreamId", "value": "{{upstreamId}}", "description": "the upstream server ID to retrieve settings for", "disabled": false } ] }, "method": "POST", "header": [], "description": "This method is no longer supported" }, "response": [] }, { "name": "Add user to group", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/groups/add-user", "query": [], "variable": [] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Deprecated since 2.10. Use /rest/users/add-groups instead.\n\nAdd a user to a group.\n\nIn the request entity, the context attribute is the group and the itemName is the user.\n\nThe authenticated user must have the ADMIN permission to call this resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Remove user from group", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/groups/remove-user", "query": [], "variable": [] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Deprecated since 2.10. Use /rest/users/remove-groups instead.\n\nRemove a user from a group.\n\nThe authenticated user must have the ADMIN permission to call this resource.\n\nIn the request entity, the context attribute is the group and the itemName is the user.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Add user to group", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/users/add-group", "query": [], "variable": [] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Deprecated since 2.10. Use /rest/users/add-groups instead.\n\nAdd a user to a group. This is very similar to groups/add-user, but with the context and itemName attributes of the supplied request entity reversed. On the face of it this may appear redundant, but it facilitates a specific UI component in the application.\n\nIn the request entity, the context attribute is the user and the itemName is the group.\n\nThe authenticated user must have the ADMIN permission to call this resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Get default branch", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/branches/default", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieves the repository's default branch, if it has been created. If the repository is empty, 204 No Content will be returned. For non-empty repositories, if the configured default branch has not yet been created a 404 Not Found will be returned. \n\nThis URL is deprecated. Callers should use GET /projects/{key}/repos/{slug}/default-branch instead, which allows retrieving the configured default branch even if the ref has not been created yet. \n\nThe authenticated user must have REPO_READ permission for the specified repository to call this resource." }, "response": [] }, { "name": "Update default branch", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/branches/default", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" } ], "description": "Update the default branch of a repository. \n\nThis URL is deprecated. Callers should use PUT /projects/{key}/repos/{slug}/default-branch instead. \n\nThe authenticated user must have REPO_ADMIN permission for the specified repository to call this resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Approve pull request", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/pull-requests/:pullRequestId/approve", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "pullRequestId", "value": "{{pullRequestId}}", "description": "The ID of the pull request within the repository", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Approve a pull request as the current user. Implicitly adds the user as a participant if they are not already. \n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource. \n\nDeprecated since 4.2. Use /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/participants/{userSlug} instead" }, "response": [] }, { "name": "Unapprove pull request", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/pull-requests/:pullRequestId/approve", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "pullRequestId", "value": "{{pullRequestId}}", "description": "The ID of the pull request within the repository", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "DELETE", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Remove approval from a pull request as the current user. This does not remove the user as a participant. \n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource. \n\nDeprecated since 4.2. Use /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/participants/{userSlug} instead" }, "response": [] }, { "name": "Unassign pull request participant", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/pull-requests/:pullRequestId/participants", "query": [ { "key": "username", "value": "{{username}}", "disabled": true } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "pullRequestId", "value": "{{pullRequestId}}", "description": "The ID of the pull request within the repository", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Unassigns a participant from the REVIEWER role they may have been given in a pull request. \n\nIf the participant has no explicit role this method has no effect. \n\nAfterwards, the user will still remain a participant in the pull request but their role will be reduced to PARTICIPANT. This is because once made a participant of a pull request, a user will forever remain a participant. Only their role may be altered. \n\nThe authenticated user must have REPO_WRITE permission for the repository that this pull request targets to call this resource. \n\nDeprecated since 4.2. Use /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/participants/{userSlug} instead." }, "response": [] }, { "name": "Get pull request tasks", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/pull-requests/:pullRequestId/tasks", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "pullRequestId", "value": "{{pullRequestId}}", "description": "The pull request ID.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [], "description": "Retrieve the tasks associated with a pull request. \n\n**Removed in 8.0**. Tasks are now managed using Comments with BLOCKER severity. Use /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/blocker-comments instead \n\n**Deprecated since 7.2, changed to 404 in 8.0, remove in 9.0.** Use /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/blocker-comments instead" }, "response": [] }, { "name": "Get pull request task count", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/pull-requests/:pullRequestId/tasks/count", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "pullRequestId", "value": "{{pullRequestId}}", "description": "The pull request ID.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [], "description": "Retrieve the total number of OPEN and RESOLVED tasks associated with a pull request. \n\nDeprecated since 7.2. Tasks are now managed using Comments with BLOCKER severity. Use /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/blocker-comments?count=true instead." }, "response": [] }, { "name": "Create task", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/tasks", "query": [], "variable": [] }, "method": "POST", "header": [], "description": "Create a new task. \n\nRemoved in 8.0. Tasks are now managed using Comments with severity BLOCKER. Call POST /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments instead,passing the attribute 'severity' set to 'BLOCKER'." }, "response": [] }, { "name": "Get task", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/tasks/:taskId", "query": [], "variable": [ { "key": "taskId", "value": "{{taskId}}", "description": "the id identifying the task", "disabled": false } ] }, "method": "GET", "header": [], "description": "Retrieve an existing task.\n\nRemoved in 8.0. Tasks are now managed using Comments with BLOCKER severity. Call GET /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments/{commentId} instead. @deprecated since 7.2, changed to 404 in 8.0, remove in 9.0. Call GET /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments/{commentId} instead." }, "response": [] }, { "name": "Update task", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/tasks/:taskId", "query": [], "variable": [ { "key": "taskId", "value": "{{taskId}}", "description": "the id identifying the task to update", "disabled": false } ] }, "method": "PUT", "header": [], "description": "Update an existing task. \n\n Removed in 8.0. Tasks are now managed using Comments with BLOCKER severity. Call PUT /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments/{commentId} instead. To resolve a task, pass the attribute 'state' set to 'RESOLVED'. @deprecated since 7.2, changed to 404 in 8.0, remove in 9.0. Call PUT /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments/{commentId}\n instead. \n\n As of Stash 3.3, only the state and text of a task can be updated. \n\n Updating the state of a task is allowed for any user having READ access to the repository. However only the task's creator, the context's author or an admin of the context's repository can update the task's text. (For a pull request task, those are the task's creator, the pull request's author or an admin on the repository containing the pull request). Additionally the task's text cannot be updated if it has been resolved." }, "response": [] }, { "name": "Delete task", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/tasks/:taskId", "query": [], "variable": [ { "key": "taskId", "value": "{{taskId}}", "description": "the id identifying the task to delete", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Delete a task.\n\nRemoved in 8.0. Tasks are now managed using Comments with BLOCKER severity. Call DELETE /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments/{commentId}instead. @deprecated since 7.2, changed to 404 in 8.0, remove in 9.0. Call DELETE /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments/{commentId} instead.\n\nNote that only the task's creator, the context's author or an admin of the context's repository can delete a task. (For a pull request task, those are the task's creator, the pull request's author or an admin on the repository containing the pull request). Additionally a task cannot be deleted if it has already been resolved." }, "response": [] } ] }, { "name": "Jira Integration", "item": [ { "name": "Create Jira Issue", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}jira/latest/comments/:commentId/issues", "query": [ { "key": "applicationId", "value": "{{applicationId}}", "disabled": true, "description": "id of the Jira server" } ], "variable": [ { "key": "commentId", "value": "{{commentId}}", "description": "the comment to associate the created Jira issue to", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Create a Jira issue and associate it with a comment on a pull request.\n\nThis resource can only be used with comments on a pull request. Attempting to call this resource with a different type of comment (for example, a comment on a commit) will result in an error. \n\n The authenticated user must have REPO_READ permission for the repository containing the comment to call this resource.\n\nThe JSON structure for the create issue format is specified by Jira's REST v2 API.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Get changesets for issue key", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}jira/latest/issues/:issueKey/commits", "query": [ { "key": "maxChanges", "value": "{{maxChanges}}", "disabled": true, "description": "The maximum number of changes to retrieve for each changeset" }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "issueKey", "value": "{{issueKey}}", "description": "The issue key to search by", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve a page of changesets associated with the given issue key." }, "response": [] }, { "name": "Get entity link", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}jira/latest/projects/:projectKey/primary-enhanced-entitylink", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieves the enchanced primary entitylink \n\nThe authenticated user must have PROJECT_READ permission for the project having the primary enhanced entitylink. \n\n" }, "response": [] }, { "name": "Get issues for a pull request", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}jira/latest/projects/:projectKey/repos/:repositorySlug/pull-requests/:pullRequestId/issues", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false }, { "key": "pullRequestId", "value": "{{pullRequestId}}", "description": "The pull request id", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json;charset=UTF-8" } ], "description": "Retrieves Jira issue keys that are associated with the commits in the specified pull request. The number of commits checked for issues is limited to a default of 100." }, "response": [] } ] }, { "name": "Markup", "item": [ { "name": "Preview markdown render", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/markup/preview", "query": [ { "key": "htmlEscape", "value": "{{htmlEscape}}", "disabled": true, "description": "(Optional) true if HTML should be escaped in the input markup, false otherwise." }, { "key": "urlMode", "value": "{{urlMode}}", "disabled": true, "description": "(Optional) The mode to use when building URLs. One of: ABSOLUTE, RELATIVE or, CONFIGURED. By default this is RELATIVE." }, { "key": "includeHeadingId", "value": "{{includeHeadingId}}", "disabled": true, "description": "(Optional) true if headers should contain an ID based on the heading content." }, { "key": "hardwrap", "value": "{{hardwrap}}", "disabled": true, "description": "(Optional) Whether the markup implementation should convert newlines to breaks. By default this is false which reflects the standard markdown specification." } ], "variable": [] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "*/*" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Preview generated HTML for the given markdown content.\n\nOnly authenticated users may call this resource.", "body": { "mode": "raw" } }, "response": [] } ] }, { "name": "Mirroring (Mirror)", "item": [ { "name": "Get items in ref changes queue", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}mirroring/latest/supportInfo/refChangesQueue", "query": [], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json;charset=UTF-8" } ], "description": "Retrieves a list of up to plugin.mirroring.farm.max.ref.change.queue.dump.size items currently in the ref changes queue. The ref changes queue is an internal component of every mirror farm, and is shared between all nodes. When the contents of an upstream repository changes, an item is added to this queue so that the mirror farm nodes know to synchronize. The mirror farm constantly polls and removes items from this queue for processing, so it is empty most of the time." }, "response": [] }, { "name": "Get total number of items in ref changes queue", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}mirroring/latest/supportInfo/refChangesQueue/count", "query": [], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieves the total number of items currently in the ref changes queue" }, "response": [] }, { "name": "Get sync status of repositories", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}mirroring/latest/supportInfo/repoSyncStatus", "query": [ { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieves a page of sync statuses of the repositories on this mirror node" }, "response": [] }, { "name": "Get upstream servers", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}mirroring/latest/upstreamServers", "query": [ { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieves a page of upstream servers" }, "response": [] }, { "name": "Get upstream server by ID", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}mirroring/latest/upstreamServers/:upstreamId", "query": [], "variable": [ { "key": "upstreamId", "value": "{{upstreamId}}", "description": "The upstream server ID to retrieve settings for.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieves upstream server details by ID." }, "response": [] }, { "name": "Get farm nodes", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}mirroring/latest/upstreamServers/:upstreamId/farmNodes", "query": [], "variable": [ { "key": "upstreamId", "value": "{{upstreamId}}", "description": "the upstream server ID to retrieve settings for", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json;charset=UTF-8" } ], "description": "Retrieves the list of farm nodes in this cluster" }, "response": [] }, { "name": "Get synchronization progress state", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}mirroring/latest/upstreamServers/:upstreamId/progress", "query": [], "variable": [ { "key": "upstreamId", "value": "{{upstreamId}}", "description": "the upstream server ID to retrieve settings for", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": " Retrieves synchronization progress state for the specified upstream server.If there's no progress to report, this resource will return {\"discovering\":false,\"syncedRepos\":0,\"totalRepos\":0} If there are repositories in the process of synchronizing, but the precise number hasn't been discovered yet, this resource will return: {\"discovering\":true,\"syncedRepos\":3,\"totalRepos\":100} If there is progress to report and the total number of repositories is known, this resource will return: {\"discovering\":false,\"syncedRepos\":242,\"totalRepos\":1071} " }, "response": [] }, { "name": "Get clone URLs", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}mirroring/latest/upstreamServers/:upstreamId/repos/:upstreamRepoId", "query": [], "variable": [ { "key": "upstreamRepoId", "value": "{{upstreamRepoId}}", "description": "the repository ID", "disabled": false }, { "key": "upstreamId", "value": "{{upstreamId}}", "description": "the upstream server ID", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieves all available clone urls for the specified repository." }, "response": [] }, { "name": "Get upstream settings", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}mirroring/latest/upstreamServers/:upstreamId/settings", "query": [], "variable": [ { "key": "upstreamId", "value": "{{upstreamId}}", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieves upstream settings" }, "response": [] }, { "name": "Update upstream settings", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}mirroring/latest/upstreamServers/:upstreamId/settings", "query": [], "variable": [ { "key": "upstreamId", "value": "{{upstreamId}}", "disabled": false } ] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Sets the settings for the specified upstream", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Get mirror mode", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}mirroring/latest/upstreamServers/:upstreamId/settings/mode", "query": [], "variable": [ { "key": "upstreamId", "value": "{{upstreamId}}", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Gets the current mirror mode for the specified upstream" }, "response": [] }, { "name": "Update mirror mode", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}mirroring/latest/upstreamServers/:upstreamId/settings/mode", "query": [], "variable": [ { "key": "upstreamId", "value": "{{upstreamId}}", "disabled": false } ] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Sets the mirror mode for the specified upstream", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Get mirrored project IDs", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}mirroring/latest/upstreamServers/:upstreamId/settings/projects", "query": [], "variable": [ { "key": "upstreamId", "value": "{{upstreamId}}", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Returns the IDs of the projects that the mirror is configured to mirror" }, "response": [] }, { "name": "Add multiple projects to be mirrored", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}mirroring/latest/upstreamServers/:upstreamId/settings/projects", "query": [], "variable": [ { "key": "upstreamId", "value": "{{upstreamId}}", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Configures the mirror to mirror the provided projects", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Stop mirroring projects", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}mirroring/latest/upstreamServers/:upstreamId/settings/projects", "query": [], "variable": [ { "key": "upstreamId", "value": "{{upstreamId}}", "disabled": false } ] }, "method": "DELETE", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" } ], "description": "Configures the mirror to no longer mirror the provided projects", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Add project to be mirrored", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}mirroring/latest/upstreamServers/:upstreamId/settings/projects/:projectId", "query": [], "variable": [ { "key": "upstreamId", "value": "{{upstreamId}}", "disabled": false }, { "key": "projectId", "value": "{{projectId}}", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Configures the mirror to mirror the provided project" }, "response": [] }, { "name": "Stop mirroring project", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}mirroring/latest/upstreamServers/:upstreamId/settings/projects/:projectId", "query": [], "variable": [ { "key": "upstreamId", "value": "{{upstreamId}}", "disabled": false }, { "key": "projectId", "value": "{{projectId}}", "description": "the project ID to stop mirroring", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Configures the mirror to no longer mirror the provided project" }, "response": [] } ] }, { "name": "Mirroring (Upstream)", "item": [ { "name": "Get preferred mirror", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}mirroring/latest/account/settings/preferred-mirror", "query": [], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieves the current user's preferred mirror server" }, "response": [] }, { "name": "Set preferred mirror", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}mirroring/latest/account/settings/preferred-mirror", "query": [], "variable": [] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" } ], "description": "Sets the mirror specified by a mirror ID as the current user's preferred mirror", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Remove preferred mirror", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}mirroring/latest/account/settings/preferred-mirror", "query": [], "variable": [] }, "method": "DELETE", "header": [], "description": "Removes the current user's preferred mirror" }, "response": [] }, { "name": "Get analytics settings from upstream", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}mirroring/latest/analyticsSettings", "query": [], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Gets the analytics settings from the mirroring upstream" }, "response": [] }, { "name": "Authenticate on behalf of a user", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}mirroring/latest/authenticate", "query": [], "variable": [] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Authenticates on behalf of a user. Used by mirrors to check the credentials supplied to them by users. If successful a user and their effective permissions are returned as follows -\n\n* For SSH credentials - all the effective user permissions are returned.\n* For all other credentials - the highest global permission is returned along with highest repository permission if repository ID is also provided in the request.\n\nCurrently only username/password, bearer token and SSH credentials are supported.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Get all mirrors", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}mirroring/latest/mirrorServers", "query": [ { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Returns a list of mirrors" }, "response": [] }, { "name": "Get mirror by ID", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}mirroring/latest/mirrorServers/:mirrorId", "query": [], "variable": [ { "key": "mirrorId", "value": "{{mirrorId}}", "description": "the mirror ID", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Returns the mirror specified by a mirror ID" }, "response": [] }, { "name": "Upgrade add-on for a mirror", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}mirroring/latest/mirrorServers/:mirrorId", "query": [], "variable": [ { "key": "mirrorId", "value": "{{mirrorId}}", "description": "the ID of the mirror to upgrade", "disabled": false } ] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Upgrades the add-on for the mirror server in question This endpoint can only be called by the mirror instance or system administratorsSince 5.8", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Delete mirror by ID", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}mirroring/latest/mirrorServers/:mirrorId", "query": [], "variable": [ { "key": "mirrorId", "value": "{{mirrorId}}", "description": "the ID of the mirror to remove", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Removes a mirror, disabling all access and notifications for the mirror server in question" }, "response": [] }, { "name": "Publish RepositoryMirrorEvent", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}mirroring/latest/mirrorServers/:mirrorId/events", "query": [], "variable": [ { "key": "mirrorId", "value": "{{mirrorId}}", "description": "the server id of the mirror that raised this event", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" } ], "description": "Publishes a RepositoryMirrorEvent on the event queue.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Get mirror auth token", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}mirroring/latest/mirrorServers/:mirrorId/token", "query": [], "variable": [ { "key": "mirrorId", "value": "{{mirrorId}}", "description": "the mirror ID", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Returns an authentication token for the mirror server in question" }, "response": [] }, { "name": "Get HTML for remote-connect web-panel on mirror", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}mirroring/latest/mirrorServers/:mirrorId/webPanels/config", "query": [], "variable": [ { "key": "mirrorId", "value": "{{mirrorId}}", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "text/html" } ], "description": "Gets the rendered HTML that is needed to get the remote connect web-panel on the mirror." }, "response": [] }, { "name": "Get project", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}mirroring/latest/projects/:projectId", "query": [], "variable": [ { "key": "projectId", "value": "{{projectId}}", "description": "the ID of the requested project", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Returns the requested project using its primary key ID. Since 6.7" }, "response": [] }, { "name": "Get hashes for repositories in project", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}mirroring/latest/projects/:projectId/repos", "query": [ { "key": "includeDefaultBranch", "value": "{{includeDefaultBranch}}", "disabled": true, "description": "includes defaultBranchId in the response, if true. Default value is false" }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectId", "value": "{{projectId}}", "description": "the id of the requested project", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Returns a page of repositories for a given project, enriched with a content hash" }, "response": [] }, { "name": "Get content hashes for repositories", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}mirroring/latest/repos", "query": [ { "key": "includeDefaultBranch", "value": "{{includeDefaultBranch}}", "disabled": true, "description": "includes defaultBranchId for each repository in the response, if true. Default value is false." } ], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Returns a page of repositories enriched with a content hash and default branch" }, "response": [] }, { "name": "Get content hash for a repository", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}mirroring/latest/repos/:repoId", "query": [ { "key": "includeDefaultBranch", "value": "{{includeDefaultBranch}}", "disabled": true } ], "variable": [ { "key": "repoId", "value": "{{repoId}}", "description": "the ID of the requested repository", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Returns a repository enriched with a content hash and default branch" }, "response": [] }, { "name": "Get mirrors for repository", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}mirroring/latest/repos/:repoId/mirrors", "query": [], "variable": [ { "key": "repoId", "value": "{{repoId}}", "description": "the ID of the requested repository", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Returns a page of mirrors for a repository. This resource will return all mirrors along with authorized links to the mirror's repository REST resource. To determine if a repository is available on the mirror, the returned URL needs to be called." }, "response": [] }, { "name": "Get mirroring requests", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}mirroring/latest/requests", "query": [ { "key": "state", "value": "{{state}}", "disabled": true, "description": "(optional) the request state to filter on" }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieves a mirroring request" }, "response": [] }, { "name": "Create a mirroring request", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}mirroring/latest/requests", "query": [], "variable": [] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Creates a new mirroring request", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Get a mirroring request", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}mirroring/latest/requests/:mirroringRequestId", "query": [], "variable": [ { "key": "mirroringRequestId", "value": "{{mirroringRequestId}}", "description": "the ID of the mirroring request to retrieve", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieves a mirroring request" }, "response": [] }, { "name": "Delete a mirroring request", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}mirroring/latest/requests/:mirroringRequestId", "query": [], "variable": [ { "key": "mirroringRequestId", "value": "{{mirroringRequestId}}", "description": "the ID of the mirroring request to delete", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Deletes a mirroring request" }, "response": [] }, { "name": "Accept a mirroring request", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}mirroring/latest/requests/:mirroringRequestId/accept", "query": [], "variable": [ { "key": "mirroringRequestId", "value": "{{mirroringRequestId}}", "description": "the ID of the request to accept", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Accepts a mirroring request" }, "response": [] }, { "name": "Reject a mirroring request", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}mirroring/latest/requests/:mirroringRequestId/reject", "query": [], "variable": [ { "key": "mirroringRequestId", "value": "{{mirroringRequestId}}", "description": "the ID of the request to reject", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Rejects a mirroring request" }, "response": [] } ] }, { "name": "Permission Management", "item": [ { "name": "Get groups", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/groups", "query": [ { "key": "filter", "value": "{{filter}}", "disabled": true, "description": "If specified only group names containing the supplied string will be returned." }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve a page of groups. \n\nThe authenticated user must have LICENSED_USER permission or higher to call this resource." }, "response": [] }, { "name": "Create group", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/groups", "query": [ { "key": "name", "value": "{{name}}", "disabled": false, "description": "Name of the group." } ], "variable": [] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Create a new group. \n\nThe authenticated user must have ADMIN permission or higher to call this resource." }, "response": [] }, { "name": "Remove group", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/groups", "query": [ { "key": "name", "value": "{{name}}", "disabled": false, "description": "The name identifying the group to delete." } ], "variable": [] }, "method": "DELETE", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Deletes the specified group, removing them from the system. This also removes any permissions that may have been granted to the group.\n\nA user may not delete the last group that is granting them administrative permissions, or a group with greater permissions than themselves.\n\nThe authenticated user must have the ADMIN permission to call this resource." }, "response": [] }, { "name": "Add multiple users to group", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/groups/add-users", "query": [], "variable": [] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Add multiple users to a group. \n\nThe authenticated user must have the ADMIN permission to call this resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Get group members", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/groups/more-members", "query": [ { "key": "filter", "value": "{{filter}}", "disabled": true, "description": "If specified only users with usernames, display names or email addresses containing the supplied string will be returned." }, { "key": "context", "value": "{{context}}", "disabled": false, "description": "The group which should be used to locate members." }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieves a list of users that are members of a specified group. The authenticated user must have the LICENSED_USER permission to call this resource." }, "response": [] }, { "name": "Get members not in group", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/groups/more-non-members", "query": [ { "key": "filter", "value": "{{filter}}", "disabled": true, "description": "If specified only users with usernames, display names or email addresses containing the supplied string will be returned." }, { "key": "context", "value": "{{context}}", "disabled": false, "description": "The group which should be used to locate members." }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieves a list of users that are not members of a specified group. The authenticated user must have the LICENSED_USER permission to call this resource." }, "response": [] }, { "name": "Get groups with a global permission", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/permissions/groups", "query": [ { "key": "filter", "value": "{{filter}}", "disabled": true, "description": "If specified only group names containing the supplied string will be returned" }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve a page of groups that have been granted at least one global permission.\n\n\nThe authenticated user must have ADMIN permission or higher to call this resource." }, "response": [] }, { "name": "Update global permission for group", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/permissions/groups", "query": [ { "key": "name", "value": "{{name}}", "disabled": false, "description": "The names of the groups" }, { "key": "permission", "value": "{{permission}}", "disabled": false, "description": "The permission to grant" } ], "variable": [] }, "method": "PUT", "header": [], "description": "Promote or demote a group's global permission level. Available global permissions are:\n\n\n- LICENSED_USER\n- PROJECT_CREATE\n- ADMIN\n- SYS_ADMIN\n\nSee the Bitbucket Data Center documentation for a detailed explanation of what each permission entails.\n\n\nThe authenticated user must have:\n\n\n- ADMIN permission or higher; and\n- the permission they are attempting to grant or higher; and\n- greater or equal permissions than the current permission level of the group (a user may not demote the permission level of a group with higher permissions than them)\n\n\nto call this resource. In addition, a user may not demote a group's permission level if their own permission\nlevel would be reduced as a result." }, "response": [] }, { "name": "Revoke all global permissions for group", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/permissions/groups", "query": [ { "key": "name", "value": "{{name}}", "disabled": false, "description": "The name of the group" } ], "variable": [] }, "method": "DELETE", "header": [], "description": "Revoke all global permissions for a group.\n\n\n\nThe authenticated user must have:\n\n\n- ADMIN permission or higher; and\n- greater or equal permissions than the current permission level of the group (a user may not demote the permission level of a group with higher permissions than them)\n\n\nto call this resource. In addition, a user may not revoke a group's permissions if their own permission level\nwould be reduced as a result." }, "response": [] }, { "name": "Get groups with no global permission", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/permissions/groups/none", "query": [ { "key": "filter", "value": "{{filter}}", "disabled": true, "description": "If specified only user names containing the supplied string will be returned" }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve a page of groups that have no granted global permissions.\n\n\nThe authenticated user must have ADMIN permission or higher to call this resource." }, "response": [] }, { "name": "Get users with a global permission", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/permissions/users", "query": [ { "key": "filter", "value": "{{filter}}", "disabled": true, "description": "If specified only user names containing the supplied string will be returned" }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve a page of users that have been granted at least one global permission.\n\n\nThe authenticated user must have ADMIN permission or higher to call this resource." }, "response": [] }, { "name": "Update global permission for user", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/permissions/users", "query": [ { "key": "name", "value": "{{name}}", "disabled": false, "description": "The names of the users" }, { "key": "permission", "value": "{{permission}}", "disabled": false, "description": "The permission to grant" } ], "variable": [] }, "method": "PUT", "header": [], "description": "Promote or demote the global permission level of a user. Available global permissions are:\n\n\n- LICENSED_USER\n- PROJECT_CREATE\n- ADMIN\n- SYS_ADMIN\n\n\nSee the Bitbucket Data Center documentation for a detailed explanation of what each permission entails.\n\n\nThe authenticated user must have:\n\n\n- ADMIN permission or higher; and\n- the permission they are attempting to grant; and\n- greater or equal permissions than the current permission level of the user (a user may not demote the permission level of a user with higher permissions than them)\n\n\nto call this resource. In addition, a user may not demote their own permission level." }, "response": [] }, { "name": "Revoke all global permissions for user", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/permissions/users", "query": [ { "key": "name", "value": "{{name}}", "disabled": false, "description": "The name of the user" } ], "variable": [] }, "method": "DELETE", "header": [], "description": "Revoke all global permissions for a user.\n\n\nThe authenticated user must have:\n\n\n- ADMIN permission or higher; and\n- greater or equal permissions than the current permission level of the user (a user may not demote the permission level of a user with higher permissions than them)\n\n\nto call this resource. In addition, a user may not demote their own permission level." }, "response": [] }, { "name": "Get users with no global permission", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/permissions/users/none", "query": [ { "key": "filter", "value": "{{filter}}", "disabled": true, "description": "If specified only user names containing the supplied string will be returned" }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve a page of users that have no granted global permissions.\n\n\nThe authenticated user must have ADMIN permission or higher to call this resource." }, "response": [] }, { "name": "Get directories", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/user-directories", "query": [ { "key": "includeInactive", "value": "{{includeInactive}}", "disabled": true, "description": "Set true to include inactive directories; otherwise, false to only return active directories." } ], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve a list of active directories. \n\n The authenticated user must have the ADMIN permission to call this resource." }, "response": [] }, { "name": "Get users", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/users", "query": [ { "key": "filter", "value": "{{filter}}", "disabled": true, "description": "If specified only users with usernames, display name or email addresses containing the supplied string will be returned." }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve a page of users. \n\n The authenticated user must have the LICENSED_USER permission to call this resource." }, "response": [] }, { "name": "Update user details", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/users", "query": [], "variable": [] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Update a user's details. \n\nThe authenticated user must have the ADMIN permission to call this resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Create user", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/users", "query": [ { "key": "emailAddress", "value": "{{emailAddress}}", "disabled": false, "description": "The e-mail address for the new user." }, { "key": "password", "value": "{{password}}", "disabled": true, "description": "The password for the new user. Required if the notify parameter is not present or is set to false" }, { "key": "addToDefaultGroup", "value": "{{addToDefaultGroup}}", "disabled": true, "description": "Set true to add the user to the default group, which can be used to grant them a set of initial permissions; otherwise, false to not add them to a group." }, { "key": "displayName", "value": "{{displayName}}", "disabled": false, "description": "The display name for the new user." }, { "key": "name", "value": "{{name}}", "disabled": false, "description": "The username for the new user." }, { "key": "notify", "value": "{{notify}}", "disabled": true, "description": "If present and not false instead of requiring a password, the create user will be notified via email their account has been created and requires a password to be reset. This option can only be used if a mail server has been configured." } ], "variable": [] }, "method": "POST", "header": [], "description": "Creates a new user from the assembled query parameters.\n\nThe default group can be used to control initial permissions for new users, such as granting users the ability to login or providing read access to certain projects or repositories. If the user is not added to the default group, they may not be able to login after their account is created until explicit permissions are configured.\n\nThe authenticated user must have the ADMIN permission to call this resource." }, "response": [] }, { "name": "Remove user", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/users", "query": [ { "key": "name", "value": "{{name}}", "disabled": false, "description": "The username identifying the user to delete." } ], "variable": [] }, "method": "DELETE", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Deletes the specified user, removing them from the system. This also removes any permissions that may have been granted to the user.\n\nA user may not delete themselves, and a user with ADMIN permissions may not delete a user with SYS_ADMINpermissions.\n\nThe authenticated user must have the ADMIN permission to call this resource." }, "response": [] }, { "name": "Add user to groups", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/users/add-groups", "query": [], "variable": [] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Add a user to one or more groups. \n\n The authenticated user must have the ADMIN permission to call this resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Clear CAPTCHA for user", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/users/captcha", "query": [ { "key": "name", "value": "{{name}}", "disabled": false, "description": "The username" } ], "variable": [] }, "method": "DELETE", "header": [], "description": "Clears any CAPTCHA challenge that may constrain the user with the supplied username when they authenticate. Additionally any counter or metric that contributed towards the user being issued the CAPTCHA challenge (for instance too many consecutive failed logins) will also be reset.\n\nThe authenticated user must have the ADMIN permission to call this resource, and may not clear the CAPTCHA of a user with greater permissions than themselves." }, "response": [] }, { "name": "Set password for user", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/users/credentials", "query": [], "variable": [] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" } ], "description": "Update a user's password. \n\nThe authenticated user must have the ADMIN permission to call this resource, and may not update the password of a user with greater permissions than themselves.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Check user removal", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/users/erasure", "query": [ { "key": "name", "value": "{{name}}", "disabled": false, "description": "The username of the user to validate erasability for." } ], "variable": [] }, "method": "GET", "header": [], "description": "Validate if a user can be erased.\n\nA username is only valid for erasure if it exists as the username of a deleted user. This endpoint will return an appropriate error response if the supplied username is invalid for erasure.\n\nThis endpoint does not perform the actual user erasure, and will not modify the application in any way.\n\nThe authenticated user must have the ADMIN permission to call this resource." }, "response": [] }, { "name": "Erase user information", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/users/erasure", "query": [ { "key": "name", "value": "{{name}}", "disabled": false, "description": "The username identifying the user to erase." } ], "variable": [] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Erases personally identifying user data for a deleted user.\n\nReferences in the application to the original username will be either removed or updated to a new non-identifying username. Refer to the support guide for details about what data is and isn't erased.\n\nUser erasure can only be performed on a deleted user. If the user has not been deleted first then this endpoint will return a bad request and no erasure will be performed.\n\nErasing user data is irreversible and may lead to a degraded user experience. This method should not be used as part of a standard user deletion and cleanup process.\n\nPlugins can participate in user erasure by defining a <user-erasure-handler> module. If one or more plugin modules fail, an error summary of the failing modules is returned.\n\nThe authenticated user must have the ADMIN permission to call this resource." }, "response": [] }, { "name": "Get groups for user", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/users/more-members", "query": [ { "key": "filter", "value": "{{filter}}", "disabled": true, "description": "If specified only users with usernames, display names or email addresses containing the supplied string will be returned." }, { "key": "context", "value": "{{context}}", "disabled": false, "description": "The group which should be used to locate members." }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieves a list of users that are not members of a specified group. The authenticated user must have the LICENSED_USER permission to call this resource." }, "response": [] }, { "name": "Find other groups for user", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/users/more-non-members", "query": [ { "key": "filter", "value": "{{filter}}", "disabled": true, "description": "If specified only groups with names containing the supplied string will be returned." }, { "key": "context", "value": "{{context}}", "disabled": false, "description": "The user which should be used to locate groups." }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieves a list of groups the specified user is not a member of. The authenticated user must have the LICENSED_USER permission to call this resource." }, "response": [] }, { "name": "Remove user from group", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/users/remove-group", "query": [], "variable": [] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Remove a user from a group. This is very similar to groups/remove-user, but with the context and itemName attributes of the supplied request entity reversed. On the face of it this may appear redundant, but it facilitates a specific UI component in the application.\n\nIn the request entity, the context attribute is the user and the itemName is the group.\n\nThe authenticated user must have the ADMIN permission to call this resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Rename user", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/users/rename", "query": [], "variable": [] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Rename a user. \n\nThe authenticated user must have the ADMIN permission to call this resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Get group names", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/groups", "query": [ { "key": "filter", "value": "{{filter}}", "disabled": true }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve a page of group names.\n\nThe authenticated user must have LICENSED_USER permission or higher to call this resource." }, "response": [] }, { "name": "Revoke all repository permissions for users and groups", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/permissions", "query": [ { "key": "user", "value": "{{user}}", "disabled": true, "description": "The names of the users" }, { "key": "group", "value": "{{group}}", "disabled": true, "description": "The names of the groups" } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Revoke all permissions for the specified repository for the given groups and users.\n\nThe authenticated user must have PROJECT_ADMIN permission for the specified repository or a higher global permission to call this resource.\n\nIn addition, a user may not revoke a group's permission if their own permission would be revoked as a result, nor may they revoke their own permission unless they have a global permission that already implies that permission." }, "response": [] }, { "name": "Get groups with permission to repository", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/permissions/groups", "query": [ { "key": "filter", "value": "{{filter}}", "disabled": true, "description": "If specified only group names containing the supplied string will be returned." }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve a page of groups that have been granted at least one permission for the specified repository.\n\nThe authenticated user must have REPO_ADMIN permission for the specified repository or a higher project or global permission to call this resource." }, "response": [] }, { "name": "Update group repository permission", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/permissions/groups", "query": [ { "key": "name", "value": "{{name}}", "disabled": false, "description": "The names of the groups." }, { "key": "permission", "value": "{{permission}}", "disabled": false, "description": "The permission to grant" } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "PUT", "header": [], "description": "Promote or demote a group's permission level for the specified repository. Available repository permissions are:\n\n- REPO_READ\n- REPO_WRITE\n- REPO_ADMIN\n\n\nSee the Bitbucket Data Center documentation for a detailed explanation of what each permission entails.\n\nThe authenticated user must have REPO_ADMIN permission for the specified repository or a higher project or global permission to call this resource. In addition, a user may not demote a group's permission level if their own permission level would be reduced as a result." }, "response": [] }, { "name": "Revoke group repository permission", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/permissions/groups", "query": [ { "key": "name", "value": "{{name}}", "disabled": false, "description": "The name of the group." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Revoke all permissions for the specified repository for a group.\n\nThe authenticated user must have REPO_ADMIN permission for the specified repository or a higher project or global permission to call this resource.\n\nIn addition, a user may not revoke a group's permissions if it will reduce their own permission level." }, "response": [] }, { "name": "Get groups without repository permission", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/permissions/groups/none", "query": [ { "key": "filter", "value": "{{filter}}", "disabled": true, "description": "If specified only group names containing the supplied string will be returned." }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve a page of groups that have no granted permissions for the specified repository.\n\nThe authenticated user must have REPO_ADMIN permission for the specified repository or a higher project or global permission to call this resource." }, "response": [] }, { "name": "Search repository permissions", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/permissions/search", "query": [ { "key": "permission", "value": "{{permission}}", "disabled": true, "description": "Permissions to filter by. See the [permissions documentation](https://confluence.atlassian.com/display/BitbucketServer/Using+repository+permissions)for a detailed explanation of what each permission entails. This parameter can be specified multiple times to filter by more than one permission, and can contain repository, project, and global permissions.\n\n" }, { "key": "filterText", "value": "{{filterText}}", "disabled": true, "description": "Name of the user or group to filter the name of" }, { "key": "type", "value": "{{type}}", "disabled": true, "description": "Type of entity (user or group)Valid entity types are:\n\n- USER- GROUP" } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json;charset=UTF-8" } ], "description": "Search direct and implied permissions of users and groups. This endpoint returns a superset of the results returned by the /users and /groups endpoints because it allows filtering by project and global permissions too.\n\nThe authenticated user must have REPO_ADMIN permission for the specified repository or a higher project/global permission to call this resource." }, "response": [] }, { "name": "Get users with permission to repository", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/permissions/users", "query": [ { "key": "filter", "value": "{{filter}}", "disabled": true, "description": "If specified only user names containing the supplied string will be returned." }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve a page of users that have been granted at least one permission for the specified repository.\n\nThe authenticated user must have REPO_ADMIN permission for the specified repository or a higher project or global permission to call this resource." }, "response": [] }, { "name": "Update user repository permission", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/permissions/users", "query": [ { "key": "name", "value": "{{name}}", "disabled": false, "description": "The names of the users." }, { "key": "permission", "value": "{{permission}}", "disabled": false, "description": "The permission to grant" } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "PUT", "header": [], "description": "Promote or demote a user's permission level for the specified repository. Available repository permissions are:\n\n- REPO_READ- REPO_WRITE- REPO_ADMINSee the Bitbucket Data Center documentation for a detailed explanation of what each permission entails.\n\nThe authenticated user must have REPO_ADMIN permission for the specified repository or a higher project or global permission to call this resource. In addition, a user may not reduce their own permission level unless they have a project or global permission that already implies that permission." }, "response": [] }, { "name": "Revoke user repository permission", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/permissions/users", "query": [ { "key": "name", "value": "{{name}}", "disabled": false, "description": "The name of the user." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Revoke all permissions for the specified repository for a user.\n\nThe authenticated user must have REPO_ADMIN permission for the specified repository or a higher project or global permission to call this resource.\n\nIn addition, a user may not revoke their own repository permissions if they do not have a higher project or global permission." }, "response": [] }, { "name": "Get users without repository permission", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/permissions/users/none", "query": [ { "key": "filter", "value": "{{filter}}", "disabled": true, "description": "If specified only user names containing the supplied string will be returned." }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve a page of licensed users that have no granted permissions for the specified repository.\n\nThe authenticated user must have REPO_ADMIN permission for the specified repository or a higher project or global permission to call this resource." }, "response": [] } ] }, { "name": "Project", "item": [ { "name": "Search for ref restrictions", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}branch-permissions/latest/projects/:projectKey/restrictions", "query": [ { "key": "matcherType", "value": "{{matcherType}}", "disabled": true, "description": "Matcher type to filter on" }, { "key": "matcherId", "value": "{{matcherId}}", "disabled": true, "description": "Matcher id to filter on. Requires the matcherType parameter to be specified also." }, { "key": "type", "value": "{{type}}", "disabled": true, "description": "Types of restrictions to filter on." }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Search for restrictions using the supplied parameters.\n\nThe authenticated user must have PROJECT_ADMIN permission or higher to call this resource. Only authenticated users may call this resource." }, "response": [] }, { "name": "Create multiple ref restrictions", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}branch-permissions/latest/projects/:projectKey/restrictions", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/vnd.atl.bitbucket.bulk+json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Allows creating multiple restrictions at once.", "body": { "mode": "raw" } }, "response": [] }, { "name": "Get a ref restriction", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}branch-permissions/latest/projects/:projectKey/restrictions/:id", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "id", "value": "{{id}}", "description": "The restriction id.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Returns a restriction as specified by a restriction id.\n\nThe authenticated user must have PROJECT_ADMIN permission or higher to call this resource. Only authenticated users may call this resource." }, "response": [] }, { "name": "Delete a ref restriction", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}branch-permissions/latest/projects/:projectKey/restrictions/:id", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "id", "value": "{{id}}", "description": "The restriction id.", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Deletes a restriction as specified by a restriction id.\n\nThe authenticated user must have PROJECT_ADMIN permission or higher to call this resource. Only authenticated users may call this resource." }, "response": [] }, { "name": "Get project avatar", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/hooks/:hookKey/avatar", "query": [ { "key": "version", "value": "{{version}}", "disabled": true, "description": "(optional) Version used for HTTP caching only - any non-blank version will result in a large max-age Cache-Control header. Note that this does not affect the Last-Modified header." } ], "variable": [ { "key": "hookKey", "value": "{{hookKey}}", "description": "The complete module key of the hook module.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve the avatar for the project matching the supplied moduleKey." }, "response": [] }, { "name": "Get projects", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects", "query": [ { "key": "name", "value": "{{name}}", "disabled": true, "description": "Name to filter by." }, { "key": "permission", "value": "{{permission}}", "disabled": true, "description": "Permission to filter by" }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve a page of projects. \n\nOnly projects for which the authenticated user has the PROJECT_VIEW permission will be returned." }, "response": [] }, { "name": "Create a new project", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects", "query": [], "variable": [] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" } ], "description": "Create a new project. \n\nTo include a custom avatar for the project, the project definition should contain an additional attribute with the key avatar and the value a data URI containing Base64-encoded image data. The URI should be in the following format: data:(content type, e.g. image/png);base64,(data) If the data is not Base64-encoded, or if a character set is defined in the URI, or the URI is otherwise invalid, project creation will fail. \n\nThe authenticated user must have PROJECT_CREATE permission to call this resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Get a project", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve the project matching the supplied projectKey. \n\nThe authenticated user must have PROJECT_VIEW permission for the specified project to call this resource." }, "response": [] }, { "name": "Update project", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false } ] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Update the project matching the projectKey supplied in the resource path. \n\nTo include a custom avatar for the updated project, the project definition should contain an additional attribute with the key avatar and the value a data URI containing Base64-encoded image data. The URI should be in the following format: \n``` data:(content type, e.g. image/png);base64,(data)```\n\nIf the data is not Base64-encoded, or if a character set is defined in the URI, or the URI is otherwise invalid, project creation will fail. \n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Delete project", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Delete the project matching the supplied projectKey. \n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource." }, "response": [] }, { "name": "Get avatar for project", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/avatar.png", "query": [ { "key": "s", "value": "{{s}}", "disabled": true, "description": "The desired size of the image. The server will return an image as close as possible to the specified size." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve the avatar for the project matching the supplied projectKey. \n\nThe authenticated user must have PROJECT_VIEW permission for the specified project to call this resource." }, "response": [] }, { "name": "Update project avatar", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/avatar.png", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "multipart/form-data" } ], "description": "Update the avatar for the project matching the supplied projectKey. \n\nThis resource accepts POST multipart form data, containing a single image in a form-field named 'avatar'. \n\nThere are configurable server limits on both the dimensions (1024x1024 pixels by default) and uploaded file size (1MB by default). Several different image formats are supported, but PNG and JPEG are preferred due to the file size limit. \n\nThis resource has Cross-Site Request Forgery (XSRF) protection. To allow the request to pass the XSRF check the caller needs to send an X-Atlassian-Token HTTP header with the value no-check. \n\nAn example curl request to upload an image name 'avatar.png' would be: ```curl -X POST -u username:password -H \"X-Atlassian-Token: no-check\" http://example.com/rest/api/1.0/projects/STASH/avatar.png -F avatar=@avatar.png ```\n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource.", "body": { "mode": "formdata", "formdata": [ { "key": "avatar", "description": "The avatar file to upload.", "disabled": true, "type": "file" } ] } }, "response": [] }, { "name": "Get configured hook scripts", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/hook-scripts", "query": [ { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Return a page of hook scripts configured for the specified project. \n\nThis endpoint requires **PROJECT_ADMIN** permission." }, "response": [] }, { "name": "Create/update a hook script", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/hook-scripts/:scriptId", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "scriptId", "value": "{{scriptId}}", "description": "The ID of the hook script", "disabled": false } ] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Creates/updates the hook script configuration for the provided hook script and project. \n\nThis endpoint requires **PROJECT_ADMIN** permission.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Remove a hook script", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/hook-scripts/:scriptId", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "scriptId", "value": "{{scriptId}}", "description": "The ID of the hook script", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Removes the hook script from the set of hook scripts configured to run in all repositories under the project. \n\nThis endpoint requires **PROJECT_ADMIN** permission." }, "response": [] }, { "name": "Revoke project permissions", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/permissions", "query": [ { "key": "user", "value": "{{user}}", "disabled": true, "description": "The names of the users" }, { "key": "group", "value": "{{group}}", "disabled": true, "description": "The names of the groups" } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Revoke all permissions for the specified project for the given groups and users.\n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project or a higher global permission to call this resource.\n\nIn addition, a user may not revoke a group's permission if their own permission would be revoked as a result, nor may they revoke their own permission unless they have a global permission that already implies that permission." }, "response": [] }, { "name": "Get groups with permission to project", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/permissions/groups", "query": [ { "key": "filter", "value": "{{filter}}", "disabled": true, "description": "If specified only group names containing the supplied string will be returned" }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve a page of groups that have been granted at least one permission for the specified project.\n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project or a higher global permission to call this resource." }, "response": [] }, { "name": "Update group project permission", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/permissions/groups", "query": [ { "key": "name", "value": "{{name}}", "disabled": true, "description": "The names of the groups" }, { "key": "permission", "value": "{{permission}}", "disabled": true, "description": "The permission to grant.See the [permissions documentation](https://confluence.atlassian.com/display/BitbucketServer/Using+project+permissions)for a detailed explanation of what each permission entails. Available project permissions are:\n\n- PROJECT_READ\n- PROJECT_WRITE\n- PROJECT_ADMIN\n\n\n" } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false } ] }, "method": "PUT", "header": [], "description": "Promote or demote a group's permission level for the specified project.\n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project or a higher global permission to call this resource. In addition, a user may not demote a group's permission level if theirown permission level would be reduced as a result." }, "response": [] }, { "name": "Revoke group project permission", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/permissions/groups", "query": [ { "key": "name", "value": "{{name}}", "disabled": true, "description": "The name of the group" } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false } ] }, "method": "DELETE", "header": [], "description": " Revoke all permissions for the specified project for a group.\n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project or a higher global permission to call this resource.\n\nIn addition, a user may not revoke a group's permissions if it will reduce their own permission level." }, "response": [] }, { "name": "Get groups without project permission", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/permissions/groups/none", "query": [ { "key": "filter", "value": "{{filter}}", "disabled": true, "description": "If specified only group names containing the supplied string will be returned" }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false } ] }, "method": "GET", "header": [], "description": "Retrieve a page of groups that have no granted permissions for the specified project.\n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project or a higher" }, "response": [] }, { "name": "Search project permissions", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/permissions/search", "query": [ { "key": "permission", "value": "{{permission}}", "disabled": true, "description": "Permissions to filter by. See the [permissions documentation](https://confluence.atlassian.com/display/BitbucketServer/Using+project+permissions)for a detailed explanation of what each permission entails. This parameter can be specified multiple times to filter by more than one permission, and can contain global and project permissions.\n\n" }, { "key": "filterText", "value": "{{filterText}}", "disabled": true, "description": "Name of the user or group to filter the name of" }, { "key": "type", "value": "{{type}}", "disabled": true, "description": "Type of entity (user or group)Valid entity types are:\n\n- USER- GROUP" } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json;charset=UTF-8" } ], "description": "Search direct and implied permissions of principals (users and groups). This endpoint returns a superset of the results returned by the /users and /groups endpoints because it allows filtering by global permissions too.\n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project or a higher global permission to call this resource." }, "response": [] }, { "name": "Get users with permission to project", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/permissions/users", "query": [ { "key": "filter", "value": "{{filter}}", "disabled": true, "description": "If specified only user names containing the supplied string will be returned" }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve a page of users that have been granted at least one permission for the specified project.\n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project or a higher global permission to call this resource." }, "response": [] }, { "name": "Update user project permission", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/permissions/users", "query": [ { "key": "name", "value": "{{name}}", "disabled": true, "description": "The names of the users" }, { "key": "permission", "value": "{{permission}}", "disabled": true, "description": "The permission to grant.See the [permissions documentation](https://confluence.atlassian.com/display/BitbucketServer/Using+project+permissions)for a detailed explanation of what each permission entails. Available project permissions are:\n\n- PROJECT_READ\n- PROJECT_WRITE\n- PROJECT_ADMIN\n\n\n" } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false } ] }, "method": "PUT", "header": [], "description": "Promote or demote a user's permission level for the specified project.\n\n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project or a higher global permission to call this resource. In addition, a user may not reduce their own permission level unless they have a global permission that already implies that permission." }, "response": [] }, { "name": "Revoke user project permission", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/permissions/users", "query": [ { "key": "name", "value": "{{name}}", "disabled": true, "description": "The name of the user" } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Revoke all permissions for the specified project for a user.\n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project or a higher global permission to call this resource.\n\nIn addition, a user may not revoke their own project permissions if they do not have a higher global permission." }, "response": [] }, { "name": "Get users without project permission", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/permissions/users/none", "query": [ { "key": "filter", "value": "{{filter}}", "disabled": true, "description": "If specified only user names containing the supplied string will be returned" }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve a page of licensed users that have no granted permissions for the specified project.\n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project or a higher global permission to call this resource." }, "response": [] }, { "name": "Check default project permission", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/permissions/:permission/all", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false }, { "key": "permission", "value": "{{permission}}", "description": "The permission to grant. Available project permissions are:\n\n- PROJECT_READ\n- PROJECT_WRITE\n- PROJECT_ADMIN\n\n\n", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Check whether the specified permission is the default permission (granted to all users) for a project.\n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project or a higher global permission to call this resource." }, "response": [] }, { "name": "Grant project permission", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/permissions/:permission/all", "query": [ { "key": "allow", "value": "{{allow}}", "disabled": true, "description": "true to grant the specified permission to all users, or false to revoke it" } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false }, { "key": "permission", "value": "{{permission}}", "description": "The permission to grant. Available project permissions are:\n\n- PROJECT_READ\n- PROJECT_WRITE\n- PROJECT_ADMIN\n\n\n", "disabled": false } ] }, "method": "POST", "header": [], "description": "Grant or revoke a project permission to all users, i.e. set the default permission.\n\n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project or a higher\nglobal permission to call this resource." }, "response": [] }, { "name": "Get repositories for project", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos", "query": [ { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve repositories from the project corresponding to the supplied projectKey. \n\nThe authenticated user must have PROJECT_READ permission for the specified project to call this resource." }, "response": [] }, { "name": "Create repository", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" } ], "description": "Create a new repository. Requires an existing project in which this repository will be created. The only parameters which will be used are name and scmId. \n\nThe authenticated user must have REPO_CREATE permission or higher, for the context project to call this resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Get repository", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve the repository matching the supplied projectKey and repositorySlug. \n\nThe authenticated user must have REPO_READ permission for the specified repository to call this resource." }, "response": [] }, { "name": "Update repository", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" } ], "description": "Update the repository matching the repositorySlug supplied in the resource path. \n\nThe repository's slug is derived from its name. If the name changes the slug may also change. \n\nThis resource can be used to change the repository's default branch by specifying a new default branch in the request. For example: \"defaultBranch\":\"main\"\n\nThis resource can be used to move the repository to a different project by specifying a new project in the request. For example: \"project\":{\"key\":\"NEW_KEY\"}\n\nThe authenticated user must have REPO_ADMIN permission for the specified repository to call this resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Fork repository", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" } ], "description": "Create a new repository forked from an existing repository. \n\nThe JSON body for this POST is not required to contain any properties. Even the name may be omitted. The following properties will be used, if provided: \n\n- \"name\":\"Fork name\" - Specifies the forked repository's name \n - Defaults to the name of the origin repository if not specified\n- \"defaultBranch\":\"main\" - Specifies the forked repository's default branch\n - Defaults to the origin repository's default branch if not specified\n- \"project\":{\"key\":\"TARGET_KEY\"} - Specifies the forked repository's target project by key\n - Defaults to the current user's personal project if not specified\n\n\nThe authenticated user must have REPO_READ permission for the specified repository and PROJECT_ADMIN on the target project to call this resource. Note that users always have PROJECT_ADMIN permission on their personal projects.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Delete repository", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Schedule the repository matching the supplied projectKey and repositorySlug to be deleted. \n\nThe authenticated user must have sufficient permissions specified by the repository delete policy to call this resource. The default permission required is REPO_ADMIN permission." }, "response": [] }, { "name": "Get repository contributing guidelines", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/contributing", "query": [ { "key": "at", "value": "{{at}}", "disabled": true, "description": "A specific commit or ref to retrieve the guidelines at, or the default branch if not specified" }, { "key": "markup", "value": "{{markup}}", "disabled": true, "description": "If present or \"true\", triggers the raw content to be markup-rendered and returned as HTML; otherwise, if not specified, or any value other than \"true\", the content is streamed without markup" }, { "key": "htmlEscape", "value": "{{htmlEscape}}", "disabled": true, "description": "(Optional) true if HTML should be escaped in the input markup, false otherwise. If not specified, the value of the markup.render.html.escape property, which is true by default, will be used" }, { "key": "includeHeadingId", "value": "{{includeHeadingId}}", "disabled": true, "description": "(Optional) true if headings should contain an ID based on the heading content. If not specified, the value of the markup.render.headerids property, which is false by default, will be used" }, { "key": "hardwrap", "value": "{{hardwrap}}", "disabled": true, "description": "(Optional) Whether the markup implementation should convert newlines to breaks. If not specified, the value of the markup.render.hardwrap property, which is true by default, will be used" } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieves the contributing guidelines for the repository, if they've been defined. \n\nThis checks the repository for a CONTRIBUTING file, optionally with an md or txt extension, and, if found, streams it. By default, the raw content of the file is streamed. Appending ?markup to the URL will stream an HTML-rendered version instead. \n\nThe authenticated user must have REPO_READ permission for the specified repository to call this resource." }, "response": [] }, { "name": "Get repository default branch", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/default-branch", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieves the repository's configured default branch. \n\nEvery repository has a configured default branch, but that branch may not actually exist in the repository. For example, a newly-created repository will have a configured default branch even though no branches have been pushed yet. \n\nThe authenticated user must have REPO_READ permission for the specified repository to call this resource." }, "response": [] }, { "name": "Update default branch for repository", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/default-branch", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" } ], "description": "Update the default branch of a repository. \n\nThe authenticated user must have REPO_ADMIN permission for the specified repository to call this resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Get repository forks", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/forks", "query": [ { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve repositories which have been forked from this one. Unlike #getRelatedRepositories(Repository, PageRequest) related repositories, this only looks at a given repository's direct forks. If those forks have themselves been the origin of more forks, such \"grandchildren\" repositories will not be retrieved. \n\nOnly repositories to which the authenticated user has REPO_READ permission will be included, even if other repositories have been forked from this one." }, "response": [] }, { "name": "Get repository license", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/license", "query": [ { "key": "at", "value": "{{at}}", "disabled": true, "description": "A specific commit or ref to retrieve the guidelines at, or the default branch if not specified" }, { "key": "markup", "value": "{{markup}}", "disabled": true, "description": "If present or \"true\", triggers the raw content to be markup-rendered and returned as HTML; otherwise, if not specified, or any value other than \"true\", the content is streamed without markup" }, { "key": "htmlEscape", "value": "{{htmlEscape}}", "disabled": true, "description": "(Optional) true if HTML should be escaped in the input markup, false otherwise. If not specified, the value of the markup.render.html.escape property, which is true by default, will be used" }, { "key": "includeHeadingId", "value": "{{includeHeadingId}}", "disabled": true, "description": "(Optional) true if headings should contain an ID based on the heading content. If not specified, the value of the markup.render.headerids property, which is false by default, will be used" }, { "key": "hardwrap", "value": "{{hardwrap}}", "disabled": true, "description": "(Optional) Whether the markup implementation should convert newlines to breaks. If not specified, the value of the markup.render.hardwrap property, which is true by default, will be used" } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieves the license for the repository, if it's been defined. \n\nThis checks the repository for a LICENSE file, optionally with an md or txtextension, and, if found, streams it. By default, the raw content of the file is streamed. Appending ?markup to the URL will stream an HTML-rendered version instead. \n\nThe authenticated user must have REPO_READ permission for the specified repository to call this resource." }, "response": [] }, { "name": "Get repository readme", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/readme", "query": [ { "key": "at", "value": "{{at}}", "disabled": true, "description": "A specific commit or ref to retrieve the guidelines at, or the default branch if not specified" }, { "key": "markup", "value": "{{markup}}", "disabled": true, "description": "If present or \"true\", triggers the raw content to be markup-rendered and returned as HTML; otherwise, if not specified, or any value other than \"true\", the content is streamed without markup" }, { "key": "htmlEscape", "value": "{{htmlEscape}}", "disabled": true, "description": "(Optional) true if HTML should be escaped in the input markup, false otherwise. If not specified, the value of the markup.render.html.escape property, which is true by default, will be used" }, { "key": "includeHeadingId", "value": "{{includeHeadingId}}", "disabled": true, "description": "(Optional) true if headings should contain an ID based on the heading content. If not specified, the value of the markup.render.headerids property, which is false by default, will be used" }, { "key": "hardwrap", "value": "{{hardwrap}}", "disabled": true, "description": "(Optional) Whether the markup implementation should convert newlines to breaks. If not specified, the value of the markup.render.hardwrap property, which is true by default, will be used" } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieves the README for the repository, if it's been defined. \n\nThis checks the repository for a README file, optionally with an md or txtextension, and, if found, streams it. By default, the raw content of the file is streamed. Appending ?markup to the URL will stream an HTML-rendered version instead. Note that, when streaming HTML, relative URLs in the README will not work if applied relative to this URL. \n\nThe authenticated user must have REPO_READ permission for the specified repository to call this resource." }, "response": [] }, { "name": "Retry repository creation", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/recreate", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "If a create or fork operation fails, calling this method will clean up the broken repository and try again. The repository must be in an INITIALISATION_FAILED state. \n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource." }, "response": [] }, { "name": "Get related repository", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/related", "query": [ { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve repositories which are related to this one. Related repositories are from the same Repository#getHierarchyId() hierarchy as this repository. \n\nOnly repositories to which the authenticated user has REPO_READ permission will be included, even if more repositories are part of this repository's hierarchy." }, "response": [] }, { "name": "Get enforcing project setting", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/settings-restriction", "query": [ { "key": "namespace", "value": "{{namespace}}", "disabled": false, "description": "The namespace used to identify the provider of the feature" }, { "key": "componentKey", "value": "{{componentKey}}", "disabled": true, "description": "The component key to uniquely identify individually restrictable subcomponents of a feature within the provided feature key and namespace" }, { "key": "featureKey", "value": "{{featureKey}}", "disabled": false, "description": "The feature key to uniquely identify the feature within the provided namespace" } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Get a specified project settings restriction for the given namespace, feature key and component key.\nNote that not providing the component key will **not** return restrictions for the namespace and feature key with a component key set.\n\nThe authenticated user must have **PROJECT_VIEW** permission for the target project to retrieve a settings restriction." }, "response": [] }, { "name": "Enforce project restriction", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/settings-restriction", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Create a new project settings restriction for the given project.\n\nThe authenticated user must have **PROJECT_ADMIN** permission for the target project to create a settings restriction.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Stop enforcing project restriction", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/settings-restriction", "query": [ { "key": "namespace", "value": "{{namespace}}", "disabled": false, "description": "A namespace used to identify the provider of the feature" }, { "key": "componentKey", "value": "{{componentKey}}", "disabled": true, "description": "A key to uniquely identify individually restrictable subcomponents of a feature within the provided feature key and namespace" }, { "key": "featureKey", "value": "{{featureKey}}", "disabled": false, "description": "A key to uniquely identify the feature within the provided namespace" } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Delete a specified project settings restriction.\n\nIf a restriction does not exist for the specified project, namespace, featureKey, and componentKey, the request will be ignored and a 204 response will be returned.\n\nThe authenticated user must have **PROJECT_ADMIN** permission for the target project to delete a settings restriction." }, "response": [] }, { "name": "Get all enforcing project settings", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/settings-restriction/all", "query": [ { "key": "namespace", "value": "{{namespace}}", "disabled": false, "description": "A namespace used to identify the provider of the feature" }, { "key": "featureKey", "value": "{{featureKey}}", "disabled": false, "description": "A key to uniquely identify the feature within the provided namespace" }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Get all project settings restrictions for the given namespace and feature key, including those with a component key set.\n\nThe authenticated user must have **PROJECT_VIEW** permission for the target project to retrieve a settings restrictions." }, "response": [] }, { "name": "Get auto decline settings", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/settings/auto-decline", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieves the auto decline settings for the supplied project. Default settings are returned if no explicit settings have been set for the project." }, "response": [] }, { "name": "Create/Update auto decline settings", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/settings/auto-decline", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false } ] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Creates or updates the auto decline settings for the supplied project.\n\nThe authenticated user must have PROJECT_ADMIN permission for this project to call the resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Delete auto decline settings", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/settings/auto-decline", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Delete auto decline settings for the supplied project.\n\nThe authenticated user must have PROJECT_ADMIN permission for this project to call the resource." }, "response": [] }, { "name": "Get pull request auto-merge settings", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/settings/auto-merge", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieves the pull request auto-merge settings for the supplied project. Default settings will be returned if no explicit settings have been set for the project\n\nThe authenticated user must have PROJECT_VIEW permission for this project to call the resource." }, "response": [] }, { "name": "Create or update the pull request auto-merge settings", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/settings/auto-merge", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false } ] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Creates or updates the pull request auto-merge settings for the supplied project, and applies the restriction action specified in the request.\n\nThe authenticated user must have PROJECT_ADMIN permission for this project to call the resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Delete pull request auto-merge settings", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/settings/auto-merge", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Deletes pull request auto-merge settings for the supplied project.\n\nThe authenticated user must have PROJECT_ADMIN permission for this project to call the resource." }, "response": [] }, { "name": "Get repository hooks", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/settings/hooks", "query": [ { "key": "type", "value": "{{type}}", "disabled": true, "description": "The optional type to filter by." }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve a page of repository hooks for this project. \n\nThe authenticated user must have PROJECT_READ permission for the specified project to call this resource." }, "response": [] }, { "name": "Get a repository hook", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/settings/hooks/:hookKey", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "hookKey", "value": "{{hookKey}}", "description": "The hook key.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve a repository hook for this project. \n\nThe authenticated user must have PROJECT_READ permission for the specified project to call this resource." }, "response": [] }, { "name": "Enable repository hook", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/settings/hooks/:hookKey/enabled", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "hookKey", "value": "{{hookKey}}", "description": "The hook key.", "disabled": false } ] }, "method": "PUT", "header": [ { "key": "Content-Length", "value": "{{Content-Length}}", "description": "The content length.", "disabled": true }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Enable a repository hook for this project and optionally apply new configuration. \n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource. \n\nA JSON document may be provided to use as the settings for the hook. These structure and validity of the document is decided by the plugin providing the hook." }, "response": [] }, { "name": "Disable repository hook", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/settings/hooks/:hookKey/enabled", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "hookKey", "value": "{{hookKey}}", "description": "The hook key.", "disabled": false } ] }, "method": "DELETE", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Disable a repository hook for this project. \n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource." }, "response": [] }, { "name": "Get repository hook settings", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/settings/hooks/:hookKey/settings", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "hookKey", "value": "{{hookKey}}", "description": "The hook key.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve the settings for a repository hook for this project. \n\nThe authenticated user must have PROJECT_READ permission for the specified project to call this resource." }, "response": [] }, { "name": "Update repository hook settings", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/settings/hooks/:hookKey/settings", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "hookKey", "value": "{{hookKey}}", "description": "The complete module key of the hook module.", "disabled": false } ] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Modify the settings for a repository hook for this project. \n\nThe service will reject any settings which are too large, the current limit is 32KB once serialized. \n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource. \n\nA JSON document can be provided to use as the settings for the hook. These structure and validity of the document is decided by the plugin providing the hook.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Get merge strategy", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/settings/pull-requests/:scmId", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "scmId", "value": "{{scmId}}", "description": "The SCM to get strategies for.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve the merge strategy configuration for this project and SCM. \n\nThe authenticated user must have PROJECT_READ permission for the context repository to call this resource." }, "response": [] }, { "name": "Update merge strategy", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/settings/pull-requests/:scmId", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "scmId", "value": "{{scmId}}", "description": "The SCM to get strategies for.", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Update the pull request merge strategy configuration for this project and SCM. \n\nThe authenticated user must have PROJECT_ADMIN permission for the context repository to call this resource. \n\nOnly the strategies provided will be enabled, the default must be set and included in the set of strategies. \n\nAn explicitly set pull request merge strategy configuration can be deleted by POSTing a document with an empty \"mergeConfig\" attribute. i.e: \n{ \n \"mergeConfig\": {} \n} \n\n\nUpon completion of this request, the effective configuration will be the configuration explicitly set for the SCM, or if no such explicit configuration is set then the default configuration will be used.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Find webhooks", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/webhooks", "query": [ { "key": "event", "value": "{{event}}", "disabled": true, "description": "List of com.atlassian.webhooks.WebhookEvent IDs to filter for" }, { "key": "statistics", "value": "{{statistics}}", "disabled": true, "description": "true if statistics should be provided for all found webhooks" } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Find webhooks in this project. \n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource." }, "response": [] }, { "name": "Create webhook", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/webhooks", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Create a webhook for the project specified via the URL. \n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Test webhook", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/webhooks/test", "query": [ { "key": "webhookId", "value": "{{webhookId}}", "disabled": true }, { "key": "sslVerificationRequired", "value": "{{sslVerificationRequired}}", "disabled": true }, { "key": "url", "value": "{{url}}", "disabled": true, "description": "The url in which to connect to" } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Test connectivity to a specific endpoint. \n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Get webhook", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/webhooks/:webhookId", "query": [ { "key": "statistics", "value": "{{statistics}}", "disabled": true, "description": "true if statistics should be provided for the webhook" } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "webhookId", "value": "{{webhookId}}", "description": "ID of the webhook", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Get a webhook by ID. \n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource." }, "response": [] }, { "name": "Update webhook", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/webhooks/:webhookId", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "webhookId", "value": "{{webhookId}}", "description": "Id of the existing webhook", "disabled": false } ] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Update an existing webhook. \n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Delete webhook", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/webhooks/:webhookId", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "webhookId", "value": "{{webhookId}}", "description": "The ID of the webhook to be deleted.", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Delete a webhook for the project specified via the URL. \n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource." }, "response": [] }, { "name": "Get last webhook invocation details", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/webhooks/:webhookId/latest", "query": [ { "key": "event", "value": "{{event}}", "disabled": true, "description": "The string ID of a specific event to retrieve the last invocation for." }, { "key": "outcome", "value": "{{outcome}}", "disabled": true, "description": "The outcome to filter for. Can be SUCCESS, FAILURE, ERROR. None specified means that the all will be considered" } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "webhookId", "value": "{{webhookId}}", "description": "ID of the webhook", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Get the latest invocations for a specific webhook. \n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource." }, "response": [] }, { "name": "Get webhook statistics", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/webhooks/:webhookId/statistics", "query": [ { "key": "event", "value": "{{event}}", "disabled": true, "description": "The string ID of a specific event to retrieve the last invocation for. May be empty, in which case all events are considered" } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "webhookId", "value": "{{webhookId}}", "description": "ID of the webhook", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Get the statistics for a specific webhook. \n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource." }, "response": [] }, { "name": "Get webhook statistics summary", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/webhooks/:webhookId/statistics/summary", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "webhookId", "value": "{{webhookId}}", "description": "ID of the webhook", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Get the statistics summary for a specific webhook. \n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource." }, "response": [] } ] }, { "name": "Pull Requests", "item": [ { "name": "Create default reviewer", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}default-reviewers/latest/projects/:projectKey/condition", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Create a default reviewer pull request condition for the given project.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Update the default reviewer", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}default-reviewers/latest/projects/:projectKey/condition/:id", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "id", "value": "{{id}}", "description": "The ID of the pull request condition.", "disabled": false } ] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Update the default reviewer pull request condition for the given ID.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Remove default reviewer", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}default-reviewers/latest/projects/:projectKey/condition/:id", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "id", "value": "{{id}}", "description": "The ID of the pull request condition.", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Delete the default reviewer pull request condition associated with the given ID." }, "response": [] }, { "name": "Get default reviewers", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}default-reviewers/latest/projects/:projectKey/conditions", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Return a page of default reviewer pull request conditions that have been configured for this project." }, "response": [] }, { "name": "Create default reviewers condition", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}default-reviewers/latest/projects/:projectKey/repos/:repositorySlug/condition", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Create a default reviewer pull request condition for the given repository.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Update a default reviewer condition", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}default-reviewers/latest/projects/:projectKey/repos/:repositorySlug/condition/:id", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "id", "value": "{{id}}", "description": "The ID of the pull request condition", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Update the default reviewer pull request condition for the given ID.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Delete a default reviewer condition", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}default-reviewers/latest/projects/:projectKey/repos/:repositorySlug/condition/:id", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "id", "value": "{{id}}", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Delete the default reviewer pull request condition associated with the given ID." }, "response": [] }, { "name": "Get configured default reviewers", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}default-reviewers/latest/projects/:projectKey/repos/:repositorySlug/conditions", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Return a page of default reviewer pull request conditions that have been configured for this repository." }, "response": [] }, { "name": "Get required reviewers for PR creation", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}default-reviewers/latest/projects/:projectKey/repos/:repositorySlug/reviewers", "query": [ { "key": "targetRepoId", "value": "{{targetRepoId}}", "disabled": true, "description": "The ID of the repository in which the target ref exists" }, { "key": "sourceRepoId", "value": "{{sourceRepoId}}", "disabled": true, "description": "The ID of the repository in which the source ref exists" }, { "key": "sourceRefId", "value": "{{sourceRefId}}", "disabled": true, "description": "The ID of the source ref" }, { "key": "targetRefId", "value": "{{targetRefId}}", "disabled": true, "description": "The ID of the target ref" } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Return a set of users who are required reviewers for pull requests created from the given source repository and ref to the given target ref in this repository." }, "response": [] }, { "name": "React to a PR comment", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}comment-likes/latest/projects/:projectKey/repos/:repositorySlug/pull-requests/:pullRequestId/comments/:commentId/reactions/:emoticon", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "commentId", "value": "{{commentId}}", "description": "The comment id.", "disabled": false }, { "key": "pullRequestId", "value": "{{pullRequestId}}", "description": "The pull request id.", "disabled": false }, { "key": "emoticon", "value": "{{emoticon}}", "description": "The emoticon to add", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Add an emoticon reaction to a pull request comment" }, "response": [] }, { "name": "Remove a reaction from a PR comment", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}comment-likes/latest/projects/:projectKey/repos/:repositorySlug/pull-requests/:pullRequestId/comments/:commentId/reactions/:emoticon", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "commentId", "value": "{{commentId}}", "description": "The comment id.", "disabled": false }, { "key": "pullRequestId", "value": "{{pullRequestId}}", "description": "The pull request id.", "disabled": false }, { "key": "emoticon", "value": "{{emoticon}}", "description": "The emoticon to remove", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Remove an emoticon reaction from a pull request comment" }, "response": [] }, { "name": "Check PR rebase precondition", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}git/latest/projects/:projectKey/repos/:repositorySlug/pull-requests/:pullRequestId/rebase", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "pullRequestId", "value": "{{pullRequestId}}", "description": "The ID of the pull request within the repository.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Checks preconditions to determine whether the pull request can be rebased.\n\nSome of the preconditions are:\n\n- The pull request is between Git repositories\n- The pull request is currently open\n- The pull request's {@link PullRequest#getFromRef \"from\" ref} is a branch\n - In other words, the qualified ID for the \"from\" ref must start with refs/heads/\n - Tags, and other non-standard refs, cannot be rebased\n- The current user has an e-mail address\n - Pull requests cannot be rebased anonymously\n - `git rebase` records the current user as the committer for the rebased commits, which requires a name and e-mail address\n- The current user has write access to the {@link PullRequest#getFromRef \"from\" ref}'s repository\n - Note that in order to view a pull request a user is only required to have read access to the {@link PullRequest#getToRef toRef}'s repository, so just because a user can see a pull request does not mean they can request a rebase\n\n\nThis list is not exhaustive, and the exact set of preconditions applied can be extended by third-party add-ons.\n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource." }, "response": [] }, { "name": "Rebase pull request", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}git/latest/projects/:projectKey/repos/:repositorySlug/pull-requests/:pullRequestId/rebase", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "pullRequestId", "value": "{{pullRequestId}}", "description": "The ID of the pull request within the repository.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Rebases the specified pull request, rewriting the incoming commits to start from the tip commit of the pull request's target branch. This operation alters the pull request's source branch and cannot be undone.\n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets and REPO_WRITE permission for the pull request's source repository to call this resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Get merge strategies", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/pull-requests/:scmId", "query": [], "variable": [ { "key": "scmId", "value": "{{scmId}}", "description": "the id of the scm to get strategies for", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve the merge strategies available for this instance. \n\nThe user must be authenticated to call this resource." }, "response": [] }, { "name": "Update merge strategies", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/pull-requests/:scmId", "query": [], "variable": [ { "key": "scmId", "value": "{{scmId}}", "description": "the id of the scm to get strategies for", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Update the pull request merge strategies for the context repository. \n\nThe authenticated user must have ADMIN permission to call this resource. \n\nOnly the strategies provided will be enabled, only one may be set to default \n\nThe commit message template will not be updated if not provided, and will be deleted if the `commitMessageTemplate` attribute is empty, i.e: `commitMessageTemplate: {}`.\n\nAn explicitly set pull request merge strategy configuration can be deleted by POSTing a document with an empty `mergeConfig` attribute. i.e:\n```\n{ \n \"mergeConfig\": {} \n} \n```\n\nUpon completion of this request, the effective configuration will be the default configuration.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Get repository pull requests containing commit", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/commits/:commitId/pull-requests", "query": [ { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false }, { "key": "commitId", "value": "{{commitId}}", "description": "the commit ID", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve a page of pull requests in the current repository that contain the given commit.\n\nThe user must be authenticated and have access to the specified repository to call this resource." }, "response": [] }, { "name": "Search pull request participants", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/participants", "query": [ { "key": "filter", "value": "{{filter}}", "disabled": true, "description": "(optional) Return only users, whose username, name or email address contain the filter value" }, { "key": "role", "value": "{{role}}", "disabled": true, "description": "(optional) The role associated with the pull request participant. This must be one of AUTHOR, REVIEWER, or PARTICIPANT" }, { "key": "direction", "value": "{{direction}}", "disabled": true, "description": "(optional), Defaults to INCOMING) the direction relative to the specified repository. Either INCOMING or OUTGOING." }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve a page of participant users for all the pull requests to or from the specified repository. \n\nOptionally clients can specify following filters." }, "response": [] }, { "name": "Get pull requests for repository", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/pull-requests", "query": [ { "key": "withAttributes", "value": "{{withAttributes}}", "disabled": true, "description": "(optional) defaults to true, whether to return additional pull request attributes" }, { "key": "at", "value": "{{at}}", "disabled": true, "description": "(optional) a fully-qualified branch ID to find pull requests to or from, such as refs/heads/master" }, { "key": "withProperties", "value": "{{withProperties}}", "disabled": true, "description": "(optional) defaults to true, whether to return additional pull request properties" }, { "key": "filterText", "value": "{{filterText}}", "disabled": true, "description": "(optional) If specified, only pull requests where the title or description contains the supplied string will be returned." }, { "key": "state", "value": "{{state}}", "disabled": true, "description": "(optional, defaults to OPEN). Supply ALL to return pull request in any state. If a state is supplied only pull requests in the specified state will be returned. Either OPEN, DECLINED or MERGED." }, { "key": "order", "value": "{{order}}", "disabled": true, "description": "(optional, defaults to NEWEST) the order to return pull requests in, either OLDEST (as in: \"oldest first\") or NEWEST." }, { "key": "direction", "value": "{{direction}}", "disabled": true, "description": "(optional, defaults to INCOMING) the direction relative to the specified repository. Either INCOMING or OUTGOING." }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve a page of pull requests to or from the specified repository. \n\nThe authenticated user must have REPO_READ permission for the specified repository to call this resource. Optionally clients can specify PR participant filters. Each filter has a mandatory username.N parameter, and the optional role.N and approved.N parameters. \n\n- username.N - the \"root\" of a single participant filter, where \"N\" is a natural number starting from 1. This allows clients to specify multiple participant filters, by providing consecutive filters as username.1, username.2 etc. Note that the filters numbering has to start with 1 and be continuous for all filters to be processed. The total allowed number of participant filters is 10 and all filters exceeding that limit will be dropped.\n- role.N(optional) the role associated with username.N. This must be one of AUTHOR, REVIEWER, or PARTICIPANT\n- approved.N (optional) the approved status associated with username.N. That is whether username.N has approved the PR. Either true, or false\n" }, "response": [] }, { "name": "Create pull request", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/pull-requests", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" } ], "description": "Create a new pull request from a source branch or tag to a target branch. The source and target may be in the same repository, or different ones. (Note that different repositories must belong to the same Repository#getHierarchyId() hierarchy.) \n\nThe fromRef may be a branch or a tag. The toRef is required to be a branch. Tags are not allowed as targets because tags are intended to be immutable and should not be changed after they are created. \n\nThe authenticated user must have REPO_READ permission for the fromRef and toRef repositories to call this resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Get pull request", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/pull-requests/:pullRequestId", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "pullRequestId", "value": "{{pullRequestId}}", "description": "The ID of the pull request within the repository", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve a pull request. \n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource." }, "response": [] }, { "name": "Update pull request metadata", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/pull-requests/:pullRequestId", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "pullRequestId", "value": "{{pullRequestId}}", "description": "The ID of the pull request within the repository", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Update the title, description, reviewers or destination branch of an existing pull request. \n\n**Note:** the reviewers list may be updated using this resource. However the author and participants list may not. \n\nThe authenticated user must either: \n\n- be the author of the pull request and have the REPO_READ permission for the repository that this pull request targets; or\n- have the REPO_WRITE permission for the repository that this pull request targets\n\n\nto call this resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Delete pull request", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/pull-requests/:pullRequestId", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "pullRequestId", "value": "{{pullRequestId}}", "description": "The ID of the pull request within the repository", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "DELETE", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" } ], "description": "Deletes a pull request. \n\nTo call this resource, users must be authenticated and have permission to view the pull request. Additionally, they must: \n\n- be the pull request author, if the system is configured to allow authors to delete their own pull requests (this is the default) OR \n- have repository administrator permission for the repository the pull request is targeting\n\n\nA body containing the version of the pull request must be provided with this request. \n\n`{ \"version\": 1 }`", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Stream raw pull request diff", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/pull-requests/:pullRequestId.diff", "query": [ { "key": "contextLines", "value": "{{contextLines}}", "disabled": true, "description": "The number of context lines to include around added/removed lines in the diff" }, { "key": "whitespace", "value": "{{whitespace}}", "disabled": true, "description": "optional whitespace flag which can be set to ignore-all" } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "pullRequestId", "value": "{{pullRequestId}}", "description": "The ID of the pull request within the repository", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "text/plain" } ], "description": "Streams the raw diff for a pull request. \n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource." }, "response": [] }, { "name": "Stream pull request as patch", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/pull-requests/:pullRequestId.patch", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "pullRequestId", "value": "{{pullRequestId}}", "description": "The ID of the pull request within the repository", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Streams a patch representing a pull request. \n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource." }, "response": [] }, { "name": "Get pull request activity", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/pull-requests/:pullRequestId/activities", "query": [ { "key": "fromType", "value": "{{fromType}}", "disabled": true, "description": "(required if fromId is present) the type of the activity item specified by fromId (either COMMENT or ACTIVITY)" }, { "key": "fromId", "value": "{{fromId}}", "disabled": true, "description": "(optional) the ID of the activity item to use as the first item in the returned page" }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "pullRequestId", "value": "{{pullRequestId}}", "description": "The ID of the pull request within the repository", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve a page of activity associated with a pull request. \n\nActivity items include comments, approvals, rescopes (i.e. adding and removing of commits), merges and more. \n\nDifferent types of activity items may be introduced in newer versions of Stash or by user installed plugins, so clients should be flexible enough to handle unexpected entity shapes in the returned page. \n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource." }, "response": [] }, { "name": "Get auto-merge request for pull request", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/pull-requests/:pullRequestId/auto-merge", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "pullRequestId", "value": "{{pullRequestId}}", "description": "The ID of the pull request within the repository", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Returns an auto-merge request for the pull request, if requested.\n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource." }, "response": [] }, { "name": "Auto-merge pull request", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/pull-requests/:pullRequestId/auto-merge", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "pullRequestId", "value": "{{pullRequestId}}", "description": "The ID of the pull request within the repository", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Requests the system to try merging the pull request if auto-merge was requested on it.\n\nThe authenticated user must have REPO_WRITE permission for the repository that this pull request targets to call this resource." }, "response": [] }, { "name": "Cancel auto-merge for pull request", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/pull-requests/:pullRequestId/auto-merge", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "pullRequestId", "value": "{{pullRequestId}}", "description": "The ID of the pull request within the repository", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Cancels a request to auto-merge the pull request, if the pull request was not merged yet.\n\nThe authenticated user must have REPO_WRITE permission for the repository that this pull request targets to call this resource." }, "response": [] }, { "name": "Search pull request comments", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/pull-requests/:pullRequestId/blocker-comments", "query": [ { "key": "count", "value": "{{count}}", "disabled": true, "description": "If true only the count of the comments by state will be returned (and not the body of the comments)." }, { "key": "state", "value": "{{state}}", "disabled": true }, { "key": "states", "value": "{{states}}", "disabled": true, "description": "(optional). If supplied, only comments with a state in the given list will be returned. The state can be OPEN or RESOLVED." }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "pullRequestId", "value": "{{pullRequestId}}", "description": "The pull request ID.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Gets comments matching the given set of field values for the specified pull request. (Note this does not perform any kind of searching for comments by their text). \n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource." }, "response": [] }, { "name": "Add new blocker comment", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/pull-requests/:pullRequestId/blocker-comments", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "pullRequestId", "value": "{{pullRequestId}}", "description": "The pull request ID.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" } ], "description": "Add a new blocker comment. \n\nComments can be added in a few places by setting different attributes: \n\nGeneral pull request blocker comment: \n```\n\n{ \n \"text\": \"A task on a pull request.\" \n}\n```\n\nBlocker reply to a comment: \n\n```\n\n{\n \"text\": \"This reply is a task.\", \n \"parent\": { \n \"id\": 1 \n } \n} \n```\n\nGeneral blocker file comment:\n\n```\n\n{\n \"text\": \"A blocker comment on a file.\", \n \"anchor\": { \n \"diffType\": \"RANGE\", \n \"fromHash\": \"6df3858eeb9a53a911cd17e66a9174d44ffb02cd\", \n \"path\": \"path/to/file\", \n \"srcPath\": \"path/to/file\", \n \"toHash\": \"04c7c5c931b9418ca7b66f51fe934d0bd9b2ba4b\" \n } \n } \n```\n\nBlocker file line comment: \n\n```\n\n{ \n \"text\": \"A task on a particular line within a file.\", \n \"anchor\": { \n \"diffType\": \"COMMIT\", \n \"line\": 1, \n \"lineType\": \"CONTEXT\", \n \"fileType\": \"FROM\", \n \"fromHash\": \"6df3858eeb9a53a911cd17e66a9174d44ffb02cd\", \n \"path\": \"path/to/file\", \n \"srcPath\": \"path/to/file\", \n \"toHash\": \"04c7c5c931b9418ca7b66f51fe934d0bd9b2ba4b\" \n } \n } \n```\n\nFor file and line comments, 'path' refers to the path of the file to which the comment should be applied and 'srcPath' refers to the path the that file used to have (only required for copies and moves). Also, fromHash and toHash refer to the sinceId / untilId (respectively) used to produce the diff on which the comment was added. Finally diffType refers to the type of diff the comment was added on. For backwards compatibility purposes if no diffType is provided and no fromHash/toHash pair is provided the diffType will be resolved to 'EFFECTIVE'. In any other cases the diffType is REQUIRED. \n\nFor line comments, 'line' refers to the line in the diff that the comment should apply to. 'lineType' refers to the type of diff hunk, which can be: \n\n- 'ADDED' - for an added line;\n- 'REMOVED' - for a removed line; or\n- 'CONTEXT' - for a line that was unmodified but is in the vicinity of the diff.\n \n\n'fileType' refers to the file of the diff to which the anchor should be attached - which is of relevance when displaying the diff in a side-by-side way. Currently the supported values are: \n\n- 'FROM' - the source file of the diff\n - 'TO' - the destination file of the diff\n\n\nIf the current user is not a participant the user is added as a watcher of the pull request. \n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Get pull request comment", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/pull-requests/:pullRequestId/blocker-comments/:commentId", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "commentId", "value": "{{commentId}}", "description": "The ID of the comment to retrieve", "disabled": false }, { "key": "pullRequestId", "value": "{{pullRequestId}}", "description": "The pull request ID.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieves a pull request comment.\n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource." }, "response": [] }, { "name": "Update pull request comment", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/pull-requests/:pullRequestId/blocker-comments/:commentId", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "commentId", "value": "{{commentId}}", "description": "The ID of the comment to retrieve.", "disabled": false }, { "key": "pullRequestId", "value": "{{pullRequestId}}", "description": "The pull request ID.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Update a comment, with the following restrictions: \n\n- only the author of the comment may update the text of the comment\n- only the author of the comment, the author of the pull request or repository admins and above may update the other fields of a comment\n\n\nConvert a comment to a task or vice versa. \n\nComments can be converted to tasks by setting the 'severity' attribute to 'BLOCKER': \n```\n\n{ \n\"severity\": \"BLOCKER\" \n}\n\n```\n\nTasks can be converted to comments by setting the 'severity' attribute to 'NORMAL': ```\n\n{ \n\"severity\": \"NORMAL\" \n}\n\n```\n\nResolve a blocker comment. \n\nBlocker comments can be resolved by setting the 'state' attribute to 'RESOLVED': ```\n\n{ \n\"state\": \"RESOLVED\" \n} \n```\n\nNote: the supplied JSON object must contain a version that must match the server's version of the comment or the update will fail. To determine the current version of the comment, the comment should be fetched from the server prior to the update. Look for the 'version' attribute in the returned JSON structure. \n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Delete pull request comment", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/pull-requests/:pullRequestId/blocker-comments/:commentId", "query": [ { "key": "version", "value": "{{version}}", "disabled": true, "description": "The expected version of the comment. This must match the server's version of the comment or the delete will fail. To determine the current version of the comment, the comment should be fetched from the server prior to the delete. Look for the 'version' attribute in the returned JSON structure." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "commentId", "value": "{{commentId}}", "description": "The ID of the comment to retrieve.", "disabled": false }, { "key": "pullRequestId", "value": "{{pullRequestId}}", "description": "The pull request ID.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Delete a pull request comment. Anyone can delete their own comment. Only users with REPO_ADMIN and above may delete comments created by other users.\n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource." }, "response": [] }, { "name": "Gets pull request changes", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/pull-requests/:pullRequestId/changes", "query": [ { "key": "sinceId", "value": "{{sinceId}}", "disabled": true, "description": "The since commit hash to stream changes for a RANGE arbitrary change scope" }, { "key": "changeScope", "value": "{{changeScope}}", "disabled": true, "description": "UNREVIEWED to stream the unreviewed changes for the current user (if they exist); RANGE to stream changes between two arbitrary commits (requires 'sinceId' and 'untilId'); otherwise ALL to stream all changes (the default)" }, { "key": "untilId", "value": "{{untilId}}", "disabled": true, "description": "The until commit hash to stream changes for a RANGE arbitrary change scope" }, { "key": "withComments", "value": "{{withComments}}", "disabled": true, "description": "true to apply comment counts in the changes (the default); otherwise, false to stream changes without comment counts" }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "pullRequestId", "value": "{{pullRequestId}}", "description": "The pull request ID.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Gets changes for the specified PullRequest.\n\nIf the changeScope query parameter is set to 'UNREVIEWED', the application will attempt to stream unreviewed changes based on the lastReviewedCommit of the current user, which are the changes between the lastReviewedCommit and the latest commit of the source branch. The current user is considered to not have any unreviewed changes for the pull request when the lastReviewedCommit is either null (everything is unreviewed, so all changes are streamed), equal to the latest commit of the source branch (everything is reviewed), or no longer on the source branch (the source branch has been rebased). In these cases, the application will fall back to streaming all changes (the default), which is the effective diff for the pull request. The type of changes streamed can be determined by the changeScope parameter included in the properties map of the response. \n\nNote: This resource is currently not paged. The server will return at most one page. The server will truncate the number of changes to either the request's page limit or an internal maximum, whichever is smaller. The start parameter of the page request is also ignored. \n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource." }, "response": [] }, { "name": "Get pull request comments for path", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/pull-requests/:pullRequestId/comments", "query": [ { "key": "path", "value": "{{path}}", "disabled": false, "description": "The path to stream comments for a given path" }, { "key": "fromHash", "value": "{{fromHash}}", "disabled": true, "description": "The from commit hash to stream comments for a RANGE or COMMIT arbitrary change scope" }, { "key": "anchorState", "value": "{{anchorState}}", "disabled": true, "description": "ACTIVE to stream the active comments; ORPHANED to stream the orphaned comments; ALL to stream both the active and the orphaned comments;" }, { "key": "diffType", "value": "{{diffType}}", "disabled": true }, { "key": "toHash", "value": "{{toHash}}", "disabled": true, "description": "The to commit hash to stream comments for a RANGE or COMMIT arbitrary change scope" }, { "key": "state", "value": "{{state}}", "disabled": true }, { "key": "diffTypes", "value": "{{diffTypes}}", "disabled": true, "description": "EFFECTIVE to stream the comments related to the effective diff of the pull request; RANGE to stream comments related to a commit range between two arbitrary commits (requires 'fromHash' and 'toHash'); COMMIT to stream comments related to a commit between two arbitrary commits (requires 'fromHash' and 'toHash')" }, { "key": "states", "value": "{{states}}", "disabled": true, "description": "(optional). If supplied, only comments with a state in the given list will be returned. The state can be OPEN or RESOLVED." }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "pullRequestId", "value": "{{pullRequestId}}", "description": "The pull request ID.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Gets comments for the specified pull request and path. \n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource." }, "response": [] }, { "name": "Add pull request comment", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/pull-requests/:pullRequestId/comments", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "pullRequestId", "value": "{{pullRequestId}}", "description": "The pull request ID.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" } ], "description": "Add a new comment. \n\nComments can be added in a few places by setting different attributes: General pull request comment: \n { \n \"text\": \"An insightful general comment on a pull request.\" \n } \n Reply to a comment: { \n \"text\": \"A measured reply.\", \n \"parent\": { \n \"id\": 1 \n } \n } \n General file comment: { \n \"text\": \"An insightful general comment on a file.\", \n \"anchor\": { \n \"diffType\": \"RANGE\", \n \"fromHash\": \"6df3858eeb9a53a911cd17e66a9174d44ffb02cd\", \n \"path\": \"path/to/file\", \n \"srcPath\": \"path/to/file\", \n \"toHash\": \"04c7c5c931b9418ca7b66f51fe934d0bd9b2ba4b\" \n } \n } \n File line comment: { \n \"text\": \"A pithy comment on a particular line within a file.\", \n \"anchor\": { \n \"diffType\": \"COMMIT\", \n \"line\": 1, \n \"lineType\": \"CONTEXT\", \n \"fileType\": \"FROM\", \n \"fromHash\": \"6df3858eeb9a53a911cd17e66a9174d44ffb02cd\", \n \"path\": \"path/to/file\", \n \"srcPath\": \"path/to/file\", \n \"toHash\": \"04c7c5c931b9418ca7b66f51fe934d0bd9b2ba4b\" \n } \n } \n \n\n Add a new task. \n\nTasks are just comments with the attribute 'severity' set to 'BLOCKER': \n\nGeneral pull request task: { \n \"text\": \"A task on a pull request.\", \n \"severity\": \"BLOCKER\" \n } \n \n\n Add a pending comment. \n\nPending comments are just comments with the attribute 'state' set to 'PENDING': \n\nPending comment: { \n \"text\": \"This is a pending comment\", \n \"state\": \"PENDING\" \n } \n \n\nFor file and line comments, 'path' refers to the path of the file to which the comment should be applied and 'srcPath' refers to the path the that file used to have (only required for copies and moves). Also, fromHash and toHash refer to the sinceId / untilId (respectively) used to produce the diff on which the comment was added. Finally diffType refers to the type of diff the comment was added on. For backwards compatibility purposes if no diffType is provided and no fromHash/toHash pair is provided the diffType will be resolved to 'EFFECTIVE'. In any other cases the diffType is REQUIRED. \n\nFor line comments, 'line' refers to the line in the diff that the comment should apply to. 'lineType' refers to the type of diff hunk, which can be: \n\n- 'ADDED' - for an added line;\n- 'REMOVED' - for a removed line; or\n- 'CONTEXT' - for a line that was unmodified but is in the vicinity of the diff.\n'fileType' refers to the file of the diff to which the anchor should be attached - which is of relevance when displaying the diff in a side-by-side way. Currently the supported values are: \n\n- 'FROM' - the source file of the diff\n- 'TO' - the destination file of the diff\nIf the current user is not a participant the user is added as a watcher of the pull request. \n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Get a pull request comment", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/pull-requests/:pullRequestId/comments/:commentId", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "commentId", "value": "{{commentId}}", "description": "The ID of the comment to retrieve.", "disabled": false }, { "key": "pullRequestId", "value": "{{pullRequestId}}", "description": "The pull request ID.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieves a pull request comment. \n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource." }, "response": [] }, { "name": "Update pull request comment", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/pull-requests/:pullRequestId/comments/:commentId", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "commentId", "value": "{{commentId}}", "description": "The ID of the comment to retrieve.", "disabled": false }, { "key": "pullRequestId", "value": "{{pullRequestId}}", "description": "The pull request ID.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Update a comment, with the following restrictions: \n\n- only the author of the comment may update the text of the comment\n- only the author of the comment, the author of the pull request or repository admins and above may update the other fields of a comment\n \n\nConvert a comment to a task or vice versa. \n\nComments can be converted to tasks by setting the 'severity' attribute to 'BLOCKER': \n { \n \"severity\": \"BLOCKER\" \n } \n \n\nTasks can be converted to comments by setting the 'severity' attribute to 'NORMAL': { \n \"severity\": \"NORMAL\" \n } \n \n\nResolve a task. \n\nTasks can be resolved by setting the 'state' attribute to 'RESOLVED': { \n \"state\": \"RESOLVED\" \n } \n \n\nNote: the supplied JSON object must contain a version that must match the server's version of the comment or the update will fail. To determine the current version of the comment, the comment should be fetched from the server prior to the update. Look for the 'version' attribute in the returned JSON structure. \n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Delete a pull request comment", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/pull-requests/:pullRequestId/comments/:commentId", "query": [ { "key": "version", "value": "{{version}}", "disabled": true, "description": "The expected version of the comment. This must match the server's version of the comment or the delete will fail. To determine the current version of the comment, the comment should be fetched from the server prior to the delete. Look for the 'version' attribute in the returned JSON structure." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "commentId", "value": "{{commentId}}", "description": "The ID of the comment to retrieve.", "disabled": false }, { "key": "pullRequestId", "value": "{{pullRequestId}}", "description": "The pull request ID.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Delete a pull request comment. Anyone can delete their own comment. Only users with REPO_ADMIN and above may delete comments created by other users. \n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource." }, "response": [] }, { "name": "Apply pull request suggestion", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/pull-requests/:pullRequestId/comments/:commentId/apply-suggestion", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "commentId", "value": "{{commentId}}", "description": "The ID of the comment to retrieve.", "disabled": false }, { "key": "pullRequestId", "value": "{{pullRequestId}}", "description": "The pull request ID.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" } ], "description": "Apply a suggestion contained within a comment.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Get commit message suggestion", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/pull-requests/:pullRequestId/commit-message-suggestion", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "pullRequestId", "value": "{{pullRequestId}}", "description": "The ID of the pull request to generate the suggestion for", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve a suggested commit message for the given Pull Request." }, "response": [] }, { "name": "Get pull request commits", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/pull-requests/:pullRequestId/commits", "query": [ { "key": "avatarScheme", "value": "{{avatarScheme}}", "disabled": true, "description": "The desired scheme for the avatar URL. If the parameter is not present URLs will use the same scheme as this request" }, { "key": "withCounts", "value": "{{withCounts}}", "disabled": true, "description": "If set to true, the service will add \"authorCount\" and \"totalCount\" at the end of the page. \"authorCount\" is the number of different authors and \"totalCount\" is the total number of commits." }, { "key": "avatarSize", "value": "{{avatarSize}}", "disabled": true, "description": "If present the service adds avatar URLs for commit authors. Should be an integer specifying the desired size in pixels. If the parameter is not present, avatar URLs will not be setCOMMIT to stream comments related to a commit between two arbitrary commits (requires 'fromHash' and 'toHash')" }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "pullRequestId", "value": "{{pullRequestId}}", "description": "ID of the pullrequest, part of the path", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve commits for the specified pull request. \n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource." }, "response": [] }, { "name": "Decline pull request", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/pull-requests/:pullRequestId/decline", "query": [ { "key": "version", "value": "{{version}}", "disabled": true, "description": "The current version of the pull request. If the server's version isn't the same as the specified version the operation will fail. To determine the current version of the pull request it should be fetched from the server prior to this operation. Look for the 'version' attribute in the returned JSON structure." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "pullRequestId", "value": "{{pullRequestId}}", "description": "The pullrequest ID provided by the path", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Decline a pull request. \n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Stream a diff within a pull request", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/pull-requests/:pullRequestId/diff/:path", "query": [ { "key": "avatarScheme", "value": "{{avatarScheme}}", "disabled": true, "description": "The security scheme for avatar URLs. If the scheme is not present then it is inherited from the request. It can be set to \"https\" to force the use of secure URLs. Not applicable if streaming raw diff" }, { "key": "contextLines", "value": "{{contextLines}}", "disabled": true, "description": "The number of context lines to include around added/removed lines in the diff" }, { "key": "sinceId", "value": "{{sinceId}}", "disabled": true, "description": "The since commit hash to stream a diff between two arbitrary hashes" }, { "key": "srcPath", "value": "{{srcPath}}", "disabled": true, "description": "The previous path to the file, if the file has been copied, moved or renamed" }, { "key": "diffType", "value": "{{diffType}}", "disabled": true, "description": "The type of diff being requested. When withComments is true this works as a hint to the system to attach the correct set of comments to the diff. Not applicable if streaming raw diff" }, { "key": "untilId", "value": "{{untilId}}", "disabled": true, "description": "The until commit hash to stream a diff between two arbitrary hashes" }, { "key": "whitespace", "value": "{{whitespace}}", "disabled": true, "description": "Optional whitespace flag which can be set to ignore-all" }, { "key": "withComments", "value": "{{withComments}}", "disabled": true, "description": "true to embed comments in the diff (the default); otherwise, false to stream the diff without comments. Not applicable if streaming raw diff" }, { "key": "avatarSize", "value": "{{avatarSize}}", "disabled": true, "description": "If present the service adds avatar URLs for comment authors where the provided value specifies the desired avatar size in pixels. Not applicable if streaming raw diff" }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "path", "value": "{{path}}", "description": "The path to the file which should be diffed (optional)", "disabled": false }, { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "pullRequestId", "value": "{{pullRequestId}}", "description": "The pull request ID.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Streams a diff within a pull request. \n\nIf the specified file has been copied, moved or renamed, the srcPath must also be specified to produce the correct diff. \n\nTo stream a raw text representation of the diff, this endpoint can be called with the request header 'Accept: text/plain'. \n\nNote: This RESTful endpoint is currently not paged. The server will internally apply a hard cap to the streamed lines, and it is not possible to request subsequent pages if that cap is exceeded. \n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource." }, "response": [] }, { "name": "Test if pull request can be merged", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/pull-requests/:pullRequestId/merge", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "pullRequestId", "value": "{{pullRequestId}}", "description": "The ID of the pull request within the repository", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Test whether a pull request can be merged. \n\nA pull request may not be merged if: \n\n- there are conflicts that need to be manually resolved before merging; and/or\n- one or more merge checks have vetoed the merge.\n\n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource." }, "response": [] }, { "name": "Merge pull request", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/pull-requests/:pullRequestId/merge", "query": [ { "key": "version", "value": "{{version}}", "disabled": true, "description": "The current version of the pull request. If the server's version isn't the same as the specified version the operation will fail. To determine the current version of the pull request it should be fetched from the server prior to this operation. Look for the 'version' attribute in the returned JSON structure." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "pullRequestId", "value": "{{pullRequestId}}", "description": "The ID of the pull request within the repository", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Merge the specified pull request immediately or set the pull request to auto-merge when all the merge checks pass by setting autoMerge field in the request body.\n\nThe authenticated user must have REPO_WRITE permission for the repository that this pull request targets to call this resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Get pull request participants", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/pull-requests/:pullRequestId/participants", "query": [ { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "pullRequestId", "value": "{{pullRequestId}}", "description": "The ID of the pull request within the repository", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieves a page of the participants for a given pull request. \n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource." }, "response": [] }, { "name": "Assign pull request participant role", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/pull-requests/:pullRequestId/participants", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "pullRequestId", "value": "{{pullRequestId}}", "description": "The ID of the pull request within the repository", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Assigns a participant to an explicit role in pull request. Currently only the REVIEWER role may be assigned. \n\nIf the user is not yet a participant in the pull request, they are made one and assigned the supplied role. \n\nIf the user is already a participant in the pull request, their previous role is replaced with the supplied role unless they are already assigned the AUTHOR role which cannot be changed and will result in a Bad Request (400) response code. \n\nThe authenticated user must have REPO_WRITE permission for the repository that this pull request targets to call this resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Change pull request status", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/pull-requests/:pullRequestId/participants/:userSlug", "query": [ { "key": "version", "value": "{{version}}", "disabled": true, "description": "The current version of the pull request. If the server's version isn't the same as the specified version the operation will fail. To determine the current version of the pull request it should be fetched from the server prior to this operation. Look for the 'version' attribute in the returned JSON structure." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "userSlug", "value": "{{userSlug}}", "description": "The slug for the user changing their status", "disabled": false }, { "key": "pullRequestId", "value": "{{pullRequestId}}", "description": "The ID of the pull request within the repository", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Change the current user's status for a pull request. Implicitly adds the user as a participant if they are not already. If the current user is the author, this method will fail. \n\nThe possible values for {@code status} are UNAPPROVED, NEEDS_WORK (which is referred to as \"Requested changes\" in the frontend from 8.10 onward), or APPROVED. \n\nIf the new {@code status} is NEEDS_WORK or APPROVED then the {@code lastReviewedCommit} for the participant will be updated to the latest commit of the source branch of the pull request. \n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Unassign pull request participant", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/pull-requests/:pullRequestId/participants/:userSlug", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "userSlug", "value": "{{userSlug}}", "description": "The slug for the user being unassigned", "disabled": false }, { "key": "pullRequestId", "value": "{{pullRequestId}}", "description": "The ID of the pull request within the repository", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Unassigns a participant from the REVIEWER role they may have been given in a pull request. \n\nIf the participant has no explicit role this method has no effect. \n\nAfterwards, the user will still remain a participant in the pull request but their role will be reduced to PARTICIPANT. This is because once made a participant of a pull request, a user will forever remain a participant. Only their role may be altered. \n\nThe authenticated user must have REPO_WRITE permission for the repository that this pull request targets to call this resource." }, "response": [] }, { "name": "Re-open pull request", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/pull-requests/:pullRequestId/reopen", "query": [ { "key": "version", "value": "{{version}}", "disabled": true, "description": "The current version of the pull request. If the server's version isn't the same as the specified version the operation will fail. To determine the current version of the pull request it should be fetched from the server prior to this operation. Look for the 'version' attribute in the returned JSON structure." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "pullRequestId", "value": "{{pullRequestId}}", "description": "The ID of the pull request within the repository", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Re-open a declined pull request. \n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Get pull request comment thread", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/pull-requests/:pullRequestId/review", "query": [ { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "pullRequestId", "value": "{{pullRequestId}}", "description": "The pull request ID.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Get the CommentThread threads which have Comment comments that have a CommentState#PENDING pending state and are part of the pull request review for the authenticated user." }, "response": [] }, { "name": "Complete pull request review", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/pull-requests/:pullRequestId/review", "query": [ { "key": "version", "value": "{{version}}", "disabled": true, "description": "The current version of the pull request. If the server's version isn't the same as the specified version the operation will fail. To determine the current version of the pull request it should be fetched from the server prior to this operation. Look for the 'version' attribute in the returned JSON structure." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "pullRequestId", "value": "{{pullRequestId}}", "description": "The pull request ID.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Complete a review on a pull request.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Discard pull request review", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/pull-requests/:pullRequestId/review", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "pullRequestId", "value": "{{pullRequestId}}", "description": "The pull request ID.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Discard a pull request review for the authenticated user. \n\nThe authenticated user must have REPO_READ permission for the repository to call this resource." }, "response": [] }, { "name": "Watch pull request", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/pull-requests/:pullRequestId/watch", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "pullRequestId", "value": "{{pullRequestId}}", "description": "The pull request ID.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "POST", "header": [], "description": "Add the authenticated user as a watcher for the specified pull request. \n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource." }, "response": [] }, { "name": "Stop watching pull request", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/pull-requests/:pullRequestId/watch", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "pullRequestId", "value": "{{pullRequestId}}", "description": "The pull request ID.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Remove the authenticated user as a watcher for the specified pull request. \n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource." }, "response": [] }, { "name": "Get all reviewer groups", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/settings/reviewer-groups", "query": [ { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve a page of reviewer groups of a given scope.\n\nThe authenticated user must have REPO_READ permission for the specified repository to call this resource." }, "response": [] }, { "name": "Create reviewer group", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/settings/reviewer-groups", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" } ], "description": "Create a reviewer group.\n\nThe authenticated user must have REPO_ADMIN permission for the specified repository to call this resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Get reviewer group", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/settings/reviewer-groups/:id", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "id", "value": "{{id}}", "description": "The ID of the reviewer group to be retrieved", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve a reviewer group.\n\nThe authenticated user must have REPO_READ permission for the specified repository to call this resource." }, "response": [] }, { "name": "Update reviewer group attributes", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/settings/reviewer-groups/:id", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "id", "value": "{{id}}", "description": "The ID of the reviewer group to be updated", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Update the attributes of a reviewer group.\n\nThe authenticated user must have REPO_ADMIN permission for the specified repository to call this resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Delete reviewer group", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/settings/reviewer-groups/:id", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "id", "value": "{{id}}", "description": "The ID of the reviewer group to be deleted", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Deletes a reviewer group.\n\nThe authenticated user must have REPO_ADMIN permission for the specified repository to call this resource." }, "response": [] }, { "name": "Get reviewer group users", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/settings/reviewer-groups/:id/users", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "id", "value": "{{id}}", "description": "The ID of the reviewer group to be retrieved", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json;charset=UTF-8" } ], "description": "Retrieve a list of the users of a reviewer group.\n\nThis does not return all the users of the group, only the users who have REPO_READ permission for the specified repository.\n\nThe authenticated user must have REPO_READ permission for the specified repository to call this resource." }, "response": [] }, { "name": "Get all reviewer groups", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/settings/reviewer-groups", "query": [ { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve a page of reviewer groups of a given scope.\n\nThe authenticated user must have PROJECT_READ permission for the specified project to call this resource." }, "response": [] }, { "name": "Create reviewer group", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/settings/reviewer-groups", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" } ], "description": "Create a reviewer group.\n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Get reviewer group", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/settings/reviewer-groups/:id", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "id", "value": "{{id}}", "description": "The ID of the reviewer group to be retrieved", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve a reviewer group.\n\nThe authenticated user must have PROJECT_READ permission for the specified project to call this resource." }, "response": [] }, { "name": "Update reviewer group attributes", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/settings/reviewer-groups/:id", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "id", "value": "{{id}}", "description": "The ID of the reviewer group to be updated", "disabled": false } ] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Update the attributes of a reviewer group.\n\nThe authenticated user must have PROJECT_READ permission for the specified project to call this resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Delete reviewer group", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/settings/reviewer-groups/:id", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "id", "value": "{{id}}", "description": "The ID of the reviewer group to be deleted", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Deletes a reviewer group.\n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource." }, "response": [] } ] }, { "name": "Repository", "item": [ { "name": "Create branch", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}branch-utils/latest/projects/:projectKey/repos/:repositorySlug/branches", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" } ], "description": " Creates a branch in the specified repository.\n\n\nThe authenticated user must have an effective REPO_WRITE permission to call this resource. If\nbranch permissions are set up in the repository, the authenticated user must also have access to the branch name\nthat is to be created.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Delete branch", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}branch-utils/latest/projects/:projectKey/repos/:repositorySlug/branches", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "DELETE", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" } ], "description": " Deletes a branch in the specified repository.\n\n\n If the branch does not exist, this operation will not raise an error. In other words after calling this resource\n and receiving a 204 response the branch provided in the request is guaranteed to not exist in the specified\n repository any more, regardless of its existence beforehand.\n\n\n The optional 'endPoint' parameter of the request may contain a commit ID that the provided ref name is\n expected to point to. Should the ref point to a different commit ID, a 400 response will be returned with\n appropriate error details.\n\n\n The authenticated user must have an effective REPO_WRITE permission to call this resource. If\n branch permissions are set up in the repository, the authenticated user must also have access to the branch name\n that is to be deleted.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Get branch", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}branch-utils/latest/projects/:projectKey/repos/:repositorySlug/branches/info/:commitId", "query": [ { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "commitId", "value": "{{commitId}}", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Gets the branch information associated with a single commit from a given repository." }, "response": [] }, { "name": "React to a comment", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}comment-likes/latest/projects/:projectKey/repos/:repositorySlug/commits/:commitId/comments/:commentId/reactions/:emoticon", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "commentId", "value": "{{commentId}}", "description": "The comment id", "disabled": false }, { "key": "commitId", "value": "{{commitId}}", "description": "The commit id", "disabled": false }, { "key": "emoticon", "value": "{{emoticon}}", "description": "The emoticon to add", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Add an emoticon reaction to a comment" }, "response": [] }, { "name": "Remove a reaction from comment", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}comment-likes/latest/projects/:projectKey/repos/:repositorySlug/commits/:commitId/comments/:commentId/reactions/:emoticon", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "commentId", "value": "{{commentId}}", "description": "The comment id", "disabled": false }, { "key": "commitId", "value": "{{commitId}}", "description": "The commit id", "disabled": false }, { "key": "emoticon", "value": "{{emoticon}}", "description": "The emoticon to remove", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Remove an emoticon reaction from a comment" }, "response": [] }, { "name": "Create tag", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}git/latest/projects/:projectKey/repos/:repositorySlug/tags", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" } ], "description": "Creates a tag in the specified repository.\n\nThe authenticated user must have an effective REPO_WRITE permission to call this resource.\n\n'LIGHTWEIGHT' and 'ANNOTATED' are the two type of tags that can be created. The 'startPoint' can either be a ref or a 'commit'.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Delete tag", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}git/latest/projects/:projectKey/repos/:repositorySlug/tags/:name", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "name", "value": "{{name}}", "description": "The name of the tag to be deleted.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Deletes a tag in the specified repository.\n\nThe authenticated user must have an effective REPO_WRITE permission to call this resource." }, "response": [] }, { "name": "Search for ref restrictions", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}branch-permissions/latest/projects/:projectKey/repos/:repositorySlug/restrictions", "query": [ { "key": "matcherType", "value": "{{matcherType}}", "disabled": true, "description": "Matcher type to filter on" }, { "key": "matcherId", "value": "{{matcherId}}", "disabled": true, "description": "Matcher id to filter on. Requires the matcherType parameter to be specified also." }, { "key": "type", "value": "{{type}}", "disabled": true, "description": "Types of restrictions to filter on." }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Search for restrictions using the supplied parameters.\n\nThe authenticated user must have REPO_ADMIN permission or higher to call this resource. Only authenticated users may call this resource." }, "response": [] }, { "name": "Create multiple ref restrictions", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}branch-permissions/latest/projects/:projectKey/repos/:repositorySlug/restrictions", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/vnd.atl.bitbucket.bulk+json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Allows creating multiple restrictions at once.", "body": { "mode": "raw" } }, "response": [] }, { "name": "Get a ref restriction", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}branch-permissions/latest/projects/:projectKey/repos/:repositorySlug/restrictions/:id", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "id", "value": "{{id}}", "description": "The restriction id.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Returns a restriction as specified by a restriction id. \n\nThe authenticated user must have REPO_ADMIN permission or higher to call this resource. Only authenticated users may call this resource." }, "response": [] }, { "name": "Delete a ref restriction", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}branch-permissions/latest/projects/:projectKey/repos/:repositorySlug/restrictions/:id", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "id", "value": "{{id}}", "description": "The restriction id.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Deletes a restriction as specified by a restriction id.\n\nThe authenticated user must have REPO_ADMIN permission or higher to call this resource. Only authenticated users may call this resource." }, "response": [] }, { "name": "Get synchronization status", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}sync/latest/projects/:projectKey/repos/:repositorySlug", "query": [ { "key": "at", "value": "{{at}}", "disabled": true, "description": "Retrieves the synchronization status for the specified ref within the repository, rather than for the entire repository" } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieves the synchronization status for the specified repository. In addition to listing refs which cannot be synchronized, if any, the status also provides the timestamp for the most recent synchronization and indicates whether synchronization is available and enabled. If \"?at\" is specified in the URL, the synchronization status for the specified ref is returned, rather than the complete repository status.\n\nThe authenticated user must have REPO_READ permission for the repository, or it must be public if the request is anonymous. Additionally, after synchronization is enabled for a repository, meaning synchronization was available at that time, permission changes and other actions can cause it to become unavailable. Even when synchronization is enabled, if it is no longer available for the repository it will not be performed." }, "response": [] }, { "name": "Disable synchronization", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}sync/latest/projects/:projectKey/repos/:repositorySlug", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Enables or disables synchronization for the specified repository. When synchronization is enabled, branches within the repository are immediately synchronized and the status is updated with the outcome. That initial synchronization is performed before the REST request returns, allowing it to return the updated status.\n\nThe authenticated user must have REPO_ADMIN permission for the specified repository. Anonymous users cannot manage synchronization, even on public repositories. Additionally, synchronization must be available for the specified repository. Synchronization is only available if:\n\n- The repository is a fork, since its origin is used as upstream\n- The owning user still has access to the fork's origin, if the repository is a personalfork", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Manual synchronization", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}sync/latest/projects/:projectKey/repos/:repositorySlug/synchronize", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Allows developers to apply a manual operation to bring a ref back in sync with upstream when it becomes out of sync due to conflicting changes. The following actions are supported:\n\n- MERGE: Merges in commits from the upstream ref. After applying this action, the synchronized ref will be AHEAD (as it still includes commits that do not exist upstream.\n - This action is only supported for DIVERGED refs\n - If a \"commitMessage\" is provided in the context, it will be used on the merge commit. Otherwise a default message is used.\n- DISCARD: Throws away local changes in favour of those made upstream. This is a destructive operation where commits in the local repository are lost.\n - No context entries are supported for this action\n - If the upstream ref has been deleted, the local ref is deleted as well\n - Otherwise, the local ref is updated to reference the same commit as upstream, even if the update is not fast-forward (similar to a forced push)\n\n\nThe authenticated user must have REPO_WRITE permission for the specified repository. Anonymous users cannot synchronize refs, even on public repositories. Additionally, synchronization must be enabled and available for the specified repository.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Get recently accessed repositories", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/profile/recent/repos", "query": [ { "key": "permission", "value": "{{permission}}", "disabled": true, "description": "(optional) If specified, it must be a valid repository permission level name and will limit the resulting repository list to ones that the requesting user has the specified permission level to. If not specified, the default REPO_READ permission level will be assumed." }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve a page of recently accessed repositories for the currently authenticated user. \n\nRepositories are ordered from most recently to least recently accessed. Only authenticated users may call this resource." }, "response": [] }, { "name": "Stream archive of repository", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/archive", "query": [ { "key": "path", "value": "{{path}}", "disabled": true, "description": "Paths to include in the streamed archive; may be repeated to include multiple paths" }, { "key": "filename", "value": "{{filename}}", "disabled": true, "description": "A filename to include the \"Content-Disposition\" header" }, { "key": "at", "value": "{{at}}", "disabled": true, "description": "The commit to stream an archive of; if not supplied, an archive of the default branch is streamed" }, { "key": "prefix", "value": "{{prefix}}", "disabled": true, "description": "A prefix to apply to all entries in the streamed archive; if the supplied prefix does not end with a trailing /, one will be added automatically" }, { "key": "format", "value": "{{format}}", "disabled": true, "description": "The format to stream the archive in; must be one of: zip, tar, tar.gz or tgz" } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Streams an archive of the repository's contents at the requested commit. If no `at=` commit is requested, an archive of the default branch is streamed.\n\nThe filename= query parameter may be used to specify the exact filename to include in the \"Content-Disposition\" header. If an explicit filename is not provided, one will be automatically generated based on what is being archived. Its format depends on the at= value: \n\n- No at= commit: <slug>-<default-branch-name>@<commit>.<format>; e.g. example-master@43c2f8a0fe8.zip\n- at=sha: <slug>-<at>.<format>; e.g. example-09bcbb00100cfbb5310fb6834a1d5ce6cac253e9.tar.gz\n- at=branchOrTag: <slug>-<branchOrTag>@<commit>.<format>; e.g. example-feature@bbb225f16e1.tar \n\n - If the branch or tag is qualified (e.g. refs/heads/master, the short name (master) will be included in the filename\n - If the branch or tag's short name includes slashes (e.g. release/4.6), they will be converted to hyphens in the filename (release-4.5)\n\n\n\n\nArchives may be requested in the following formats by adding the format= query parameter: \n\n- zip: A zip file using standard compression (Default)\n- tar: An uncompressed tarball\n- tar.gz or tgz: A GZip-compressed tarball\n\n\nThe contents of the archive may be filtered by using the path= query parameter to specify paths to include. path= may be specified multiple times to include multiple paths. \n\nThe prefix= query parameter may be used to define a directory (or multiple directories) where the archive's contents should be placed. If the prefix does not end with /, one will be added automatically. The prefix is always treated as a directory; it is not possible to use it to prepend characters to the entries in the archive. \n\nArchives of public repositories may be streamed by any authenticated or anonymous user. Streaming archives for non-public repositories requires an authenticated user with at least REPO_READ permission." }, "response": [] }, { "name": "Get an attachment", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/attachments/:attachmentId", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false }, { "key": "attachmentId", "value": "{{attachmentId}}", "description": "the attachment ID", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug", "disabled": false } ] }, "method": "GET", "header": [ { "key": "User-Agent", "value": "{{User-Agent}}", "disabled": true }, { "key": "Range", "value": "{{Range}}", "disabled": true }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve the attachment.\n\nThe authenticated user must have REPO_READ permission for the specified repository that is associated to the attachment.\n\nRange requests (see IETF RFC7233) are supported. However only a single range issupported. If multiple ranges are passed the ranges will be ignored and the entire content will be returned in the response." }, "response": [] }, { "name": "Delete an attachment", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/attachments/:attachmentId", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false }, { "key": "attachmentId", "value": "{{attachmentId}}", "description": "the attachment ID", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Delete an attachment.\n\nThe user must be authenticated and have REPO_ADMIN permission for the specified repository." }, "response": [] }, { "name": "Get attachment metadata", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/attachments/:attachmentId/metadata", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false }, { "key": "attachmentId", "value": "{{attachmentId}}", "description": "the attachment ID", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve the attachment metadata.\n\nThe authenticated user must have REPO_READ permission for the specified repository that is associated to the attachment that has the attachment metadata." }, "response": [] }, { "name": "Save attachment metadata", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/attachments/:attachmentId/metadata", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false }, { "key": "attachmentId", "value": "{{attachmentId}}", "description": "the attachment ID", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug", "disabled": false } ] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Save attachment metadata.\n\nThe authenticated user must have REPO_READ permission for the specified repository that is associated to the attachment that has the attachment metadata.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Delete attachment metadata", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/attachments/:attachmentId/metadata", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false }, { "key": "attachmentId", "value": "{{attachmentId}}", "description": "the attachment ID", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Delete attachment metadata.\n\nThe user must be authenticated and have REPO_ADMIN permission for the specified repository." }, "response": [] }, { "name": "Find branches", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/branches", "query": [ { "key": "boostMatches", "value": "{{boostMatches}}", "disabled": true, "description": "Controls whether exact and prefix matches will be boosted to the top" }, { "key": "orderBy", "value": "{{orderBy}}", "disabled": true, "description": "Ordering of refs either ALPHABETICAL (by name) or MODIFICATION (last updated)" }, { "key": "details", "value": "{{details}}", "disabled": true, "description": "Whether to retrieve plugin-provided metadata about each branch" }, { "key": "filterText", "value": "{{filterText}}", "disabled": true, "description": "The text to match on" }, { "key": "base", "value": "{{base}}", "disabled": true, "description": "Base branch or tag to compare each branch to (for the metadata providers that uses that information" }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve the branches matching the supplied filterText param. \n\nThe authenticated user must have REPO_READ permission for the specified repository to call this resource." }, "response": [] }, { "name": "Create branch", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/branches", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Creates a branch using the information provided in the RestCreateBranchRequest request \n\nThe authenticated user must have REPO_WRITE permission for the context repository to call this resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Get file content at revision", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/browse", "query": [ { "key": "noContent", "value": "{{noContent}}", "disabled": true, "description": "If blame&noContent only the blame is retrieved instead of the contents" }, { "key": "at", "value": "{{at}}", "disabled": true, "description": "The commit ID or ref to retrieve the content for" }, { "key": "size", "value": "{{size}}", "disabled": true, "description": "If true only the size will be returned for the file path instead of the contents" }, { "key": "blame", "value": "{{blame}}", "disabled": true, "description": "If present and not equal to 'false', the blame will be returned for the file as well" }, { "key": "type", "value": "{{type}}", "disabled": true, "description": "If true only the type will be returned for the file path instead of the contents" } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve a page of content for a file path at a specified revision. \n\nResponses from this endpoint vary widely depending on the query parameters. The example JSON is for a request that does not use size, type, blame or noContent. \n\n1. size will return a response like {\"size\":10000}\n2. type will return a response like {\"type\":\"FILE\"}, where possible values are \"DIRECTORY\", \"FILE\" and \"SUBMODULE\"\n3. blame without noContent will include blame for the lines of content returned on the page\n4. blame with noContent will omit file contents and only return blame for the requested lines\n5. noContent without blame is ignored and does nothing\n\n\nThe various parameters are \"processed\" in the above order. That means ?size=true&type=truewill return a size response, not a type one; the type parameter will be ignored. \n\nThe blame and noContent query parameters are handled differently from size and type. For blame and noContent, the presence of the parameter implies \"true\" if no value is specified; size and and type both require an explicit=true or they're treated as \"false\". \n\n- ?blame is the same as ?blame=true\n- ?blame&noContent is the same as ?blame=true&noContent=true\n- ?size is the same as ?size=false\n- ?type is the same as ?type=false\n\n\nThe authenticated user must have REPO_READ permission for the specified repository to call this resource." }, "response": [] }, { "name": "Get file content", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/browse/:path", "query": [ { "key": "noContent", "value": "{{noContent}}", "disabled": true, "description": "If blame&noContent only the blame is retrieved instead of the contents" }, { "key": "at", "value": "{{at}}", "disabled": true, "description": "The commit ID or ref to retrieve the content for" }, { "key": "size", "value": "{{size}}", "disabled": true, "description": "If true only the size will be returned for the file path instead of the contents" }, { "key": "blame", "value": "{{blame}}", "disabled": true, "description": "If present and not equal to 'false', the blame will be returned for the file as well" }, { "key": "type", "value": "{{type}}", "disabled": true, "description": "If true only the type will be returned for the file path instead of the contents" } ], "variable": [ { "key": "path", "value": "{{path}}", "description": "The file path to retrieve content from", "disabled": false }, { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve a page of content for a file path at a specified revision. \n\nResponses from this endpoint vary widely depending on the query parameters. The example JSON is for a request that does not use size, type, blame or noContent. \n\n1. size will return a response like {\"size\":10000}\n2. type will return a response like {\"type\":\"FILE\"}, where possible values are \"DIRECTORY\", \"FILE\" and \"SUBMODULE\"\n3. blame without noContent will include blame for the lines of content returned on the page\n4. blame with noContent will omit file contents and only return blame for the requested lines\n5. noContent without blame is ignored and does nothing\n\n\nThe various parameters are \"processed\" in the above order. That means ?size=true&type=truewill return a size response, not a type one; the type parameter will be ignored. \n\nThe blame and noContent query parameters are handled differently from size and type. For blame and noContent, the presence of the parameter implies \"true\" if no value is specified; size and and type both require an explicit=true or they're treated as \"false\". \n\n- ?blame is the same as ?blame=true\n- ?blame&noContent is the same as ?blame=true&noContent=true\n- ?size is the same as ?size=false\n- ?type is the same as ?type=false\n\n\nThe authenticated user must have REPO_READ permission for the specified repository to call this resource." }, "response": [] }, { "name": "Edit file", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/browse/:path", "query": [], "variable": [ { "key": "path", "value": "{{path}}", "description": "The path of the file that is to be modified or created", "disabled": false }, { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "multipart/form-data" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Update the content of path, on the given repository and branch. \n\nThis resource accepts PUT multipart form data, containing the file in a form-field named content. \n\nAn example curl request to update 'README.md' would be:\n\n```curl -X PUT -u username:password -F content=@README.md -F 'message=Updated using file-edit REST API' -F branch=master -F sourceCommitId=5636641a50b http://example.com/rest/api/latest/projects/PROJECT_1/repos/repo_1/browse/README.md ```\n\n- branch: the branch on which the path should be modified or created\n- content: the full content of the file at path \n- message: the message associated with this change, to be used as the commit message. Or null if the default message should be used.\n- sourceCommitId: the commit ID of the file before it was edited, used to identify if content has changed. Or null if this is a new file\n\n\nThe file can be updated or created on a new branch. In this case, the sourceBranch parameter should be provided to identify the starting point for the new branch and the branch parameter identifies the branch to create the new commit on.", "body": { "mode": "formdata", "formdata": [ { "key": "branch", "description": "The branch on which the path should be modified or created.", "disabled": true, "type": "text", "value": "{{branch}}" }, { "key": "content", "description": "The full content of the file at path.", "disabled": true, "type": "text", "value": "{{content}}" }, { "key": "message", "description": "The message associated with this change, to be used as the commit message. Or null if the default message should be used.", "disabled": true, "type": "text", "value": "{{message}}" }, { "key": "sourceBranch", "description": "The starting point for branch. If provided and different from branch, branch will be created as a new branch, branching off from sourceBranch.", "disabled": true, "type": "text", "value": "{{sourceBranch}}" }, { "key": "sourceCommitId", "description": "The commit ID of the file before it was edited, used to identify if content has changed. Or null if this is a new file", "disabled": true, "type": "text", "value": "{{sourceCommitId}}" } ] } }, "response": [] }, { "name": "Get changes made in commit", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/changes", "query": [ { "key": "until", "value": "{{until}}", "disabled": true, "description": "The commit to retrieve changes for" }, { "key": "since", "value": "{{since}}", "disabled": true, "description": "The commit to which until should be compared to produce a page of changes. If not specified the commit's first parent is assumed (if one exists)" }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve a page of changes made in a specified commit. \n\nNote: The implementation will apply a hard cap ({@code page.max.changes}) and it is not possible to request subsequent content when that cap is exceeded. \n\nThe authenticated user must have REPO_READ permission for the specified repository to call this resource." }, "response": [] }, { "name": "Get commits", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/commits", "query": [ { "key": "avatarScheme", "value": "{{avatarScheme}}", "disabled": true, "description": "The desired scheme for the avatar URL. If the parameter is not present URLs will use the same scheme as this request" }, { "key": "path", "value": "{{path}}", "disabled": true, "description": "An optional path to filter commits by" }, { "key": "withCounts", "value": "{{withCounts}}", "disabled": true, "description": "Optionally include the total number of commits and total number of unique authors" }, { "key": "followRenames", "value": "{{followRenames}}", "disabled": true, "description": "If true, the commit history of the specified file will be followed past renames. Only valid for a path to a single file." }, { "key": "until", "value": "{{until}}", "disabled": true, "description": "The commit ID (SHA1) or ref (inclusively) to retrieve commits before" }, { "key": "avatarSize", "value": "{{avatarSize}}", "disabled": true, "description": "If present the service adds avatar URLs for commit authors. Should be an integer specifying the desired size in pixels. If the parameter is not present, avatar URLs will not be set" }, { "key": "since", "value": "{{since}}", "disabled": true, "description": "The commit ID or ref (exclusively) to retrieve commits after" }, { "key": "merges", "value": "{{merges}}", "disabled": true, "description": "If present, controls how merge commits should be filtered. Can be either exclude, to exclude merge commits, include, to include both merge commits and non-merge commits or only, to only return merge commits." }, { "key": "ignoreMissing", "value": "{{ignoreMissing}}", "disabled": true, "description": "true to ignore missing commits, false otherwise" }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve a page of commits from a given starting commit or \"between\" two commits. If no explicit commit is specified, the tip of the repository's default branch is assumed. commits may be identified by branch or tag name or by ID. A path may be supplied to restrict the returned commits to only those which affect that path. \n\nThe authenticated user must have REPO_READ permission for the specified repository to call this resource." }, "response": [] }, { "name": "Get commit by ID", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/commits/:commitId", "query": [ { "key": "path", "value": "{{path}}", "disabled": true, "description": "An optional path to filter the commit by. If supplied the details returned may not be for the specified commit. Instead, starting from the specified commit, they will be the details for the first commit affecting the specified path." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false }, { "key": "commitId", "value": "{{commitId}}", "description": "The commit ID to retrieve", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve a single commit identified by its ID. In general, that ID is a SHA1. From 2.11, ref names like \"refs/heads/master\" are no longer accepted by this resource.\n\nThe authenticated user must have REPO_READ permission for the specified repository to call this resource." }, "response": [] }, { "name": "Get changes in commit", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/commits/:commitId/changes", "query": [ { "key": "withComments", "value": "{{withComments}}", "disabled": true, "description": "true to apply comment counts in the changes (the default); otherwise, false to stream changes without comment counts" }, { "key": "since", "value": "{{since}}", "disabled": true, "description": "The commit to which until should be compared to produce a page of changes. If not specified the commit's first parent is assumed (if one exists)" }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false }, { "key": "commitId", "value": "{{commitId}}", "description": "The commit to retrieve changes for", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve a page of changes made in a specified commit. \n\n Note: The implementation will apply a hard cap (page.max.changes) and it is not possible to request subsequent content when that cap is exceeded. \n\n The authenticated user must have REPO_READ permission for the specified repository to call this resource." }, "response": [] }, { "name": "Search for commit comments", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/commits/:commitId/comments", "query": [ { "key": "path", "value": "{{path}}", "disabled": true, "description": "The path to the file on which comments were made" }, { "key": "since", "value": "{{since}}", "disabled": true, "description": "For a merge commit, a parent can be provided to specify which diff the comments are on. For a commit range, a sinceId can be provided to specify where the comments are anchored from." }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false }, { "key": "commitId", "value": "{{commitId}}", "description": "The full ID of the commit within the repository", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieves the commit discussion comments that match the specified search criteria.\n\nIt is possible to retrieve commit discussion comments that are anchored to a range of commits by providing the sinceId that the comments anchored from.\n\nThe authenticated user must have REPO_READ permission for the repository that the commit is in to call this resource." }, "response": [] }, { "name": "Add a new commit comment", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/commits/:commitId/comments", "query": [ { "key": "since", "value": "{{since}}", "disabled": true, "description": "For a merge commit, a parent can be provided to specify which diff the comments should be on. For a commit range, a sinceId can be provided to specify where the comments should be anchored from." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false }, { "key": "commitId", "value": "{{commitId}}", "description": "The full ID of the commit within the repository", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" } ], "description": "Add a new comment.\n\nComments can be added in a few places by setting different attributes:\n\nGeneral commit comment:\n\n```{\n \"text\": \"An insightful general comment on a commit.\"\n}\n\n\nReply to a comment:\n{\n \"text\": \"A measured reply.\",\n \"parent\": {\n \"id\": 1\n }\n}\n\nGeneral file comment:\n{\n \"text\": \"An insightful general comment on a file.\",\n \"anchor\": {\n \"diffType\": \"COMMIT\",\n \"fromHash\": \"6df3858eeb9a53a911cd17e66a9174d44ffb02cd\",\n \"path\": \"path/to/file\",\n \"srcPath\": \"path/to/file\",\n \"toHash\": \"04c7c5c931b9418ca7b66f51fe934d0bd9b2ba4b\"\n }\n}\n\nFile line comment:\n{\n \"text\": \"A pithy comment on a particular line within a file.\",\n \"anchor\": {\n \"diffType\": \"COMMIT\",\n \"line\": 1,\n \"lineType\": \"CONTEXT\",\n \"fileType\": \"FROM\",\n \"fromHash\": \"6df3858eeb9a53a911cd17e66a9174d44ffb02cd\",\n \"path\": \"path/to/file\",\n \"srcPath\": \"path/to/file\",\n \"toHash\": \"04c7c5c931b9418ca7b66f51fe934d0bd9b2ba4b\"\n }\n}\n```\n\nNote: general file comments are an experimental feature and may change in the near future!\n\nFor file and line comments, 'path' refers to the path of the file to which the comment should be applied and 'srcPath' refers to the path the that file used to have (only required for copies and moves). Also, fromHash and toHash refer to the sinceId / untilId (respectively) used to produce the diff on which the comment was added. Finally diffType refers to the type of diff the comment was added on.\n\nFor line comments, 'line' refers to the line in the diff that the comment should apply to. 'lineType' refers to the type of diff hunk, which can be:- 'ADDED' - for an added line;- 'REMOVED' - for a removed line; or- 'CONTEXT' - for a line that was unmodified but is in the vicinity of the diff.'fileType' refers to the file of the diff to which the anchor should be attached - which is of relevance when displaying the diff in a side-by-side way. Currently the supported values are:- 'FROM' - the source file of the diff- 'TO' - the destination file of the diffIf the current user is not a participant the user is added as one and updated to watch the commit.\n\nThe authenticated user must have REPO_READ permission for the repository that the commit is in to call this resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Get a commit comment", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/commits/:commitId/comments/:commentId", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false }, { "key": "commentId", "value": "{{commentId}}", "description": "The ID of the comment to retrieve", "disabled": false }, { "key": "commitId", "value": "{{commitId}}", "description": "The full ID of the commit within the repository", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieves a commit discussion comment.\n\nThe authenticated user must have REPO_READ permission for the repository that the commit is in to call this resource." }, "response": [] }, { "name": "Update a commit comment", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/commits/:commitId/comments/:commentId", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false }, { "key": "commentId", "value": "{{commentId}}", "description": "The ID of the comment to retrieve", "disabled": false }, { "key": "commitId", "value": "{{commitId}}", "description": "The full ID of the commit within the repository", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug", "disabled": false } ] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Update a comment, with the following restrictions:\n\n- only the author of the comment may update the text of the comment\n- only the author of the comment or repository admins and above may update the other fields of a comment\n\n\nNote: the supplied supplied JSON object must contain a version that must match the server's version of the comment or the update will fail. To determine the current version of the comment, the comment should be fetched from the server prior to the update. Look for the 'version' attribute in the returned JSON structure.\n\nThe authenticated user must have REPO_READ permission for the repository that the commit is in to call this resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Delete a commit comment", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/commits/:commitId/comments/:commentId", "query": [ { "key": "version", "value": "{{version}}", "disabled": true, "description": "The expected version of the comment. This must match the server's version of the comment or the delete will fail. To determine the current version of the comment, the comment should be fetched from the server prior to the delete. Look for the 'version' attribute in the returned JSON structure." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false }, { "key": "commentId", "value": "{{commentId}}", "description": "the comment", "disabled": false }, { "key": "commitId", "value": "{{commitId}}", "description": "The full ID of the commit within the repository", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Delete a commit comment. Anyone can delete their own comment. Only users with REPO_ADMIN and above may delete comments created by other users. Comments which have replies may not be deleted, regardless of the user's granted permissions.\n\nThe authenticated user must have REPO_READ permission for the repository that the commit is in to call this resource." }, "response": [] }, { "name": "Get diff between revisions", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/commits/:commitId/diff/:path", "query": [ { "key": "srcPath", "value": "{{srcPath}}", "disabled": true, "description": "The source path for the file, if it was copied, moved or renamed" }, { "key": "avatarSize", "value": "{{avatarSize}}", "disabled": true, "description": "If present the service adds avatar URLs for comment authors where the provided value specifies the desired avatar size in pixels. Not applicable if streaming raw diff" }, { "key": "filter", "value": "{{filter}}", "disabled": true, "description": "Text used to filter files and lines (optional). Not applicable if streaming raw diff" }, { "key": "avatarScheme", "value": "{{avatarScheme}}", "disabled": true, "description": "The security scheme for avatar URLs. If the scheme is not present then it is inherited from the request. It can be set to \"https\" to force the use of secure URLs. Not applicable if streaming raw diff" }, { "key": "contextLines", "value": "{{contextLines}}", "disabled": true, "description": "The number of context lines to include around added/removed lines in the diff.Not applicable if streaming raw diff" }, { "key": "autoSrcPath", "value": "{{autoSrcPath}}", "disabled": true, "description": "true to automatically try to find the source path when it's not provided, false otherwise. Requires the path to be provided." }, { "key": "whitespace", "value": "{{whitespace}}", "disabled": true, "description": "Optional whitespace flag which can be set to ignore-all" }, { "key": "withComments", "value": "{{withComments}}", "disabled": true, "description": "true to embed comments in the diff (the default); otherwise false to stream the diff without comments. Not applicable if streaming raw diff" }, { "key": "since", "value": "{{since}}", "disabled": true, "description": "The base revision to diff from. If omitted the parent revision of the until revision is used" } ], "variable": [ { "key": "commitId", "value": "{{commitId}}", "description": "The full ID of the commit within the repository", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug", "disabled": false }, { "key": "path", "value": "{{path}}", "description": "The path to the file which should be diffed (optional)", "disabled": false }, { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve the diff between two provided revisions.\n\nTo stream a raw text representation of the diff, this endpoint can be called with the request header 'Accept: text/plain'. \n\nNote: This resource is currently not paged. The server will internally apply a hard cap to the streamed lines, and it is not possible to request subsequent pages if that cap is exceeded. In the event that the cap is reached, the diff will be cut short and one or more {@code truncated} flags will be set to true on the \"segments\", \"hunks\" and \"diffs\" properties, as well as the top-level object, in the returned JSON response.\n\nThe authenticated user must have REPO_READ permission for the specified repository to call this resource." }, "response": [] }, { "name": "Watch commit", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/commits/:commitId/watch", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false }, { "key": "commitId", "value": "{{commitId}}", "description": "The full ID of the commit within the repository", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug", "disabled": false } ] }, "method": "POST", "header": [], "description": "Add the authenticated user as a watcher for the specified commit.\n\nThe authenticated user must have REPO_READ permission for the repository containing the commit to call this resource." }, "response": [] }, { "name": "Stop watching commit", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/commits/:commitId/watch", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false }, { "key": "commitId", "value": "{{commitId}}", "description": "The full ID of the commit within the repository", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Remove the authenticated user as a watcher for the specified commit.\n\nThe authenticated user must have REPO_READ permission for the repository containing the commit to call this resource." }, "response": [] }, { "name": "Compare commits", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/compare/changes", "query": [ { "key": "fromRepo", "value": "{{fromRepo}}", "disabled": true, "description": "an optional parameter specifying the source repository containing the source commit if that commit is not present in the current repository; the repository can be specified by either its ID fromRepo=42 or by its project key plus its repo slug separated by a slash: fromRepo=projectKey/repoSlug" }, { "key": "from", "value": "{{from}}", "disabled": true, "description": "the source commit (can be a partial/full commit ID or qualified/unqualified ref name)" }, { "key": "to", "value": "{{to}}", "disabled": true, "description": "the target commit (can be a partial/full commit ID or qualified/unqualified ref name)" }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Gets the file changes available in the from commit but not in the to commit.\n\n\nIf either the from or to commit are not specified, they will be replaced by the default branch of their containing repository." }, "response": [] }, { "name": "Get accessible commits", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/compare/commits", "query": [ { "key": "fromRepo", "value": "{{fromRepo}}", "disabled": true, "description": "an optional parameter specifying the source repository containing the source commit if that commit is not present in the current repository; the repository can be specified by either its ID fromRepo=42 or by its project key plus its repo slug separated by a slash: fromRepo=projectKey/repoSlug" }, { "key": "from", "value": "{{from}}", "disabled": true, "description": "the source commit (can be a partial/full commit ID or qualified/unqualified ref name)" }, { "key": "to", "value": "{{to}}", "disabled": true, "description": "the target commit (can be a partial/full commit ID or qualified/unqualified ref name)" }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Gets the commits accessible from the from commit but not in the to commit.\n\nIf either the from or to commit are not specified, they will be replaced by the default branch of their containing repository." }, "response": [] }, { "name": "Get diff between commits", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/compare/diff:path", "query": [ { "key": "contextLines", "value": "{{contextLines}}", "disabled": true, "description": "an optional number of context lines to include around each added or removed lines in the diff" }, { "key": "fromRepo", "value": "{{fromRepo}}", "disabled": true, "description": "an optional parameter specifying the source repository containing the source commit if that commit is not present in the current repository; the repository can be specified by either its ID fromRepo=42 or by its project key plus its repo slug separated by a slash: fromRepo=projectKey/repoSlug" }, { "key": "srcPath", "value": "{{srcPath}}", "disabled": true, "description": "source path" }, { "key": "from", "value": "{{from}}", "disabled": true, "description": "the source commit (can be a partial/full commit ID or qualified/unqualified ref name)" }, { "key": "to", "value": "{{to}}", "disabled": true, "description": "the target commit (can be a partial/full commit ID or qualified/unqualified ref name)" }, { "key": "whitespace", "value": "{{whitespace}}", "disabled": true, "description": "an optional whitespace flag which can be set to ignore-all" }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "path", "value": "{{path}}", "description": "the path to the file to diff (optional)", "disabled": false }, { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Gets a diff of the changes available in the from commit but not in the to commit.\n\nIf either the from or to commit are not specified, they will be replaced by the default branch of their containing repository." }, "response": [] }, { "name": "Get raw diff for path", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/diff", "query": [ { "key": "contextLines", "value": "{{contextLines}}", "disabled": true, "description": "The number of context lines to include around added/removed lines in the diff" }, { "key": "srcPath", "value": "{{srcPath}}", "disabled": true, "description": "The source path for the file, if it was copied, moved or renamed" }, { "key": "until", "value": "{{until}}", "disabled": true, "description": "The target revision to diff to (required)" }, { "key": "whitespace", "value": "{{whitespace}}", "disabled": true, "description": "Optional whitespace flag which can be set to ignore-all" }, { "key": "since", "value": "{{since}}", "disabled": true, "description": "The base revision to diff from. If omitted the parent revision of the until revision is used" } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Stream the raw diff between two provided revisions. \n\nThe authenticated user must have REPO_READ permission for the specified repository to call this resource." }, "response": [] }, { "name": "Get raw diff for path", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/diff/:path", "query": [ { "key": "contextLines", "value": "{{contextLines}}", "disabled": true, "description": "The number of context lines to include around added/removed lines in the diff" }, { "key": "srcPath", "value": "{{srcPath}}", "disabled": true, "description": "The source path for the file, if it was copied, moved or renamed" }, { "key": "until", "value": "{{until}}", "disabled": true, "description": "The target revision to diff to (required)" }, { "key": "whitespace", "value": "{{whitespace}}", "disabled": true, "description": "Optional whitespace flag which can be set to ignore-all" }, { "key": "since", "value": "{{since}}", "disabled": true, "description": "The base revision to diff from. If omitted the parent revision of the until revision is used" } ], "variable": [ { "key": "path", "value": "{{path}}", "description": "The path to the file which should be diffed (required)", "disabled": false }, { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Stream the raw diff between two provided revisions. \n\nThe authenticated user must have REPO_READ permission for the specified repository to call this resource." }, "response": [] }, { "name": "Get files in directory", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/files", "query": [ { "key": "at", "value": "{{at}}", "disabled": true, "description": "The commit ID or ref (e.g. a branch or tag) to list the files at. If not specified the default branch will be used instead." }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve a page of files from particular directory of a repository. The search is done recursively, so all files from any sub-directory of the specified directory will be returned. \n\nThe authenticated user must have REPO_READ permission for the specified repository to call this resource." }, "response": [] }, { "name": "Get files in directory", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/files/:path", "query": [ { "key": "at", "value": "{{at}}", "disabled": true, "description": "The commit ID or ref (e.g. a branch or tag) to list the files at. If not specified the default branch will be used instead." }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "path", "value": "{{path}}", "description": "The directory to list files for.", "disabled": false }, { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve a page of files from particular directory of a repository. The search is done recursively, so all files from any sub-directory of the specified directory will be returned. \n\nThe authenticated user must have REPO_READ permission for the specified repository to call this resource." }, "response": [] }, { "name": "Get hook scripts", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/hook-scripts", "query": [ { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Return a page of hook scripts configured for the specified repository. \n\nThis endpoint requires **REPO_ADMIN** permission." }, "response": [] }, { "name": "Create/update a hook script", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/hook-scripts/:scriptId", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "scriptId", "value": "{{scriptId}}", "description": "The ID of the hook script", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Creates/updates the hook script configuration for the provided hook script and repository. \n\nThis endpoint requires **REPO_ADMIN** permission.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Remove a hook script", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/hook-scripts/:scriptId", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "scriptId", "value": "{{scriptId}}", "description": "The ID of the hook script", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Removes the hook script from the set of hook scripts configured to run in the repository. \n\nThis endpoint requires **REPO_ADMIN** permission." }, "response": [] }, { "name": "Get repository labels", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/labels", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Get all labels applied to the given repository. \n\nThe authenticated user must have REPO_READ permission for the specified repository." }, "response": [] }, { "name": "Add repository label", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/labels", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Applies a label to the repository. \n\nThe authenticated user must have REPO_ADMIN permission for the specified repository.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Remove repository label", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/labels/:labelName", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "labelName", "value": "{{labelName}}", "description": "The label to remove", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Remove label that is applied to the given repository. \n\nThe authenticated user must have REPO_ADMIN permission for the specified repository." }, "response": [] }, { "name": "Stream files", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/last-modified", "query": [ { "key": "at", "value": "{{at}}", "disabled": true, "description": "The commit to use as the starting point when listing files and calculating modifications" } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Streams files from the repository's root with the last commit to modify each file. Commit modifications are traversed starting from the at commit or, if not specified, from the tip of the default branch.\n\nUnless the repository is public, the authenticated user must have REPO_READ access to call this resource." }, "response": [] }, { "name": "Stream files with last modified commit in path", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/last-modified/:path", "query": [ { "key": "at", "value": "{{at}}", "disabled": true, "description": "The commit to use as the starting point when listing files and calculating modifications" } ], "variable": [ { "key": "path", "value": "{{path}}", "description": "The path within the repository whose files should be streamed", "disabled": false }, { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Streams files in the requested path with the last commit to modify each file. Commit modifications are traversed starting from the at commit or, if not specified, from the tip of the default branch.\n\nUnless the repository is public, the authenticated user must have REPO_READ access to call this resource." }, "response": [] }, { "name": "Get patch content at revision", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/patch", "query": [ { "key": "until", "value": "{{until}}", "disabled": true, "description": "The target revision from which to generate the patch (required)" }, { "key": "allAncestors", "value": "{{allAncestors}}", "disabled": true, "description": "indicates whether or not to generate a patch which includes all the ancestors of the 'until' revision. If true, the value provided by 'since' is ignored." }, { "key": "since", "value": "{{since}}", "disabled": true, "description": "The base revision from which to generate the patch. This is only applicable when 'allAncestors' is false. If omitted the patch will represent one single commit, the 'until'." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve the patch content for a repository at a specified revision. \n\nCache headers are added to the response (only if full commit hashes are used, not in the case of short hashes). \n\nThe authenticated user must have REPO_READ permission for the specified repository to call this resource." }, "response": [] }, { "name": "Get raw content of a file at revision", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/raw/:path", "query": [ { "key": "at", "value": "{{at}}", "disabled": true, "description": "A specific commit or ref to retrieve the raw content at, or the default branch if not specified" }, { "key": "markup", "value": "{{markup}}", "disabled": true, "description": "If present or \"true\", triggers the raw content to be markup-rendered and returned as HTML; otherwise, if not specified, or any value other than \"true\", the content is streamed without markup" }, { "key": "htmlEscape", "value": "{{htmlEscape}}", "disabled": true, "description": "(Optional) true if HTML should be escaped in the input markup, false otherwise. If not specified, the value of the markup.render.html.escape property, which is true by default, will be used" }, { "key": "includeHeadingId", "value": "{{includeHeadingId}}", "disabled": true, "description": "(Optional) true if headings should contain an ID based on the heading content. If not specified, the value of the markup.render.headerids property, which is false by default, will be used" }, { "key": "hardwrap", "value": "{{hardwrap}}", "disabled": true, "description": "(Optional) Whether the markup implementation should convert newlines to breaks. If not specified, the value of the markup.render.hardwrap property, which is true by default, will be used" } ], "variable": [ { "key": "path", "value": "{{path}}", "description": "The file path to retrieve content from", "disabled": false }, { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve the raw content for a file path at a specified revision. \n\nThe authenticated user must have REPO_READ permission for the specified repository to call this resource." }, "response": [] }, { "name": "Get ref change activity", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/ref-change-activities", "query": [ { "key": "ref", "value": "{{ref}}", "disabled": true, "description": "(optional) exact match for a ref ID to filter ref change activity for" }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve a page of repository ref change activity. \n\nThe authenticated user must have REPO_ADMIN permission to call this resource." }, "response": [] }, { "name": "Get branches with ref change activities for repository", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/ref-change-activities/branches", "query": [ { "key": "filterText", "value": "{{filterText}}", "disabled": true, "description": "(optional) Partial match for a ref ID to filter minimal refs for" }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve a page of branches with ref change activities for a specific repository. \n\nThe authenticated user must have REPO_ADMIN permission to call this resource." }, "response": [] }, { "name": "Get auto decline settings", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/settings/auto-decline", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieves the auto decline settings for the supplied repository. Project settings will be returned if no explicit settings have been set for the repository. In the case that there are no project settings, the default settings will be returned.\n\nThe authenticated user must have REPO_READ permission for this repository to call the resource." }, "response": [] }, { "name": "Create auto decline settings", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/settings/auto-decline", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug", "disabled": false } ] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Creates or updates the auto decline settings for the supplied repository.\n\nThe authenticated user must have REPO_ADMIN permission for this repository to call the resource", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Delete auto decline settings", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/settings/auto-decline", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Delete auto decline settings for the supplied repository.\n\nThe authenticated user must have REPO_ADMIN permission for this repository to call the resource." }, "response": [] }, { "name": "Get pull request auto-merge settings", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/settings/auto-merge", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieves the pull request auto-merge settings for the supplied repository. Project settings will be returned if no explicit settings have been set for the repository. In the case that there are no project settings, the default settings will be returned. If the repository's project has restricted its auto-merge settings, then the settings of the project will be returned.\n\nThe authenticated user must have REPO_READ permission for this repository to call the resource." }, "response": [] }, { "name": "Create or update the pull request auto-merge settings", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/settings/auto-merge", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug", "disabled": false } ] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Creates or updates the pull request auto-merge settings for the supplied repository.\n\nThe authenticated user must have REPO_ADMIN permission for this repository to call the resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Delete pull request auto-merge settings", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/settings/auto-merge", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Deletes pull request auto-merge settings for the supplied repository.\n\nThe authenticated user must have REPO_ADMIN permission for this repository to call the resource." }, "response": [] }, { "name": "Get repository hooks", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/settings/hooks", "query": [ { "key": "type", "value": "{{type}}", "disabled": true, "description": "The optional type to filter by." }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve a page of repository hooks for this repository. \n\nThe authenticated user must have REPO_ADMIN permission for the specified repository to call this resource." }, "response": [] }, { "name": "Get repository hook", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/settings/hooks/:hookKey", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "hookKey", "value": "{{hookKey}}", "description": "The hook key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve a repository hook for this repository. \n\nThe authenticated user must have REPO_ADMIN permission for the specified repository to call this resource." }, "response": [] }, { "name": "Delete repository hook", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/settings/hooks/:hookKey", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "hookKey", "value": "{{hookKey}}", "description": "The hook key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Delete repository hook configuration for the supplied hookKey and repositorySlug\n\nThe authenticated user must have REPO_ADMIN permission for the specified repository to call this resource." }, "response": [] }, { "name": "Enable repository hook", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/settings/hooks/:hookKey/enabled", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "hookKey", "value": "{{hookKey}}", "description": "The hook key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "PUT", "header": [ { "key": "Content-Length", "value": "{{Content-Length}}", "description": "The content length.", "disabled": true }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Enable a repository hook for this repository and optionally apply new configuration. \n\nThe authenticated user must have REPO_ADMIN permission for the specified repository to call this resource. \n\nA JSON document may be provided to use as the settings for the hook. These structure and validity of the document is decided by the plugin providing the hook." }, "response": [] }, { "name": "Disable repository hook", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/settings/hooks/:hookKey/enabled", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "hookKey", "value": "{{hookKey}}", "description": "The hook key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "DELETE", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Disable a repository hook for this repository. \n\nThe authenticated user must have REPO_ADMIN permission for the specified repository to call this resource." }, "response": [] }, { "name": "Get repository hook settings", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/settings/hooks/:hookKey/settings", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "hookKey", "value": "{{hookKey}}", "description": "The hook key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve the settings for a repository hook for this repository. \n\nThe authenticated user must have REPO_ADMIN permission for the specified repository to call this resource." }, "response": [] }, { "name": "Update repository hook settings", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/settings/hooks/:hookKey/settings", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "hookKey", "value": "{{hookKey}}", "description": "The hook key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Modify the settings for a repository hook for this repository. \n\nThe service will reject any settings which are too large, the current limit is 32KB once serialized. \n\nThe authenticated user must have REPO_ADMIN permission for the specified repository to call this resource. \n\nA JSON document can be provided to use as the settings for the hook. These structure and validity of the document is decided by the plugin providing the hook.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Get pull request settings", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/settings/pull-requests", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve the pull request settings for the context repository. \n\nThe authenticated user must have REPO_READ permission for the context repository to call this resource. \n\nThis resource will call all RestFragments that are registered with the key bitbucket.repository.settings.pullRequests. If any fragment fails validations by returning a non-empty Map of errors, then no fragments will execute. \n\nThe property keys for the settings that are bundled with the application are \n\n- mergeConfig - the merge strategy configuration for pull requests\n- requiredApprovers - (Deprecated, please use com.atlassian.bitbucket.server.bundled-hooks.requiredApproversMergeHook instead) the number of approvals required on a pull request for it to be mergeable, or 0 if the merge check is disabled\n- com.atlassian.bitbucket.server.bundled-hooks.requiredApproversMergeHook - the merge check configuration for required approvers\n- requiredAllApprovers - whether or not all approvers must approve a pull request for it to be mergeable\n- requiredAllTasksComplete - whether or not all tasks on a pull request need to be completed for it to be mergeable\n- requiredSuccessfulBuilds - (Deprecated, please use com.atlassian.bitbucket.server.bitbucket-build.requiredBuildsMergeCheck instead) the number of successful builds on a pull request for it to be mergeable, or 0 if the merge check is disabled\n- com.atlassian.bitbucket.server.bitbucket-build.requiredBuildsMergeCheck - the merge check configuration for required builds\n\n\n" }, "response": [] }, { "name": "Update pull request settings", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/settings/pull-requests", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Update the pull request settings for the context repository. \n\nThe authenticated user must have REPO_ADMIN permission for the context repository to call this resource. \n\nThis resource will call all RestFragments that are registered with the key bitbucket.repository.settings.pullRequests. If any fragment fails validations by returning a non-empty Map of errors, then no fragments will execute. \n\nOnly the settings that should be updated need to be included in the request. \n\nThe property keys for the settings that are bundled with the application are \n\n- mergeConfig - the merge strategy configuration for pull requests\n- requiredApprovers - (Deprecated, please use com.atlassian.bitbucket.server.bundled-hooks.requiredApproversMergeHook instead) the number of approvals required on a pull request for it to be mergeable, or 0 to disable the merge check\n- com.atlassian.bitbucket.server.bundled-hooks.requiredApproversMergeHook - a json map containing the keys 'enabled' (a boolean to enable or disable this merge check) and 'count' (an integer to set the number of required approvals)\n- requiredAllApprovers - whether or not all approvers must approve a pull request for it to be mergeable\n- requiredAllTasksComplete - whether or not all tasks on a pull request need to be completed for it to be mergeable\n- requiredSuccessfulBuilds - (Deprecated, please use com.atlassian.bitbucket.server.bitbucket-build.requiredBuildsMergeCheck instead) the number of successful builds on a pull request for it to be mergeable, or 0 to disable the merge check\n- com.atlassian.bitbucket.server.bitbucket-build.requiredBuildsMergeCheck - a json map containing the keys 'enabled' (a boolean to enable or disable this merge check) and 'count' (an integer to set the number of required builds)\n\n\nMerge strategy configuration deletion:\n\nAn explicitly set pull request merge strategy configuration can be deleted by POSTing a document with an empty \"mergeConfig\" attribute. i.e: \n\n\n```{ \n \"mergeConfig\": { \n } \n} \n```\n\nUpon completion of this request, the effective configuration will be: \n\n- The configuration set for this repository's SCM type as set at the project level, if present, otherwise\n- the configuration set for this repository's SCM type as set at the instance level, if present, otherwise\n- the default configuration for this repository's SCM type\n\n\n", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Find tag", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/tags", "query": [ { "key": "orderBy", "value": "{{orderBy}}", "disabled": true, "description": "Ordering of refs either ALPHABETICAL (by name) or MODIFICATION (last updated)" }, { "key": "filterText", "value": "{{filterText}}", "disabled": true, "description": "The text to match on." }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve the tags matching the supplied filterText param. \n\nThe authenticated user must have REPO_READ permission for the context repository to call this resource." }, "response": [] }, { "name": "Create tag", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/tags", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Creates a tag using the information provided in the RestCreateTagRequest request \n\nThe authenticated user must have REPO_WRITE permission for the context repository to call this resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Get tag", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/tags/:name", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "name", "value": "{{name}}", "description": "The name of the tag to be retrieved.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve a tag in the specified repository. \n\nThe authenticated user must have REPO_READ permission for the context repository to call this resource." }, "response": [] }, { "name": "Watch repository", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/watch", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" } ], "description": "Add the authenticated user as a watcher for the specified repository. \n\nThe authenticated user must have REPO_READ permission for the repository to call this resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Stop watching repository", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/watch", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Remove the authenticated user as a watcher for the specified repository. \n\nThe authenticated user must have REPO_READ permission for the repository to call this resource." }, "response": [] }, { "name": "Find webhooks", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/webhooks", "query": [ { "key": "event", "value": "{{event}}", "disabled": true, "description": "List of com.atlassian.webhooks.WebhookEvent IDs to filter for" }, { "key": "statistics", "value": "{{statistics}}", "disabled": true, "description": "true if statistics should be provided for all found webhooks" } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Find webhooks in this repository. \n\nThe authenticated user must have REPO_ADMIN permission for the specified repository to call this resource." }, "response": [] }, { "name": "Create webhook", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/webhooks", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Create a webhook for the repository specified via the URL. \n\nThe authenticated user must have REPO_ADMIN permission for the specified repository to call this resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Search webhooks", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/webhooks/search", "query": [ { "key": "scopeType", "value": "{{scopeType}}", "disabled": true, "description": "Scopes to filter by. This parameter can be specified once e.g. \"scopeType=repository\", or twice e.g. \"scopeType=repository&scopeType=project\", to filter by more than one scope level. " }, { "key": "event", "value": "{{event}}", "disabled": true, "description": "List of com.atlassian.webhooks.WebhookEvent ids to filter for" }, { "key": "statistics", "value": "{{statistics}}", "disabled": true, "description": "true if statistics should be provided for all found webhooks" } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Search webhooks in this repository and parent project. This endpoint returns a superset of the results returned by the /webhooks endpoint because it allows filtering by project scope too, not just repository webhooks.\n\nThe authenticated user must have REPO_ADMIN permission for the specified repository to call this resource." }, "response": [] }, { "name": "Test webhook", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/webhooks/test", "query": [ { "key": "webhookId", "value": "{{webhookId}}", "disabled": true }, { "key": "sslVerificationRequired", "value": "{{sslVerificationRequired}}", "disabled": true, "description": "Whether SSL verification is required for the specified webhook URL. Default value is true." }, { "key": "url", "value": "{{url}}", "disabled": true, "description": "The url in which to connect to" } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Test connectivity to a specific endpoint. \n\nThe authenticated user must have REPO_ADMIN permission for the specified repository to call this resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Get webhook", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/webhooks/:webhookId", "query": [ { "key": "statistics", "value": "{{statistics}}", "disabled": true, "description": "true if statistics should be provided for the webhook" } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "webhookId", "value": "{{webhookId}}", "description": "ID of the webhook", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Get a webhook by ID. \n\nThe authenticated user must have REPO_ADMIN permission for the specified repository to call this resource." }, "response": [] }, { "name": "Update webhook", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/webhooks/:webhookId", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "webhookId", "value": "{{webhookId}}", "description": "Id of the existing webhook", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Update an existing webhook. \n\nThe authenticated user must have REPO_ADMIN permission for the specified repository to call this resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Delete webhook", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/webhooks/:webhookId", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "webhookId", "value": "{{webhookId}}", "description": "The ID of the webhook to be deleted.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Delete a webhook for the repository specified via the URL. \n\nThe authenticated user must have REPO_ADMIN permission for the specified repository to call this resource." }, "response": [] }, { "name": "Get last webhook invocation details", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/webhooks/:webhookId/latest", "query": [ { "key": "event", "value": "{{event}}", "disabled": true, "description": "The string ID of a specific event to retrieve the last invocation for." }, { "key": "outcome", "value": "{{outcome}}", "disabled": true, "description": "The outcome to filter for. Can be SUCCESS, FAILURE, ERROR. None specified means that the all will be considered" } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "webhookId", "value": "{{webhookId}}", "description": "ID of the webhook", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Get the latest invocations for a specific webhook. \n\nThe authenticated user must have REPO_ADMIN permission for the specified repository to call this resource." }, "response": [] }, { "name": "Get webhook statistics", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/webhooks/:webhookId/statistics", "query": [ { "key": "event", "value": "{{event}}", "disabled": true, "description": "The string ID of a specific event to retrieve the last invocation for. May be empty, in which case all events are considered" } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "webhookId", "value": "{{webhookId}}", "description": "ID of the webhook", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Get the statistics for a specific webhook. \n\nThe authenticated user must have REPO_ADMIN permission for the specified repository to call this resource." }, "response": [] }, { "name": "Get webhook statistics summary", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/webhooks/:webhookId/statistics/summary", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "webhookId", "value": "{{webhookId}}", "description": "ID of the webhook", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Get the statistics summary for a specific webhook. \n\nThe authenticated user must have REPO_ADMIN permission for the specified repository to call this resource." }, "response": [] }, { "name": "Search for repositories", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/repos", "query": [ { "key": "archived", "value": "{{archived}}", "disabled": true, "description": "(optional) if specified, this will limit the resulting repository list to ones whose are ACTIVE, ARCHIVED or ALL for both. The match performed is case-insensitive. This filter defaults to ACTIVE when not set. Available since 8.0" }, { "key": "projectname", "value": "{{projectname}}", "disabled": true, "description": "(optional) if specified, this will limit the resulting repository list to ones whose project's name matches this parameter's value. The match performed is case-insensitive and any leading and/or trailing whitespace characters on the projectname parameter will be stripped." }, { "key": "projectkey", "value": "{{projectkey}}", "disabled": true, "description": "(optional) if specified, this will limit the resulting repository list to ones whose project's key matches this parameter's value. The match performed is case-insensitive and any leading and/or trailing whitespace characters on the projectKey parameter will be stripped. Available since 8.0" }, { "key": "visibility", "value": "{{visibility}}", "disabled": true, "description": "(optional) if specified, this will limit the resulting repository list based on the repositories visibility. Valid values are public or private." }, { "key": "name", "value": "{{name}}", "disabled": true, "description": "(optional) if specified, this will limit the resulting repository list to ones whose name matches this parameter's value. The match performed is case-insensitive and any leading and/or trailing whitespace characters on the name parameter will be stripped." }, { "key": "permission", "value": "{{permission}}", "disabled": true, "description": "(optional) if specified, it must be a valid repository permission level name and will limit the resulting repository list to ones that the requesting user has the specified permission level to. If not specified, the default implicit 'read' permission level will be assumed. The currently supported explicit permission values are REPO_READ, REPO_WRITE and REPO_ADMIN." }, { "key": "state", "value": "{{state}}", "disabled": true, "description": "(optional) if specified, it must be a valid repository state name and will limit the resulting repository list to ones that are in the specified state. The currently supported explicit state values are AVAILABLE, INITIALISING and INITIALISATION_FAILED. Available since 5.13" }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve a page of repositories based on query parameters that control the search. See the documentation of the parameters for more details. \n\nThis resource is anonymously accessible. \n\nNote on permissions. In absence of the permission query parameter the implicit 'read' permission is assumed. Please note that this permission is lower than the REPO_READ permission rather than being equal to it. The implicit 'read' permission for a given repository is assigned to any user that has any of the higher permissions, such as REPO_READ, as well as to anonymous users if the repository is marked as public. The important implication of the above is that an anonymous request to this resource with a permission level REPO_READ is guaranteed to receive an empty list of repositories as a result. For anonymous requests it is therefore recommended to not specify the permission parameter at all." }, "response": [] } ] }, { "name": "Security", "item": [ { "name": "Get all GPG keys", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}gpg/latest/keys", "query": [ { "key": "user", "value": "{{user}}", "disabled": true, "description": "The name of the user to get keys for (optional; requires ADMIN permission or higher)." }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Find all the keys for the currently authenticated user. Optionally, users with ADMIN and higher permissions may choose to specify the user parameter to retrieve GPG keys for another user.\n\nOnly authenticated users may call this endpoint." }, "response": [] }, { "name": "Create a GPG key", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}gpg/latest/keys", "query": [ { "key": "user", "value": "{{user}}", "disabled": true, "description": "The name of the user to add a key for (optional; requires ADMIN permission or higher)." } ], "variable": [] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Add a GPG key to the authenticated user's account. Optionally, users with ADMIN and higher permissions may choose to specify the user parameter to add a GPG key for another user.\n\nOnly authenticated users may call this endpoint.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Delete all GPG keys for user", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}gpg/latest/keys", "query": [ { "key": "user", "value": "{{user}}", "disabled": true, "description": "The username of the user to delete the keys for. If no username is specified, the GPG keys will be deleted for the currently authenticated user." } ], "variable": [] }, "method": "DELETE", "header": [], "description": "Delete all GPG keys for a supplied user." }, "response": [] }, { "name": "Delete a GPG key", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}gpg/latest/keys/:fingerprintOrId", "query": [], "variable": [ { "key": "fingerprintOrId", "value": "{{fingerprintOrId}}", "description": "The GPG fingerprint or ID.", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Delete the GPG key with the specified ID or Key Fingerprint." }, "response": [] }, { "name": "Find repository secret scanning allowlist rules", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/secret-scanning/allowlist", "query": [ { "key": "filter", "value": "{{filter}}", "disabled": true, "description": "Filter names by the provided text" }, { "key": "order", "value": "{{order}}", "disabled": true, "description": "Order by" }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Find repository secret scanning allowlist rules by filtering.\n\nRepository **Admin** is required" }, "response": [] }, { "name": "Create repository secret scanning allowlist rule", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/secret-scanning/allowlist", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "*/*" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Create a new repository secret scanning allowlist rule. Repository allowlist rules are used when scanning the given repository.\n\nRepository **Admin** is required", "body": { "mode": "raw" } }, "response": [] }, { "name": "Get a repository secret scanning allowlist rule", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/secret-scanning/allowlist/:id", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "id", "value": "{{id}}", "description": "The allowlist rule id.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Get a repository secret scanning allowlist rule by ID.\n\nRepository **Admin** is required" }, "response": [] }, { "name": "Edit an existing repository secret scanning allowlist rule", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/secret-scanning/allowlist/:id", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "id", "value": "{{id}}", "description": "The allowlist rule id.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "*/*" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Edit a repository secret scanning allowlist rule.\n\nRepository **Admin** is required", "body": { "mode": "raw" } }, "response": [] }, { "name": "Delete a repository secret scanning allowlist rule", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/secret-scanning/allowlist/:id", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "id", "value": "{{id}}", "description": "The allowlist rule id.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Delete a repository secret scanning allowlist rule with the provided ID.\n\nRepository **Admin** is required" }, "response": [] }, { "name": "Get whether a repository is exempt", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/secret-scanning/exempt", "query": [], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Check whether a repository is exempt from secret scanning" }, "response": [] }, { "name": "Exempt a repo from secret scanning", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/secret-scanning/exempt", "query": [], "variable": [] }, "method": "PUT", "header": [], "description": "Exempt a repository from being scanned for secrets \n\nDeprecated since 8.6. Exemptions are now managed by scope. \nUse POST /rest/api/1.0/secret-scanning/exempt for global scope \nUse POST /rest/api/1.0/projects/{projectKey}/secret-scanning/exempt for the project scope" }, "response": [] }, { "name": "Delete an exempt repository", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/secret-scanning/exempt", "query": [], "variable": [] }, "method": "DELETE", "header": [], "description": "Remove a repository from being exempt from secret scanning" }, "response": [] }, { "name": "Find repository secret scanning rules", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/secret-scanning/rules", "query": [ { "key": "filter", "value": "{{filter}}", "disabled": true, "description": "Filter names by the provided text" }, { "key": "order", "value": "{{order}}", "disabled": true, "description": "Order by" }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Find repository secret scanning rules by filtering.\n\nRepository **Admin** is required" }, "response": [] }, { "name": "Create repository secret scanning rule", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/secret-scanning/rules", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "*/*" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Create a new repository secret scanning rule. Repository rules are used when scanning the given repository.\n\nRepository **Admin** is required", "body": { "mode": "raw" } }, "response": [] }, { "name": "Get a repository secret scanning rule", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/secret-scanning/rules/:id", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "id", "value": "{{id}}", "description": "The rule id.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Get a repository secret scanning rule by ID.\n\nRepository **Admin** is required" }, "response": [] }, { "name": "Edit an existing repository secret scanning rule", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/secret-scanning/rules/:id", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "id", "value": "{{id}}", "description": "The rule id.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "*/*" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Edit a repository secret scanning rule.\n\nRepository **Admin** is required", "body": { "mode": "raw" } }, "response": [] }, { "name": "Delete a repository secret scanning rule", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/repos/:repositorySlug/secret-scanning/rules/:id", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "id", "value": "{{id}}", "description": "The rule id.", "disabled": false }, { "key": "repositorySlug", "value": "{{repositorySlug}}", "description": "The repository slug.", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Delete a repository secret scanning rule with the provided ID.\n\nRepository **Admin** is required" }, "response": [] }, { "name": "Find project secret scanning allowlist rules", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/secret-scanning/allowlist", "query": [ { "key": "filter", "value": "{{filter}}", "disabled": true, "description": "Filter names by the provided text" }, { "key": "order", "value": "{{order}}", "disabled": true, "description": "Order by" }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Find project secret scanning allowlist rules by filtering.\n\nProject **Admin** is required" }, "response": [] }, { "name": "Create project secret scanning allowlist rule", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/secret-scanning/allowlist", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "*/*" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Create a new project level secret scanning allowlist rule. Project allowlist rules are used when scanning all non exempt repositories in the provided project.\n\nProject **Admin** is required", "body": { "mode": "raw" } }, "response": [] }, { "name": "Get a project secret scanning allowlist rule", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/secret-scanning/allowlist/:id", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "id", "value": "{{id}}", "description": "The allowlist rule id.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Get a project secret scanning allowlist rule by ID.\n\nProject **Admin** is required" }, "response": [] }, { "name": "Edit an existing project secret scanning allowlist rule", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/secret-scanning/allowlist/:id", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "id", "value": "{{id}}", "description": "The allowlist rule id.", "disabled": false } ] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "*/*" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Edit a project secret scanning allowlist rule.\n\nProject **Admin** is required", "body": { "mode": "raw" } }, "response": [] }, { "name": "Delete a project secret scanning allowlist rule", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/secret-scanning/allowlist/:id", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "id", "value": "{{id}}", "description": "The allowlist rule id.", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Delete a project secret scanning allowlist rule with the provided ID.\n\nProject **Admin** is required" }, "response": [] }, { "name": "Find repos exempt from secret scanning for a project", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/secret-scanning/exempt", "query": [ { "key": "order", "value": "{{order}}", "disabled": true, "description": "Order by project name followed by repository name either ascending or descending, defaults to ascending." }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Find repositories exempt from secret scanning in a project" }, "response": [] }, { "name": "Bulk exempt repos from secret scanning", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/secret-scanning/exempt", "query": [], "variable": [] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "*/*" } ], "description": "Bulk exempt a list of repositories from being scanned for secrets. User must be have **PROJECT ADMIN** permissions.", "body": { "mode": "raw" } }, "response": [] }, { "name": "Find project secret scanning rules", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/secret-scanning/rules", "query": [ { "key": "filter", "value": "{{filter}}", "disabled": true, "description": "Filter names by the provided text" }, { "key": "order", "value": "{{order}}", "disabled": true, "description": "Order by" }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Find project secret scanning rules by filtering.\n\nProject **Admin** is required" }, "response": [] }, { "name": "Create project secret scanning rule", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/secret-scanning/rules", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "*/*" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Create a new project level secret scanning rule. Project rules are used when scanning all non exempt repositories in the provided project.\n\nProject **Admin** is required", "body": { "mode": "raw" } }, "response": [] }, { "name": "Get a project secret scanning rule", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/secret-scanning/rules/:id", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "id", "value": "{{id}}", "description": "The rule id.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Get a project secret scanning rule by ID.\n\nProject **Admin** is required" }, "response": [] }, { "name": "Edit an existing project secret scanning rule", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/secret-scanning/rules/:id", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "id", "value": "{{id}}", "description": "The rule id.", "disabled": false } ] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "*/*" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Edit a project secret scanning rule.\n\nProject **Admin** is required", "body": { "mode": "raw" } }, "response": [] }, { "name": "Delete a project secret scanning rule", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/projects/:projectKey/secret-scanning/rules/:id", "query": [], "variable": [ { "key": "projectKey", "value": "{{projectKey}}", "description": "The project key.", "disabled": false }, { "key": "id", "value": "{{id}}", "description": "The rule id.", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Delete a project secret scanning rule with the provided ID.\n\nProject **Admin** is required" }, "response": [] }, { "name": "Find all repos exempt from secret scan", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/secret-scanning/exempt", "query": [ { "key": "order", "value": "{{order}}", "disabled": true, "description": "Order by project name followed by repository name either ascending or descending, defaults to ascending." }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Find all repositories exempt from secret scanning" }, "response": [] }, { "name": "Bulk exempt repos from secret scanning", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/secret-scanning/exempt", "query": [], "variable": [] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "*/*" } ], "description": "Bulk exempt a list of repositories from being scanned for secrets. User must be have global **ADMIN** permissions.", "body": { "mode": "raw" } }, "response": [] }, { "name": "Find global secret scanning rules", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/secret-scanning/rules", "query": [ { "key": "filter", "value": "{{filter}}", "disabled": true, "description": "Filter by rule name" }, { "key": "order", "value": "{{order}}", "disabled": true, "description": "Order by" }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Find global secret scanning rules by filtering." }, "response": [] }, { "name": "Create global secret scanning rule", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/secret-scanning/rules", "query": [], "variable": [] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "*/*" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Create a new global secret scanning rule. Global rules are used when scanning all non exempt repositories.", "body": { "mode": "raw" } }, "response": [] }, { "name": "Get a global secret scanning rule", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/secret-scanning/rules/:id", "query": [], "variable": [ { "key": "id", "value": "{{id}}", "description": "The rule id.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Get a global secret scanning rule by ID." }, "response": [] }, { "name": "Edit a global secret scanning rule.", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/secret-scanning/rules/:id", "query": [], "variable": [ { "key": "id", "value": "{{id}}", "description": "The rule id.", "disabled": false } ] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "*/*" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Edit an existing global secret scanning rule", "body": { "mode": "raw" } }, "response": [] }, { "name": "Delete a global secret scanning rule", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/secret-scanning/rules/:id", "query": [], "variable": [ { "key": "id", "value": "{{id}}", "description": "The rule id.", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Delete a global secret scanning rule with the provided ID" }, "response": [] } ] }, { "name": "Signing", "item": [ { "name": "Get all X.509 certificates", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/signing/x509-certificates", "query": [], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Get all X.509 certificates that have been added to the system.\n\nThe authenticated user must have the ADMIN permission to call this resource." }, "response": [] }, { "name": "Create an X.509 certificate", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/signing/x509-certificates", "query": [], "variable": [] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "multipart/form-data" } ], "description": "Create an X.509 certificate. This will add the given X.509 certificate to the system. Existing entries will not be overridden if an X.509 certificate already exists. Once added, an X.509 certificate cannot be updated.\n\nThe authenticated user must have the ADMIN permission to call this resource.", "body": { "mode": "formdata", "formdata": [ { "key": "certificate", "description": "The X.509 certificate file to upload.", "disabled": true, "type": "file" } ] } }, "response": [] }, { "name": "Update X.509 CRL entries", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/signing/x509-certificates/crl/:id", "query": [], "variable": [ { "key": "id", "value": "{{id}}", "description": "The ID of the issuer certificate.", "disabled": false } ] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Update the certificate revocation list (CRL) entries for an issuer X.509 certificate in the system, identified by id. This will add any new revoked X.509 certificates that were issued by the given issuer X.509 certificate.\n\nThis endpoint will schedule a request to asynchronously perform the task. Please allow time for the task to complete as it will vary depending on how many CRLs there are to retrieve and process.\n\nNote: CRL updates are scheduled to run every 24 hours. You may wish to trigger a refresh manually using this endpoint, otherwise, entries will be updated daily.\n\nThe authenticated user must have the ADMIN permission to call this resource." }, "response": [] }, { "name": "Delete an X.509 certificate", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/signing/x509-certificates/:id", "query": [], "variable": [ { "key": "id", "value": "{{id}}", "description": "The ID of the X.509 certificate.", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Delete an X.509 certificate specified by the given ID.\n\nThe authenticated user must have the ADMIN permission to call this resource." }, "response": [] } ] }, { "name": "System Maintenance", "item": [ { "name": "Dismiss retention config notification", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}audit/latest/notification-settings/retention-config-review", "query": [], "variable": [] }, "method": "DELETE", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Dismisses the retention config review notification displayed by the audit plugin for the user that's currently logged in." }, "response": [] }, { "name": "Get repository archive policy", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}policies/latest/admin/repos/archive", "query": [], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieves the repository archive policy for the instance.\n\nThe user must be authenticated to access this resource." }, "response": [] }, { "name": "Update repository archive policy", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}policies/latest/admin/repos/archive", "query": [], "variable": [] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Sets the repository archive policy for the instance.\n\nThe authenticated user must have SYS_ADMIN permission.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Get repository delete policy", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}policies/latest/admin/repos/delete", "query": [], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieves the repository delete policy for the instance.\n\nThe user must be authenticated to access this resource." }, "response": [] }, { "name": "Update the repository delete policy", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}policies/latest/admin/repos/delete", "query": [], "variable": [] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Sets the repository delete policy for the instance.\n\nThe authenticated user must have SYS_ADMIN permission.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Get global SSH key settings", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}admin", "query": [], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Gets the global settings that enforce the maximum expiry of SSH keys and restrictions on SSH key types." }, "response": [] }, { "name": "Update global SSH key settings", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}admin", "query": [], "variable": [] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" } ], "description": "Updates the global settings that enforces the maximum expiry of SSH keys and restrictions on SSH key types.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Get supported SSH key algorithms and lengths", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}admin/supported-key-types", "query": [], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieves a list of all supported SSH key algorithms and lengths." }, "response": [] }, { "name": "Get announcement banner", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/banner", "query": [], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Gets the announcement banner, if one exists and is available to the user" }, "response": [] }, { "name": "Update/Set announcement banner", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/banner", "query": [], "variable": [] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" } ], "description": "Sets the announcement banner with the provided JSON.\nOnly users authenticated as Admins may call this resource", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Delete announcement banner", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/banner", "query": [], "variable": [] }, "method": "DELETE", "header": [], "description": "Deletes a banner, if one is present in the database." }, "response": [] }, { "name": "Get cluster node information", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/cluster", "query": [], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Gets information about the nodes that currently make up the stash cluster.\n\nThe authenticated user must have the SYS_ADMIN permission to call this resource." }, "response": [] }, { "name": "Get the default branch", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/default-branch", "query": [], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieves the configured global default branch, which is used when creating new repositories if an explicit default branch is not specified.\n\nThe user must be authenticated to call this resource." }, "response": [] }, { "name": "Update/Set default branch", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/default-branch", "query": [], "variable": [] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" } ], "description": "Configures the global default branch, which is used when creating new repositories if an explicit default branch is not specified.\n\nThe authenticated user must have ADMIN permission to call this resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Clear default branch", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/default-branch", "query": [], "variable": [] }, "method": "DELETE", "header": [], "description": "Clears the global default branch, which is used when creating new repositories if an explicit default branch is not specified, if one has been configured.\n\nThe authenticated user must have ADMIN permission to call this resource." }, "response": [] }, { "name": "Get the control plane PEM", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/git/mesh/config/control-plane.pem", "query": [], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "text/plain" } ], "description": "Obtain the control plane PEM.\n\nThe authenticated user must have **SYS_ADMIN** permission." }, "response": [] }, { "name": "Generate Mesh connectivity report", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/git/mesh/diagnostics/connectivity", "query": [], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Generates a connectivity report between the Bitbucket node(s) and the Mesh node(s).\n\nThe authenticated user must have **SYS_ADMIN** permission." }, "response": [] }, { "name": "Get all registered Mesh nodes", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/git/mesh/nodes", "query": [], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Get all the registered Mesh nodes.\n\nThe authenticated user must have **SYS_ADMIN** permission." }, "response": [] }, { "name": "Register new Mesh node", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/git/mesh/nodes", "query": [], "variable": [] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Register a new Mesh node.\n\nThe authenticated user must have **SYS_ADMIN** permission.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Get Mesh node", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/git/mesh/nodes/:id", "query": [], "variable": [ { "key": "id", "value": "{{id}}", "description": "The ID of the Mesh node.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Get the registered Mesh node that matches the supplied ID.\n\nThe authenticated user must have **SYS_ADMIN** permission." }, "response": [] }, { "name": "Update Mesh node", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/git/mesh/nodes/:id", "query": [], "variable": [ { "key": "id", "value": "{{id}}", "description": "The ID of the Mesh node to update.", "disabled": false } ] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Update a Mesh node.\n\nThe authenticated user must have **SYS_ADMIN** permission.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Delete Mesh node", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/git/mesh/nodes/:id", "query": [ { "key": "force", "value": "{{force}}", "disabled": true } ], "variable": [ { "key": "id", "value": "{{id}}", "disabled": false } ] }, "method": "DELETE", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json;charset=UTF-8" } ], "description": "Delete a Mesh node\n\nThe authenticated user must have **SYS_ADMIN** permission." }, "response": [] }, { "name": "Get support zips for all Mesh nodes", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/git/mesh/support-zips", "query": [], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/octet-stream" } ], "description": "Get the support zips for all the Mesh nodes.\n\nThe authenticated user must have **SYS_ADMIN** permission." }, "response": [] }, { "name": "Get support zip for node", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/git/mesh/support-zips/:id", "query": [], "variable": [ { "key": "id", "value": "{{id}}", "description": "The ID of the Mesh node.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/octet-stream" } ], "description": "Get the support zip for the Mesh node that matches the specified ID.\n\nThe authenticated user must have **SYS_ADMIN** permission." }, "response": [] }, { "name": "Get license details", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/license", "query": [], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieves details about the current license, as well as the current status of the system with regards to the installed license. The status includes the current number of users applied toward the license limit, as well as any status messages about the license (warnings about expiry or user counts exceeding license limits). \n\nThe authenticated user must have ADMIN permission. Unauthenticated users, and non-administrators, are not permitted to access license details." }, "response": [] }, { "name": "Update license", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/license", "query": [], "variable": [] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Decodes the provided encoded license and sets it as the active license. If no license was provided, a 400 is returned. If the license cannot be decoded, or cannot be applied, a 409 is returned. Some possible reasons a license may not be applied include: \n\n- It is for a different product\n- It is already expired\n\n\nOtherwise, if the license is updated successfully, details for the new license are returned with a 200 response.\n\nWarning: It is possible to downgrade the license during update, applying a license with a lower number of permitted users. If the number of currently-licensed users exceeds the limits of the new license, pushing will be disabled until the licensed user count is brought into compliance with the new license.\n\nThe authenticated user must have SYS_ADMIN permission. ADMIN users may view the current license details, but they may not update the license.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Get mail configuration", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/mail-server", "query": [], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieves the current mail configuration. \n\nThe authenticated user must have the SYS_ADMIN permission to call this resource." }, "response": [] }, { "name": "Update mail configuration", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/mail-server", "query": [], "variable": [] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Updates the mail configuration. \n\nThe authenticated user must have the SYS_ADMIN permission to call this resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Delete mail configuration", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/mail-server", "query": [], "variable": [] }, "method": "DELETE", "header": [], "description": "Deletes the current mail configuration.\n\nThe authenticated user must have the SYS_ADMIN permission to call this resource." }, "response": [] }, { "name": "Get server mail address", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/mail-server/sender-address", "query": [], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieves the server email address" }, "response": [] }, { "name": "Update server mail address", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/mail-server/sender-address", "query": [], "variable": [] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Updates the server email address \n\nThe authenticated user must have the ADMIN permission to call this resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Update mail configuration", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/mail-server/sender-address", "query": [], "variable": [] }, "method": "DELETE", "header": [], "description": "Clears the server email address.\n\nThe authenticated user must have the ADMIN permission to call this resource." }, "response": [] }, { "name": "Get rate limit history", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/rate-limit/history", "query": [ { "key": "order", "value": "{{order}}", "disabled": true, "description": "An optional sort category to arrange the results in descending order" }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieves the recent rate limit history for the instance.\n\nThe authenticated user must have the ADMIN permission to call this resource." }, "response": [] }, { "name": "Get rate limit settings", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/rate-limit/settings", "query": [], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieves the rate limit settings for the instance.\n\nThe user must be authenticated to call this resource." }, "response": [] }, { "name": "Set rate limit", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/rate-limit/settings", "query": [], "variable": [] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Sets the rate limit settings for the instance.\n\nThe authenticated user must have ADMIN permission to call this resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Get rate limit settings for user", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/rate-limit/settings/users", "query": [ { "key": "filter", "value": "{{filter}}", "disabled": true, "description": "Optional filter" }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieves the user-specific rate limit settings for the given user.\n\nThe authenticated user must have ADMIN permission to call this resource." }, "response": [] }, { "name": "Set rate limit settings for users", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/rate-limit/settings/users", "query": [], "variable": [] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Sets the given rate limit settings for the given users.\n\nThe authenticated user must have ADMIN permission to call this resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Get user specific rate limit settings", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/rate-limit/settings/users/:userSlug", "query": [], "variable": [ { "key": "userSlug", "value": "{{userSlug}}", "description": "The user slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieves the user-specific rate limit settings for the given user.\n\nTo call this resource, the user must be authenticated and either have ADMIN permission or be the same user as the one whose settings are requested. A user with ADMIN permission cannot get the settings of a user with SYS_ADMIN permission." }, "response": [] }, { "name": "Set rate limit settings for user", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/rate-limit/settings/users/:userSlug", "query": [], "variable": [ { "key": "userSlug", "value": "{{userSlug}}", "description": "The user slug.", "disabled": false } ] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Sets the given rate limit settings for the given user.\n\nThe authenticated user must have ADMIN permission to call this resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Delete user specific rate limit settings", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/admin/rate-limit/settings/users/:userSlug", "query": [], "variable": [ { "key": "userSlug", "value": "{{userSlug}}", "description": "The user slug.", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Deletes the user-specific rate limit settings for the given user.\n\nThe authenticated user must have ADMIN permission to call this resource." }, "response": [] }, { "name": "Get application properties", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/application-properties", "query": [], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve version information and other application properties.\n\nNo authentication is required to call this resource." }, "response": [] }, { "name": "Create a new hook script", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/hook-scripts", "query": [], "variable": [] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "multipart/form-data" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Create a new hook script.\n\nThis endpoint requires **SYS_ADMIN** permission.", "body": { "mode": "formdata", "formdata": [ { "key": "content", "description": "The hook script contents.", "disabled": true, "type": "text", "value": "{{content}}" }, { "key": "description", "description": "A description of the hook script (useful when querying registered hook scripts).", "disabled": true, "type": "text", "value": "{{description}}" }, { "key": "name", "description": "The name of the hook script (useful when querying registered hook scripts).", "disabled": true, "type": "text", "value": "{{name}}" }, { "key": "type", "description": "The type of hook script; supported values are \"PRE\" for pre-receive hooks and \"POST\" for post-receive hooks.", "disabled": true, "type": "text", "value": "{{type}}" } ] } }, "response": [] }, { "name": "Get a hook script", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/hook-scripts/:scriptId", "query": [], "variable": [ { "key": "scriptId", "value": "{{scriptId}}", "description": "The ID of the hook script to retrieve", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieves a hook script by ID." }, "response": [] }, { "name": "Update a hook script", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/hook-scripts/:scriptId", "query": [], "variable": [ { "key": "scriptId", "value": "{{scriptId}}", "description": "The ID of the hook script", "disabled": false } ] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "*/*" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Updates a hook script.\n\nThis endpoint requires **SYS_ADMIN** permission.", "body": { "mode": "raw" } }, "response": [] }, { "name": "Delete a hook script.", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/hook-scripts/:scriptId", "query": [], "variable": [ { "key": "scriptId", "value": "{{scriptId}}", "description": "The ID of the hook script to delete", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Deletes a registered hook script.\n\nThis endpoint requires **SYS_ADMIN** permission." }, "response": [] }, { "name": "Get hook script content", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/hook-scripts/:scriptId/content", "query": [], "variable": [ { "key": "scriptId", "value": "{{scriptId}}", "description": "The ID of the hook script", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieves the hook script content.\n\nThis endpoint requires **SYS_ADMIN** permission." }, "response": [] }, { "name": "Get all labels", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/labels", "query": [ { "key": "prefix", "value": "{{prefix}}", "disabled": true, "description": "(optional) prefix to filter the labels on." }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Returns a paged response of all the labels in the system.\n\nThe user needs to be authenticated to use this resource." }, "response": [] }, { "name": "Get label", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/labels/:labelName", "query": [], "variable": [ { "key": "labelName", "value": "{{labelName}}", "description": "the label name", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Returns a label.\n\nThe user needs to be authenticated to use this resource." }, "response": [] }, { "name": "Get labelables for label", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/labels/:labelName/labeled", "query": [ { "key": "type", "value": "{{type}}", "disabled": true, "description": " the type of labelables to be returned. Supported values: REPOSITORY" }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "labelName", "value": "{{labelName}}", "description": "The page of labelables.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Returns a page of labelables for a given label.\n\nOnly labelables that the authenticated user has view access to will be returned." }, "response": [] }, { "name": "Get current log level", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/logs/logger/:loggerName", "query": [], "variable": [ { "key": "loggerName", "value": "{{loggerName}}", "description": "The name of the logger.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve the current log level for a given logger.\n\nThe authenticated user must have ADMIN permission or higher to call this resource." }, "response": [] }, { "name": "Set log level", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/logs/logger/:loggerName/:levelName", "query": [], "variable": [ { "key": "levelName", "value": "{{levelName}}", "description": "The level to set the logger to. Either TRACE, DEBUG, INFO, WARN or ERROR", "disabled": false }, { "key": "loggerName", "value": "{{loggerName}}", "description": "The name of the logger.", "disabled": false } ] }, "method": "PUT", "header": [], "description": "Set the current log level for a given logger.\n\nThe authenticated user must have ADMIN permission or higher to call this resource." }, "response": [] }, { "name": "Get root log level", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/logs/rootLogger", "query": [], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": " Retrieve the current log level for the root logger.\n\nThe authenticated user must have ADMIN permission or higher to call this resource." }, "response": [] }, { "name": "Set root log level", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/logs/rootLogger/:levelName", "query": [], "variable": [ { "key": "levelName", "value": "{{levelName}}", "description": "the level to set the logger to. Either TRACE, DEBUG, INFO, WARN or ERROR", "disabled": false } ] }, "method": "PUT", "header": [], "description": "Set the current log level for the root logger.\n\nThe authenticated user must have ADMIN permission or higher to call this resource." }, "response": [] }, { "name": "Start export job", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/migration/exports", "query": [], "variable": [] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Starts a background job that exports the selected repositories.\n\nOnly 2 concurrent exports are supported _per cluster node_. If a request ends up on a node that is already running that many export jobs, the request will be rejected and an error returned.\n\nThe response includes a description of the job that has been started, and its ID can be used to query these details again, including the current progress, warnings and errors that occurred while processing the job, and to interrupt and cancel the execution of this job.\n\nThe request to start an export is similar to the one for previewing an export. Additionally, it accepts an optional parameter, `exportLocation`, which can be used to specify a _relative_ path within `data/migration/export` in the shared home directory. No locations outside of that directory will be accepted for exports.\n\nThere are essentially three ways to select repositories for export. Regardless of which you use, a few general rules apply:\n\n- You can supply a list of selectors. The selection will be additive.\n- Repositories that are selected more than once due to overlapping selectors will be de-duplicated and effectively exported only once.\n- For every selected repository, its full fork hierarchy will be considered selected, even if parts of that hierarchy would otherwise not be matched by the provided selectors. For example, when you explicitly select a single repository only, but that repository is a fork, then its origin will be exported (and eventually imported), too.\n\nNow, a single repository can be selected like this:\n\n```\n\n\n\n{\n \"projectKey\": \"PRJ\",\n \"slug\": \"my-repo\"\n}\n\n```\n\nSecond, all repositories in a specific project can be selected like this:\n\n```\n\n\n\n{\n \"projectKey\": \"PRJ\",\n \"slug\": *\"\n}\n\n```\n\nAnd third, all projects and repositories in the system would be selected like this:\n\n```\n\n\n\n{\n \"projectKey\": \"*\",\n \"slug\": *\"\n}\n\n```\n\nThe authenticated user must have **ADMIN** permission or higher to call this resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Preview export", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/migration/exports/preview", "query": [], "variable": [] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Enumerates the projects and repositories that would be exported for a given export request.\n\nAll affected repositories will be enumerated explicitly, and while projects are listed as individual items in responses from this endpoint, their presence does not imply that all their repositories are included.\n\nWhile this endpoint can be used to verify that all selectors in the request apply as intended, it should be noted that a subsequent, actual export might contain a different set of repositories, as they might have been added or deleted in the meantime.\n\nNote that the overall response from this endpoint can become very large when a lot of repositories end up in the selection. This is why the server is streaming the response while it is being generated (as opposed to creating it in memory and then sending it all at once) and it can be consumed in a streaming way, too.\n\nAlso, due to the potential size of the response, projects and repositories are listed with fewer details than in other REST responses.\n\nFor a more detailed description of selectors, see the endpoint documentation for starting an export.\n\nThe authenticated user must have **ADMIN** permission or higher to call this resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Get export job details", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/migration/exports/:jobId", "query": [], "variable": [ { "key": "jobId", "value": "{{jobId}}", "description": "the ID of the job", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Gets the details, including the current status and progress, of the export job identified by the given ID.\n\nThe authenticated user must have **ADMIN** permission or higher to call this resource." }, "response": [] }, { "name": "Cancel export job", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/migration/exports/:jobId/cancel", "query": [], "variable": [ { "key": "jobId", "value": "{{jobId}}", "description": "the ID of the job to cancel", "disabled": false } ] }, "method": "POST", "header": [], "description": "Requests the cancellation of an export job.\n\nThe request to cancel a job will be processed successfully if the job is actually still running. If it has already finished (successfully or with errors) or if it has already been canceled before, then an error will be returned.\n\nThere might be a small delay between accepting the request and actually cancelling the job. In most cases, the delay will be close to instantaneously. In the unlikely case of communication issues across a cluster, it can however take a few seconds to cancel a job.\n\nA client should always actively query the job status to confirm that a job has been successfully canceled.\n\nThe authenticated user must have **ADMIN** permission or higher to call this resource." }, "response": [] }, { "name": "Get job messages", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/migration/exports/:jobId/messages", "query": [ { "key": "severity", "value": "{{severity}}", "disabled": true, "description": "The severity to include in the results" }, { "key": "subject", "value": "{{subject}}", "disabled": true, "description": "The subject" }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "jobId", "value": "{{jobId}}", "description": "The ID of the job", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Gets the messages generated by the job.\n\nWithout any filter, all messages will be returned, but the response can optionally be filtered for the following severities. The severity parameter can be repeated to include multiple severities in one response.\n\n- INFO\n- WARN\n- ERROR\n\nThe authenticated user must have **ADMIN** permission or higher to call this resource." }, "response": [] }, { "name": "Start import job", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/migration/imports", "query": [], "variable": [] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Starts a background job that imports the specified archive.\n\nOnly 1 import at a time is supported _per cluster_. If another request is made while an import is already running, the request will be rejected and an error returned.\n\nThe path in the request must point to a valid archive file. The file must be located within the `data/migration/import` directory in the shared home directory.\n\nThe authenticated user must have **ADMIN** permission or higher to call this resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Get import job status", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/migration/imports/:jobId", "query": [], "variable": [ { "key": "jobId", "value": "{{jobId}}", "description": "The ID of the job", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Gets the details, including the current status and progress, of the import job identified by the given ID.\n\nThe authenticated user must have **ADMIN** permission or higher to call this resource." }, "response": [] }, { "name": "Cancel import job", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/migration/imports/:jobId/cancel", "query": [], "variable": [ { "key": "jobId", "value": "{{jobId}}", "description": "the ID of the job to cancel", "disabled": false } ] }, "method": "POST", "header": [], "description": "Requests the cancellation of an import job.\n\nThe request to cancel a job will be processed successfully if the job is actually still running. If it has already finished (successfully or with errors) or if it has already been canceled before, then an error will be returned.\n\nNote that import jobs are not canceled as instantaneously as export jobs. Rather, once the request has been accepted, there are a number of checkpoints at which the job will actually apply it and stop. This is to keep the system in a reasonably consistent state:\n\n- After the current fork hierarchy has been imported and verified.\n- Before the next repository is imported.\n- Before the next pull request is imported.\n\nA client should always actively query the job status to confirm that a job has been successfully canceled.\n\nThe authenticated user must have **ADMIN** permission or higher to call this resource." }, "response": [] }, { "name": "Get import job messages", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/migration/imports/:jobId/messages", "query": [ { "key": "severity", "value": "{{severity}}", "disabled": true, "description": "The severity to include in the results" }, { "key": "subject", "value": "{{subject}}", "disabled": true, "description": "The subject" }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "jobId", "value": "{{jobId}}", "description": "The ID of the job", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Gets the messages generated by the job.\n\nWithout any filter, all messages will be returned, but the response can optionally be filtered for the following severities. The severity parameter can be repeated to include multiple severities in one response.\n\n- INFO\n- WARN\n- ERROR\n\nThe authenticated user must have **ADMIN** permission or higher to call this resource." }, "response": [] }, { "name": "Start Mesh migration job", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/migration/mesh", "query": [], "variable": [] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Starts a background job that migrates selected projects/repositories to Mesh. \n\nOnly 1 job is supported _per cluster_.\n\nThe response includes a description of the job that has been started, and its ID can be used to query these details again, including the current progress, and to interrupt and cancel the execution of this job. \n\nThe request to start a migration is similar to the one for previewing a migration. \n\nThere are essentially three ways to select repositories for migration. Regardless of which you use, a few general rules apply: \n\n - You can supply a list of repository IDs and project IDs. The selection will be additive. All repositories in the system are migrated if both lists are empty. - Repositories that are selected more than once due to overlapping IDs will be de-duplicated and effectively migrated only once. - For every selected repository, its full fork hierarchy will be considered selected, even if parts of that hierarchy would otherwise not be matched by the provided IDs. For example, when you explicitly select a single repository only, but that repository is a fork, then its origin will be migrated too. \n\nNow, a single repository can be selected like this: \n\n```\n\n {\n \"repositoryIds\": [1]\n }\n```\n\nMultiple repositories can be selected like this:\n\n\n\n```\n\n {\n \"repositoryIds\": [1, 2]\n }\n```\n\nSecond, all repositories in a specific project can be selected like this:\n\n\n\n```\n\n {\n \"projectIds\": [1]\n }\n```\n\nAnd third, all projects and repositories in the system would be selected like this:\n\n\n\n```\n\n {\n \"projectIds\": [],\n \"repositoryIds\": []\n }\n```\n\nThe authenticated user must have **SYS_ADMIN** permission to call this resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Preview Mesh migration", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/migration/mesh/preview", "query": [], "variable": [] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Enumerates the projects and repositories that would be migrated for a given request.\n\nAll affected repositories will be enumerated explicitly, and while projects are listed as individual items in responses from this endpoint, their presence does not imply that all their repositories are included.\n\nWhile this endpoint can be used to verify that all selectors in the request apply as intended, it should be noted that a subsequent, actual export might contain a different set of repositories, as they might have been added or deleted in the meantime.\n\nNote that the overall response from this endpoint can become very large when a lot of repositories end up in the selection. This is why the server is streaming the response while it is being generated (as opposed to creating it in memory and then sending it all at once) and it can be consumed in a streaming way, too.\n\nAlso, due to the potential size of the response, projects and repositories are listed with fewer details than in other REST responses.\n\nThe authenticated user must have **SYS_ADMIN** permission to call this resource.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Find repositories by Mesh migration state", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/migration/mesh/repos", "query": [ { "key": "migrationId", "value": "{{migrationId}}", "disabled": true, "description": "(optional) The currently active migration job. If not passed, this is looked up internally." }, { "key": "projectKey", "value": "{{projectKey}}", "disabled": true, "description": "(optional) The project key. Can be specified more than once to filter by more than one project." }, { "key": "name", "value": "{{name}}", "disabled": true, "description": "(optional) The repository name" }, { "key": "state", "value": "{{state}}", "disabled": true, "description": "(optional) If a migration is active, the MeshMigrationQueueState state to filter results by. Can be specified more than once to filter by more than one state." }, { "key": "remote", "value": "{{remote}}", "disabled": true, "description": "(optional) Whether the repository has been fully migrated to Mesh. If not present, all repositories are considered regardless of where they're located." }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Searches for repositories in the system matching the specified criteria and enriches their MeshMigrationQueueState migration state if a migration is currently in progress. \n\nThe currently active migration can optionally be specified by passing a migrationId, if known. If this isn't passed, an attempt is made to locate the active migration and its ID is used. \n\nIf a migration is currently active, only repositories that are a part of the migration are filtered and returned. Otherwise, all repositories in the systems are filtered and returned. \n\nFiltering by state is ignored when no migration is currently in progress. In such a case, results are not enriched with their MeshMigrationQueueState migration state. \n\nThe authenticated user must have **SYS_ADMIN** permission to call this resource." }, "response": [] }, { "name": "Get all Mesh migration job summaries", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/migration/mesh/summaries", "query": [ { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve a page of Mesh migration job summaries. Jobs are ordered by when they were started, newest first. \n\nThe authenticated user must have **SYS_ADMIN** permission to call this resource." }, "response": [] }, { "name": "Get summary for Mesh migration job", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/migration/mesh/summary", "query": [], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Gets the summary, including the queue status and progress, of the currently active Mesh migration job.\n\nThe authenticated user must have **SYS_ADMIN** permission to call this resource." }, "response": [] }, { "name": "Get Mesh migration job details", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/migration/mesh/:jobId", "query": [], "variable": [ { "key": "jobId", "value": "{{jobId}}", "description": "The ID of the job", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Gets the details, including the current status and progress, of the job identified by the given ID.\n\nThe authenticated user must have **SYS_ADMIN** permission to call this resource." }, "response": [] }, { "name": "Cancel Mesh migration job", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/migration/mesh/:jobId/cancel", "query": [], "variable": [ { "key": "jobId", "value": "{{jobId}}", "description": "The ID of the job to cancel", "disabled": false } ] }, "method": "POST", "header": [], "description": "Requests the cancellation of a migration job. \n\nThe request to cancel a job will be processed successfully if the job is actually still running. If it has already finished (successfully or with errors) or if it has already been canceled before, then an error will be returned. \n\nThere might be a small delay between accepting the request and actually cancelling the job. In most cases, the delay will be close to instantaneously. In the unlikely case of communication issues across a cluster, it can however take a few seconds to cancel a job.\n\nA client should always actively query the job status to confirm that a job has been successfully canceled.\n\nThe authenticated user must have **SYS_ADMIN** permission to call this resource." }, "response": [] }, { "name": "Get Mesh migration job messages", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/migration/mesh/:jobId/messages", "query": [ { "key": "severity", "value": "{{severity}}", "disabled": true, "description": "The severity to include in the results" }, { "key": "subject", "value": "{{subject}}", "disabled": true, "description": "The subject" }, { "key": "start", "value": "{{start}}", "disabled": true, "description": "Start number for the page (inclusive). If not passed, first page is assumed." }, { "key": "limit", "value": "{{limit}}", "disabled": true, "description": "Number of items to return. If not passed, a page size of 25 is used." } ], "variable": [ { "key": "jobId", "value": "{{jobId}}", "description": "The ID of the job", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Gets the messages generated by the job. \n\nWithout any filter, all messages will be returned, but the response can optionally be filtered for the following severities. The severity parameter can be repeated to include multiple severities in one response. \n\n - INFO\n - WARN\n - ERROR\n\n\nThe authenticated user must have **SYS_ADMIN** permission to call this resource." }, "response": [] }, { "name": "Get Mesh migration job summary", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/migration/mesh/:jobId/summary", "query": [], "variable": [ { "key": "jobId", "value": "{{jobId}}", "description": "The ID of the job", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Gets the summary, including the queue status and progress, of a Mesh migration job. \n\nThe authenticated user must have **SYS_ADMIN** permission to call this resource." }, "response": [] }, { "name": "Get all users", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/users", "query": [ { "key": "filter", "value": "{{filter}}", "disabled": true, "description": "Return only users, whose username, name or email address contain the filter value" }, { "key": "permission.N", "value": "{{permission.N}}", "disabled": true, "description": "The \"root\" of a single permission filter, similar to the permission parameter, where \"N\" is a natural number starting from 1. This allows clients to specify multiple permission filters, by providing consecutive filters as permission.1, permission.2 etc. Note that the filters numbering has to start with 1 and be continuous for all filters to be processed. The total allowed number of permission filters is 50 and all filters exceeding that limit will be dropped. See the section \"Permission Filters\" above for more details on how the permission filters are processed." }, { "key": "permission", "value": "{{permission}}", "disabled": true, "description": "The \"root\" of a permission filter, whose value must be a valid global, project, or repository permission. Additional filter parameters referring to this filter that specify the resource (project or repository) to apply the filter to must be prefixed with permission.. See the section \"Permission Filters\" above for more details." }, { "key": "group", "value": "{{group}}", "disabled": true, "description": "return only users who are members of the given group" } ], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve a page of users, optionally run through provided filters.\n\n\nOnly authenticated users may call this resource.\n### Permission Filters\n\n\nThe following three sub-sections list parameters supported for permission filters (where [root] is\nthe root permission filter name, e.g. permission, permission.1 etc.) depending on the\npermission resource. The system determines which filter to apply (Global, Project or Repository permission)\nbased on the `[root]` permission value. E.g. ADMIN is a global permission,\nPROJECT_ADMIN is a project permission and REPO_ADMIN is a repository permission. Note\nthat the parameters for a given resource will be looked up in the order as they are listed below, that is e.g.\nfor a project resource, if both projectId and projectKey are provided, the system will\nuse projectId for the lookup.\nGlobal permissions\n\n\nThe permission value under [root] is the only required and recognized parameter, as global\npermissions do not apply to a specific resource.\n\n\nExample valid filter: permission=ADMIN.\nProject permissions\n\n\n- [root]- specifies the project permission\n- [root].projectId - specifies the project ID to lookup the project by\n- [root].projectKey - specifies the project key to lookup the project by\n\n\nExample valid filter: permission.1=PROJECT_ADMIN&permission.1.projectKey=TEST_PROJECT.\n#### Repository permissions\n\n\n- [root]- specifies the repository permission\n- [root].projectId - specifies the repository ID to lookup the repository by\n- [root].projectKey and [root].repositorySlug- specifies the project key and repository slug to lookup the repository by; both values need to be provided for this look up to be triggered\n\n\nExample valid filter: permission.2=REPO_ADMIN&permission.2.projectKey=TEST_PROJECT&permission.2.repositorySlug=test_repo." }, "response": [] }, { "name": "Update user details", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/users", "query": [], "variable": [] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Update the currently authenticated user's details. The update will always be applied to the currently authenticated user.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Set password", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/users/credentials", "query": [], "variable": [] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" } ], "description": "Update the currently authenticated user's password.", "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Get user", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/users/:userSlug", "query": [], "variable": [ { "key": "userSlug", "value": "{{userSlug}}", "description": "The user slug", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve the user matching the supplied userSlug." }, "response": [] }, { "name": "Update user avatar", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/users/:userSlug/avatar.png", "query": [], "variable": [ { "key": "userSlug", "value": "{{userSlug}}", "description": "The user slug", "disabled": false } ] }, "method": "POST", "header": [ { "key": "X-Atlassian-Token", "value": "{{X-Atlassian-Token}}", "description": "This resource has Cross-Site Request Forgery (XSRF) protection. To allow the request to pass the XSRF check the caller needs to send an X-Atlassian-Token HTTP header with the value no-check.", "disabled": true }, { "description": "", "disabled": false, "key": "Content-Type", "value": "multipart/form-data" } ], "description": "Update the avatar for the user with the supplied slug.\n\n\nThis resource accepts POST multipart form data, containing a single image in a form-field named 'avatar'.\n\n\nThere are configurable server limits on both the dimensions (1024x1024 pixels by default) and uploaded\nfile size (1MB by default). Several different image formats are supported, but PNG and\nJPEG are preferred due to the file size limit.\n\n\nThis resource has Cross-Site Request Forgery (XSRF) protection. To allow the request to\npass the XSRF check the caller needs to send an X-Atlassian-Token HTTP header with the\nvalue no-check.\n\n\nAn example curl request to upload an image name 'avatar.png' would be:\n```\ncurl -X POST -u username:password -H \"X-Atlassian-Token: no-check\" http://example.com/rest/api/latest/users/jdoe/avatar.png -F avatar=@avatar.png\n```\n\n\nUsers are always allowed to update their own avatar. To update someone else's avatar the authenticated user must\nhave global ADMIN permission, or global SYS_ADMIN permission to update a\nSYS_ADMIN user's avatar.", "body": { "mode": "formdata", "formdata": [ { "key": "avatar", "description": "The avatar file to upload.", "disabled": true, "type": "file" } ] } }, "response": [] }, { "name": "Delete user avatar", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/users/:userSlug/avatar.png", "query": [], "variable": [ { "key": "userSlug", "value": "{{userSlug}}", "description": "The user slug", "disabled": false } ] }, "method": "DELETE", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Delete the avatar associated to a user.\n\n\nUsers are always allowed to delete their own avatar. To delete someone else's avatar the authenticated user must\nhave global ADMIN permission, or global SYS_ADMIN permission to update a\nSYS_ADMIN user's avatar." }, "response": [] }, { "name": "Get user settings", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/users/:userSlug/settings", "query": [], "variable": [ { "key": "userSlug", "value": "{{userSlug}}", "description": "The user slug.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieve a map of user setting key values for a specific user identified by the user slug." }, "response": [] }, { "name": "Update user settings", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/users/:userSlug/settings", "query": [], "variable": [ { "key": "userSlug", "value": "{{userSlug}}", "description": "The user slug.", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" } ], "description": "Update the entries of a map of user setting key/values for a specific user identified by the user slug.", "body": { "mode": "raw", "raw": "" } }, "response": [] } ] }, { "name": "Other operations", "item": [ { "name": "Get pull requests in inbox", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/inbox/pull-requests", "query": [ { "key": "role", "value": "{{role}}", "disabled": true }, { "key": "limit", "value": "{{limit}}", "disabled": true }, { "key": "start", "value": "{{start}}", "disabled": true } ], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json;charset=UTF-8" } ], "description": "Returns a page of pull requests in the user's inbox." }, "response": [] }, { "name": "Get total number of pull requests in inbox", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}api/latest/inbox/pull-requests/count", "query": [], "variable": [] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json;charset=UTF-8" } ], "description": "Returns the total number of pull requests in the user's inbox" }, "response": [] } ] } ], "variable": [ { "key": "protocol", "name": "Protocol", "description": "The HTTP Protocol that should be used for this REST API.", "type": "string", "value": "http" }, { "key": "host", "name": "Host", "description": "The HTTP host that should be used for this REST API.", "type": "string", "value": "api.atlassian.com" }, { "key": "basePath", "name": "Base Path", "description": "The path, after the host, of the base of the REST API.", "type": "string", "value": "%7Bbaseurl%7D/rest/" } ] }