-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi.yaml
More file actions
51 lines (51 loc) · 1.42 KB
/
Copy pathopenapi.yaml
File metadata and controls
51 lines (51 loc) · 1.42 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
openapi: 3.1.0
info:
title: Resilient Job Queue API
version: 1.0.0
paths:
/health:
get:
responses:
"200": { description: Healthy }
/jobs:
post:
parameters:
- in: header
name: Idempotency-Key
required: true
schema: { type: string, minLength: 8, maxLength: 128 }
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [type, payload]
properties:
type: { type: string, enum: [echo, delay, fail] }
payload: { type: object }
timeoutMs: { type: integer, minimum: 100, maximum: 60000, default: 10000 }
maxAttempts: { type: integer, minimum: 1, maximum: 5, default: 3 }
responses:
"202": { description: Job queued }
"200": { description: Existing idempotent job returned }
/jobs/{id}:
get:
parameters:
- in: path
name: id
required: true
schema: { type: string }
responses:
"200": { description: Job status }
"404": { description: Job not found }
/jobs/{id}/retry:
post:
parameters:
- in: path
name: id
required: true
schema: { type: string }
responses:
"202": { description: Failed job requeued }
"409": { description: Job is not failed }