openapi: 3.1.0 info: title: Atlassian Admin Account Uploading 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: Uploading paths: /repositories/{workspace}/{repo_slug}/src: 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 post: tags: - Uploading description: This operation allows you to create a new commit in a Bitbucket repository by uploading one or more files directly through the API. You specify the target workspace and repository via the path parameters, then provide the file content along with commit metadata such as the commit message, branch name, author information, and optional parent commit references in the request body. The files are uploaded as multipart form data, where each file can be specified with its path in the repository and its content. Upon successful execution, the API creates a new commit containing the uploaded files and returns details about the newly created commit including its hash, timestamp, and author information. This is particularly useful for automating file updates, CI/CD pipelines, or any workflow that needs to programmatically modify repository contents without requiring a local git clone or manual file operations. summary: Atlassian Create Commit by Uploading File responses: '201': description: ' ' '403': description: If the authenticated user does not have write or admin access content: application/json: schema: $ref: '#/components/schemas/error' '404': description: If the repository does not exist. content: application/json: schema: $ref: '#/components/schemas/error' parameters: - name: message in: query description: The commit message. When omitted, Bitbucket uses a canned string. required: false schema: type: string - name: author in: query description: ' The raw string to be used as the new Commits author. This string follows the format `Erik van Zijst `. When omitted, Bitbucket uses the authenticated user''s full/display name and primary email address. Commits cannot be created anonymously.' required: false schema: type: string - name: parents in: query description: ' A comma-separated list of SHA1s of the commits that should be the parents of the newly created commit. When omitted, the new commit will inherit from and become a child of the main branch''s tip/HEAD commit. When more than one SHA1 is provided, the first SHA1 identifies the commit from which the content will be inherited.".' required: false schema: type: string - name: files in: query description: ' Optional field that declares the files that the request is manipulating. When adding a new file to a repo, or when overwriting an existing file, the client can just upload the full contents of the file in a normal form field and the use of this `files` meta data field is redundant. However, when the `files` field contains a file path that does not have a corresponding, identically-named form field, then Bitbucket interprets that as the client wanting to replace the named file with the null set and the file is deleted instead. Paths in the repo that are referenced in neither files nor an individual file field, remain unchanged and carry over from the parent to the new commit. This API does not support renaming as an explicit feature. To rename a file, simply delete it and recreate it under the new name in the same commit. ' required: false schema: type: string - name: branch in: query description: ' The name of the branch that the new commit should be created on. When omitted, the commit will be created on top of the main branch and will become the main branch''s new head. When a branch name is provided that already exists in the repo, then the commit will be created on top of that branch. In this case, *if* a parent SHA1 was also provided, then it is asserted that the parent is the branch''s tip/HEAD at the time the request is made. When this is not the case, a 409 is returned. When a new branch name is specified (that does not already exist in the repo), and no parent SHA1s are provided, then the new commit will inherit from the current main branch''s tip/HEAD commit, but not advance the main branch. The new commit will be the new branch. When the request *also* specifies a parent SHA1, then the new commit and branch are created directly on top of the parent commit, regardless of the state of the main branch. When a branch name is not specified, but a parent SHA1 is provided, then Bitbucket asserts that it represents the main branch''s current HEAD/tip, or a 409 is returned. When a branch name is not specified and the repo is empty, the new commit will become the repo''s root commit and will be on the main branch. When a branch name is specified and the repo is empty, the new commit will become the repo''s root commit and also define the repo''s main branch going forward. This API cannot be used to create additional root commits in non-empty repos. The branch field cannot be repeated. As a side effect, this API can be used to create a new branch without modifying any files, by specifying a new branch name in this field, together with `parents`, but omitting the `files` fields, while not sending any files. This will create a new commit and branch with the same contents as the first parent. The diff of this commit against its first parent will be empty. ' required: false schema: type: string security: - oauth2: - repository:write - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - write:repository:bitbucket operationId: createCommitByUploadingFile x-api-evangelist-processing: WriteDescription: true ChooseTags: true x-microcks-operation: delay: 0 dispatcher: FALLBACK 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 example: example_value 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 example: example_value 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/