-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathapi_services_app_backend.yaml
517 lines (513 loc) · 14 KB
/
api_services_app_backend.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
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
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
openapi: 3.0.3
servers:
- url: https://api-app.io.pagopa.it/api/v2
info:
title: Services App Backend API
version: 13.34.3
tags:
- name: search
description: Search APIs
- name: details
description: Retrieve resources details
- name: featured
description: Retrieve featured Lists
security:
- Bearer: []
paths:
/institutions:
get:
tags:
- search
summary: Find institutions
description: Multiple status values can be provided with comma separated strings
operationId: findInstitutions
parameters:
- name: search
in: query
description: A full-text search query expression
required: false
schema:
type: string
- name: scope
in: query
description: Institution scope
required: false
schema:
$ref: '#/components/schemas/ScopeType'
- name: limit
in: query
description: >-
The number of search results to retrieve. This can be used in
conjunction with skip to implement client-side paging of search
results
(https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part2-url-conventions.html#sec_SystemQueryOptionstopandskip).
required: false
schema:
type: integer
minimum: 1
maximum: 100
default: 20
- name: offset
in: query
description: >-
The number of search results to skip
(https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part2-url-conventions.html#sec_SystemQueryOptionstopandskip).
This value cannot be greater than 100,000.
required: false
schema:
type: integer
minimum: 0
maximum: 100
default: 0
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/InstitutionsResource'
'400':
description: Bad Request
'401':
description: Bearer token null or expired
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ProblemJson'
'502':
description: Bad gateway
'504':
description: Gateway timeout
/institutions/featured:
get:
tags:
- featured
summary: Retrieve featured intitutions
operationId: getFeaturedInstitutions
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Institutions'
'401':
description: Bearer token null or expired
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ProblemJson'
'502':
description: Bad gateway
'504':
description: Gateway timeout
/institutions/{institutionId}/services:
get:
tags:
- search
summary: Find services for institution
description: Given an Institution allow to find its services
operationId: findInstutionServices
parameters:
- name: institutionId
in: path
description: ID of the institution to search for services
required: true
schema:
type: string
- name: limit
in: query
description: >-
The number of search results to retrieve. This can be used in
conjunction with skip to implement client-side paging of search
results
(https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part2-url-conventions.html#sec_SystemQueryOptionstopandskip).
required: false
schema:
type: integer
minimum: 1
maximum: 100
default: 20
- name: offset
in: query
description: >-
The number of search results to skip
(https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part2-url-conventions.html#sec_SystemQueryOptionstopandskip).
This value cannot be greater than 100,000.
required: false
schema:
type: integer
minimum: 0
maximum: 100
default: 0
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/InstitutionServicesResource'
'400':
description: Bad Request
'401':
description: Bearer token null or expired
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ProblemJson'
'502':
description: Bad gateway
'504':
description: Gateway timeout
/services/featured:
get:
tags:
- featured
summary: Retrieve featured services
operationId: getFeaturedServices
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/FeaturedServices'
'401':
description: Bearer token null or expired
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ProblemJson'
'502':
description: Bad gateway
'504':
description: Gateway timeout
/services/{serviceId}:
get:
tags:
- details
summary: Retrieve service details
description: Retrieve a service by ID
operationId: getServiceById
parameters:
- name: serviceId
in: path
description: ID of service to return
required: true
schema:
type: string
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/ServiceDetails'
'401':
description: Bearer token null or expired
'404':
description: Not found
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ProblemJson'
'502':
description: Bad gateway
'504':
description: Gateway timeout
components:
securitySchemes:
Bearer:
type: apiKey
name: Authorization
in: header
schemas:
InstitutionsResource:
allOf:
- $ref: '#/components/schemas/Institutions'
- $ref: '#/components/schemas/PaginationResultSet'
Institutions:
type: object
properties:
institutions:
type: array
items:
$ref: '#/components/schemas/Institution'
required:
- institutions
Institution:
type: object
properties:
id:
type: string
description: Institution ID
name:
type: string
description: Institution Name
fiscal_code:
$ref: '#/components/schemas/OrganizationFiscalCode'
required:
- id
- name
- fiscal_code
InstitutionServicesResource:
allOf:
- $ref: '#/components/schemas/Services'
- $ref: '#/components/schemas/PaginationResultSet'
Services:
type: object
properties:
services:
type: array
items:
$ref: '#/components/schemas/ServiceMinified'
required:
- services
ServiceMinified:
type: object
description: Service data (minified)
properties:
id:
type: string
description: Service ID
name:
type: string
description: Service Name
example: Tari
version:
type: integer
description: Service Version
required:
- id
- name
- version
ServiceDetails:
type: object
properties:
id:
type: string
description: Service ID
name:
type: string
description: Service name
description:
type: string
description: Service description
organization:
$ref: '#/components/schemas/Organization'
available_notification_channels:
$ref: '#/components/schemas/AvailableNotificationChannels'
metadata:
$ref: '#/components/schemas/ServiceMetadata'
version:
type: integer
description: Service version
required:
- id
- name
- version
- organization
- metadata
FeaturedServices:
type: object
properties:
services:
type: array
items:
$ref: '#/components/schemas/FeaturedService'
required:
- services
FeaturedService:
allOf:
- $ref: '#/components/schemas/ServiceMinified'
- type: object
properties:
organization_name:
type: string
description: Organization Name
ServiceMetadata:
description: A set of service metadata properties
allOf:
- $ref: '#/components/schemas/ServiceBaseMetadata'
- type: object
properties:
topic:
$ref: '#/components/schemas/ServiceTopic'
ServiceTopic:
type: object
properties:
id:
type: number
description: The topic id
example: 3
name:
type: string
description: The topic name
example: Benessere sociale
required:
- id
- name
ServiceBaseMetadata:
type: object
description: A set of common service metadata properties
properties:
web_url:
type: string
minLength: 1
app_ios:
type: string
minLength: 1
app_android:
type: string
minLength: 1
tos_url:
type: string
minLength: 1
privacy_url:
type: string
minLength: 1
address:
type: string
minLength: 1
phone:
type: string
minLength: 1
email:
type: string
minLength: 1
pec:
type: string
minLength: 1
cta:
type: string
minLength: 1
token_name:
type: string
minLength: 1
support_url:
type: string
minLength: 1
category:
type: string
enum:
- SPECIAL
- STANDARD
custom_special_flow:
type: string
minLength: 1
scope:
type: string
enum:
- NATIONAL
- LOCAL
required:
- scope
Organization:
type: object
properties:
name:
type: string
minLength: 1
fiscal_code:
type: string
description: Organization's fiscal code.
pattern: ^[0-9]{11}$
example: 12345678901
department_name:
type: string
minLength: 1
required:
- name
- fiscal_code
OrganizationFiscalCode:
type: string
x-import: '@pagopa/ts-commons/lib/strings'
format: OrganizationFiscalCode
PaginationResultSet:
type: object
properties:
offset:
type: number
description: result set offset
limit:
type: number
description: result set size
count:
type: number
description: total record count
required:
- offset
- limit
- count
AvailableNotificationChannels:
description: All the notification channels available for a service
type: array
items:
$ref: '#/components/schemas/NotificationChannel'
NotificationChannel:
type: string
description: All notification channels
enum:
- EMAIL
- WEBHOOK
example:
- EMAIL
ScopeType:
type: string
description: Institutions/Services Scopes
enum:
- NATIONAL
- LOCAL
ProblemJson:
type: object
properties:
type:
type: string
format: uri
description: |-
An absolute URI that identifies the problem type. When dereferenced,
it SHOULD provide human-readable documentation for the problem type
(e.g., using HTML).
default: about:blank
example: https://example.com/problem/constraint-violation
title:
type: string
description: >-
A short, summary of the problem type. Written in english and
readable
for engineers (usually not suited for non technical stakeholders and
not localized); example: Service Unavailable
status:
type: integer
format: int32
description: >-
The HTTP status code generated by the origin server for this
occurrence
of the problem.
minimum: 100
maximum: 600
exclusiveMaximum: true
example: 200
detail:
type: string
description: |-
A human readable explanation specific to this occurrence of the
problem.
example: There was an error processing the request
instance:
type: string
format: uri
description: >-
An absolute URI that identifies the specific occurrence of the
problem.
It may or may not yield further information if dereferenced.