list_code_repositories

CodeRepositoriesApi.list_code_repositories(role_id, limit=None, offset=None, sortorder=None, sortby=None, projection_expression=None, filter_expression=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)

List code repositories accessible to the user

Returns a paginated list of SageMaker-linked code repositories the caller can access. SecretArn is stripped; Credentials is the parameter key or “N/A”. AccessType is owner, editor, or read-only.

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

  • limit (int) – Number of repositories to return in this page. Defaults to 100. Maximum is 1000; values above that return IPV-1050.

  • offset (int) – 1-based page number. offset=1 is the first page. Internally converted with int(offset)-1.

  • sortorder (str) – Sort direction applied to sortby. desc reverses the list; any other value sorts ascending. Defaults to desc.

  • sortby (str) – Repository attribute used for sorting, compared case-insensitively. Defaults to LastModifiedTime. The value must exist on the item.

  • projection_expression (str) – Comma-separated attribute names to include on each repository. When omitted, all returned fields are included. Example: RepositoryName,RepositoryType,AccessType.

  • filter_expression (str) – Comma-separated key:value pairs combined with AND. RepositoryName supports * wildcards. Example: RepositoryName:feature*,RepositoryType:github.

  • _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:

CodeRepositoriesList

Returns:

Returns the result object.

Request and Response Examples

HTTP: GET /code-repositories

Success (HTTP 200)

Paginated CodeRepositories list with count, total_count, and next_available yes/no.

Request / response example

{
  "CodeRepositories": [
    {
      "RepositoryName": "feature-store-utils",
      "RepositoryType": "github",
      "Description": "Shared ML utility scripts",
      "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",
      "Keywords": [
        "ml"
      ]
    }
  ],
  "count": 1,
  "total_count": 1,
  "next_available": "no"
}

Errors

Documented error codes: IPV-1050, GE-1044.

HTTP 400

Page size exceeds 1000 or authorization failed. Body is {“Message”: “<CODE> - <text>”}.

Request / response example

{
  "Message": "IPV-1050 - Out of range for items per page, Limit is 1000"
}

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."
}