-
Notifications
You must be signed in to change notification settings - Fork 0
/
api-spec.yaml
195 lines (194 loc) · 4.6 KB
/
api-spec.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
openapi: "3.1.0"
info:
version: "1.0.0"
title: Durable PHP API
paths:
/activities: # done
get:
summary: List all activities the current user has access to
responses:
'200':
description: A list
content:
application/json:
schema:
$ref: '#/components/schemas/ListOfStrings'
/activity/{id}: # done
parameters:
- in: path
name: id
schema:
type: string
get:
summary: Get the current status of an activity
responses:
200:
content:
application/json:
schema:
$ref: "#/components/schemas/Status"
/entities: # done
get:
summary: List all entities the current user has access to
responses:
200:
content:
application/json:
schema:
$ref: "#/components/schemas/ListOfStrings"
/entity/{name}/{id}: # done
parameters:
- in: path
name: id
schema:
type: string
get:
summary: Get a current entity's state and status (API scope)
responses:
200:
content:
application/json:
schema:
type: object
properties:
status:
$ref: "#/components/schemas/Status"
state:
type: object
additionalProperties: true
/entity/{name}/{id}/{method}: # done
parameters:
- in: path
name: id
schema:
type: string
- in: path
name: method
schema:
type: string
description: The name of the method to call
- in: header
name: At
schema:
type: string
description: Schedule at a specific time
put:
summary: Send a signal to an entity
requestBody:
description: An array of parameters to call the method with
required: true
content:
application/json:
schema:
type: array
items:
type: any
responses:
202: { }
/orchestrations: # done
get:
summary: Get a list of orchestrations a user has access to
responses:
200:
content:
application/json:
schema:
$ref: "#/components/schemas/ListOfStrings"
put: # done
summary: Start a new orchestration
requestBody:
required: true
content:
application/json:
schema:
required:
- name
- input
type: object
properties:
name:
type: string
id:
type: string
input:
type: array
items:
type: any
responses:
202:
headers:
x-id:
description: The id of the newly created orchestration
schema:
type: string
/orchestration/{name}/{id}: #done
get:
summary: Get the current status of an orchestration
responses:
200:
content:
application/json:
schema:
$ref: "#/components/schemas/Status"
/orchestration/{name}/{id}/{signal}: #done
parameters:
- in: path
name: id
schema:
type: string
- in: path
name: signal
description: The signal name to send
schema:
type: string
put:
summary: Send a signal to an orchestration
requestBody:
required: true
content:
application/json:
schema:
type: array
items:
type: any
responses:
202: { }
components:
schemas:
ListOfStrings:
type: array
items:
type: string
Status:
type: object
properties:
createdAt:
type: string
format: date
customStatus:
type: string
input:
type: array
items:
type: any
id:
type: string
lastUpdated:
type: string
format: date
output:
type: array
items:
type: any
runtimeStatus:
type: string
enum:
- Running
- Completed
- ContinuedAsNew
- Failed
- Canceled
- Terminated
- Pending
- Suspended
- Unknown