시간 구간별 네임스페이스 데이터 조회

시간 구간별 네임스페이스 데이터 조회

주어진 네임스페이스와 시간 구간의 풀 데이터를 다운로드할 수 있는 URL 목록을 반환해요.

출처: 문서

본문

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

시간 구간별 네임스페이스 데이터 조회 작업이에요. 주어진 네임스페이스와 시간 구간의 풀 데이터를 다운로드할 수 있는 URL 목록을 반환해요.

요청 예시

실행 전에 자리 표시자를 바꾸고 필요 자격 증명이나 요청 바디를 채워야 해요.

curl \
  --request GET \
  --header "Authorization: Bearer ${TOKEN}" \
  --header 'Accept: application/json' \
  'https://hub.docker.com/api/publisher/analytics/v1/namespaces/<NAMESPACE>/pulls/exports/years/<YEAR>/<TIMESPANTYPE>/<TIMESPAN>/<DATAVIEW>'

요청과 응답

응답 200 Success

Schema:

{
  "$ref": "#/components/schemas/ResponseData"
}

download:

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

전체 작업 계약

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

참조된 스키마

더 알아보기