-
Notifications
You must be signed in to change notification settings - Fork 49
/
Copy pathcommon-components-v2.json
325 lines (325 loc) · 11.2 KB
/
common-components-v2.json
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.0",
"info": {
"description": "This specification provides common re-usable components for the public API.",
"version": "2.0",
"title": "Public API V2 Common components"
},
"servers": [
{
"url": "https://api.personio.de"
}
],
"paths": {},
"components": {
"responses": {
"NotFoundResponse": {
"description": "The requested resource was not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ResourceNotFound"
}
}
}
}
},
"schemas": {
"MetaObject": {
"description": "This object represents the metadata information for an object. It's a set of arbitrary key/value attributes such as `links`.",
"type": "object",
"readOnly": true,
"properties": {
"links": {
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/LinkObject"
},
"example": {
"links": {
"self": {
"href": "https://api.personio.de/v2/person?cursor=<current-cursor>"
}
}
}
}
}
},
"CreatedObject": {
"description": "This is an object that is returned whenever a new resource is created. It contains the unique identifier for the created resource and optionally a link that can be used to retrieve it.",
"properties": {
"id": {
"readOnly": true,
"type": "string",
"example": "some-random-id",
"description": "The id of the created resource."
},
"_meta": {
"$ref": "#/components/schemas/MetaObject"
}
}
},
"DateTimeWithTimezone": {
"description": "Definition of date + timestamp formats.",
"type": "object",
"properties": {
"date": {
"type": "string",
"format": "date-time",
"example": "2022-01-01T14:07:17.000Z",
"description": "Date + timestamp. Date time has no offset from UTC."
},
"timezone": {
"type": "string",
"example": "Europe/Berlin",
"description": "Timezone database name."
}
}
},
"ResourceNotFound": {
"description": "This object is used to describe the use case where a specific requested resource does not exist.",
"x-papi-gateway-errors": [
{
"code": "common.requested_resource_not_found",
"description": "The requested resource was not found. The resource could have been deleted or never existed in our system\""
}
],
"properties": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"ErrorResponse": {
"type": "object",
"description": "This object represents an error response.",
"properties": {
"personio_trace_id": {
"type": "string",
"example": "aswo3f-a202lfso-312123sld-1230ddd",
"description": "A unique ID that was created for this error."
},
"timestamp": {
"type": "string",
"format": "date-time",
"example": "2021-05-28T11:17:30.000Z",
"description": "The timestamp of when the error occurred."
},
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"title": {
"type": "string",
"example": "Not found",
"description": "The title of the error."
},
"detail": {
"type": "string",
"example": "The requested resource was not found.",
"description": "A short description about the error."
},
"type": {
"type": "string",
"format": "uri",
"example": "https://developer.personio.de/reference/errors#common.requested_resource_not_found",
"description": "A link to the developer hub where more information can be found for the encountered error."
},
"_meta": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
}
},
"CustomAttribute": {
"description": "Custom Attribute schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The unique identifier for this `custom_attribute`.",
"readOnly": true
},
"type": {
"type": "string",
"description": "The type of the custom attribute. Only listed values are valid.",
"enum": [
"UNSPECIFIED",
"STRING",
"INT",
"DOUBLE",
"DATE",
"BOOLEAN",
"STRING_LIST"
]
},
"global_id": {
"type": "string",
"description": "The global identifier for this attribute. This value is unique and can be set to a selected value at the creation of the custom attribute.",
"readOnly": true
},
"label": {
"type": "string",
"description": "The label defined for this attribute.",
"readOnly": true
},
"value": {
"$ref": "#/components/schemas/CustomAttributeValue"
}
}
},
"CustomAttributeValue": {
"oneOf": [
{
"type": "string",
"description": "An arbitrary value that can be represented as a string."
},
{
"type": "array",
"description": "A list of values.",
"items": {
"type": "string",
"description": "An arbitrary value that can be represented as a string."
}
},
{
"type": "array",
"description": "A list of objects.",
"items": {
"type": "object",
"description": "An arbitrary object."
}
}
]
},
"LinkObject": {
"description": "This objects represents a hyperlink.",
"type": "object",
"readOnly": true,
"properties": {
"href": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": true
}
},
"parameters": {
"PersonioPartnerId": {
"name": "Personio-Partner-ID",
"in": "header",
"required": false,
"description": "The partner identifier. This is an optional header in case you are a partner of Personio. The value should represent your distinct company name and must be provided in UPPER_SNAKE_CASE. For example MY_COMPANY_NAME. [Read more details](https://developer.personio.de/reference/include-our-headers-in-your-requests)",
"schema": {
"type": "string"
}
},
"PersonioAppId": {
"name": "Personio-App-ID",
"in": "header",
"required": false,
"description": "The application identifier. This is an optional header in case you are a partner of Personio. The value should represent your distinct application within your company. The name and must be provided in UPPER_SNAKE_CASE. For example MY_APPLICATION_NAME. [Read more details](https://developer.personio.de/reference/include-our-headers-in-your-requests)",
"schema": {
"type": "string"
}
},
"Pagination": {
"in": "query",
"name": "limit",
"required": false,
"schema": {
"example": 100,
"type": "integer",
"minimum": 1,
"maximum": 200,
"default": 100
},
"description": "The amount of resources to be returned per one request. It can range between 1 and 200, and the default is 100."
},
"Cursor": {
"in": "query",
"name": "cursor",
"example": "cur_82sQwR2eZvKilo2duNh219Kw",
"required": false,
"schema": {
"type": "string"
},
"description": "The pagination cursor to navigate over to the next list of resources. If you pass a specific limit to your request, or you rely on the default value of the number of resources to be returned, then your subsequent call has to include the cursor in order to retrieve the next list of resources. If cursor is missing, the first page is returned."
}
},
"examples": {
"ResourceNotFound": {
"value": {
"personio_trace_id": "aswo3f-a202lfso-312123sld-1230ddd",
"timestamp": "2021-05-28T11:17:30+00:00",
"errors": [
{
"title": "Resource not found",
"detail": "The requested resource was not found. The resource could have been deleted or never existed in our system.",
"type": "https://developer.personio.de/reference/errors#common.requested_resource_not_found"
}
]
}
},
"InternalServerError": {
"value": {
"personio_trace_id": "aswo3f-a202lfso-312123sld-1230ddd",
"timestamp": "2021-05-28T11:17:30+00:00",
"errors": [
{
"title": "Internal Server Error",
"detail": "There was a problem while processing this request. Please try again later.",
"type": "https://developer.personio.de/reference/errors#common.internal_server_error"
}
]
}
},
"BadGateway": {
"value": {
"personio_trace_id": "aswo3f-a202lfso-312123sld-1230ddd",
"timestamp": "2021-05-28T11:17:30+00:00",
"errors": [
{
"title": "Bad Gateway",
"detail": "There was a problem while processing this request. Please try again later.",
"type": "https://developer.personio.de/reference/errors#common.bad_gateway"
}
]
}
},
"ServiceUnavailable": {
"value": {
"personio_trace_id": "aswo3f-a202lfso-312123sld-1230ddd",
"timestamp": "2021-05-28T11:17:30+00:00",
"errors": [
{
"title": "Service Unavailable",
"detail": "The server is temporarily unavailable. Please try again later.",
"type": "https://developer.personio.de/reference/errors#common.service_unavailable"
}
]
}
},
"GatewayTimeout": {
"value": {
"personio_trace_id": "aswo3f-a202lfso-312123sld-1230ddd",
"timestamp": "2021-05-28T11:17:30+00:00",
"errors": [
{
"title": "Gateway Timeout",
"detail": "There was a problem while processing this request. Please try again later.",
"type": "https://developer.personio.de/reference/errors#common.gateway_timeout"
}
]
}
}
}
}
}