-
Notifications
You must be signed in to change notification settings - Fork 73
/
Copy pathproducer.swagger.yaml
891 lines (890 loc) · 31.2 KB
/
producer.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
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
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
openapi: 3.0.0
info:
title: Producer API
description: Nodeos Producer API Specification. See developer documentation at https://docs.eosnetwork.com for information on enabling this plugin.
version: 1.0.0
license:
name: MIT
url: https://opensource.org/licenses/MIT
contact:
url: https://antelope.io
tags:
- name: Protocol Version 4.0
description: The release tag for Leap binaries is also the protocol version
servers:
- url: "{protocol}://{host}:{port}/v1"
variables:
protocol:
enum:
- http
- https
default: http
host:
default: localhost
port:
default: "8080"
security:
- {}
paths:
/producer/pause:
post:
summary: pause
description: Pause producer node. Takes no arguments and returns no values.
operationId: pause
responses:
"201":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/OK"
"400":
description: client error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/producer/resume:
post:
summary: resume
description: Resume producer node. Takes no arguments and returns no values.
operationId: resume
responses:
"201":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/OK"
"400":
description: client error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/producer/paused:
post:
summary: paused
description: Retrieves paused status for producer node. Takes no arguments and returns no values.
operationId: paused
responses:
"201":
description: OK
content:
text/plain:
schema:
description: true or false
type: string
example: false
"400":
description: client error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/producer/get_runtime_options:
post:
summary: get_runtime_options
description: Retrieves runtime options for producer node.
operationId: get_runtime_options
responses:
"201":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/Runtime_Options"
"400":
description: client error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/producer/update_runtime_options:
post:
summary: update_runtime_options
description: Update runtime options for producer node. May post any of the runtime options in combination or alone.
operationId: update_runtime_options
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/Runtime_Options"
responses:
"201":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/OK"
"400":
description: client error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/producer/get_greylist:
post:
summary: get_greylist
description: Retrieves the greylist for producer node.
operationId: get_greylist
responses:
"201":
description: OK
content:
application/json:
schema:
type: object
properties:
accounts:
type: array
description: Array of account names stored in the greylist
items:
$ref: "https://docs.eosnetwork.com/openapi/v2.0/Name.yaml"
"400":
description: client error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/producer/add_greylist_accounts:
post:
summary: add_greylist_accounts
description: Adds accounts to greylist for producer node. At least one account is required.
operationId: add_greylist_accounts
requestBody:
content:
application/json:
schema:
type: object
properties:
accounts:
type: array
description: List of account names to add
items:
$ref: "https://docs.eosnetwork.com/openapi/v2.0/Name.yaml"
responses:
"201":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/OK"
"400":
description: client error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/producer/remove_greylist_accounts:
post:
summary: remove_greylist_accounts
description: Removes accounts from greylist for producer node. At least one account is required.
operationId: remove_greylist_accounts
requestBody:
content:
application/json:
schema:
type: object
properties:
accounts:
type: array
description: List of account names to remove
items:
$ref: "https://docs.eosnetwork.com/openapi/v2.0/Name.yaml"
responses:
"201":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/OK"
"400":
description: client error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/producer/get_whitelist_blacklist:
post:
summary: get_whitelist_blacklist
description: Retrieves the whitelist and blacklist for producer node. A JSON object containing whitelist and blacklist information.
operationId: get_whitelist_blacklist
responses:
"201":
description: OK
content:
application/json:
schema:
type: object
properties:
actor_whitelist:
type: array
items:
$ref: "https://docs.eosnetwork.com/openapi/v2.0/Name.yaml"
actor_blacklist:
type: array
items:
$ref: "https://docs.eosnetwork.com/openapi/v2.0/Name.yaml"
contract_whitelist:
type: array
items:
$ref: "https://docs.eosnetwork.com/openapi/v2.0/Name.yaml"
contract_blacklist:
type: array
items:
$ref: "https://docs.eosnetwork.com/openapi/v2.0/Name.yaml"
action_blacklist:
type: array
items:
type: array
description: Array of two string values, the account name as the first and action name as the second
items:
allOf:
- $ref: "https://docs.eosnetwork.com/openapi/v2.0/Name.yaml"
- $ref: "https://docs.eosnetwork.com/openapi/v2.0/CppSignature.yaml"
key_blacklist:
type: array
items:
- $ref: "https://docs.eosnetwork.com/openapi/v2.0/KeyType.yaml"
"400":
description: client error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/producer/set_whitelist_blacklist:
post:
summary: set_whitelist_blacklist
description: Defines the whitelist and blacklist for a producer node. Takes a JSON object containing whitelist and blacklist information.
operationId: set_whitelist_blacklist
requestBody:
content:
application/json:
schema:
type: object
properties:
actor_whitelist:
type: array
items:
$ref: "https://docs.eosnetwork.com/openapi/v2.0/Name.yaml"
actor_blacklist:
type: array
items:
$ref: "https://docs.eosnetwork.com/openapi/v2.0/Name.yaml"
contract_whitelist:
type: array
items:
$ref: "https://docs.eosnetwork.com/openapi/v2.0/Name.yaml"
contract_blacklist:
type: array
items:
$ref: "https://docs.eosnetwork.com/openapi/v2.0/Name.yaml"
action_blacklist:
type: array
items:
type: array
description: Array of two string values, the account name as the first and action name as the second
items:
anyOf:
- $ref: "https://docs.eosnetwork.com/openapi/v2.0/Name.yaml"
- $ref: "https://docs.eosnetwork.com/openapi/v2.0/CppSignature.yaml"
key_blacklist:
type: array
items:
$ref: "https://docs.eosnetwork.com/openapi/v2.0/KeyType.yaml"
responses:
"201":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/OK"
"400":
description: client error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/producer/create_snapshot:
post:
summary: create_snapshot
description: Creates a snapshot for producer node. Returns error when unable to create a snapshot.
operationId: create_snapshot
responses:
"201":
description: OK
content:
application/json:
schema:
type: object
properties:
head_block_id:
$ref: "https://docs.eosnetwork.com/openapi/v2.0/Sha256.yaml"
head_block_num:
type: integer
description: Highest block number on the chain
example: 5102
head_block_time:
type: string
description: Highest block unix timestamp
example: 2020-11-16T00:00:00.000
version:
type: integer
description: version number
example: 6
snapshot_name:
type: string
description: The path and file name of the snapshot
example: /home/me/nodes/node-name/snapshots/snapshot-0000999f99999f9f999f99f99ff9999f999f9fff99ff99ffff9f9f9fff9f9999.bin
"400":
description: client error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/producer/schedule_snapshot:
post:
summary: schedule_snapshot
description: Submits a request to automatically generate snapshots according to a schedule specified with given parameters. If request body is empty, schedules immediate snapshot generation. Returns error when unable to accept schedule.
operationId: schedule_snapshot
requestBody:
content:
application/json:
schema:
type: object
properties:
block_spacing:
type: integer
description: Generate snapshot every block_spacing blocks
start_block_num:
type: integer
description: Block number at which schedule starts
example: 5102
end_block_num:
type: integer
description: Block number at which schedule ends
example: 15102
snapshot_description:
type: string
description: Description of the snapshot
example: Daily snapshot
responses:
"201":
description: OK
content:
application/json:
schema:
type: object
required:
- snapshot_request_id
- block_spacing
- start_block_num
- end_block_num
- snapshot_description
properties:
snapshot_request_id:
type: integer
description: Unique id identifying current snapshot request
block_spacing:
type: integer
description: Generate snapshot every block_spacing blocks
start_block_num:
type: integer
description: Block number at which schedule starts
example: 5102
end_block_num:
type: integer
description: Block number at which schedule ends
example: 15102
snapshot_description:
type: string
description: Description of the snapshot
example: Daily snapshot
"400":
description: client error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/producer/get_snapshot_requests:
post:
summary: get_snapshot_requests
description: Returns a list of scheduled snapshots.
operationId: get_snapshot_requests
responses:
"201":
description: OK
content:
application/json:
schema:
type: object
properties:
snapshot_requests:
type: array
description: An array of scheduled snapshot requests
items:
type: object
required:
- snapshot_request_id
- block_spacing
- start_block_num
- end_block_num
- snapshot_description
- pending_snapshots
properties:
snapshot_request_id:
type: integer
description: Unique id identifying current snapshot request
block_spacing:
type: integer
description: Generate snapshot every block_spacing blocks
start_block_num:
type: integer
description: Block number at which schedule starts
example: 5102
end_block_num:
type: integer
description: Block number at which schedule ends
example: 15102
snapshot_description:
type: string
description: Description of the snapshot
example: Daily snapshot
pending_snapshots:
type: array
description: List of pending snapshots
items:
type: object
required:
- head_block_id
- head_block_num
- head_block_time
- version
- snapshot_name
properties:
head_block_id:
$ref: "https://docs.eosnetwork.com/openapi/v2.0/Sha256.yaml"
head_block_num:
type: integer
description: Highest block number on the chain
example: 5102
head_block_time:
type: string
description: Highest block unix timestamp
example: 2020-11-16T00:00:00.000
version:
type: integer
description: version number
example: 6
snapshot_name:
type: string
description: The path and file name of the snapshot
example: /home/me/nodes/node-name/snapshots/snapshot-0000999f99999f9f999f99f99ff9999f999f9fff99ff99ffff9f9f9fff9f9999.bin
"400":
description: client error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/producer/unschedule_snapshot:
post:
summary: unschedule_snapshot
description: Removes snapshot request identified by id. Returns error if referenced snapshot request does not exist.
operationId: unschedule_snapshot
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
snapshot_request_id:
type: integer
description: snapshot id
responses:
"201":
description: OK
content:
application/json:
schema:
type: object
required:
- snapshot_request_id
- block_spacing
- start_block_num
- end_block_num
- snapshot_description
properties:
snapshot_request_id:
type: integer
description: Unique id identifying current snapshot request
block_spacing:
type: integer
description: Generate snapshot every block_spacing blocks
start_block_num:
type: integer
description: Block number at which schedule starts
example: 5102
end_block_num:
type: integer
description: Block number at which schedule ends
example: 15102
snapshot_description:
type: string
description: Description of the snapshot
example: Daily snapshot
"400":
description: client error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/producer/get_integrity_hash:
post:
summary: get_integrity_hash
description: Retrieves the integrity hash for producer node
operationId: get_integrity_hash
responses:
"201":
description: OK
content:
application/json:
schema:
type: object
description: Defines the integrity hash information details
properties:
head_block_id:
$ref: "https://docs.eosnetwork.com/openapi/v2.0/Sha256.yaml"
integrity_hash:
$ref: "https://docs.eosnetwork.com/openapi/v2.0/Sha256.yaml"
"400":
description: client error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/producer/schedule_protocol_feature_activations:
post:
summary: schedule_protocol_feature_activations
description: Schedule protocol feature activation for producer node. Note some features may require pre-activation. Will return error for duplicate requests or when feature required pre-activation.
operationId: schedule_protocol_feature_activations
requestBody:
content:
application/json:
schema:
type: object
properties:
protocol_features_to_activate:
type: array
description: List of protocol features to activate
items:
$ref: "https://docs.eosnetwork.com/openapi/v2.0/Sha256.yaml"
responses:
"201":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/OK"
"400":
description: client error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/producer/get_supported_protocol_features:
post:
summary: get_supported_protocol_features
description: Retrieves supported protocol features for producer node. Pass filters in as part of the request body.
operationId: get_supported_protocol_features
requestBody:
content:
application/json:
schema:
type: object
properties:
exclude_disabled:
type: boolean
description: Exclude disabled protocol features
example: false
default: false
exclude_unactivatable:
type: boolean
description: Exclude unactivatable protocol features
default: false
example: false
responses:
"201":
description: OK
content:
application/json:
schema:
type: array
description: Variant type, an array of strings with the supported protocol features
items:
type: object
properties:
feature_digest:
$ref: "https://docs.eosnetwork.com/openapi/v2.0/Sha256.yaml"
subjective_restrictions:
type: object
properties:
enabled:
type: boolean
example: true
preactivation_required:
type: boolean
example: true
earliest_allowed_activation_time:
type: string
example: "1970-01-01T00:00:00.000"
description_digest:
$ref: "https://docs.eosnetwork.com/openapi/v2.0/Sha256.yaml"
dependencies:
type: array
items:
$ref: "https://docs.eosnetwork.com/openapi/v2.0/Sha256.yaml"
protocol_feature_type:
type: string
example: "builtin"
specification:
type: array
items:
type: object
properties:
name:
type: string
value:
type: string
"400":
description: client error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/producer/get_account_ram_corrections:
post:
summary: get_account_ram_corrections
description: Retrieves accounts with ram corrections.
operationId: get_account_ram_corrections
requestBody:
content:
application/json:
schema:
type: object
properties:
lower_bound:
type: integer
description: lowest account key
upper_bound:
type: integer
description: highest account key
limit:
type: integer
description: number of rows to scan
default: 10
example: 10
reverse:
type: boolean
description: direction of search
example: false
default: false
responses:
"201":
description: OK
content:
application/json:
schema:
type: object
required:
- rows
properties:
rows:
type: array
items:
type: string
more:
type: array
items:
- $ref: "https://docs.eosnetwork.com/openapi/v2.0/Name.yaml"
"400":
description: client error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/producer/get_unapplied_transactions:
post:
summary: get_unapplied_transactions
description: Get Unapplied Transactions.
operationId: get_unapplied_transactions
requestBody:
content:
application/json:
schema:
type: object
properties:
limit:
type: integer
description: limit number of transactions to return
default: 100
example: 100
lower_bound:
$ref: "https://docs.eosnetwork.com/openapi/v2.0/Sha256.yaml"
time_limit_ms:
type: integer
default: http-max-response-time-ms
example: 10
responses:
"200":
description: OK
content:
application/json:
schema:
type: object
properties:
size:
type: integer
default: 0
example: 12428
incoming_size:
type: integer
default: 0
example: 4475
trxs:
type: array
items:
type: object
properties:
trx_id:
$ref: "https://docs.eosnetwork.com/openapi/v2.0/Sha256.yaml"
expiration:
type: string
example: "2022-09-17T16:30:16"
trx_type:
type: string
example: "aborted"
first_auth:
type: string
example: "jkbsg.wam"
first_receiver:
type: string
example: "m.federation"
first_action:
type: string
example: "mine"
total_actions:
type: integer
default: 0
example: 1
billed_cpu_time_us:
type: integer
default: 0
example: 504
size:
type: integer
default: 0
example: 934
more:
$ref: "https://docs.eosnetwork.com/openapi/v2.0/Sha256.yaml"
"400":
description: client error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
components:
securitySchemes: {}
schemas:
Error:
type: object
properties:
code:
type: integer
description: http return code
example: 400
message:
type: string
description: summary of error
example: Invalid Request
error:
type: object
description: details on the error
properties:
code:
type: integer
description: internal error code
example: 3200006
name:
type: string
description: name of error
example: invalid_http_request
what:
type: string
description: prettier version of error name
example: invalid http request
details:
type: array
description: list of additional information for debugging
items:
type: object
properties:
message:
type: string
description: debugging message
example: Unable to parse valid input from POST body
file:
type: string
description: file where error was thrown
example: http_plugin.hpp
line_number:
type: integer
description: line number in file where error was thrown
example: 246
method:
type: string
description: function executed when error occurred
example: parse_params
OK:
type: object
properties:
result:
type: string
description: status
example: ok
Runtime_Options:
type: object
properties:
max_transaction_time:
type: integer
description: Max transaction time
example: 100
max_irreversible_block_age:
type: integer
description: Max irreversible block age
example: -1
produce_time_offset_us:
type: integer
description: Time offset
example: -100000
last_block_time_offset_us:
type: integer
description: Last block time offset
example: -200000
max_scheduled_transaction_time_per_block_ms:
type: integer
description: Max scheduled transaction time per block in ms
example: 100
subjective_cpu_leeway_us:
type: integer
description: in micro seconds
example: 10
incoming_defer_ratio:
type: string
description: Incoming defer ratio, parsed to double
example: "1.00000000000000000"
greylist_limit:
type: integer
description: limit on number of Names supported by greylist
example: 1000