-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathopenapi.yaml
More file actions
325 lines (310 loc) · 8.7 KB
/
openapi.yaml
File metadata and controls
325 lines (310 loc) · 8.7 KB
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
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
openapi: 3.0.3
info:
title: EPO Bulk Data Distribution Service (BDDS) API (unofficial)
description: |
European Patent Office Bulk Data Distribution Service API for accessing patent data sets.
**Authentication**: OAuth2 password grant flow required.
**Base URL**: https://publication-bdds.apps.epo.org/bdds/bdds-bff-service/prod/api
This specification was reverse-engineered from the actual API behavior.
version: 1.0.0
contact:
name: Wolfgang Stark
url: https://patent.dev
license:
name: MIT
url: https://opensource.org/licenses/MIT
servers:
- url: https://publication-bdds.apps.epo.org/bdds/bdds-bff-service/prod/api
description: Production server
- url: https://login.epo.org
description: OAuth server
paths:
/oauth2/aus3up3nz0N133c0V417/v1/token:
post:
summary: Authenticate to EPO BDDS
description: Obtain an OAuth2 access token using password grant flow
operationId: authenticate
tags:
- Authentication
requestBody:
required: true
content:
application/x-www-form-urlencoded:
schema:
type: object
required:
- grant_type
- username
- password
- scope
properties:
grant_type:
type: string
enum: [password]
description: OAuth2 grant type
username:
type: string
description: EPO BDDS username
password:
type: string
format: password
description: EPO BDDS password
scope:
type: string
enum: [openid]
description: OAuth2 scope
parameters:
- name: Authorization
in: header
required: true
schema:
type: string
description: 'Basic MG9hM3VwZG43YW41cE1JOE80MTc='
responses:
'200':
description: Authentication successful
content:
application/json:
schema:
$ref: '#/components/schemas/TokenResponse'
'400':
description: Bad request
'401':
description: Authentication failed
/products/:
get:
summary: List all products
description: Retrieve list of all available BDDS products (both subscribed and public)
operationId: listProducts
tags:
- Products
security:
- BearerAuth: []
responses:
'200':
description: List of products
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Product'
'401':
description: Unauthorized - invalid or expired token
/products/{productId}:
get:
summary: Get product details with deliveries
description: Retrieve detailed information about a specific product including all available deliveries
operationId: getProduct
tags:
- Products
security:
- BearerAuth: []
parameters:
- name: productId
in: path
required: true
schema:
type: integer
description: Product ID
responses:
'200':
description: Product details with deliveries
content:
application/json:
schema:
$ref: '#/components/schemas/ProductWithDeliveries'
'401':
description: Unauthorized - invalid or expired token
'404':
description: Product not found
/products/{productId}/delivery/{deliveryId}/file/{fileId}/download:
get:
summary: Download delivery file
description: Download a specific file from a product delivery
operationId: downloadFile
tags:
- Downloads
security:
- BearerAuth: []
parameters:
- name: productId
in: path
required: true
schema:
type: integer
description: Product ID
- name: deliveryId
in: path
required: true
schema:
type: integer
description: Delivery ID
- name: fileId
in: path
required: true
schema:
type: integer
description: File ID
responses:
'200':
description: File content
content:
application/octet-stream:
schema:
type: string
format: binary
'401':
description: Unauthorized - invalid or expired token
'404':
description: File not found
components:
securitySchemes:
BearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
description: OAuth2 Bearer token obtained from /oauth2/.../token endpoint
schemas:
TokenResponse:
type: object
required:
- token_type
- expires_in
- access_token
- scope
- id_token
properties:
token_type:
type: string
example: Bearer
description: Token type
expires_in:
type: integer
example: 3600
description: Token expiry time in seconds (typically 1 hour)
access_token:
type: string
description: JWT access token
scope:
type: string
example: openid
description: OAuth2 scope
id_token:
type: string
description: OpenID Connect ID token
Product:
type: object
required:
- id
- name
- description
properties:
id:
type: integer
example: 3
description: Product ID
name:
type: string
example: EP DocDB front file
description: Product name
description:
type: string
example: EP DocDB front file - bibliographic data
description: Product description
ProductWithDeliveries:
type: object
required:
- id
- name
- description
- deliveries
properties:
id:
type: integer
example: 3
description: Product ID
name:
type: string
example: EP DocDB front file
description: Product name
description:
type: string
example: EP DocDB front file - bibliographic data
description: Product description
deliveries:
type: array
items:
$ref: '#/components/schemas/Delivery'
description: List of available deliveries for this product
Delivery:
type: object
required:
- deliveryId
- deliveryName
- deliveryPublicationDatetime
- files
properties:
deliveryId:
type: integer
example: 12345
description: Delivery ID
deliveryName:
type: string
example: "2024-10-15"
description: Delivery name (typically a date)
deliveryPublicationDatetime:
type: string
format: date-time
example: "2024-10-15T10:30:00Z"
description: When the delivery was published
deliveryExpiryDatetime:
type: string
format: date-time
nullable: true
example: "2024-11-15T10:30:00Z"
description: When the delivery expires (null if no expiry)
files:
type: array
items:
$ref: '#/components/schemas/DeliveryFile'
description: Files in this delivery
DeliveryFile:
type: object
required:
- fileId
- fileName
- fileSize
- fileChecksum
- filePublicationDatetime
properties:
fileId:
type: integer
example: 67890
description: File ID
fileName:
type: string
example: "EP_docdb_20241015.zip"
description: File name
fileSize:
type: string
example: "1.5 GB"
description: Human-readable file size
fileChecksum:
type: string
example: "a1b2c3d4e5f6..."
description: File checksum (typically MD5 or SHA)
filePublicationDatetime:
type: string
format: date-time
example: "2024-10-15T10:30:00Z"
description: When the file was published
security:
- BearerAuth: []
tags:
- name: Authentication
description: OAuth2 authentication endpoints
- name: Products
description: Product listing and details
- name: Downloads
description: File download endpoints