Update DVP OAPI doc to latest version

This commit is contained in:
Chris Ainsworth-Patrick 2022-06-30 07:54:40 +01:00
parent 9eb2a8ab72
commit cfd1799ca9
5 changed files with 250 additions and 31 deletions

View File

@ -1028,8 +1028,12 @@ reference:
title: v1.19 reference title: v1.19 reference
- path: /engine/api/v1.18/ - path: /engine/api/v1.18/
title: v1.18 reference title: v1.18 reference
- title: Docker Hub API - sectiontitle: Docker Hub API
path: /docker-hub/api/latest/ section:
- title: Docker Hub API
path: /docker-hub/api/latest/
- title: DVP Data API
path: /docker-hub/api/dvp/
- title: Registry API - title: Registry API
path: /registry/spec/api/ path: /registry/spec/api/
- sectiontitle: Docker Extension SDK API (Beta) - sectiontitle: Docker Extension SDK API (Beta)

View File

@ -1,10 +1,10 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>Docker Hub API {{ page.name | replace: '.md' }} Reference</title> <title>Docker Hub API Reference - {{ page.name | replace: '.md' }}</title>
<!-- needed for adaptive design --> <!-- needed for adaptive design -->
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="Reference documentation and Swagger (OpenAPI) specification for the v{{ page.name | replace: '.md' }} version of the API served by Docker Hub." /> <meta name="description" content="Reference documentation and Swagger (OpenAPI) specification for the {{ page.name | replace: '.md' }} API served by Docker Hub." />
<meta charset="utf-8" /> <meta charset="utf-8" />
<!-- favicon --> <!-- favicon -->
<meta name="msapplication-TileImage" content="/favicons/docs@2x.ico" /> <meta name="msapplication-TileImage" content="/favicons/docs@2x.ico" />

View File

@ -6,12 +6,15 @@ info:
url: https://docs.docker.com/images/logo-docker-main.png url: https://docs.docker.com/images/logo-docker-main.png
href: /reference href: /reference
description: | description: |
The Docker DVP Data API allows Docker Verified Publishers to view image pull analytics data for their namespaces The Docker DVP Data API allows [Docker Verified Publishers](https://docs.docker.com/docker-hub/publish/) to view image pull analytics data for their namespaces
servers: servers:
- url: https://hub-stage.docker.com/api/dvp/v1 - url: https://hub.docker.com/api/dvp/v1
security: security:
- HubAuth: [] - HubAuth: []
features.openapi:
schemaDefinitionsTagName: Schemas
tags: tags:
- name: namespaces - name: namespaces
x-displayName: Namespace data x-displayName: Namespace data
@ -19,6 +22,22 @@ tags:
x-displayName: Repository data x-displayName: Repository data
- name: discovery - name: discovery
x-displayName: Discovery x-displayName: Discovery
- name: responseDataFile
x-displayName: ResponseDataFile
description: |
<SchemaDefinition schemaRef="#/components/schemas/ResponseDataFile" />
- name: yearModel
x-displayName: Year Data Model
description: |
<SchemaDefinition schemaRef="#/components/schemas/YearModel" />
- name: monthModel
x-displayName: Month Data Model
description: |
<SchemaDefinition schemaRef="#/components/schemas/MonthModel" />
- name: weekModel
x-displayName: Week Data Model
description: |
<SchemaDefinition schemaRef="#/components/schemas/WeekModel" />
x-tagGroups: x-tagGroups:
- name: API - name: API
@ -26,13 +45,19 @@ x-tagGroups:
- discovery - discovery
- namespaces - namespaces
- repos - repos
- name: Models
tags:
- responseDataFile
- yearModel
- monthModel
- weekModel
paths: paths:
/data: /data:
get: get:
tags: [discovery] tags: [discovery]
summary: Get namespaces and repos summary: Get namespaces and repos
description: Gets a list of namespaces and repos which have data available description: Gets a list of your namespaces and repos which have data available
operationId: getNamespaces operationId: getNamespaces
responses: responses:
'200': '200':
@ -41,7 +66,27 @@ paths:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/NamespaceData' $ref: '#/components/schemas/NamespaceData'
/data/{namespace}/year: /data/namespaces/{namespace}:
get:
tags: [discovery]
summary: Get namespace
description: Gets metadata associated with specified namespace, including extra repos associated with the namespace
operationId: getNamespace
parameters:
- in: path
name: namespace
schema:
type: string
required: true
description: Namespace to fetch data for
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/NamespaceMetadata'
/data/namespaces/{namespace}/years:
get: get:
tags: [namespaces] tags: [namespaces]
summary: Get years with data summary: Get years with data
@ -61,7 +106,7 @@ paths:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/YearData' $ref: '#/components/schemas/YearData'
/data/{namespace}/year/{year}/month: /data/namespaces/{namespace}/years/{year}/months:
get: get:
tags: [namespaces] tags: [namespaces]
summary: Get months with data summary: Get months with data
@ -87,7 +132,7 @@ paths:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/MonthData' $ref: '#/components/schemas/MonthData'
/data/{namespace}/year/{year}/week: /data/namespaces/{namespace}/years/{year}/weeks:
get: get:
tags: [namespaces] tags: [namespaces]
summary: Get weeks with data summary: Get weeks with data
@ -113,11 +158,45 @@ paths:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/WeekData' $ref: '#/components/schemas/WeekData'
/data/{namespace}/year/{year}/month/{month}: /data/namespaces/{namespace}/years/{year}/months/{month}:
get:
tags: [namespaces]
summary: Get namespace metadata for month
description: Gets info about data for the given namespace and month
operationId: getNamespaceMonthMetadata
parameters:
- in: path
name: namespace
schema:
type: string
required: true
description: Namespace to fetch data for
- in: path
name: year
schema:
type: integer
required: true
description: Year to fetch data for
- in: path
name: month
schema:
type: integer
required: true
description: Month to fetch data for
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/MonthModel'
'404':
description: Not Found
/data/namespaces/{namespace}/years/{year}/months/{month}/raw:
get: get:
tags: [namespaces] tags: [namespaces]
summary: Get namespace data for month summary: Get namespace data for month
description: Gets a list of URLs that can be used to download the pull data for the given namespace and month description: Gets a list of URLs that can be used to download the raw pull data for the given namespace and month
operationId: getNamespaceDataByMonth operationId: getNamespaceDataByMonth
parameters: parameters:
- in: path - in: path
@ -145,11 +224,45 @@ paths:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/ResponseData' $ref: '#/components/schemas/ResponseData'
/data/{namespace}/year/{year}/week/{week}: /data/namespaces/{namespace}/years/{year}/weeks/{week}:
get:
tags: [namespaces]
summary: Get namespace metadata for week
description: Gets info about data for the given namespace and week
operationId: getNamespaceWeekMetadata
parameters:
- in: path
name: namespace
schema:
type: string
required: true
description: Namespace to fetch data for
- in: path
name: year
schema:
type: integer
required: true
description: Year to fetch data for
- in: path
name: week
schema:
type: integer
required: true
description: Week to fetch data for
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/WeekModel'
'404':
description: Not Found
/data/namespaces/{namespace}/years/{year}/weeks/{week}/raw:
get: get:
tags: [namespaces] tags: [namespaces]
summary: Get namespace data for week summary: Get namespace data for week
description: Gets a list of URLs that can be used to download the pull data for the given namespace and week description: Gets a list of URLs that can be used to download the raw pull data for the given namespace and week
operationId: getNamespaceDataByWeek operationId: getNamespaceDataByWeek
parameters: parameters:
- in: path - in: path
@ -177,7 +290,7 @@ paths:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/ResponseData' $ref: '#/components/schemas/ResponseData'
/data/{namespace}/year/{year}/month/{month}/summary: /data/namespaces/{namespace}/years/{year}/months/{month}/summary:
get: get:
tags: [namespaces] tags: [namespaces]
summary: Get namespace summary data for month summary: Get namespace summary data for month
@ -209,7 +322,7 @@ paths:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/ResponseData' $ref: '#/components/schemas/ResponseData'
/data/{namespace}/year/{year}/week/{week}/summary: /data/namespaces/{namespace}/years/{year}/weeks/{week}/summary:
get: get:
tags: [namespaces] tags: [namespaces]
summary: Get namespace summary data for week summary: Get namespace summary data for week
@ -241,7 +354,7 @@ paths:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/ResponseData' $ref: '#/components/schemas/ResponseData'
/data/{namespace}/{repo}/year: /data/repos/{namespace}/{repo}/years:
get: get:
tags: [repos] tags: [repos]
summary: Get years with data summary: Get years with data
@ -267,7 +380,7 @@ paths:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/YearData' $ref: '#/components/schemas/YearData'
/data/{namespace}/{repo}/year/{year}/month: /data/repos/{namespace}/{repo}/years/{year}/months:
get: get:
tags: [repos] tags: [repos]
summary: Get months with data summary: Get months with data
@ -299,7 +412,7 @@ paths:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/MonthData' $ref: '#/components/schemas/MonthData'
/data/{namespace}/{repo}/year/{year}/week: /data/repos/{namespace}/{repo}/years/{year}/weeks:
get: get:
tags: [repos] tags: [repos]
summary: Get weeks with data summary: Get weeks with data
@ -331,11 +444,51 @@ paths:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/WeekData' $ref: '#/components/schemas/WeekData'
/data/{namespace}/{repo}/year/{year}/month/{month}: /data/repos/{namespace}/{repo}/years/{year}/months/{month}:
get:
tags: [repos]
summary: Get repository metadata for month
description: Gets info about data for the given repository and month
operationId: getRepoMonthMetadata
parameters:
- in: path
name: namespace
schema:
type: string
required: true
description: Namespace to fetch data for
- in: path
name: repo
schema:
type: string
required: true
description: Repo to fetch data for
- in: path
name: year
schema:
type: integer
required: true
description: Year to fetch data for
- in: path
name: month
schema:
type: integer
required: true
description: Month to fetch data for
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/MonthModel'
'404':
description: Not Found
/data/repos/{namespace}/{repo}/years/{year}/months/{month}/raw:
get: get:
tags: [repos] tags: [repos]
summary: Get repository data for month summary: Get repository data for month
description: Gets a list of URLs that can be used to download the pull data for the given repository and month description: Gets a list of URLs that can be used to download the raw pull data for the given repository and month
operationId: getRepoDataByMonth operationId: getRepoDataByMonth
parameters: parameters:
- in: path - in: path
@ -369,11 +522,51 @@ paths:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/ResponseData' $ref: '#/components/schemas/ResponseData'
/data/{namespace}/{repo}/year/{year}/week/{week}: /data/repos/{namespace}/{repo}/years/{year}/weeks/{week}:
get:
tags: [repos]
summary: Get repository metadata for week
description: Gets info about data for the given repository and week
operationId: getRepoWeekMetadata
parameters:
- in: path
name: namespace
schema:
type: string
required: true
description: Namespace to fetch data for
- in: path
name: repo
schema:
type: string
required: true
description: Repo to fetch data for
- in: path
name: year
schema:
type: integer
required: true
description: Year to fetch data for
- in: path
name: week
schema:
type: integer
required: true
description: Week to fetch data for
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/WeekModel'
'404':
description: Not Found
/data/repos/{namespace}/{repo}/years/{year}/weeks/{week}/raw:
get: get:
tags: [repos] tags: [repos]
summary: Get repository data for week summary: Get repository data for week
description: Gets a list of URLs that can be used to download the pull data for the given repository and week description: Gets a list of URLs that can be used to download the raw pull data for the given repository and week
operationId: getRepoDataByWeek operationId: getRepoDataByWeek
parameters: parameters:
- in: path - in: path
@ -407,7 +600,7 @@ paths:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/ResponseData' $ref: '#/components/schemas/ResponseData'
/data/{namespace}/{repo}/year/{year}/month/{month}/summary: /data/repos/{namespace}/{repo}/years/{year}/months/{month}/summary:
get: get:
tags: [repos] tags: [repos]
summary: Get repository summary data for month summary: Get repository summary data for month
@ -445,7 +638,7 @@ paths:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/ResponseData' $ref: '#/components/schemas/ResponseData'
/data/{namespace}/{repo}/year/{year}/week/{week}/summary: /data/repos/{namespace}/{repo}/years/{year}/weeks/{week}/summary:
get: get:
tags: [repos] tags: [repos]
summary: Get repository summary data for week summary: Get repository summary data for week
@ -506,28 +699,49 @@ components:
type: array type: array
items: items:
type: string type: string
NamespaceMetadata:
properties:
namespace:
type: string
extraRepos:
type: array
items:
type: string
YearData: YearData:
properties: properties:
years: years:
type: array type: array
items: items:
type: integer $ref: '#/components/schemas/YearModel'
YearModel:
properties:
year:
type: integer
MonthData: MonthData:
properties: properties:
months: months:
type: array type: array
items: items:
type: integer $ref: '#/components/schemas/MonthModel'
MonthModel:
properties:
month:
type: integer
WeekData: WeekData:
properties: properties:
weeks: weeks:
type: array type: array
items: items:
type: integer $ref: '#/components/schemas/WeekModel'
WeekModel:
properties:
week:
type: integer
securitySchemes: securitySchemes:
HubAuth: HubAuth:
type: https type: https
scheme: bearer scheme: bearer
bearerFormat: JWT bearerFormat: JWT
description: Docker Hub bearer token description: >
See [Hub API Authentication docs](https://docs.docker.com/docker-hub/api/latest/#tag/authentication)
x-displayName: Docker Hub Authentication x-displayName: Docker Hub Authentication

View File

@ -1687,4 +1687,4 @@ components:
This message shows that your installation appears to be working correctly. This message shows that your installation appears to be working correctly.
``` ```

View File

@ -30,7 +30,8 @@ various APIs, CLIs, and file formats.
|:------------------------------------------------------|:---------------------------------------------------------------------------------------| |:------------------------------------------------------|:---------------------------------------------------------------------------------------|
| [Engine API](/engine/api/) | The main API for Docker, provides programmatic access to a daemon | | [Engine API](/engine/api/) | The main API for Docker, provides programmatic access to a daemon |
| [Registry API](/registry/spec/api/) | Facilitates distribution of images to the engine | | [Registry API](/registry/spec/api/) | Facilitates distribution of images to the engine |
| [Docker Hub API](/docker-hub/api/latest/) | API to interact with Docker Hub | | [Docker Hub API](/docker-hub/api/latest/) | API to interact with Docker Hub |
| [DVP Data API](/docker-hub/api/dvp/) | API for Docker Verified Publishers to fetch analytics data |
## Drivers and specifications ## Drivers and specifications