get_code_repository

CodeRepositoriesApi.get_code_repository(name, role_id, projection_expression=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)

Get code repository details

Returns one repository the caller can access (read-only or higher). Credentials is the parameter key or “N/A”. SecretArn is not returned. CodeCommit repositories created in Amorphic also include CodeCommitRepositoryName.

Parameters:
  • name (str) – RepositoryName of the code repository to retrieve. (required)

  • role_id (str) – Amorphic role ID sent for authorization. Missing this header returns AUTH-1001. (required)

  • projection_expression (str) – Documented query parameter. The current handler does not apply projection on this GET; the full repository object is returned.

  • _request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

  • _request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.

  • _content_type (str, Optional) – force content-type for the request.

  • _headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.

  • _host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.

Return type:

CodeRepositoryDetails

Returns:

Returns the result object.

Request and Response Examples

HTTP: GET /code-repositories/{name}

Success (HTTP 200)

Repository details including AccessType and Credentials parameter key.

Request / response example

{
  "RepositoryName": "feature-store-utils",
  "RepositoryType": "github",
  "Description": "Shared ML utility scripts",
  "Keywords": [
    "ml"
  ],
  "RepositoryUrl": "https://github.com/org/feature-store-utils.git",
  "DefaultRepositoryBranch": "main",
  "Credentials": "/adp/amorphic/pstore/user/amp-github-creds",
  "AccessType": "owner",
  "CreatedBy": "jdoe",
  "LastModifiedBy": "jdoe",
  "LastModifiedTime": "2026-08-15 10:00:00"
}

Errors

Documented error codes: IPV-1002, AUTH-1012, GE-1044.

HTTP 400

Repository not found or caller has less than read-only access.

Repository does not exist

{
  "Message": "IPV-1002 - Invalid RepositoryName - missing-repo, resource not found."
}

Caller has no read access

{
  "Message": "AUTH-1012 - User: jdoe requires at least read-only access on the resource to perform this action."
}

HTTP 500

Uncaught backend failure. Typical Message is “GE-1044 - Unexpected error - {ex}.”

Request / response example

{
  "Message": "GE-1044 - Unexpected error - Could not complete the request. Please try again."
}