-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathstart_orchestration.http
47 lines (40 loc) · 1.28 KB
/
start_orchestration.http
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
# Change the rooturl if needed (switch from localhost to remote in Azure).
@rooturl = http://localhost:7071
# The code is only required when the Function App is running in Azure.
@code=null
# Make sure the taskHub name matches your host.json file.
@taskHub=NEOEventsv1
### Start the orchestration and pass in a DetectedNeoEvent
# @name starter
POST {{rooturl}}/api/start
Content-Type: application/json
{
"id" : "{{$guid}}",
"date" : "{{$datetime iso8601}}",
"distance" : 1,
"velocity" : 25,
"diameter" : 15
}
# The orchestration Id is extracted from the reponse
@instanceId={{starter.response.body.$.id}}
### Retrieve the status of a single orchestrator instance
GET {{rooturl}}/runtime/webhooks/durableTask/instances/{{instanceId}}
?taskHub={{taskHub}}
&code={{code}}
&showHistory=true
&showHistoryOutput=true
&showInput=true
### Raise Approve event
@isApproved=true
POST {{rooturl}}/api/event/{{instanceId}}/{{isApproved}}
Content-Type: application/json
{
}
### Retrieve the status of multiple orchestrator instances
GET {{rooturl}}/runtime/webhooks/durableTask/instances?taskHub={{taskHub}}
&code={{code}}
&createdTimeFrom="2019-09-18T11:50:00.0Z"
&createdTimeTo="2019-09-18T11:54:00.0Z"
&runtimeStatus=Completed
&showInput=false
&top=50