Get timespans with data Run in API Explorer

GET /namespaces/{namespace}/pulls/exports/years/{year}/{timespantype}

Gets a list of timespans of the given type that have data for the given namespace and year.

Path parameters

  • namespace string Required

    Namespace to fetch data for

  • year integer Required

    Year to fetch data for

  • timespantype string Required

    Type of timespan to fetch data for

    Values are months or weeks.

Responses

  • 200 application/json

    Success

    One of:
GET /namespaces/{namespace}/pulls/exports/years/{year}/{timespantype}
curl \
 --request GET 'https://hub.docker.com/api/publisher/analytics/v1/namespaces/{namespace}/pulls/exports/years/{year}/{timespantype}' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "months": [
    {
      "month": 42
    }
  ]
}
{
  "weeks": [
    {
      "week": 42
    }
  ]
}