-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathigpec-checkPEC.yaml
More file actions
146 lines (137 loc) · 3.85 KB
/
Copy pathigpec-checkPEC.yaml
File metadata and controls
146 lines (137 loc) · 3.85 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
openapi: 3.0.1
info:
title: IGPEC-APIVerificaPEC
description: "API per **verificare** se una *casella di PEC* è correttamente funzionante. \n\n
Per *casella di PEC* correttamente funzionante si intende un indirizzo al quale il Gestore di competenza ha conferito tutte le abilitazioni necessarie per la completa operatività dello stesso."
version: 1.0.0
servers:
- url: https://igpec.agid.gov.it/checkpec/rest/v1.0.0
security:
- app_id: []
- api_key: []
tags:
- name: base
- name: utility
paths:
/{domain}/{localpart}:
get:
tags:
- base
description: Verifica lo stato del funzionamento di una PEC {localpart}@{domain}
parameters:
- name: domain
in: path
description: domain della PEC da verificare
required: true
schema:
pattern: ^\w{1,}([\.-]{0,1}\w+){0,}(\.\w{2,})$
type: string
- name: localpart
in: path
description: localpart della PEC da verificare
required: true
schema:
pattern: ^\w{1,}([\.-]?\w+){1,}$
type: string
responses:
200:
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/PECstatus'
400:
description: "BAD REQUEST"
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
401:
description: "UNAUTHORIZED"
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
404:
description: "NOT FOUND"
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
default:
description: Gli HTTP state codes non indicati hanno un comportamento conforme alle indicazioni riportate in https://httpstatuses.com/
content: {}
components:
schemas:
PECstatus:
required:
- email
- esito
- tipo
type: object
properties:
email:
type: string
description: PEC {localpart}@{domain} di cui è stata richiesta la verifica dello stato di funzionamento
format: email
esito:
type: string
description: Stato di funzionamento della PEC
enum:
- OK
- KO
tipo:
type: string
description: Tipo della PEC verificato
enum:
- PA
- Privato
example:
email: mailbox@pec.it
esito: OK
tipo: Privato
Error:
required:
- timestamp
- status
- error
- message
- path
type: object
properties:
timestamp:
type: string
description: timestamp dell'errore
format: date-time
status:
maximum: 600
minimum: 100
type: integer
description: HTTP status code generato per l'errore verificatosi
format: int32
error:
type: string
description: Tipologia dell'errore verificatosi
message:
type: string
description: Messaggio specifico per errore verificatosi
path:
type: string
description: Riferimento al path per cui si è verificato l'errore
example:
timestamp: 2020-05-05T10:55:18.383+0000
status: 400
error: Bad request
message: Sintassi non valida del domain o del localpart
path: /test-pec.it/test-pec
securitySchemes:
api_key:
type: apiKey
description: HEADER utilizzato per indicare la apikey del client
name: X-API-KEY
in: header
app_id:
type: apiKey
description: HEADER utilizzato per indicare l'identità del client
name: X-APP-ID
in: header