Share feedback
Answers are generated based on the documentation.

Get years with data

GET/namespaces/{namespace}/pulls/exports/years
Gets a list of years that have data for the given namespace.

Connection and access

API connection and authentication guidance

https://hub.docker.com/api/publisher/analytics/v1

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

  • HubAuth

Parameters

namespace path Required

Namespace to fetch data for

Type: string

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

Request and responses

Response 200

Success

application/json

Schema: YearData

Schema example

{
  "years": [
    {
      "year": 2025
    }
  ]
}

Referenced schemas

#/components/schemas/YearData

Complete operation contract
{
  "description": "Gets a list of years that have data for the given namespace.",
  "operationId": "getNamespaceYears",
  "parameters": [
    {
      "description": "Namespace to fetch data for",
      "in": "path",
      "name": "namespace",
      "required": true,
      "schema": {
        "type": "string"
      }
    }
  ],
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/YearData"
          }
        }
      },
      "description": "Success"
    }
  },
  "summary": "Get years with data",
  "tags": [
    "namespaces"
  ]
}