|
168 | 168 | }, |
169 | 169 | { |
170 | 170 | "name": "Webhooks" |
| 171 | + }, |
| 172 | + { |
| 173 | + "name": "Webhook Deliveries" |
171 | 174 | } |
172 | 175 | ], |
173 | 176 | "x-tagGroups": [ |
|
2412 | 2415 | "updated_at": "2015-01-28T09:52:53Z" |
2413 | 2416 | } |
2414 | 2417 | }, |
| 2418 | + "webhook_delivery": { |
| 2419 | + "type": "object", |
| 2420 | + "title": "webhook delivery", |
| 2421 | + "properties": { |
| 2422 | + "id": { |
| 2423 | + "type": "string" |
| 2424 | + }, |
| 2425 | + "webhook_id": { |
| 2426 | + "type": "string" |
| 2427 | + }, |
| 2428 | + "response_status_code": { |
| 2429 | + "type": "integer" |
| 2430 | + }, |
| 2431 | + "delivered_at": { |
| 2432 | + "type": "string", |
| 2433 | + "format": "date-time" |
| 2434 | + }, |
| 2435 | + "duration_ms": { |
| 2436 | + "type": "integer" |
| 2437 | + }, |
| 2438 | + "created_at": { |
| 2439 | + "type": "string", |
| 2440 | + "format": "date-time" |
| 2441 | + }, |
| 2442 | + "updated_at": { |
| 2443 | + "type": "string", |
| 2444 | + "format": "date-time" |
| 2445 | + } |
| 2446 | + } |
| 2447 | + }, |
2415 | 2448 | "space": { |
2416 | 2449 | "type": "object", |
2417 | 2450 | "title": "space", |
|
3493 | 3526 | "type": "integer" |
3494 | 3527 | }, |
3495 | 3528 | "example": 25 |
| 3529 | + }, |
| 3530 | + "webhook_id": { |
| 3531 | + "in": "path", |
| 3532 | + "name": "webhook_id", |
| 3533 | + "description": "Webhook ID", |
| 3534 | + "required": true, |
| 3535 | + "schema": { |
| 3536 | + "type": "string" |
| 3537 | + } |
| 3538 | + }, |
| 3539 | + "response_status_codes": { |
| 3540 | + "in": "query", |
| 3541 | + "name": "response_status_codes", |
| 3542 | + "description": "List of Response Status Codes", |
| 3543 | + "required": false, |
| 3544 | + "schema": { |
| 3545 | + "type": "string" |
| 3546 | + } |
3496 | 3547 | } |
3497 | 3548 | }, |
3498 | 3549 | "responses": { |
@@ -22123,6 +22174,216 @@ |
22123 | 22174 | } |
22124 | 22175 | } |
22125 | 22176 | } |
| 22177 | + }, |
| 22178 | + "/projects/{project_id}/webhooks/{webhook_id}/deliveries": { |
| 22179 | + "get": { |
| 22180 | + "summary": "List webhook deliveries", |
| 22181 | + "description": "List all webhook deliveries for the given webhook_id.", |
| 22182 | + "operationId": "webhook_deliveries/list", |
| 22183 | + "tags": [ |
| 22184 | + "Webhook Deliveries" |
| 22185 | + ], |
| 22186 | + "parameters": [ |
| 22187 | + { |
| 22188 | + "$ref": "#/components/parameters/X-PhraseApp-OTP" |
| 22189 | + }, |
| 22190 | + { |
| 22191 | + "$ref": "#/components/parameters/project_id" |
| 22192 | + }, |
| 22193 | + { |
| 22194 | + "$ref": "#/components/parameters/webhook_id" |
| 22195 | + }, |
| 22196 | + { |
| 22197 | + "$ref": "#/components/parameters/response_status_codes" |
| 22198 | + } |
| 22199 | + ], |
| 22200 | + "responses": { |
| 22201 | + "200": { |
| 22202 | + "description": "OK", |
| 22203 | + "content": { |
| 22204 | + "application/json": { |
| 22205 | + "schema": { |
| 22206 | + "type": "array", |
| 22207 | + "items": { |
| 22208 | + "$ref": "#/components/schemas/webhook_delivery" |
| 22209 | + } |
| 22210 | + } |
| 22211 | + } |
| 22212 | + }, |
| 22213 | + "headers": { |
| 22214 | + "X-Rate-Limit-Limit": { |
| 22215 | + "$ref": "#/components/headers/X-Rate-Limit-Limit" |
| 22216 | + }, |
| 22217 | + "X-Rate-Limit-Remaining": { |
| 22218 | + "$ref": "#/components/headers/X-Rate-Limit-Remaining" |
| 22219 | + }, |
| 22220 | + "X-Rate-Limit-Reset": { |
| 22221 | + "$ref": "#/components/headers/X-Rate-Limit-Reset" |
| 22222 | + }, |
| 22223 | + "Link": { |
| 22224 | + "$ref": "#/components/headers/Link" |
| 22225 | + } |
| 22226 | + } |
| 22227 | + }, |
| 22228 | + "400": { |
| 22229 | + "$ref": "#/components/responses/400" |
| 22230 | + }, |
| 22231 | + "404": { |
| 22232 | + "$ref": "#/components/responses/404" |
| 22233 | + }, |
| 22234 | + "429": { |
| 22235 | + "$ref": "#/components/responses/429" |
| 22236 | + } |
| 22237 | + }, |
| 22238 | + "x-code-samples": [ |
| 22239 | + { |
| 22240 | + "lang": "Curl", |
| 22241 | + "source": "curl \"https://api.phrase.com/v2/projects/:project_id/webhooks/:webhook_id/deliveries?response_status_codes=401%2C404\" \\\n -u USERNAME_OR_ACCESS_TOKEN" |
| 22242 | + }, |
| 22243 | + { |
| 22244 | + "lang": "CLI v2", |
| 22245 | + "source": "phrase webhooks list \\\n--project_id <project_id> \\\n--webhook_id <webhook_id> \\\n--access_token <token>" |
| 22246 | + } |
| 22247 | + ] |
| 22248 | + } |
| 22249 | + }, |
| 22250 | + "/projects/{project_id}/webhooks/{webhook_id}/deliveries/{id}": { |
| 22251 | + "get": { |
| 22252 | + "summary": "Get a single webhook delivery", |
| 22253 | + "description": "Get all information about a single webhook delivery for the given ID.", |
| 22254 | + "operationId": "webhook_deliveries/show", |
| 22255 | + "tags": [ |
| 22256 | + "Webhook Deliveries" |
| 22257 | + ], |
| 22258 | + "parameters": [ |
| 22259 | + { |
| 22260 | + "$ref": "#/components/parameters/X-PhraseApp-OTP" |
| 22261 | + }, |
| 22262 | + { |
| 22263 | + "$ref": "#/components/parameters/project_id" |
| 22264 | + }, |
| 22265 | + { |
| 22266 | + "$ref": "#/components/parameters/webhook_id" |
| 22267 | + }, |
| 22268 | + { |
| 22269 | + "$ref": "#/components/parameters/id" |
| 22270 | + } |
| 22271 | + ], |
| 22272 | + "responses": { |
| 22273 | + "200": { |
| 22274 | + "description": "OK", |
| 22275 | + "content": { |
| 22276 | + "application/json": { |
| 22277 | + "schema": { |
| 22278 | + "$ref": "#/components/schemas/webhook_delivery" |
| 22279 | + } |
| 22280 | + } |
| 22281 | + }, |
| 22282 | + "headers": { |
| 22283 | + "X-Rate-Limit-Limit": { |
| 22284 | + "$ref": "#/components/headers/X-Rate-Limit-Limit" |
| 22285 | + }, |
| 22286 | + "X-Rate-Limit-Remaining": { |
| 22287 | + "$ref": "#/components/headers/X-Rate-Limit-Remaining" |
| 22288 | + }, |
| 22289 | + "X-Rate-Limit-Reset": { |
| 22290 | + "$ref": "#/components/headers/X-Rate-Limit-Reset" |
| 22291 | + }, |
| 22292 | + "Link": { |
| 22293 | + "$ref": "#/components/headers/Link" |
| 22294 | + } |
| 22295 | + } |
| 22296 | + }, |
| 22297 | + "400": { |
| 22298 | + "$ref": "#/components/responses/400" |
| 22299 | + }, |
| 22300 | + "404": { |
| 22301 | + "$ref": "#/components/responses/404" |
| 22302 | + }, |
| 22303 | + "429": { |
| 22304 | + "$ref": "#/components/responses/429" |
| 22305 | + } |
| 22306 | + }, |
| 22307 | + "x-code-samples": [ |
| 22308 | + { |
| 22309 | + "lang": "Curl", |
| 22310 | + "source": "curl \"https://api.phrase.com/v2/projects/:project_id/webhooks/:webhook_id/deliveries/:id\" \\\n -u USERNAME_OR_ACCESS_TOKEN" |
| 22311 | + }, |
| 22312 | + { |
| 22313 | + "lang": "CLI v2", |
| 22314 | + "source": "phrase webhook deliveries show \\\n--project_id <project_id> \\\n--webhook_id <webhook_id> \\\n--id <delivery_id> \\\n--access_token <token>" |
| 22315 | + } |
| 22316 | + ] |
| 22317 | + } |
| 22318 | + }, |
| 22319 | + "/projects/{project_id}/webhooks/{webhook_id}/deliveries/{id}/redeliver": { |
| 22320 | + "post": { |
| 22321 | + "summary": "Redeliver a single webhook delivery", |
| 22322 | + "description": "Trigger an individual webhook delivery to be redelivered.", |
| 22323 | + "operationId": "webhook_deliveries/redeliver", |
| 22324 | + "tags": [ |
| 22325 | + "Webhook Deliveries" |
| 22326 | + ], |
| 22327 | + "parameters": [ |
| 22328 | + { |
| 22329 | + "$ref": "#/components/parameters/X-PhraseApp-OTP" |
| 22330 | + }, |
| 22331 | + { |
| 22332 | + "$ref": "#/components/parameters/project_id" |
| 22333 | + }, |
| 22334 | + { |
| 22335 | + "$ref": "#/components/parameters/webhook_id" |
| 22336 | + }, |
| 22337 | + { |
| 22338 | + "$ref": "#/components/parameters/id" |
| 22339 | + } |
| 22340 | + ], |
| 22341 | + "responses": { |
| 22342 | + "200": { |
| 22343 | + "description": "OK", |
| 22344 | + "content": { |
| 22345 | + "application/json": { |
| 22346 | + "schema": { |
| 22347 | + "$ref": "#/components/schemas/webhook_delivery" |
| 22348 | + } |
| 22349 | + } |
| 22350 | + }, |
| 22351 | + "headers": { |
| 22352 | + "X-Rate-Limit-Limit": { |
| 22353 | + "$ref": "#/components/headers/X-Rate-Limit-Limit" |
| 22354 | + }, |
| 22355 | + "X-Rate-Limit-Remaining": { |
| 22356 | + "$ref": "#/components/headers/X-Rate-Limit-Remaining" |
| 22357 | + }, |
| 22358 | + "X-Rate-Limit-Reset": { |
| 22359 | + "$ref": "#/components/headers/X-Rate-Limit-Reset" |
| 22360 | + }, |
| 22361 | + "Link": { |
| 22362 | + "$ref": "#/components/headers/Link" |
| 22363 | + } |
| 22364 | + } |
| 22365 | + }, |
| 22366 | + "400": { |
| 22367 | + "$ref": "#/components/responses/400" |
| 22368 | + }, |
| 22369 | + "404": { |
| 22370 | + "$ref": "#/components/responses/404" |
| 22371 | + }, |
| 22372 | + "429": { |
| 22373 | + "$ref": "#/components/responses/429" |
| 22374 | + } |
| 22375 | + }, |
| 22376 | + "x-code-samples": [ |
| 22377 | + { |
| 22378 | + "lang": "Curl", |
| 22379 | + "source": "curl \"https://api.phrase.com/v2/projects/:project_id/webhooks/:webhook_id/deliveries/:id/redeliver\" \\\n -u USERNAME_OR_ACCESS_TOKEN" |
| 22380 | + }, |
| 22381 | + { |
| 22382 | + "lang": "CLI v2", |
| 22383 | + "source": "phrase webhook deliveries show \\\n--project_id <project_id> \\\n--webhook_id <webhook_id> \\\n--id <delivery_id> \\\n--access_token <token>" |
| 22384 | + } |
| 22385 | + ] |
| 22386 | + } |
22126 | 22387 | } |
22127 | 22388 | } |
22128 | 22389 | } |
|
0 commit comments