-
Notifications
You must be signed in to change notification settings - Fork 0
/
openapi.yaml
236 lines (236 loc) · 6.26 KB
/
openapi.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
openapi: 3.0.0
info:
title: MaxMind GeoIPUpdate Protocol
description: MaxMind GeoIPUpdate Protocol Design
version: 1.0.0
termsOfService: https://www.maxmind.com/en/end-user-license-agreement
contact:
name: MaxMind
url: https://www.maxmind.com/en/company/contact-us
license:
name: MIT
url: https://github.com/maxmind/geoipupdate/blob/main/LICENSE-MIT
paths:
/geoip/databases/{edition-id}/update:
servers:
- url: https://updates.maxmind.com
description: Official Update Server
get:
description: Get latest version
operationId: latest
security:
- authentication: [ ]
parameters:
- name: edition-id
in: path
required: true
schema:
$ref: "#/components/schemas/EditionID"
- name: User-Agent
in: header
schema:
type: string
example: geoipupdate/6.0.0
description: User Agent
- name: db_md5
in: query
required: true
schema:
type: string
example: "00000000000000000000000000000000"
description: Local Database MD5 Summed
responses:
200:
description: OK (gzipped)
headers:
Content-Encoding:
schema:
type: string
example: gzip
X-Database-Md5:
schema:
type: string
example: "00000000000000000000000000000000"
description: Uncompressed MD5 Hash, use hexadecimal encoded
Last-Modified:
schema:
$ref: "#/components/schemas/RFC1123"
content:
application/octet-stream:
schema:
type: string
format: binary
304:
description: Unmodified
content:
text/plain:
schema:
type: string
401:
$ref: "#/components/responses/InvalidLicenseKey"
404:
$ref: "#/components/responses/NotFound"
default:
description: Download first 256 bytes on error message
content:
text/plain:
schema:
type: string
/app/geoip_download:
description: Permanent download link
servers:
- url: https://download.maxmind.com
description: Official Download Server
get:
operationId: download
security:
- licenseKey: [ ]
parameters:
- $ref: "#/components/parameters/EditionID"
- $ref: "#/components/parameters/Date"
- $ref: "#/components/parameters/Suffix"
responses:
200:
$ref: "#/components/responses/DownloadFile"
400:
$ref: "#/components/responses/InvalidParams"
401:
$ref: "#/components/responses/InvalidLicenseKey"
404:
$ref: "#/components/responses/NotFound"
/app/geoip_download_by_token:
description: Temporary download link
servers:
- url: https://download.maxmind.com
description: Official Download Server
get:
operationId: downloadByToken
security:
- token: [ ]
parameters:
- $ref: "#/components/parameters/EditionID"
- $ref: "#/components/parameters/Date"
- $ref: "#/components/parameters/Suffix"
responses:
200:
$ref: "#/components/responses/DownloadFile"
400:
$ref: "#/components/responses/InvalidParams"
401:
$ref: "#/components/responses/InvalidLicenseKey"
404:
$ref: "#/components/responses/NotFound"
components:
parameters:
EditionID:
name: edition_id
in: query
required: true
schema:
$ref: "#/components/schemas/EditionID"
Date:
name: date
in: query
required: true
schema:
$ref: "#/components/schemas/Date"
Suffix:
name: suffix
in: query
required: true
schema:
$ref: "#/components/schemas/Suffix"
responses:
DownloadFile:
description: OK
headers:
Content-Disposition:
schema:
type: string
example: attachment; filename={edition-id}_{yyyyMMdd}.{suffix}
Last-Modified:
schema:
$ref: "#/components/schemas/RFC1123"
Etag:
schema:
type: string
description: Quoted MD5 Hash Hex String
content:
application/zip:
schema:
type: string
format: binary
description: Only suffix "zip"
application/gzip:
schema:
type: string
format: binary
description: Only suffix "tar.gz"
text/plain:
schema:
type: string
format: binary
description: Only suffix "zip.sha256" or "tar.gz.sha256"
InvalidParams:
description: Invalid edition-id, date or suffix
content:
text/plain:
schema:
type: string
InvalidLicenseKey:
description: Invalid license key
content:
text/plain:
schema:
type: string
NotFound:
description: Database edition not found
content:
text/plain:
schema:
type: string
schemas:
EditionID:
type: string
description: Edition ID
default: GeoLite2-Country
enum:
- GeoLite2-Country
- GeoLite2-Country-ASN
- GeoLite2-ASN
- GeoLite2-ASN-CSV
- GeoLite2-City
- GeoLite2-City-CSV
Date:
type: string
format: date
example: 20230906
description: Date (yyyyMMdd)
Suffix:
type: string
default: zip
enum:
- zip
- zip.sha256
- tar.gz
- tar.gz.sha256
description: File Suffix Name
RFC1123:
type: string
example: Wed, 01 Sep 2023 00:00:00 GMT
description: RFC1123 format
securitySchemes:
token:
type: apiKey
name: token
in: query
description: Access Token
licenseKey:
type: apiKey
name: license_key
in: query
description: License Key
authentication:
type: http
scheme: basic
description: Username as Account ID, Password as License Key