Amazon CodeCommit Codecommit Branch API

The Codecommit Branch API from Amazon CodeCommit — 3 operation(s) for codecommit branch.

Business capability
Software Construction Management BC-4200.40

Operations 3

POST /#CreateBranch Create Branch #
POST /#DeleteBranch Delete Branch #
POST /#GetBranch Get Branch #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/amazon-codecommit:amazon-codecommit-branch-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

amazon-codecommit-branch-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: AWS CodeCommit Branch API
  version: '2015-04-13'
  description: Generated from AWS's published Smithy model for AWS CodeCommit. 3 operation(s).
  contact:
    name: Amazon Web Services
    url: https://aws.amazon.com/contact-us/
  license:
    name: Apache 2.0
    identifier: Apache-2.0
    url: https://github.com/aws/api-models-aws/blob/main/LICENSE
servers:
- url: https://codecommit.{region}.amazonaws.com
  variables:
    region:
      default: us-east-1
security:
- sigv4: []
paths:
  /#CreateBranch:
    post:
      operationId: CreateBranch
      summary: Create Branch
      description: Creates a branch in a repository and points the branch to a commit. Calling the create branch operation
        does not set a repository's default branch. To do this, call the update default branch operation.
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.1:
              schema:
                type: string
        '400':
          description: BranchNameExistsException; BranchNameRequiredException; CommitDoesNotExistException; CommitIdRequiredException;
            EncryptionKeyAccessDeniedException; EncryptionKeyDisabledException; EncryptionKeyNotFoundException; EncryptionKeyUnavailableException;
            InvalidBranchNameException; InvalidCommitIdException; InvalidRepositoryNameException; RepositoryDoesNotExistException;
            RepositoryNameRequiredException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/BranchNameExistsException'
        '500':
          description: EncryptionIntegrityChecksFailedException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/EncryptionIntegrityChecksFailedException'
      parameters:
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - CodeCommit_20150413.CreateBranch
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/CreateBranchInput'
      tags:
      - Branch
  /#DeleteBranch:
    post:
      operationId: DeleteBranch
      summary: Delete Branch
      description: Deletes a branch from a repository, unless that branch is the default branch for the repository.
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/DeleteBranchOutput'
        '400':
          description: BranchNameRequiredException; DefaultBranchCannotBeDeletedException; EncryptionKeyAccessDeniedException;
            EncryptionKeyDisabledException; EncryptionKeyNotFoundException; EncryptionKeyUnavailableException; InvalidBranchNameException;
            InvalidRepositoryNameException; RepositoryDoesNotExistException; RepositoryNameRequiredException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/BranchNameRequiredException'
        '500':
          description: EncryptionIntegrityChecksFailedException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/EncryptionIntegrityChecksFailedException'
      parameters:
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - CodeCommit_20150413.DeleteBranch
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/DeleteBranchInput'
      tags:
      - Branch
  /#GetBranch:
    post:
      operationId: GetBranch
      summary: Get Branch
      description: Returns information about a repository branch, including its name and the last commit ID.
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/GetBranchOutput'
        '400':
          description: BranchDoesNotExistException; BranchNameRequiredException; EncryptionKeyAccessDeniedException; EncryptionKeyDisabledException;
            EncryptionKeyNotFoundException; EncryptionKeyUnavailableException; InvalidBranchNameException; InvalidRepositoryNameException;
            RepositoryDoesNotExistException; RepositoryNameRequiredException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/BranchDoesNotExistException'
        '500':
          description: EncryptionIntegrityChecksFailedException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/EncryptionIntegrityChecksFailedException'
      parameters:
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - CodeCommit_20150413.GetBranch
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/GetBranchInput'
      tags:
      - Branch
components:
  securitySchemes:
    sigv4:
      type: apiKey
      in: header
      name: Authorization
      description: AWS Signature Version 4. The Authorization header carries an AWS4-HMAC-SHA256 signature over the canonical
        request, with X-Amz-Date (and X-Amz-Security-Token for temporary credentials). Not a bearer token.
      x-aws-sigv4:
        signingName: codecommit
  schemas:
    BranchDoesNotExistException:
      type: object
      properties:
        message:
          type: string
          description: Any message associated with the exception.
    BranchInfo:
      type: object
      properties:
        branchName:
          type: string
          description: The name of the branch.
        commitId:
          type: string
          description: The ID of the last commit made to the branch.
    BranchNameExistsException:
      type: object
      properties:
        message:
          type: string
          description: Any message associated with the exception.
    BranchNameRequiredException:
      type: object
      properties:
        message:
          type: string
          description: Any message associated with the exception.
    CreateBranchInput:
      type: object
      properties:
        repositoryName:
          type: string
          description: The name of the repository in which you want to create the new branch.
        branchName:
          type: string
          description: The name of the new branch to create.
        commitId:
          type: string
          description: The ID of the commit to point the new branch to.
      required:
      - repositoryName
      - branchName
      - commitId
    DeleteBranchInput:
      type: object
      properties:
        repositoryName:
          type: string
          description: The name of the repository that contains the branch to be deleted.
        branchName:
          type: string
          description: The name of the branch to delete.
      required:
      - repositoryName
      - branchName
    DeleteBranchOutput:
      type: object
      properties:
        deletedBranch:
          $ref: '#/components/schemas/BranchInfo'
    EncryptionIntegrityChecksFailedException:
      type: object
      properties:
        message:
          type: string
          description: Any message associated with the exception.
    GetBranchInput:
      type: object
      properties:
        repositoryName:
          type: string
          description: The name of the repository that contains the branch for which you want to retrieve information.
        branchName:
          type: string
          description: The name of the branch for which you want to retrieve information.
    GetBranchOutput:
      type: object
      properties:
        branch:
          $ref: '#/components/schemas/BranchInfo'
x-provenance:
  method: harvested
  publisher: Amazon Web Services
  source: https://raw.githubusercontent.com/aws/api-models-aws/582e55931c45b944739742a2c1620b6026dd2d13/models/codecommit/service/2015-04-13/codecommit-2015-04-13.json
  note: converted by smithy-to-openapi.py from AWS's Smithy model (roadmap#1001)