List repositories in a namespace Run in API Explorer

GET /v2/namespaces/{namespace}/repositories

Returns a list of repositories within the specified namespace (organization or user).

Public repositories are accessible to everyone, while private repositories require appropriate authentication and permissions.

Path parameters

  • namespace string Required

Query parameters

  • page integer

    Page number to get. Defaults to 1.

    Minimum value is 1. Default value is 1.

  • page_size integer

    Number of repositories to get per page. Defaults to 10. Max of 1000.

    Minimum value is 1, maximum value is 1000. Default value is 10.

  • name string

    Filter repositories by name (partial match).

  • ordering string

    Order repositories by the specified field. Prefix with '-' for descending order. Available options:

    • name / -name: Repository name (ascending/descending)
    • last_updated / -last_updated: Last update time (ascending/descending)
    • pull_count / -pull_count: Number of pulls (ascending/descending)

    Values are name, -name, last_updated, -last_updated, pull_count, or -pull_count.

Responses

  • 200 application/json

    List of repositories

    Hide response attributes Show response attributes object
    • count integer

      total number of results available across all pages

    • next string | null

      link to next page of results if any

    • previous string | null

      link to previous page of results if any

    • results array[object]
      Hide results attributes Show results attributes object
      • name string

        Name of the repository

      • namespace string

        Namespace (organization or username) that owns the repository

      • repository_type string | null

        Type of repository

        Values are image, plugin, or null.

      • status integer

        Repository status code

      • status_description string

        Human-readable repository status

        Values are active or inactive.

      • description string | null

        Repository description

      • is_private boolean

        Whether the repository is private

      • star_count integer

        Number of users who starred this repository

        Minimum value is 0.

      • pull_count integer

        Total number of pulls for this repository

        Minimum value is 0.

      • last_updated string(date-time) | null

        ISO 8601 timestamp of when the repository was last updated

      • last_modified string(date-time) | null

        ISO 8601 timestamp of when the repository was last modified

      • date_registered string(date-time)

        ISO 8601 timestamp of when the repository was created

      • affiliation string

        User's affiliation with the repository (empty string if no affiliation)

      • media_types array[string]

        Media types supported by this repository

      • content_types array[string]

        Content types supported by this repository

      • categories array[object]

        Categories associated with this repository

        Repository category for classification and discovery

        Hide categories attributes Show categories attributes object
        • name string Required

          Human-readable name of the category

          Minimum length is 1.

        • slug string Required

          URL-friendly identifier for the category

          Minimum length is 1. Format should match the following pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$.

      • storage_size integer

        Storage size in bytes used by this repository

        Minimum value is 0.

  • 400 application/json

    Bad Request - Invalid request parameters

    Hide response attributes Show response attributes object
    • errinfo object
    • detail string
    • message string
  • 401 application/json

    Authentication failed

    Hide response attributes Show response attributes object
    • errinfo object
    • detail string
    • message string
  • 403 application/json

    Forbidden

    Hide response attributes Show response attributes object
    • errinfo object
    • detail string
    • message string
  • 404 application/json

    Page not found - occurs when requesting a page number >1 that exceeds the available results

    Hide response attributes Show response attributes object
    • errinfo object
    • detail string
    • message string
GET /v2/namespaces/{namespace}/repositories
curl \
 --request GET 'https://hub.docker.com/v2/namespaces/{namespace}/repositories' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "next": "https://hub.docker.com/v2/namespaces/docker/repositories?page=2&page_size=2",
  "count": 287,
  "results": [
    {
      "name": "highland_builder",
      "status": 1,
      "namespace": "docker",
      "categories": [
        {
          "name": "Languages & frameworks",
          "slug": "languages-and-frameworks"
        },
        {
          "name": "Integration & delivery",
          "slug": "integration-and-delivery"
        },
        {
          "name": "Operating systems",
          "slug": "operating-systems"
        }
      ],
      "is_private": false,
      "pull_count": 15722123,
      "star_count": 7,
      "affiliation": "",
      "description": "Image for performing Docker build requests",
      "media_types": [
        "application/octet-stream",
        "application/vnd.docker.container.image.v1+json",
        "application/vnd.docker.distribution.manifest.v1+prettyjws"
      ],
      "last_updated": "2023-06-20T10:44:45.459826Z",
      "storage_size": 488723114800,
      "content_types": [
        "unrecognized",
        "image"
      ],
      "last_modified": "2024-10-16T13:48:34.145251Z",
      "date_registered": "2015-05-19T21:13:35.937763Z",
      "repository_type": "image",
      "status_description": "active"
    },
    {
      "name": "whalesay",
      "status": 1,
      "namespace": "docker",
      "categories": [
        {
          "name": "Languages & frameworks",
          "slug": "languages-and-frameworks"
        },
        {
          "name": "Integration & delivery",
          "slug": "integration-and-delivery"
        }
      ],
      "is_private": false,
      "pull_count": 130737682,
      "star_count": 757,
      "affiliation": "",
      "description": "An image for use in the Docker demo tutorial",
      "media_types": [
        "application/vnd.docker.distribution.manifest.v1+prettyjws"
      ],
      "last_updated": "2015-06-19T19:06:27.388123Z",
      "storage_size": 103666708,
      "content_types": [
        "image"
      ],
      "last_modified": "2024-10-16T13:48:34.145251Z",
      "date_registered": "2015-06-09T18:16:36.527329Z",
      "repository_type": null,
      "status_description": "active"
    }
  ],
  "previous": null
}
Response examples (400)
{
  "text": "Invalid ordering value",
  "fields": {
    "ordering": [
      "Invalid ordering value. Must be one of: name, -name, last_updated, -last_updated, pull_count, -pull_count"
    ]
  }
}
Response examples (401)
{
  "errinfo": {},
  "detail": "string",
  "message": "string"
}
Response examples (403)
{
  "errinfo": {},
  "detail": "string",
  "message": "string"
}
Response examples (404)
{
  "errinfo": {},
  "detail": "string",
  "message": "string"
}