{
  "opencollection": "1.0.0",
  "info": {
    "name": "Atlassian Admin Account Refs API",
    "version": "1.0.0"
  },
  "request": {
    "auth": {
      "type": "bearer",
      "token": "{{bearerToken}}"
    }
  },
  "items": [
    {
      "info": {
        "name": "Refs",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Atlassian List Branches And Tags",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.atlassian.com/repositories/:workspace/:repo_slug/refs",
            "params": [
              {
                "name": "repo_slug",
                "value": "",
                "type": "path",
                "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n"
              },
              {
                "name": "workspace",
                "value": "",
                "type": "path",
                "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n"
              },
              {
                "name": "q",
                "value": "",
                "type": "query",
                "description": "\nQuery string to narrow down the response as per\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering)."
              },
              {
                "name": "sort",
                "value": "",
                "type": "query",
                "description": "\nField by which the results should be sorted as per\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering). The `name`\nfield is handled specially for refs in that, if specified as the sort field, it\nuses a natural sort order instead of the default lexicographical sort order. For example,\nit will return ['1.1', '1.2', '1.10'] instead of ['1.1', '1.10', '1.2']."
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://auth.atlassian.com/authorize",
              "accessTokenUrl": "https://auth.atlassian.com/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Returns the branches and tags in the repository.<br><br>By default, results will be in the order the underlying source control system returns them and identical to<br>the ordering one sees when running \"$ git show-ref\". Note that this follows simple<br>lexical ordering of the ref names.<br><br>This can be undesirable as it does apply any natural sorting semantics, meaning for instance that refs are<br>sorted [\"branch1\", \"branch10\", \"branch2\", \"v10\", \"v11\", \"v9\"] instead of [\"branch1\", \"branch2\","
        },
        {
          "info": {
            "name": "Atlassian List Open Branches",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.atlassian.com/repositories/:workspace/:repo_slug/refs/branches",
            "params": [
              {
                "name": "repo_slug",
                "value": "",
                "type": "path",
                "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n"
              },
              {
                "name": "workspace",
                "value": "",
                "type": "path",
                "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n"
              },
              {
                "name": "q",
                "value": "",
                "type": "query",
                "description": "\nQuery string to narrow down the response as per\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering)."
              },
              {
                "name": "sort",
                "value": "",
                "type": "query",
                "description": "\nField by which the results should be sorted as per\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering). The `name`\nfield is handled specially for branches in that, if specified as the sort field, it\nuses a natural sort order instead of the default lexicographical sort order. For example,\nit will return ['branch1', 'branch2', 'branch10'] instead of ['branch1', 'branch10', 'branch2']."
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://auth.atlassian.com/authorize",
              "accessTokenUrl": "https://auth.atlassian.com/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Returns a list of all open branches within the specified repository.<br>Results will be in the order the source control manager returns them.<br><br>Branches support [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering)<br>that can be used to search for specific branches. For instance, to find<br>all branches that have \"stab\" in their name:<br><br>```<br>curl -s https://api.bitbucket.org/2.0/repositories/atlassian/aui/refs/branches -G --data-urlencode 'q=name ~ \"stab\"'<br>```<br><br>By"
        },
        {
          "info": {
            "name": "Atlassian Create A Branch",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.atlassian.com/repositories/:workspace/:repo_slug/refs/branches",
            "params": [
              {
                "name": "repo_slug",
                "value": "",
                "type": "path",
                "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n"
              },
              {
                "name": "workspace",
                "value": "",
                "type": "path",
                "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://auth.atlassian.com/authorize",
              "accessTokenUrl": "https://auth.atlassian.com/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Creates a new branch in the specified repository.<br><br>The payload of the POST should consist of a JSON document that<br>contains the name of the tag and the target hash.<br><br>```<br>curl https://api.bitbucket.org/2.0/repositories/seanfarley/hg/refs/branches \\<br>-s -u seanfarley -X POST -H \"Content-Type: application/json\" \\<br>-d '{<br>    \"name\" : \"smf/create-feature\",<br>    \"target\" : {<br>        \"hash\" : \"default\",<br>    }<br>}'<br>```<br><br>This call requires authentication. Private"
        },
        {
          "info": {
            "name": "Atlassian Get A Branch",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.atlassian.com/repositories/:workspace/:repo_slug/refs/branches/:name",
            "params": [
              {
                "name": "name",
                "value": "",
                "type": "path",
                "description": "The name of the branch."
              },
              {
                "name": "repo_slug",
                "value": "",
                "type": "path",
                "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n"
              },
              {
                "name": "workspace",
                "value": "",
                "type": "path",
                "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://auth.atlassian.com/authorize",
              "accessTokenUrl": "https://auth.atlassian.com/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Returns a branch object within the specified repository.<br><br>This call requires authentication. Private repositories require the<br>caller to authenticate with an account that has appropriate<br>authorization.<br><br>For Git, the branch name should not include any prefixes (e.g.<br>refs/heads)."
        },
        {
          "info": {
            "name": "Atlassian Delete A Branch",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api.atlassian.com/repositories/:workspace/:repo_slug/refs/branches/:name",
            "params": [
              {
                "name": "name",
                "value": "",
                "type": "path",
                "description": "The name of the branch."
              },
              {
                "name": "repo_slug",
                "value": "",
                "type": "path",
                "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n"
              },
              {
                "name": "workspace",
                "value": "",
                "type": "path",
                "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://auth.atlassian.com/authorize",
              "accessTokenUrl": "https://auth.atlassian.com/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Delete a branch in the specified repository.<br><br>The main branch is not allowed to be deleted and will return a 400<br>response.<br><br>The branch name should not include any prefixes (e.g.<br>refs/heads)."
        },
        {
          "info": {
            "name": "Atlassian List Tags",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.atlassian.com/repositories/:workspace/:repo_slug/refs/tags",
            "params": [
              {
                "name": "repo_slug",
                "value": "",
                "type": "path",
                "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n"
              },
              {
                "name": "workspace",
                "value": "",
                "type": "path",
                "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n"
              },
              {
                "name": "q",
                "value": "",
                "type": "query",
                "description": "\nQuery string to narrow down the response as per\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering)."
              },
              {
                "name": "sort",
                "value": "",
                "type": "query",
                "description": "\nField by which the results should be sorted as per\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering). The `name`\nfield is handled specially for tags in that, if specified as the sort field, it\nuses a natural sort order instead of the default lexicographical sort order. For example,\nit will return ['1.1', '1.2', '1.10'] instead of ['1.1', '1.10', '1.2']."
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://auth.atlassian.com/authorize",
              "accessTokenUrl": "https://auth.atlassian.com/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Returns the tags in the repository.<br><br>By default, results will be in the order the underlying source control system returns them and identical to<br>the ordering one sees when running \"$ git tag --list\". Note that this follows simple<br>lexical ordering of the ref names.<br><br>This can be undesirable as it does apply any natural sorting semantics, meaning for instance that tags are<br>sorted [\"v10\", \"v11\", \"v9\"] instead of [\"v9\", \"v10\", \"v11\"].<br><br>Sorting can be changed using the ?sort"
        },
        {
          "info": {
            "name": "Atlassian Create A Tag",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.atlassian.com/repositories/:workspace/:repo_slug/refs/tags",
            "params": [
              {
                "name": "repo_slug",
                "value": "",
                "type": "path",
                "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n"
              },
              {
                "name": "workspace",
                "value": "",
                "type": "path",
                "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://auth.atlassian.com/authorize",
              "accessTokenUrl": "https://auth.atlassian.com/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Creates a new tag in the specified repository.<br><br>The payload of the POST should consist of a JSON document that<br>contains the name of the tag and the target hash.<br><br>```<br>curl https://api.bitbucket.org/2.0/repositories/jdoe/myrepo/refs/tags \\<br>-s -u jdoe -X POST -H \"Content-Type: application/json\" \\<br>-d '{<br>    \"name\" : \"new-tag-name\",<br>    \"target\" : {<br>        \"hash\" : \"a1b2c3d4e5f6\",<br>    }<br>}'<br>```<br><br>This endpoint does support using short hash prefixes for t"
        },
        {
          "info": {
            "name": "Atlassian Get A Tag",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.atlassian.com/repositories/:workspace/:repo_slug/refs/tags/:name",
            "params": [
              {
                "name": "name",
                "value": "",
                "type": "path",
                "description": "The name of the tag."
              },
              {
                "name": "repo_slug",
                "value": "",
                "type": "path",
                "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n"
              },
              {
                "name": "workspace",
                "value": "",
                "type": "path",
                "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://auth.atlassian.com/authorize",
              "accessTokenUrl": "https://auth.atlassian.com/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Returns the specified tag.<br><br>```<br>$ curl -s https://api.bitbucket.org/2.0/repositories/seanfarley/hg/refs/tags/3.8 -G | jq .<br>{<br>  \"name\": \"3.8\",<br>  \"links\": {<br>    \"commits\": {<br>      \"href\": \"https://api.bitbucket.org/2.0/repositories/seanfarley/hg/commits/3.8\"<br>    },<br>    \"self\": {<br>      \"href\": \"https://api.bitbucket.org/2.0/repositories/seanfarley/hg/refs/tags/3.8\"<br>    },<br>    \"html\": {<br>      \"href\": \"https://bitbucket.org/seanfarley/hg/commits/tag/3.8\"<br> "
        },
        {
          "info": {
            "name": "Atlassian Delete A Tag",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api.atlassian.com/repositories/:workspace/:repo_slug/refs/tags/:name",
            "params": [
              {
                "name": "name",
                "value": "",
                "type": "path",
                "description": "The name of the tag."
              },
              {
                "name": "repo_slug",
                "value": "",
                "type": "path",
                "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n"
              },
              {
                "name": "workspace",
                "value": "",
                "type": "path",
                "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://auth.atlassian.com/authorize",
              "accessTokenUrl": "https://auth.atlassian.com/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Delete a tag in the specified repository.<br><br>The tag name should not include any prefixes (e.g. refs/tags)."
        }
      ]
    }
  ],
  "bundled": true
}