Menu
AWS CodeCommit
API Reference (API Version 2015-04-13)

GetBlob

Returns the base-64 encoded content of an individual blob within a repository.

Request Syntax

{
   "blobId": "string",
   "repositoryName": "string"
}

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

blobId

The ID of the blob, which is its SHA-1 pointer.

Type: String

Required: Yes

repositoryName

The name of the repository that contains the blob.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 100.

Pattern: [\w\.-]+

Required: Yes

Response Syntax

{
   "content": blob
}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

content

The content of the blob, usually a file.

Type: Base64-encoded binary data object

Errors

For information about the errors that are common to all actions, see Common Errors.

BlobIdDoesNotExistException

The specified blob does not exist.

HTTP Status Code: 400

BlobIdRequiredException

A blob ID is required but was not specified.

HTTP Status Code: 400

EncryptionIntegrityChecksFailedException

An encryption integrity check failed.

HTTP Status Code: 500

EncryptionKeyAccessDeniedException

An encryption key could not be accessed.

HTTP Status Code: 400

EncryptionKeyDisabledException

The encryption key is disabled.

HTTP Status Code: 400

EncryptionKeyNotFoundException

No encryption key was found.

HTTP Status Code: 400

EncryptionKeyUnavailableException

The encryption key is not available.

HTTP Status Code: 400

FileTooLargeException

The specified file exceeds the file size limit for AWS CodeCommit. For more information about limits in AWS CodeCommit, see AWS CodeCommit User Guide.

HTTP Status Code: 400

InvalidBlobIdException

The specified blob is not valid.

HTTP Status Code: 400

InvalidRepositoryNameException

At least one specified repository name is not valid.

Note

This exception only occurs when a specified repository name is not valid. Other exceptions occur when a required repository parameter is missing, or when a specified repository does not exist.

HTTP Status Code: 400

RepositoryDoesNotExistException

The specified repository does not exist.

HTTP Status Code: 400

RepositoryNameRequiredException

A repository name is required but was not specified.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: