forked from seetadev/Veil-Stack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi.yaml
More file actions
282 lines (269 loc) · 7 KB
/
Copy pathopenapi.yaml
File metadata and controls
282 lines (269 loc) · 7 KB
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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
openapi: 3.0.3
info:
title: Veil Stack REST API
description: Backend introspection API for Veil Stack decentralized container orchestrator
version: 0.2.0
license:
name: MIT
url: https://opensource.org/licenses/MIT
servers:
- url: http://localhost:5001
description: Local development
paths:
/status:
get:
summary: Get node status
description: Returns the current state of this Veil Stack node including container status, Docker availability, and read-only mode.
operationId: getStatus
responses:
'200':
description: Node status
content:
application/json:
schema:
$ref: '#/components/schemas/NodeStatus'
example:
host: "127.0.0.1:5000"
container:
image: "nginx:latest"
state: "running"
lastReported: 1700000000000
docker: true
readOnlyMode: true
registered: true
/containers:
get:
summary: List Docker containers
description: Returns all Docker containers managed by this node's scheduler.
operationId: getContainers
responses:
'200':
description: Container list
content:
application/json:
schema:
$ref: '#/components/schemas/ContainerList'
/cluster:
get:
summary: Get cluster topology
description: Returns libp2p cluster information including peer ID, connected members, and multiaddrs.
operationId: getCluster
responses:
'200':
description: Cluster topology
content:
application/json:
schema:
$ref: '#/components/schemas/ClusterInfo'
example:
host: "127.0.0.1:5000"
peerId: "12D3KooW..."
members: ["127.0.0.1:5000", "127.0.0.1:5002"]
connections: 2
peers: 1
multiaddrs:
- "/ip4/0.0.0.0/tcp/5000"
/health:
get:
summary: Health check
description: Returns uptime and version information for monitoring and load balancers.
operationId: getHealth
responses:
'200':
description: Healthy
content:
application/json:
schema:
$ref: '#/components/schemas/HealthCheck'
example:
status: "ok"
uptime: 3600
version: "0.2.0"
/ipfs:
get:
summary: List IPFS pins
description: Returns pinned IPFS records. Requires Pinata configuration.
operationId: listPins
parameters:
- name: limit
in: query
schema:
type: integer
default: 10
- name: offset
in: query
schema:
type: integer
default: 0
- name: q
in: query
schema:
type: string
description: Filter by name
responses:
'200':
description: Pin list
content:
application/json:
schema:
type: object
properties:
pins:
type: array
items:
$ref: '#/components/schemas/IPFSPin'
count:
type: integer
'503':
description: IPFS not configured
post:
summary: Pin JSON to IPFS
description: Pins a JSON object to IPFS via Pinata. Requires Pinata configuration.
operationId: pinJSON
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- name
- data
properties:
name:
type: string
data:
type: object
responses:
'200':
description: Pinned successfully
content:
application/json:
schema:
type: object
properties:
cid:
type: string
name:
type: string
'503':
description: IPFS not configured
/ipfs/{cid}:
delete:
summary: Unpin from IPFS
description: Removes a pinned CID from IPFS via Pinata.
operationId: unpin
parameters:
- name: cid
in: path
required: true
schema:
type: string
responses:
'200':
description: Unpin result
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
components:
schemas:
NodeStatus:
type: object
properties:
host:
type: string
container:
type: object
properties:
image:
type: string
state:
type: string
enum: [idle, running, stopped, crashed, pending, no-scheduler]
lastReported:
type: number
docker:
type: boolean
readOnlyMode:
type: boolean
registered:
type: boolean
ContainerList:
type: object
properties:
containers:
type: array
items:
type: object
properties:
id:
type: string
image:
type: string
name:
type: string
state:
type: string
status:
type: string
ports:
type: array
items:
type: object
properties:
private:
type: integer
public:
type: integer
nullable: true
type:
type: string
created:
type: number
dockerAvailable:
type: boolean
ClusterInfo:
type: object
properties:
host:
type: string
peerId:
type: string
members:
type: array
items:
type: string
connections:
type: integer
peers:
type: integer
multiaddrs:
type: array
items:
type: string
HealthCheck:
type: object
properties:
status:
type: string
enum: [ok, degraded, down]
uptime:
type: number
description: Uptime in seconds
version:
type: string
IPFSPin:
type: object
properties:
cid:
type: string
name:
type: string
size:
type: integer
timestamp:
type: string