Get timespans with data
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.
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
Request and responses
Response
200
Success
application/json
Schema:
TimespanData
Schema example
{
"months": [
{
"month": 5
},
{
"month": 7
}
]
}Schema example
{
"weeks": [
{
"week": 31
},
{
"week": 32
}
]
}Referenced schemas
#/components/schemas/TimespanData
#/components/schemas/TimespanType
Complete operation contract
{
"description": "Gets a list of timespans of the given type that have data for the given namespace and year.",
"operationId": "getNamespaceTimespans",
"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"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TimespanData"
}
}
},
"description": "Success"
}
},
"summary": "Get timespans with data",
"tags": [
"namespaces"
]
}