Amazon CodeCommit Codecommit Commit API

The Codecommit Commit API from Amazon CodeCommit — 3 operation(s) for codecommit commit.

Business capability
Software Construction Management BC-4200.40

Operations 3

POST /#BatchGetCommits Batch Get Commits #
POST /#CreateCommit Create Commit #
POST /#GetCommit Get Commit #

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-commit-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-commit-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: AWS CodeCommit Commit 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:
  /#BatchGetCommits:
    post:
      operationId: BatchGetCommits
      summary: Batch Get Commits
      description: Returns information about the contents of one or more commits in a repository.
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/BatchGetCommitsOutput'
        '400':
          description: CommitIdsLimitExceededException; CommitIdsListRequiredException; EncryptionKeyAccessDeniedException;
            EncryptionKeyDisabledException; EncryptionKeyNotFoundException; EncryptionKeyUnavailableException; InvalidRepositoryNameException;
            RepositoryDoesNotExistException; RepositoryNameRequiredException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/CommitIdsLimitExceededException'
        '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.BatchGetCommits
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/BatchGetCommitsInput'
      tags:
      - Commit
  /#CreateCommit:
    post:
      operationId: CreateCommit
      summary: Create Commit
      description: Creates a commit for a repository on the tip of a specified branch.
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/CreateCommitOutput'
        '400':
          description: BranchDoesNotExistException; BranchNameIsTagNameException; BranchNameRequiredException; CommitMessageLengthExceededException;
            DirectoryNameConflictsWithFileNameException; EncryptionKeyAccessDeniedException; EncryptionKeyDisabledException;
            EncryptionKeyNotFoundException; EncryptionKeyUnavailableException; FileContentAndSourceFileSpecifiedException;
            FileContentSizeLimitExceededException; FileDoesNotExistException; FileEntryRequiredException; FileModeRequiredException;
            FileNameConflictsWithDirectoryNameException; FilePathConflictsWithSubmodulePathException; FolderContentSizeLimitExceededException;
            InvalidBranchNameException; InvalidDeletionParameterException; InvalidEmailException; InvalidFileModeException;
            InvalidParentCommitIdException; InvalidPathException; InvalidRepositoryNameException; MaximumFileEntriesExceededException;
            NameLengthExceededException; NoChangeException; ParentCommitDoesNotExistException; ParentCommitIdOutdatedException;
            ParentCommitIdRequiredException; PathRequiredException; PutFileEntryConflictException; RepositoryDoesNotExistException;
            RepositoryNameRequiredException; RestrictedSourceFileException; SamePathRequestException; SourceFileOrContentRequiredException
          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.CreateCommit
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/CreateCommitInput'
      tags:
      - Commit
  /#GetCommit:
    post:
      operationId: GetCommit
      summary: Get Commit
      description: Returns information about a commit, including commit message and committer information.
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/GetCommitOutput'
        '400':
          description: CommitIdDoesNotExistException; CommitIdRequiredException; EncryptionKeyAccessDeniedException; EncryptionKeyDisabledException;
            EncryptionKeyNotFoundException; EncryptionKeyUnavailableException; InvalidCommitIdException; InvalidRepositoryNameException;
            RepositoryDoesNotExistException; RepositoryNameRequiredException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/CommitIdDoesNotExistException'
        '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.GetCommit
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/GetCommitInput'
      tags:
      - Commit
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:
    BatchGetCommitsError:
      type: object
      properties:
        commitId:
          type: string
          description: A commit ID that either could not be found or was not in a valid format.
        errorCode:
          type: string
          description: An error code that specifies whether the commit ID was not valid or not found.
        errorMessage:
          type: string
          description: An error message that provides detail about why the commit ID either was not found or was not valid.
    BatchGetCommitsInput:
      type: object
      properties:
        commitIds:
          type: array
          items:
            type: string
          description: The full commit IDs of the commits to get information about. You must supply the full SHA IDs of each
            commit. You cannot use shortened SHA IDs.
        repositoryName:
          type: string
          description: The name of the repository that contains the commits.
      required:
      - commitIds
      - repositoryName
    BatchGetCommitsOutput:
      type: object
      properties:
        commits:
          type: array
          items:
            $ref: '#/components/schemas/Commit'
          description: An array of commit data type objects, each of which contains information about a specified commit.
        errors:
          type: array
          items:
            $ref: '#/components/schemas/BatchGetCommitsError'
          description: Returns any commit IDs for which information could not be found. For example, if one of the commit
            IDs was a shortened SHA ID or that commit was not found in the specified repository, the ID returns an error object
            with more information.
    BranchDoesNotExistException:
      type: object
      properties:
        message:
          type: string
          description: Any message associated with the exception.
    Commit:
      type: object
      properties:
        commitId:
          type: string
          description: The full SHA ID of the specified commit.
        treeId:
          type: string
          description: Tree information for the specified commit.
        parents:
          type: array
          items:
            type: string
          description: A list of parent commits for the specified commit. Each parent commit ID is the full commit ID.
        message:
          type: string
          description: The commit message associated with the specified commit.
        author:
          $ref: '#/components/schemas/UserInfo'
        committer:
          $ref: '#/components/schemas/UserInfo'
        additionalData:
          type: string
          description: Any other data associated with the specified commit.
    CommitIdDoesNotExistException:
      type: object
      properties:
        message:
          type: string
          description: Any message associated with the exception.
    CommitIdsLimitExceededException:
      type: object
      properties:
        message:
          type: string
          description: Any message associated with the exception.
    CreateCommitInput:
      type: object
      properties:
        repositoryName:
          type: string
          description: The name of the repository where you create the commit.
        branchName:
          type: string
          description: The name of the branch where you create the commit.
        parentCommitId:
          type: string
          description: The ID of the commit that is the parent of the commit you create. Not required if this is an empty
            repository.
        authorName:
          type: string
          description: The name of the author who created the commit. This information is used as both the author and committer
            for the commit.
        email:
          type: string
          description: The email address of the person who created the commit.
        commitMessage:
          type: string
          description: The commit message you want to include in the commit. Commit messages are limited to 256 KB. If no
            message is specified, a default message is used.
        keepEmptyFolders:
          type: boolean
          description: If the commit contains deletions, whether to keep a folder or folder structure if the changes leave
            the folders empty. If true, a ..gitkeep file is created for empty folders. The default is false.
        putFiles:
          type: array
          items:
            $ref: '#/components/schemas/PutFileEntry'
          description: The files to add or update in this commit.
        deleteFiles:
          type: array
          items:
            $ref: '#/components/schemas/DeleteFileEntry'
          description: The files to delete in this commit. These files still exist in earlier commits.
        setFileModes:
          type: array
          items:
            $ref: '#/components/schemas/SetFileModeEntry'
          description: The file modes to update for files in this commit.
      required:
      - repositoryName
      - branchName
    CreateCommitOutput:
      type: object
      properties:
        commitId:
          type: string
          description: The full commit ID of the commit that contains your committed file changes.
        treeId:
          type: string
          description: The full SHA-1 pointer of the tree information for the commit that contains the commited file changes.
        filesAdded:
          type: array
          items:
            $ref: '#/components/schemas/FileMetadata'
          description: The files added as part of the committed file changes.
        filesUpdated:
          type: array
          items:
            $ref: '#/components/schemas/FileMetadata'
          description: The files updated as part of the commited file changes.
        filesDeleted:
          type: array
          items:
            $ref: '#/components/schemas/FileMetadata'
          description: The files deleted as part of the committed file changes.
    DeleteFileEntry:
      type: object
      properties:
        filePath:
          type: string
          description: The full path of the file to be deleted, including the name of the file.
      required:
      - filePath
    EncryptionIntegrityChecksFailedException:
      type: object
      properties:
        message:
          type: string
          description: Any message associated with the exception.
    FileMetadata:
      type: object
      properties:
        absolutePath:
          type: string
          description: The full path to the file to be added or updated, including the name of the file.
        blobId:
          type: string
          description: The blob ID that contains the file information.
        fileMode:
          type: string
          enum:
          - EXECUTABLE
          - NORMAL
          - SYMLINK
          description: The extrapolated file mode permissions for the file. Valid values include EXECUTABLE and NORMAL.
    GetCommitInput:
      type: object
      properties:
        repositoryName:
          type: string
          description: The name of the repository to which the commit was made.
        commitId:
          type: string
          description: The commit ID. Commit IDs are the full SHA ID of the commit.
      required:
      - repositoryName
      - commitId
    GetCommitOutput:
      type: object
      properties:
        commit:
          $ref: '#/components/schemas/Commit'
      required:
      - commit
    PutFileEntry:
      type: object
      properties:
        filePath:
          type: string
          description: The full path to the file in the repository, including the name of the file.
        fileMode:
          type: string
          enum:
          - EXECUTABLE
          - NORMAL
          - SYMLINK
          description: The extrapolated file mode permissions for the file. Valid values include EXECUTABLE and NORMAL.
        fileContent:
          type: string
          format: byte
          description: The content of the file, if a source file is not specified.
        sourceFile:
          $ref: '#/components/schemas/SourceFileSpecifier'
      required:
      - filePath
    SetFileModeEntry:
      type: object
      properties:
        filePath:
          type: string
          description: The full path to the file, including the name of the file.
        fileMode:
          type: string
          enum:
          - EXECUTABLE
          - NORMAL
          - SYMLINK
          description: The file mode for the file.
      required:
      - filePath
      - fileMode
    SourceFileSpecifier:
      type: object
      properties:
        filePath:
          type: string
          description: The full path to the file, including the name of the file.
        isMove:
          type: boolean
          description: Whether to remove the source file from the parent commit.
      required:
      - filePath
    UserInfo:
      type: object
      properties:
        name:
          type: string
          description: The name of the user who made the specified commit.
        email:
          type: string
          description: The email address associated with the user who made the commit, if any.
        date:
          type: string
          description: The date when the specified commit was commited, in timestamp format with GMT offset.
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)