-
Notifications
You must be signed in to change notification settings - Fork 0
/
swagger.yaml
97 lines (97 loc) · 3.43 KB
/
swagger.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
openapi: 3.0.0
info:
title: ResView API
description: API's for running ResView Documentation
servers:
- url: http://localhost:18501
description: Link for replica 1 locally
- url: http://localhost:18502
description: Link for replica 2 locally
- url: http://localhost:18503
description: Link for replica 3 locally
- url: http://localhost:18504
description: Link for replica 4 locally
paths:
/consensus_data:
get:
summary: Get consensus info for transactions from a replica
responses:
'200': # status code
description: A JSON array of consensus data
content:
application/json:
schema:
type: object
properties:
commit_message_timestamps:
type: array
description: Timestamps of when each commit message arrived
items:
type: string
commit_time:
type: integer
description: Time replica entered commit state
execution_time:
type: integer
description: Time replica executed txn
ip:
type: string
description: Replica IP
port:
type: integer
description: Replica port
prepare_message_timestamps:
type: array
description: Timestamps of when each prepare message arrived
items:
type: string
prepare_time:
type: integer
description: Time replica entered prepare state
primary_id:
type: integer
description: Id of which replica is primary
propose_pre_prepare_time:
type: integer
description: Time replica entered propose state if primary, pre-prepare state if non-primary
replica_id:
type: integer
description: Id of replica
txn_commands:
type: array
description: Array of txn types given, Set vs Get
items:
type: string
txn_keys:
type: array
description: Keys for received txns
items:
type: string
txn_number:
type: integer
description: Sequence number of txn
txn_values:
type: array
description: Values for received txns, if applicable
items:
type: string
/get_status:
get:
summary: Return status of replica faultiness
responses:
'200': # status code
description: "Not Faulty" if replica is not faulty, "Faulty" or no response if it is faulty
content:
application/json:
schema:
type: string
/make_faulty:
post:
summary: Make replica faulty if enable faulty flag is set
responses:
'200': # status code
description: Success message
content:
application/json:
schema:
type: string