· 6 years ago · Dec 10, 2019, 01:40 PM
1{
2 "openapi": "3.0.0",
3 "info": {
4 "title": "EthVigil API",
5 "description": "REST API for Contract: Microblog",
6 "version": "0.1.0"
7 },
8 "servers": [
9 {
10 "url": "https://alpha-api.ethvigil.com/v0.1/contract/0x515569b71f407c19c6ff9797766830c2521bf180",
11 "description": "Alpha API Server"
12 }
13 ],
14 "components": {
15 "responses": {
16 "UnauthorizedError": {
17 "description": "API key is missing or invalid"
18 }
19 },
20 "securitySchemes": {
21 "ApiKeyAuth": {
22 "type": "apiKey",
23 "in": "header",
24 "name": "X-API-KEY"
25 }
26 }
27 },
28 "paths": {
29 "/getPost/{id}": {
30 "get": {
31 "parameters": [
32 {
33 "schema": {
34 "type": "integer"
35 },
36 "name": "id",
37 "required": true,
38 "in": "path"
39 }
40 ],
41 "responses": {
42 "200": {
43 "description": "OK",
44 "content": {
45 "application/json": {
46 "schema": {
47 "type": "object",
48 "properties": {
49 "success": {
50 "type": "boolean"
51 },
52 "data": {
53 "type": "array",
54 "items": {
55 "type": "object",
56 "properties": {
57 "title": {
58 "type": "string"
59 },
60 "body": {
61 "type": "string"
62 },
63 "url": {
64 "type": "string"
65 },
66 "photo": {
67 "type": "string"
68 },
69 "time": {
70 "type": "integer"
71 },
72 "isDead": {
73 "type": "boolean"
74 }
75 }
76 }
77 }
78 }
79 }
80 }
81 }
82 }
83 }
84 }
85 },
86 "/ownerName": {
87 "get": {
88 "parameters": [
89
90 ],
91 "responses": {
92 "200": {
93 "description": "Missing output parameter names replaced with corresponding Solidity data types: string",
94 "content": {
95 "application/json": {
96 "schema": {
97 "type": "object",
98 "properties": {
99 "success": {
100 "type": "boolean"
101 },
102 "data": {
103 "type": "array",
104 "items": {
105 "type": "object",
106 "properties": {
107 "string": {
108 "type": "string"
109 }
110 }
111 }
112 }
113 }
114 }
115 }
116 }
117 }
118 }
119 }
120 },
121 "/owner": {
122 "get": {
123 "parameters": [
124
125 ],
126 "responses": {
127 "200": {
128 "description": "Missing output parameter names replaced with corresponding Solidity data types: address",
129 "content": {
130 "application/json": {
131 "schema": {
132 "type": "object",
133 "properties": {
134 "success": {
135 "type": "boolean"
136 },
137 "data": {
138 "type": "array",
139 "items": {
140 "type": "object",
141 "properties": {
142 "address": {
143 "type": "string"
144 }
145 }
146 }
147 }
148 }
149 }
150 }
151 }
152 }
153 }
154 }
155 },
156 "/lastPostId": {
157 "get": {
158 "parameters": [
159
160 ],
161 "responses": {
162 "200": {
163 "description": "Missing output parameter names replaced with corresponding Solidity data types: uint256",
164 "content": {
165 "application/json": {
166 "schema": {
167 "type": "object",
168 "properties": {
169 "success": {
170 "type": "boolean"
171 },
172 "data": {
173 "type": "array",
174 "items": {
175 "type": "object",
176 "properties": {
177 "uint256": {
178 "type": "integer"
179 }
180 }
181 }
182 }
183 }
184 }
185 }
186 }
187 }
188 }
189 }
190 },
191 "/blogTitle": {
192 "get": {
193 "parameters": [
194
195 ],
196 "responses": {
197 "200": {
198 "description": "Missing output parameter names replaced with corresponding Solidity data types: string",
199 "content": {
200 "application/json": {
201 "schema": {
202 "type": "object",
203 "properties": {
204 "success": {
205 "type": "boolean"
206 },
207 "data": {
208 "type": "array",
209 "items": {
210 "type": "object",
211 "properties": {
212 "string": {
213 "type": "string"
214 }
215 }
216 }
217 }
218 }
219 }
220 }
221 }
222 }
223 }
224 }
225 },
226 "/changeOwnerName": {
227 "post": {
228 "requestBody": {
229 "required": true,
230 "content": {
231 "application/x-www-form-urlencoded": {
232 "schema": {
233 "type": "object",
234 "properties": {
235 "_ownerName": {
236 "type": "string"
237 }
238 },
239 "required": [
240 "_ownerName"
241 ]
242 }
243 }
244 }
245 },
246 "security": [
247 {
248 "ApiKeyAuth": [
249
250 ]
251 }
252 ],
253 "responses": {
254 "200": {
255 "description": "OK",
256 "content": {
257 "application/json": {
258 "schema": {
259 "type": "object",
260 "properties": {
261 "success": {
262 "type": "boolean"
263 },
264 "data": {
265 "type": "array",
266 "items": {
267 "type": "object",
268 "properties": {
269 "txHash": {
270 "type": "string"
271 }
272 }
273 }
274 }
275 }
276 }
277 }
278 }
279 },
280 "401": {
281 "$ref": "#/components/responses/UnauthorizedError"
282 }
283 }
284 }
285 },
286 "/addPost": {
287 "post": {
288 "requestBody": {
289 "required": true,
290 "content": {
291 "application/x-www-form-urlencoded": {
292 "schema": {
293 "type": "object",
294 "properties": {
295 "title": {
296 "type": "string"
297 },
298 "body": {
299 "type": "string"
300 },
301 "url": {
302 "type": "string"
303 },
304 "photo": {
305 "type": "string"
306 }
307 },
308 "required": [
309 "title",
310 "body",
311 "url",
312 "photo"
313 ]
314 }
315 }
316 }
317 },
318 "security": [
319 {
320 "ApiKeyAuth": [
321
322 ]
323 }
324 ],
325 "responses": {
326 "200": {
327 "description": "OK",
328 "content": {
329 "application/json": {
330 "schema": {
331 "type": "object",
332 "properties": {
333 "success": {
334 "type": "boolean"
335 },
336 "data": {
337 "type": "array",
338 "items": {
339 "type": "object",
340 "properties": {
341 "txHash": {
342 "type": "string"
343 }
344 }
345 }
346 }
347 }
348 }
349 }
350 }
351 },
352 "401": {
353 "$ref": "#/components/responses/UnauthorizedError"
354 }
355 }
356 }
357 },
358 "/changeOwner": {
359 "post": {
360 "requestBody": {
361 "required": true,
362 "content": {
363 "application/x-www-form-urlencoded": {
364 "schema": {
365 "type": "object",
366 "properties": {
367 "newOwner": {
368 "type": "string"
369 }
370 },
371 "required": [
372 "newOwner"
373 ]
374 }
375 }
376 }
377 },
378 "security": [
379 {
380 "ApiKeyAuth": [
381
382 ]
383 }
384 ],
385 "responses": {
386 "200": {
387 "description": "OK",
388 "content": {
389 "application/json": {
390 "schema": {
391 "type": "object",
392 "properties": {
393 "success": {
394 "type": "boolean"
395 },
396 "data": {
397 "type": "array",
398 "items": {
399 "type": "object",
400 "properties": {
401 "txHash": {
402 "type": "string"
403 }
404 }
405 }
406 }
407 }
408 }
409 }
410 }
411 },
412 "401": {
413 "$ref": "#/components/responses/UnauthorizedError"
414 }
415 }
416 }
417 },
418 "/changeBlogTitle": {
419 "post": {
420 "requestBody": {
421 "required": true,
422 "content": {
423 "application/x-www-form-urlencoded": {
424 "schema": {
425 "type": "object",
426 "properties": {
427 "_blogTitle": {
428 "type": "string"
429 }
430 },
431 "required": [
432 "_blogTitle"
433 ]
434 }
435 }
436 }
437 },
438 "security": [
439 {
440 "ApiKeyAuth": [
441
442 ]
443 }
444 ],
445 "responses": {
446 "200": {
447 "description": "OK",
448 "content": {
449 "application/json": {
450 "schema": {
451 "type": "object",
452 "properties": {
453 "success": {
454 "type": "boolean"
455 },
456 "data": {
457 "type": "array",
458 "items": {
459 "type": "object",
460 "properties": {
461 "txHash": {
462 "type": "string"
463 }
464 }
465 }
466 }
467 }
468 }
469 }
470 }
471 },
472 "401": {
473 "$ref": "#/components/responses/UnauthorizedError"
474 }
475 }
476 }
477 },
478 "/setDead": {
479 "post": {
480 "requestBody": {
481 "required": true,
482 "content": {
483 "application/x-www-form-urlencoded": {
484 "schema": {
485 "type": "object",
486 "properties": {
487 "id": {
488 "type": "integer"
489 }
490 },
491 "required": [
492 "id"
493 ]
494 }
495 }
496 }
497 },
498 "security": [
499 {
500 "ApiKeyAuth": [
501
502 ]
503 }
504 ],
505 "responses": {
506 "200": {
507 "description": "OK",
508 "content": {
509 "application/json": {
510 "schema": {
511 "type": "object",
512 "properties": {
513 "success": {
514 "type": "boolean"
515 },
516 "data": {
517 "type": "array",
518 "items": {
519 "type": "object",
520 "properties": {
521 "txHash": {
522 "type": "string"
523 }
524 }
525 }
526 }
527 }
528 }
529 }
530 }
531 },
532 "401": {
533 "$ref": "#/components/responses/UnauthorizedError"
534 }
535 }
536 }
537 }
538 }
539}