openapi: 3.1.0 info: title: Atlassian Admin Account Downloads API description: The Atlassian Admin API provides programmatic access to manage Atlassian organizations, users, domains, policies, and events. It enables administrators to automate organization management tasks, integrate with identity providers, and ensure appropriate access to Atlassian products. version: 1.0.0 contact: name: Atlassian Developer url: https://developer.atlassian.com/cloud/admin/ license: name: Atlassian Developer Terms url: https://developer.atlassian.com/platform/marketplace/atlassian-developer-terms/ x-logo: url: https://wac-cdn.atlassian.com/assets/img/favicons/atlassian/favicon.png servers: - url: https://api.atlassian.com description: Atlassian Cloud API security: - bearerAuth: [] - oauth2: [] tags: - name: Downloads paths: /repositories/{workspace}/{repo_slug}/downloads: parameters: - name: repo_slug in: path description: 'This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. ' required: true schema: type: string - name: workspace in: path description: 'This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. ' required: true schema: type: string get: tags: - Downloads description: Returns a list of download links associated with the repository. summary: Atlassian List Download Artifacts responses: '200': description: Returns a paginated list of the downloads associated with the repository. '403': description: User is not authorized to read from the repository. content: application/json: schema: $ref: '#/components/schemas/error' security: - oauth2: - repository - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - read:repository:bitbucket operationId: atlassianListDownloadArtifacts post: tags: - Downloads description: Upload new download artifacts.

To upload files, perform a `multipart/form-data` POST containing one
or more `files` fields:

$ echo Hello World > hello.txt
$ curl -s -u evzijst -X POST https://api.bitbucket.org/2.0/repositories/evzijst/git-tests/downloads -F files=@hello.txt

When a file is uploaded with the same name as an existing artifact,
then the existing file will be replaced. summary: Atlassian Upload A Download Artifact responses: '201': description: The artifact was uploaded sucessfully. '400': description: Bad Request. content: application/json: schema: $ref: '#/components/schemas/error' '403': description: User is not authorized to write to the repository. content: application/json: schema: $ref: '#/components/schemas/error' '406': description: Unsupported Content-Type. Use multiplart/form-data. content: application/json: schema: $ref: '#/components/schemas/error' security: - oauth2: - repository:write - basic: [] - api_key: [] operationId: atlassianUploadADownloadArtifact /repositories/{workspace}/{repo_slug}/downloads/{filename}: parameters: - name: filename in: path description: Name of the file. required: true schema: type: string - name: repo_slug in: path description: 'This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. ' required: true schema: type: string - name: workspace in: path description: 'This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. ' required: true schema: type: string delete: tags: - Downloads description: Deletes the specified download artifact from the repository. summary: Atlassian Delete A Download Artifact responses: '204': description: The specified download artifact was deleted. '403': description: User is not authorized to write to the repository. content: application/json: schema: $ref: '#/components/schemas/error' '404': description: The specified download does not exist. content: application/json: schema: $ref: '#/components/schemas/error' security: - oauth2: - repository:write - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - write:repository:bitbucket operationId: atlassianDeleteADownloadArtifact get: tags: - Downloads description: Return a redirect to the contents of a download artifact.

This endpoint returns the actual file contents and not the artifact's
metadata.

$ curl -s -L https://api.bitbucket.org/2.0/repositories/evzijst/git-tests/downloads/hello.txt
Hello World summary: Atlassian Get A Download Artifact Link responses: '302': description: Redirects to the url of the specified download artifact. '403': description: User is not authorized to read from the repository. content: application/json: schema: $ref: '#/components/schemas/error' '404': description: The specified download artifact does not exist. content: application/json: schema: $ref: '#/components/schemas/error' security: - oauth2: - repository - basic: [] - api_key: [] operationId: atlassianGetADownloadArtifactLink components: schemas: error: type: object title: Error description: Base type for most resource objects. It defines the common `type` element that identifies an object's type. It also identifies the element as Swagger's `discriminator`. properties: type: type: string error: type: object properties: message: type: string detail: type: string data: type: object description: Optional structured data that is endpoint-specific. properties: {} additionalProperties: true required: - message additionalProperties: false required: - type additionalProperties: true securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: API Key description: Use an Atlassian API key as a Bearer token. Create API keys at https://admin.atlassian.com. oauth2: type: oauth2 description: OAuth 2.0 authorization for Atlassian Cloud APIs. flows: authorizationCode: authorizationUrl: https://auth.atlassian.com/authorize tokenUrl: https://auth.atlassian.com/oauth/token scopes: read:org:admin: Read organization information. write:org:admin: Modify organization settings. read:user:admin: Read user information. write:user:admin: Modify user accounts. read:policy:admin: Read organization policies. write:policy:admin: Modify organization policies. read:event:admin: Read organization events. externalDocs: description: Atlassian Admin REST API Documentation url: https://developer.atlassian.com/cloud/admin/organization/rest/intro/