-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopenapi.yaml
175 lines (175 loc) · 5.87 KB
/
openapi.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
openapi: 3.0.3
info:
version: 0.0.1
title: HeyFil Query API
description: API specification for the heyFil SP query service
servers:
- url: http://localhost:8081
paths:
/sp:
get:
summary: Get all SP IDs, optionally filter by peer ID
parameters:
- in: query
name: peerid
schema:
type: string
description: |
Optional filter by peer ID. The filter is applied to all peer IDs exposed by the SP.
These include SP peer ID, and all peer IDs listed under SP's supported transports protocols
queried via `/fil/retrieval/transports/1.0.0` protocol ID.
- in: query
name: status
schema:
type: string
description: |
Optional filter by status number. The filter is negated if it begins with "!".
For example, the value "!14" will select miner IDs the status of which does not match StatusNoAddrInfo.
responses:
'200':
description: An array of SP IDs
content:
application/json:
schema:
type: array
items:
type: string
'400':
description: Invalid peer ID supplied
options:
summary: Get allowed methods for /sp endpoint
responses:
'200':
description: Returns allowed methods
/sp/{id}/recentPiece:
get:
summary: Get the CID of a recent piece that is held by a specific SP
responses:
'200':
description: The recent PieceID held by the requested SP
content:
application/json:
schema:
type: string
'404':
description: SP not found
/sp/{id}:
get:
summary: Get detailed information about a specific SP by its ID
parameters:
- in: path
name: id
required: true
schema:
type: string
description: The ID of the SP
responses:
'200':
description: The detailed SP information
content:
application/json:
schema:
type: object
properties:
id:
type: string
status:
type: integer
enum: [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 ]
description: |
The status of the SP, where:
0 = StatusUnknown,
1 = StatusOK,
2 = StatusAPICallFailed,
3 = StatusInternalError,
4 = StatusUnknownRPCError,
5 = StatusNotMiner,
6 = StatusUnreachable,
7 = StatusUnaddressable,
8 = StatusUnindexed,
9 = StatusTopicMismatch,
10 = StatusEmptyHead,
11 = StatusGetHeadError,
12 = StatusAnnounceError,
13 = StatusUnidentifiable,
14 = StatusNoAddrInfo
addr_info:
type: object
properties:
ID:
type: string
Addrs:
type: array
items:
type: string
last_checked:
type: string
format: date-time
err_message:
type: string
topic:
type: string
head_protocol:
type: string
head:
type: string
known_by_indexer:
type: boolean
protocols:
type: array
items:
type: string
agent_version:
type: string
description: The full libp2p AgentVersion.
agent_short_version:
type: string
description: The shortened libp2p AgentVersion
transports:
type: object
properties:
protocols:
type: array
items:
type: object
properties:
name:
type: string
addresses:
type: array
items:
type: string
state_miner_power:
type: object
properties:
HasMinPower:
type: boolean
MinerPower:
type: object
properties:
QualityAdjPower:
type: string
RawBytePower:
type: string
TotalPower:
type: object
properties:
QualityAdjPower:
type: string
RawBytePower:
type: string
deal_count:
type: integer
deal_count_within_day:
type: integer
deal_count_within_week:
type: integer
'400':
description: SP ID must be specified as URL parameter
'404':
description: SP not found
options:
summary: Get allowed methods for /sp/{id} endpoint
responses:
'200':
description: Returns allowed methods