Share feedback
Answers are generated based on the documentation.

Get repository in a namespace

GET/v2/namespaces/{namespace}/repositories/{repository}

Returns a repository within the specified namespace (organization or user).

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

This operation accepts bearer tokens issued from organization access tokens (OATs). The token must have the required resource access and scopes.

Connection and access

API connection and authentication guidance

https://hub.docker.com — Docker HUB API

Use one of these alternatives. Requirements within an alternative apply together.

  • bearerAuth
  • Anonymous access

Parameters

namespace path Required

Namespace of the repository, such as a user or organization name.

Type: string

All schema constraints and annotations
{
  "type": "string"
}

repository path Required

Name of the repository within the namespace.

Type: string

All schema constraints and annotations
{
  "type": "string"
}

Request and responses

Response 200

application/json

Schema: repository_info

Example

{
  "categories": [],
  "collaborator_count": 0,
  "content_types": [],
  "date_registered": "2025-01-20T10:30:00Z",
  "description": "A sample application repository",
  "full_description": "This is a comprehensive description of my application repository that contains additional details about the project.",
  "has_starred": false,
  "hub_user": "myorganization",
  "immutable_tags_settings": {
    "enabled": false,
    "rules": []
  },
  "is_automated": false,
  "is_private": false,
  "last_updated": "2025-01-20T10:30:00Z",
  "media_types": [],
  "name": "my-app",
  "namespace": "myorganization",
  "permissions": {
    "admin": true,
    "read": true,
    "write": true
  },
  "pull_count": 0,
  "repository_type": "image",
  "source": null,
  "star_count": 0,
  "status": 1,
  "status_description": "Active",
  "storage_size": null,
  "user": "myorganization"
}

Response 401

Unauthorized

application/json

Schema: error

error

{
  "errinfo": null,
  "message": "unauthorized"
}

Response 403

Forbidden

application/json

Schema: error

error

{
  "errinfo": null,
  "message": "permission denied"
}

Response 404

Not Found

application/json

Schema: error

error

{
  "errinfo": null,
  "message": "not found"
}

Response 500

Internal

application/json

Schema: error

error

{
  "errinfo": null,
  "message": "internal error"
}

Referenced schemas

#/components/schemas/repository_info

Complete operation contract
{
  "description": "Returns a repository within the specified namespace (organization or user).\n\nPublic repositories are accessible to everyone, while private repositories require appropriate authentication and permissions.\n\nThis operation accepts bearer tokens issued from organization access tokens (OATs). The token must have the required resource access and scopes.\n",
  "operationId": "GetRepository",
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "example": {
            "categories": [],
            "collaborator_count": 0,
            "content_types": [],
            "date_registered": "2025-01-20T10:30:00Z",
            "description": "A sample application repository",
            "full_description": "This is a comprehensive description of my application repository that contains additional details about the project.",
            "has_starred": false,
            "hub_user": "myorganization",
            "immutable_tags_settings": {
              "enabled": false,
              "rules": []
            },
            "is_automated": false,
            "is_private": false,
            "last_updated": "2025-01-20T10:30:00Z",
            "media_types": [],
            "name": "my-app",
            "namespace": "myorganization",
            "permissions": {
              "admin": true,
              "read": true,
              "write": true
            },
            "pull_count": 0,
            "repository_type": "image",
            "source": null,
            "star_count": 0,
            "status": 1,
            "status_description": "Active",
            "storage_size": null,
            "user": "myorganization"
          },
          "schema": {
            "$ref": "#/components/schemas/repository_info"
          }
        }
      }
    },
    "401": {
      "$ref": "#/components/responses/unauthorized"
    },
    "403": {
      "$ref": "#/components/responses/forbidden"
    },
    "404": {
      "$ref": "#/components/responses/not_found"
    },
    "500": {
      "$ref": "#/components/responses/internal_error"
    }
  },
  "security": [
    {
      "bearerAuth": []
    },
    {}
  ],
  "summary": "Get repository in a namespace",
  "tags": [
    "repositories"
  ]
}