{ "opencollection": "1.0.0", "info": { "name": "Atlassian Admin Account Directories API", "version": "1.0.0" }, "request": { "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "items": [ { "info": { "name": "Directories", "type": "folder" }, "items": [ { "info": { "name": "Atlassian Get the Root Directory of the Main Branch", "type": "http" }, "http": { "method": "GET", "url": "https://api.atlassian.com/repositories/:workspace/:repo_slug/src", "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": "format", "value": "", "type": "query", "description": "Instead of returning the file's contents, return the (json) meta data for it." } ], "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": "The GET operation on /repositories/{workspace}/{repo_slug}/src endpoint in the Atlassian Bitbucket Repositories API retrieves the contents of the root directory from the main branch of a specified repository. By providing the workspace identifier and repository slug in the path parameters, this endpoint returns a paginated list of files and directories located at the repository's root level, including metadata such as file names, paths, sizes, and commit information. This operation is useful for" }, { "info": { "name": "Atlassian Get File or Directory Contents", "type": "http" }, "http": { "method": "GET", "url": "https://api.atlassian.com/repositories/:workspace/:repo_slug/src/:commit/:path", "params": [ { "name": "commit", "value": "", "type": "path", "description": "The Commits SHA1." }, { "name": "path", "value": "", "type": "path", "description": "Path to the file." }, { "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": "format", "value": "", "type": "query", "description": "If 'meta' is provided, returns the (json) meta data for the contents of the file. If 'rendered' is provided, returns the contents of a non-binary file in HTML-formatted rendered markup. The 'rendered' option only supports these filetypes: `.md`, `.markdown`, `.mkd`, `.mkdn`, `.mdown`, `.text`, `.rst`, and `.textile`. Since Git does not generally track what text encoding scheme is used, this endpoint attempts to detect the most appropriate character encoding. While usually correct, determining the character encoding can be ambiguous which in exceptional cases can lead to misinterpretation of the characters. As such, the raw element in the response object should not be treated as equivalent to the file's actual contents." }, { "name": "q", "value": "", "type": "query", "description": "Optional filter expression as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering)." }, { "name": "sort", "value": "", "type": "query", "description": "Optional sorting parameter as per [filtering and sorting](/cloud/bitbucket/rest/intro/#sorting-query-results)." }, { "name": "max_depth", "value": "", "type": "query", "description": "If provided, returns the contents of the repository and its subdirectories recursively until the specified max_depth of nested directories. When omitted, this defaults to 1." } ], "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": "This GET operation retrieves the raw content of a file or the contents of a directory from a specific Bitbucket repository at a particular commit. By providing the workspace identifier, repository slug, commit hash or branch name, and the file or directory path, users can access the exact state of their source code at any point in the repository's history. When targeting a file, the endpoint returns the raw file content, while targeting a directory returns a listing of its contents including fil" } ] } ], "bundled": true }