-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhttp-requests.http
91 lines (72 loc) · 2.12 KB
/
http-requests.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
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
###
GET http://localhost:8080/schema/
Accept: application/json
###
GET http://localhost:8080/schema/election
Accept: application/json
###
GET http://localhost:8080/schema/election/CastVote
Accept: application/json
###
GET http://localhost:8080/schema/election/ListOpenElections
Accept: application/json
###
POST http://localhost:8080/election/CommenceElection
Content-Type: application/json
{
"ElectionID": "{{$random.uuid}}",
"OrganizerUserID": "34fb3192-d5a0-4e68-83cd-b50a1c7946f4",
"Name": "Where to Eat",
"Description": "My gustatory elegance yearns for replenishment."
}
> {%
client.global.set("election_id", response.body.meta.request.attributes.ElectionID);
%}
###
GET http://localhost:8080/election/ListOpenElections?SortBy=CommencedAt&SortDirection=descending&Page=1&ItemsPerPage=2
Accept: application/json
###
POST http://localhost:8080/election/MakeProposal
Content-Type: application/json
{
"ElectionID": "{{election_id}}",
"ProposalID": "{{$random.uuid}}",
"OwnerUserID": "28cc5071-3855-4638-82f1-54f30245fe4e",
"Name": "Cosmic Cravings",
"Description": "Taste the galaxy in every bite."
}
> {%
client.global.set("proposal_id", response.body.meta.request.attributes.ProposalID);
%}
###
GET http://localhost:8080/election/ListProposals?ElectionID={{election_id}}&Page=1&ItemsPerPage=2
Accept: application/json
###
GET http://localhost:8080/election/GetProposalDetails?ProposalID={{proposal_id}}
Accept: application/json
###
POST http://localhost:8080/election/CastVote
Content-Type: application/json
{
"ElectionID": "{{election_id}}",
"UserID": "9f32d3e2-6839-4164-99ca-24bb32a697f9",
"RankedProposalIDs": [
"{{proposal_id}}"
]
}
###
POST http://localhost:8080/election/CloseElectionByOwner
Content-Type: application/json
{
"ID": "{{$random.uuid}}",
"ElectionID": "{{election_id}}"
}
> {%
client.global.set("command_id", response.body.meta.request.attributes.ID);
%}
###
GET http://localhost:8080/async-command-status/{{command_id}}?include_logs=true
Content-Type: application/json
###
GET http://localhost:8080/election/GetElectionResults?ElectionID={{election_id}}
Accept: application/json