Share feedback
Answers are generated based on the documentation.

Get namespace data for timespan

GET/namespaces/{namespace}/pulls/exports/years/{year}/{timespantype}/{timespan}/{dataview}
Gets a list of URLs that can be used to download the pull data for the given namespace and timespan.

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"
}

year path Required

Year to fetch data for

Type: integer

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

timespantype path Required

Type of timespan to fetch data for

Schema: TimespanType

timespan path Required

Timespan to fetch data for

Type: integer

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

dataview path Required

Type of data to fetch

Schema: DataviewType

Request and responses

Response 200

Success

application/json

Schema: ResponseData

download

{
  "data": [
    {
      "size": 1024,
      "url": "https://example.invalid/exports/pulls.csv.gz?X-Amz-Expires=21600\u0026X-Amz-Signature=EXAMPLE"
    }
  ]
}

Referenced schemas

#/components/schemas/DataviewType

#/components/schemas/ResponseData

#/components/schemas/TimespanType

Complete operation contract
{
  "description": "Gets a list of URLs that can be used to download the pull data for the given namespace and timespan.",
  "operationId": "getNamespaceDataByTimespan",
  "parameters": [
    {
      "description": "Namespace to fetch data for",
      "in": "path",
      "name": "namespace",
      "required": true,
      "schema": {
        "type": "string"
      }
    },
    {
      "description": "Year to fetch data for",
      "in": "path",
      "name": "year",
      "required": true,
      "schema": {
        "type": "integer"
      }
    },
    {
      "description": "Type of timespan to fetch data for",
      "in": "path",
      "name": "timespantype",
      "required": true,
      "schema": {
        "$ref": "#/components/schemas/TimespanType"
      }
    },
    {
      "description": "Timespan to fetch data for",
      "in": "path",
      "name": "timespan",
      "required": true,
      "schema": {
        "type": "integer"
      }
    },
    {
      "description": "Type of data to fetch",
      "in": "path",
      "name": "dataview",
      "required": true,
      "schema": {
        "$ref": "#/components/schemas/DataviewType"
      }
    }
  ],
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "examples": {
            "download": {
              "description": "Use the signed URL returned by the API. The URL and file size in this example are illustrative.",
              "summary": "Illustrative download location",
              "value": {
                "data": [
                  {
                    "size": 1024,
                    "url": "https://example.invalid/exports/pulls.csv.gz?X-Amz-Expires=21600\u0026X-Amz-Signature=EXAMPLE"
                  }
                ]
              }
            }
          },
          "schema": {
            "$ref": "#/components/schemas/ResponseData"
          }
        }
      },
      "description": "Success"
    }
  },
  "summary": "Get namespace data for timespan",
  "tags": [
    "namespaces"
  ]
}