List repositories in a namespace
/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.
OAT listing behavior: an OAT with the scope-repository-list scope sees all repositories including private ones. An OAT without that scope only sees public repositories. This filtering is silent: the response is a normal 200 with no indication that private repositories were withheld.
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
Type:
string
All schema constraints and annotations
{
"type": "string"
}page
query
Type:
integer
All schema constraints and annotations
{
"default": 1,
"minimum": 1,
"type": "integer"
}page_size
query
Type:
integer
All schema constraints and annotations
{
"default": 10,
"maximum": 100,
"minimum": 1,
"type": "integer"
}name
query
Type:
string
All schema constraints and annotations
{
"type": "string"
}ordering
query
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)
Type:
string
All schema constraints and annotations
{
"enum": [
"name",
"-name",
"last_updated",
"-last_updated",
"pull_count",
"-pull_count"
],
"type": "string"
}Request and responses
Response
200
application/json
Schema:
list_repositories_response
repositories_list
{
"count": 287,
"next": "https://hub.docker.com/v2/namespaces/docker/repositories?page=2\u0026page_size=2",
"previous": null,
"results": [
{
"affiliation": "",
"categories": [
{
"name": "Languages \u0026 frameworks",
"slug": "languages-and-frameworks"
},
{
"name": "Integration \u0026 delivery",
"slug": "integration-and-delivery"
},
{
"name": "Operating systems",
"slug": "operating-systems"
}
],
"content_types": [
"unrecognized",
"image"
],
"date_registered": "2015-05-19T21:13:35.937763Z",
"description": "Image for performing Docker build requests",
"is_private": false,
"last_modified": "2024-10-16T13:48:34.145251Z",
"last_updated": "2023-06-20T10:44:45.459826Z",
"media_types": [
"application/octet-stream",
"application/vnd.docker.container.image.v1+json",
"application/vnd.docker.distribution.manifest.v1+prettyjws"
],
"name": "highland_builder",
"namespace": "docker",
"pull_count": 15722123,
"repository_type": "image",
"star_count": 7,
"status": 1,
"status_description": "active",
"storage_size": 488723114800
},
{
"affiliation": "",
"categories": [
{
"name": "Languages \u0026 frameworks",
"slug": "languages-and-frameworks"
},
{
"name": "Integration \u0026 delivery",
"slug": "integration-and-delivery"
}
],
"content_types": [
"image"
],
"date_registered": "2015-06-09T18:16:36.527329Z",
"description": "An image for use in the Docker demo tutorial",
"is_private": false,
"last_modified": "2024-10-16T13:48:34.145251Z",
"last_updated": "2015-06-19T19:06:27.388123Z",
"media_types": [
"application/vnd.docker.distribution.manifest.v1+prettyjws"
],
"name": "whalesay",
"namespace": "docker",
"pull_count": 130737682,
"repository_type": null,
"star_count": 757,
"status": 1,
"status_description": "active",
"storage_size": 103666708
}
]
}Response
400
application/json
Schema:
error
invalid_ordering
{
"fields": {
"ordering": [
"Invalid ordering value. Must be one of: name, -name, last_updated, -last_updated, pull_count, -pull_count"
]
},
"text": "Invalid ordering value"
}Response
401
application/json
Schema:
error
error
{
"errinfo": null,
"message": "unauthorized"
}Response
403
application/json
Schema:
error
error
{
"errinfo": null,
"message": "permission denied"
}Response
404
>1 that exceeds the available resultsapplication/json
Schema:
error
error
{
"errinfo": null,
"message": "not found"
}Referenced schemas
#/components/schemas/list_repositories_response
Complete operation contract
{
"description": "Returns a list of repositories within the specified namespace (organization or user).\n\nPublic repositories are accessible to everyone, while private repositories require appropriate authentication and permissions.\n\n\n\n**OAT listing behavior**: an OAT with the `scope-repository-list` scope sees all repositories including private ones. An OAT without that scope only sees public repositories. This filtering is silent: the response is a normal `200` with no indication that private repositories were withheld.\n\nThis operation accepts bearer tokens issued from organization access tokens (OATs). The token must have the required resource access and scopes.\n",
"operationId": "listNamespaceRepositories",
"parameters": [
{
"description": "Page number to get. Defaults to 1.",
"in": "query",
"name": "page",
"required": false,
"schema": {
"default": 1,
"minimum": 1,
"type": "integer"
}
},
{
"description": "Number of repositories to get per page. Defaults to 10. Max of 100.",
"in": "query",
"name": "page_size",
"required": false,
"schema": {
"default": 10,
"maximum": 100,
"minimum": 1,
"type": "integer"
}
},
{
"description": "Filter repositories by name (partial match).",
"in": "query",
"name": "name",
"required": false,
"schema": {
"type": "string"
}
},
{
"description": "Order repositories by the specified field. Prefix with '-' for descending order.\nAvailable options:\n- `name` / `-name`: Repository name (ascending/descending)\n- `last_updated` / `-last_updated`: Last update time (ascending/descending)\n- `pull_count` / `-pull_count`: Number of pulls (ascending/descending)\n",
"in": "query",
"name": "ordering",
"required": false,
"schema": {
"enum": [
"name",
"-name",
"last_updated",
"-last_updated",
"pull_count",
"-pull_count"
],
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"examples": {
"repositories_list": {
"value": {
"count": 287,
"next": "https://hub.docker.com/v2/namespaces/docker/repositories?page=2\u0026page_size=2",
"previous": null,
"results": [
{
"affiliation": "",
"categories": [
{
"name": "Languages \u0026 frameworks",
"slug": "languages-and-frameworks"
},
{
"name": "Integration \u0026 delivery",
"slug": "integration-and-delivery"
},
{
"name": "Operating systems",
"slug": "operating-systems"
}
],
"content_types": [
"unrecognized",
"image"
],
"date_registered": "2015-05-19T21:13:35.937763Z",
"description": "Image for performing Docker build requests",
"is_private": false,
"last_modified": "2024-10-16T13:48:34.145251Z",
"last_updated": "2023-06-20T10:44:45.459826Z",
"media_types": [
"application/octet-stream",
"application/vnd.docker.container.image.v1+json",
"application/vnd.docker.distribution.manifest.v1+prettyjws"
],
"name": "highland_builder",
"namespace": "docker",
"pull_count": 15722123,
"repository_type": "image",
"star_count": 7,
"status": 1,
"status_description": "active",
"storage_size": 488723114800
},
{
"affiliation": "",
"categories": [
{
"name": "Languages \u0026 frameworks",
"slug": "languages-and-frameworks"
},
{
"name": "Integration \u0026 delivery",
"slug": "integration-and-delivery"
}
],
"content_types": [
"image"
],
"date_registered": "2015-06-09T18:16:36.527329Z",
"description": "An image for use in the Docker demo tutorial",
"is_private": false,
"last_modified": "2024-10-16T13:48:34.145251Z",
"last_updated": "2015-06-19T19:06:27.388123Z",
"media_types": [
"application/vnd.docker.distribution.manifest.v1+prettyjws"
],
"name": "whalesay",
"namespace": "docker",
"pull_count": 130737682,
"repository_type": null,
"star_count": 757,
"status": 1,
"status_description": "active",
"storage_size": 103666708
}
]
}
}
},
"schema": {
"$ref": "#/components/schemas/list_repositories_response"
}
}
},
"description": "List of repositories"
},
"400": {
"content": {
"application/json": {
"examples": {
"invalid_ordering": {
"summary": "Invalid ordering value",
"value": {
"fields": {
"ordering": [
"Invalid ordering value. Must be one of: name, -name, last_updated, -last_updated, pull_count, -pull_count"
]
},
"text": "Invalid ordering value"
}
}
},
"schema": {
"$ref": "#/components/schemas/error"
}
}
},
"description": "Bad Request - Invalid request parameters"
},
"401": {
"$ref": "#/components/responses/unauthorized"
},
"403": {
"$ref": "#/components/responses/forbidden"
},
"404": {
"content": {
"application/json": {
"examples": {
"error": {
"summary": "Example error response",
"value": {
"errinfo": null,
"message": "not found"
}
}
},
"schema": {
"$ref": "#/components/schemas/error"
}
}
},
"description": "Page not found - occurs when requesting a page number `\u003e1` that exceeds the available results"
}
},
"security": [
{
"bearerAuth": []
},
{}
],
"summary": "List repositories in a namespace",
"tags": [
"repositories"
]
}