github.com/ethersphere/bee/v2@v2.2.0/openapi/SwarmCommon.yaml (about) 1 openapi: 3.0.3 2 info: 3 version: 4.1.0 4 title: Common Data Types 5 description: | 6 \*****bzzz***** 7 8 externalDocs: 9 description: Browse the documentation @ the Swarm Docs 10 url: "https://docs.swarm.eth" 11 12 paths: {} 13 components: 14 schemas: 15 Address: 16 type: object 17 properties: 18 address: 19 $ref: "#/components/schemas/SwarmAddress" 20 21 Addresses: 22 type: object 23 properties: 24 overlay: 25 $ref: "#/components/schemas/SwarmAddress" 26 underlay: 27 type: array 28 items: 29 $ref: "#/components/schemas/P2PUnderlay" 30 ethereum: 31 $ref: "#/components/schemas/EthereumAddress" 32 publicKey: 33 $ref: "#/components/schemas/PublicKey" 34 pssPublicKey: 35 $ref: "#/components/schemas/PublicKey" 36 37 BigInt: 38 description: Numeric string that represents integer which might exceed `Number.MAX_SAFE_INTEGER` limit (2^53-1) 39 type: string 40 example: "1000000000000000000" 41 42 ReserveState: 43 type: object 44 properties: 45 radius: 46 type: integer 47 storageRadius: 48 type: integer 49 commitment: 50 type: integer 51 52 ChainState: 53 type: object 54 properties: 55 chainTip: 56 type: integer 57 block: 58 type: integer 59 totalAmount: 60 $ref: "#/components/schemas/BigInt" 61 currentPrice: 62 $ref: "#/components/schemas/BigInt" 63 64 PeerAccountingData: 65 type: object 66 properties: 67 peerData: 68 type: object 69 additionalProperties: 70 $ref: "#/components/schemas/AccountingInfo" 71 72 AccountingInfo: 73 type: object 74 properties: 75 balance: 76 $ref: "#/components/schemas/BigInt" 77 thresholdReceived: 78 $ref: "#/components/schemas/BigInt" 79 thresholdGiven: 80 $ref: "#/components/schemas/BigInt" 81 surplusBalance: 82 $ref: "#/components/schemas/BigInt" 83 reservedBalance: 84 $ref: "#/components/schemas/BigInt" 85 shadowReservedBalance: 86 $ref: "#/components/schemas/BigInt" 87 ghostBalance: 88 $ref: "#/components/schemas/BigInt" 89 90 ActGranteesCreateRequest: 91 type: object 92 properties: 93 grantees: 94 type: array 95 items: 96 $ref: "#/components/schemas/PublicKey" 97 98 ActGranteesPatchRequest: 99 type: object 100 properties: 101 add: 102 type: array 103 items: 104 $ref: "#/components/schemas/PublicKey" 105 description: List of grantees to add 106 revoke: 107 type: array 108 items: 109 $ref: "#/components/schemas/PublicKey" 110 description: List of grantees to revoke future access from 111 112 ActGranteesOperationResponse: 113 type: object 114 properties: 115 ref: 116 $ref: "#/components/schemas/SwarmEncryptedReference" 117 historyref: 118 $ref: "#/components/schemas/SwarmEncryptedReference" 119 120 Balance: 121 type: object 122 properties: 123 peer: 124 $ref: "#/components/schemas/SwarmAddress" 125 balance: 126 $ref: "#/components/schemas/BigInt" 127 128 Balances: 129 type: object 130 properties: 131 balances: 132 type: array 133 items: 134 $ref: "#/components/schemas/Balance" 135 136 BzzTopology: 137 type: object 138 properties: 139 baseAddr: 140 $ref: "#/components/schemas/SwarmAddress" 141 population: 142 type: integer 143 connected: 144 type: integer 145 timestamp: 146 type: string 147 nnLowWatermark: 148 type: integer 149 depth: 150 type: integer 151 reachability: 152 type: string 153 enum: 154 - "Unknown" 155 - "Public" 156 - "Private" 157 networkAvailability: 158 type: string 159 enum: 160 - "Unknown" 161 - "Available" 162 - "Unavailable" 163 bins: 164 type: object 165 additionalProperties: 166 type: object 167 properties: 168 population: 169 type: integer 170 connected: 171 type: integer 172 disconnectedPeers: 173 type: array 174 items: 175 type: object 176 properties: 177 address: 178 $ref: "#/components/schemas/SwarmAddress" 179 metrics: 180 $ref: "#/components/schemas/PeerMetricsView" 181 connectedPeers: 182 type: array 183 items: 184 type: object 185 properties: 186 address: 187 $ref: "#/components/schemas/SwarmAddress" 188 metrics: 189 $ref: "#/components/schemas/PeerMetricsView" 190 191 Cheque: 192 type: object 193 properties: 194 beneficiary: 195 $ref: "#/components/schemas/EthereumAddress" 196 chequebook: 197 $ref: "#/components/schemas/EthereumAddress" 198 payout: 199 $ref: "#/components/schemas/BigInt" 200 201 ChequeAllPeersResponse: 202 type: object 203 properties: 204 lastcheques: 205 type: array 206 nullable: false 207 items: 208 $ref: "#/components/schemas/ChequePeerResponse" 209 210 ChequePeerResponse: 211 type: object 212 properties: 213 peer: 214 $ref: "#/components/schemas/SwarmAddress" 215 lastreceived: 216 $ref: "#/components/schemas/Cheque" 217 lastsent: 218 $ref: "#/components/schemas/Cheque" 219 220 ChequebookBalance: 221 type: object 222 properties: 223 totalBalance: 224 $ref: "#/components/schemas/BigInt" 225 availableBalance: 226 $ref: "#/components/schemas/BigInt" 227 228 ChequebookAddress: 229 type: object 230 properties: 231 chequebookAddress: 232 $ref: "#/components/schemas/EthereumAddress" 233 234 DateTime: 235 type: string 236 format: date-time 237 #pattern: '^(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{7}\+\d{2}:\d{2})$' 238 example: "2020-06-11T11:26:42.6969797+02:00" 239 240 Duration: 241 description: Go time.Duration format 242 type: string 243 example: "5.0018ms" 244 245 EthereumAddress: 246 type: string 247 pattern: "^[A-Fa-f0-9]{40}$" 248 example: "36b7efd913ca4cf880b8eeac5093fa27b0825906" 249 250 FileName: 251 type: string 252 253 GasLimit: 254 description: Gas limit refers to the maximum amount of gas you’re willing to spend on a particular transaction. 255 type: integer 256 minimum: 0 257 maximum: 18446744073709551615 258 259 GasPrice: 260 description: Gas price refers to the amount you’re willing to pay for every unit of gas. 261 type: integer 262 263 Hash: 264 type: object 265 properties: 266 hash: 267 $ref: "#/components/schemas/SwarmAddress" 268 269 HexString: 270 type: string 271 pattern: "^([A-Fa-f0-9]+)$" 272 example: "cf880b8eeac5093fa27b0825906c600685" 273 274 Hex8Bytes: 275 description: Hexadecimal string representation of 8 bytes 276 type: string 277 pattern: "^([0-9a-fA-F]{16})$" 278 example: "1a2b3c4d5e6f7a8b" 279 280 Signature: 281 description: Hexadecimal string representation of cryptographic signature 282 type: string 283 pattern: "^([0-9a-fA-F]{130})$" 284 example: "1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e" 285 286 MultiAddress: 287 type: string 288 289 NewTagRequest: 290 type: object 291 properties: 292 address: 293 $ref: "#/components/schemas/SwarmAddress" 294 295 NewTagResponse: 296 type: object 297 properties: 298 uid: 299 $ref: "#/components/schemas/Uid" 300 startedAt: 301 $ref: "#/components/schemas/DateTime" 302 split: 303 type: integer 304 description: Number of chunks created by the splitter. 305 seen: 306 type: integer 307 description: Number of chunks that are already uploaded with same reference and same postage batch. These don't need to be synced again. 308 stored: 309 type: integer 310 description: Number of chunks that were stored locally as they lie in the uploader node's neighborhood. This is only applicable for full nodes. 311 sent: 312 type: integer 313 description: Number of chunks sent on the network to peers as a part of the upload. Chunks could be sent multiple times because of failures or replication. 314 synced: 315 type: integer 316 description: Number of chunks that were pushed with a valid receipt. The receipt will also show if they were stored at the correct depth. 317 318 TagsList: 319 type: object 320 properties: 321 tags: 322 type: array 323 nullable: true 324 items: 325 $ref: "#/components/schemas/NewTagResponse" 326 327 P2PUnderlay: 328 type: string 329 example: "/ip4/127.0.0.1/tcp/1634/p2p/16Uiu2HAmTm17toLDaPYzRyjKn27iCB76yjKnJ5DjQXneFmifFvaX" 330 331 PeerMetricsView: 332 type: object 333 properties: 334 lastSeenTimestamp: 335 type: integer 336 nullable: false 337 sessionConnectionRetry: 338 type: integer 339 nullable: false 340 connectionTotalDuration: 341 type: number 342 nullable: false 343 sessionConnectionDuration: 344 type: number 345 nullable: false 346 sessionConnectionDirection: 347 type: string 348 nullable: false 349 latencyEWMA: 350 type: integer 351 nullable: false 352 reachability: 353 type: string 354 healthy: 355 type: boolean 356 357 Peers: 358 type: object 359 properties: 360 peers: 361 type: array 362 nullable: false 363 items: 364 $ref: "#/components/schemas/Address" 365 366 BlockListedPeers: 367 type: array 368 items: 369 type: object 370 properties: 371 address: 372 $ref: "#/components/schemas/Address" 373 fullNode: 374 type: boolean 375 reason: 376 type: string 377 duration: 378 type: integer 379 380 PssRecipient: 381 type: string 382 383 PssTargets: 384 pattern: "^[0-9a-fA-F]{1,6}(,[0-9a-fA-F]{1,6})*$" 385 description: List of hex string targets that are comma separated and can have maximum length of 6 386 type: string 387 388 PssTopic: 389 type: string 390 391 ProblemDetails: 392 type: object 393 properties: 394 code: 395 type: integer 396 message: 397 type: string 398 reasons: 399 type: array 400 nullable: true 401 description: List of reasons for the error message. 402 items: 403 type: string 404 405 ReferenceResponse: 406 type: object 407 properties: 408 reference: 409 $ref: "#/components/schemas/SwarmReference" 410 411 PostEnvelopeResponse: 412 type: object 413 properties: 414 issuer: 415 $ref: "#/components/schemas/EthereumAddress" 416 index: 417 $ref: "#/components/schemas/Hex8Bytes" 418 timestamp: 419 $ref: "#/components/schemas/Hex8Bytes" 420 signature: 421 $ref: "#/components/schemas/Signature" 422 423 DebugPostageBatchesResponse: 424 type: object 425 properties: 426 stamps: 427 type: array 428 nullable: false 429 items: 430 $ref: "#/components/schemas/DebugPostageBatch" 431 432 DebugPostageAllBatchesResponse: 433 type: object 434 properties: 435 batches: 436 type: array 437 nullable: false 438 items: 439 $ref: "#/components/schemas/PostageBatchShort" 440 441 BatchIDResponse: 442 type: object 443 properties: 444 batchID: 445 $ref: "#/components/schemas/BatchID" 446 txHash: 447 $ref: "#/components/schemas/TransactionHash" 448 449 Response: 450 type: object 451 properties: 452 message: 453 type: string 454 code: 455 type: integer 456 457 RttMs: 458 type: object 459 properties: 460 rtt: 461 $ref: "#/components/schemas/Duration" 462 463 Node: 464 type: object 465 properties: 466 beeMode: 467 type: string 468 enum: [light, full, dev, ultra-light, unknown] 469 description: > 470 Gives back in what mode the Bee client has been started. The modes are mutually exclusive 471 * `light` - light node; does not participate in forwarding or storing chunks 472 * `full` - full node 473 * `dev` - development mode; Bee client for development purposes, blockchain operations are mocked 474 * `ultra-light` - ultra-light node; a light node with chain disabled 475 * `unknown` - unknown mode 476 chequebookEnabled: 477 type: boolean 478 swapEnabled: 479 type: boolean 480 481 HealthStatus: 482 type: object 483 properties: 484 status: 485 type: string 486 enum: [ok, nok, unknown] 487 description: > 488 Indicates health state of node 489 * `ok` - node is healthy 490 * `nok` - node is not healthy 491 * `unknown` - health status is unknown 492 version: 493 type: string 494 apiVersion: 495 type: string 496 default: "0.0.0" 497 description: The default value is set in case the bee binary was not build correctly. 498 499 PostageBatch: 500 type: object 501 properties: 502 batchID: 503 $ref: "#/components/schemas/BatchID" 504 utilization: 505 type: integer 506 usable: 507 description: Indicate that the batch was discovered by the Bee node, but it awaits enough on-chain confirmations before declaring the batch as usable. 508 type: boolean 509 label: 510 type: string 511 depth: 512 type: integer 513 amount: 514 $ref: "#/components/schemas/BigInt" 515 bucketDepth: 516 type: integer 517 blockNumber: 518 type: integer 519 immutableFlag: 520 type: boolean 521 exists: 522 type: boolean 523 batchTTL: 524 type: integer 525 526 PostageBatchNoIssuer: 527 type: object 528 properties: 529 batchID: 530 $ref: "#/components/schemas/BatchID" 531 exists: 532 type: boolean 533 batchTTL: 534 type: integer 535 536 PostageBatchShort: 537 type: object 538 properties: 539 batchID: 540 $ref: "#/components/schemas/BatchID" 541 value: 542 $ref: "#/components/schemas/BigInt" 543 start: 544 type: integer 545 depth: 546 type: integer 547 bucketDepth: 548 type: integer 549 immutableFlag: 550 type: boolean 551 batchTTL: 552 type: integer 553 owner: 554 $ref: "#/components/schemas/EthereumAddress" 555 storageRadius: 556 type: integer 557 558 DebugPostageBatch: 559 anyOf: 560 - $ref: "#/components/schemas/PostageBatch" 561 - $ref: "#/components/schemas/PostageBatchNoIssuer" 562 563 StampBucketData: 564 type: object 565 properties: 566 bucketID: 567 type: integer 568 collisions: 569 type: integer 570 571 PostageStampBuckets: 572 type: object 573 properties: 574 depth: 575 type: integer 576 bucketDepth: 577 type: integer 578 bucketUpperBound: 579 type: integer 580 buckets: 581 type: array 582 nullable: false 583 items: 584 $ref: "#/components/schemas/StampBucketData" 585 586 Settlement: 587 type: object 588 properties: 589 peer: 590 $ref: "#/components/schemas/SwarmAddress" 591 received: 592 type: integer 593 sent: 594 type: integer 595 596 Settlements: 597 type: object 598 properties: 599 totalReceived: 600 type: integer 601 totalSent: 602 type: integer 603 settlements: 604 type: array 605 nullable: false 606 items: 607 $ref: "#/components/schemas/Settlement" 608 609 SwarmAddress: 610 type: string 611 pattern: "^[A-Fa-f0-9]{64}$" 612 example: "36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f" 613 614 PublicKey: 615 type: string 616 pattern: "^[A-Fa-f0-9]{66}$" 617 example: "02ab7473879005929d10ce7d4f626412dad9fe56b0a6622038931d26bd79abf0a4" 618 619 SwarmEncryptedReference: 620 type: string 621 pattern: "^[A-Fa-f0-9]{128}$" 622 example: "36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f2d2810619d29b5dbefd5d74abce25d58b81b251baddb9c3871cf0d6967deaae2" 623 624 DomainName: 625 type: string 626 pattern: '^[A-Za-z0-9]+\.[A-Za-z0-9]+$' 627 example: "swarm.eth" 628 629 BatchID: 630 type: string 631 pattern: "^[A-Fa-f0-9]{64}$" 632 example: "36b7efd913ca4cf880b8eeac5093fa27b0825906c600685b6abdd6566e6cfe8f" 633 634 GetStakeResponse: 635 type: object 636 properties: 637 stakedAmount: 638 $ref: "#/components/schemas/BigInt" 639 640 GetWithdrawableResponse: 641 type: object 642 properties: 643 withdrawableAmount: 644 $ref: "#/components/schemas/BigInt" 645 646 StakeTransactionResponse: 647 type: object 648 properties: 649 txHash: 650 $ref: "#/components/schemas/TransactionHash" 651 652 SwarmOnlyReference: 653 oneOf: 654 - $ref: "#/components/schemas/SwarmAddress" 655 - $ref: "#/components/schemas/SwarmEncryptedReference" 656 657 PinCheckResponse: 658 type: object 659 properties: 660 reference: 661 $ref: "#/components/schemas/SwarmOnlyReference" 662 total: 663 type: integer 664 missing: 665 type: integer 666 invalid: 667 type: integer 668 669 SwarmOnlyReferencesList: 670 type: object 671 properties: 672 reference: 673 type: array 674 nullable: false 675 items: 676 $ref: "#/components/schemas/SwarmOnlyReference" 677 678 SwarmReference: 679 oneOf: 680 - $ref: "#/components/schemas/SwarmAddress" 681 - $ref: "#/components/schemas/SwarmEncryptedReference" 682 - $ref: "#/components/schemas/DomainName" 683 684 SwapCashoutResult: 685 type: object 686 properties: 687 recipient: 688 $ref: "#/components/schemas/EthereumAddress" 689 lastPayout: 690 $ref: "#/components/schemas/BigInt" 691 bounced: 692 type: boolean 693 694 SwapCashoutStatus: 695 type: object 696 properties: 697 peer: 698 $ref: "#/components/schemas/SwarmAddress" 699 lastCashedCheque: 700 $ref: "#/components/schemas/Cheque" 701 transactionHash: 702 $ref: "#/components/schemas/TransactionHash" 703 result: 704 $ref: "#/components/schemas/SwapCashoutResult" 705 uncashedAmount: 706 $ref: "#/components/schemas/BigInt" 707 708 TagName: 709 type: string 710 711 TransactionHash: 712 type: string 713 pattern: "^0x[A-Fa-f0-9]{64}$" 714 example: "0x780cb6a37d1946978087896e1e489c37e30fe3e329510fff8d97360f73529f5a" 715 716 TransactionResponse: 717 type: object 718 properties: 719 transactionHash: 720 $ref: "#/components/schemas/TransactionHash" 721 722 TransactionInfo: 723 type: object 724 properties: 725 transactionHash: 726 $ref: "#/components/schemas/TransactionHash" 727 to: 728 $ref: "#/components/schemas/EthereumAddress" 729 nonce: 730 type: integer 731 gasPrice: 732 $ref: "#/components/schemas/BigInt" 733 gasLimit: 734 type: integer 735 gasTipCap: 736 $ref: "#/components/schemas/BigInt" 737 gasTipBoost: 738 type: integer 739 gasFeeCap: 740 $ref: "#/components/schemas/BigInt" 741 data: 742 type: string 743 created: 744 $ref: "#/components/schemas/DateTime" 745 description: 746 type: string 747 value: 748 $ref: "#/components/schemas/BigInt" 749 750 WalletResponse: 751 type: object 752 properties: 753 bzzBalance: 754 $ref: "#/components/schemas/BigInt" 755 nativeTokenBalance: 756 $ref: "#/components/schemas/BigInt" 757 chainID: 758 type: integer 759 chequebookContractAddress: 760 $ref: "#/components/schemas/EthereumAddress" 761 walletAddress: 762 $ref: "#/components/schemas/EthereumAddress" 763 764 RedistributionStatusResponse: 765 type: object 766 properties: 767 minimumGasFunds: 768 $ref: "#/components/schemas/BigInt" 769 hasSufficientFunds: 770 type: boolean 771 isFrozen: 772 type: boolean 773 isFullySynced: 774 type: boolean 775 isHealthy: 776 type: boolean 777 phase: 778 type: string 779 round: 780 type: integer 781 lastWonRound: 782 type: integer 783 lastPlayedRound: 784 type: integer 785 lastFrozenRound: 786 type: integer 787 lastSelectedRound: 788 type: integer 789 lastSampleDurationSeconds: 790 type: number 791 block: 792 type: integer 793 reward: 794 $ref: "#/components/schemas/BigInt" 795 fees: 796 $ref: "#/components/schemas/BigInt" 797 798 PendingTransactionsResponse: 799 type: object 800 properties: 801 pendingTransactions: 802 type: array 803 nullable: false 804 items: 805 $ref: "#/components/schemas/TransactionInfo" 806 807 Uid: 808 type: integer 809 810 WelcomeMessage: 811 type: object 812 properties: 813 welcomeMessage: 814 type: string 815 816 FeedType: 817 type: string 818 pattern: "^(sequence|epoch)$" 819 820 IsRetrievableResponse: 821 type: object 822 properties: 823 isRetrievable: 824 type: boolean 825 826 SecurityTokenRequest: 827 type: object 828 properties: 829 role: 830 type: string 831 nullable: false 832 expiry: 833 type: integer 834 nullable: false 835 description: Expiration time in seconds 836 837 SecurityTokenResponse: 838 type: object 839 properties: 840 key: 841 type: string 842 nullable: false 843 844 LoggerExp: 845 type: string 846 description: Base 64 encoded regular expression or subsystem string. 847 pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" 848 example: "b25lL25hbWU=" 849 850 LoggerTreeData: 851 type: object 852 nullable: true 853 properties: 854 /: 855 $ref: "#/components/schemas/LoggerTreeNode" 856 +: 857 type: array 858 items: 859 type: string 860 description: The combination of the logger verbosity and its subsystem separated by |. 861 example: "warning|one/name[0][]>>824634860360" 862 863 LoggerTreeNode: 864 type: object 865 additionalProperties: 866 $ref: "#/components/schemas/LoggerTreeData" 867 868 Logger: 869 type: object 870 properties: 871 logger: 872 type: string 873 verbosity: 874 type: string 875 subsystem: 876 type: string 877 id: 878 type: string 879 880 LoggerResponse: 881 type: object 882 properties: 883 tree: 884 $ref: "#/components/schemas/LoggerTreeNode" 885 loggers: 886 type: array 887 items: 888 $ref: "#/components/schemas/Logger" 889 890 StatusSnapshotResponse: 891 type: object 892 properties: 893 overlay: 894 $ref: "#/components/schemas/SwarmAddress" 895 beeMode: 896 type: string 897 enum: 898 - "light" 899 - "full" 900 - "dev" 901 - "ultra-light" 902 - "unknown" 903 proximity: 904 type: integer 905 reserveSize: 906 type: integer 907 reserveSizeWithinRadius: 908 type: integer 909 pullsyncRate: 910 type: number 911 storageRadius: 912 type: integer 913 connectedPeers: 914 type: integer 915 neighborhoodSize: 916 type: integer 917 requestFailed: 918 nullable: true 919 type: boolean 920 BatchCommitment: 921 type: integer 922 isReachable: 923 type: boolean 924 lastSyncedBlock: 925 type: integer 926 927 StatusResponse: 928 type: object 929 properties: 930 stamps: 931 type: array 932 nullable: false 933 items: 934 $ref: "#/components/schemas/StatusSnapshotResponse" 935 936 ApiChunkInclusionProof: 937 type: object 938 properties: 939 chunkSpan: 940 minimum: 0 941 type: integer 942 postageProof: 943 $ref: "#/components/schemas/ApiPostageProof" 944 proofSegments: 945 items: 946 type: string 947 nullable: true 948 type: array 949 proofSegments2: 950 items: 951 type: string 952 nullable: true 953 type: array 954 proofSegments3: 955 items: 956 type: string 957 nullable: true 958 type: array 959 proveSegment: 960 type: string 961 proveSegment2: 962 type: string 963 socProof: 964 items: 965 $ref: "#/components/schemas/ApiSOCProof" 966 nullable: true 967 type: array 968 969 ApiChunkInclusionProofs: 970 type: object 971 properties: 972 proof1: 973 $ref: "#/components/schemas/ApiChunkInclusionProof" 974 proof2: 975 $ref: "#/components/schemas/ApiChunkInclusionProof" 976 proofLast: 977 $ref: "#/components/schemas/ApiChunkInclusionProof" 978 979 ApiPostageProof: 980 type: object 981 properties: 982 index: 983 type: string 984 postageId: 985 type: string 986 signature: 987 type: string 988 timeStamp: 989 type: string 990 991 ApiRCHashResponse: 992 type: object 993 properties: 994 duration: 995 type: integer 996 hash: 997 $ref: "#/components/schemas/SwarmAddress" 998 proofs: 999 $ref: "#/components/schemas/ApiChunkInclusionProofs" 1000 1001 ApiSOCProof: 1002 type: object 1003 properties: 1004 chunkAddr: 1005 type: string 1006 identifier: 1007 type: string 1008 signature: 1009 type: string 1010 signer: 1011 type: string 1012 1013 WalletTxResponse: 1014 type: object 1015 properties: 1016 transactionHash: 1017 $ref: "#/components/schemas/TransactionHash" 1018 headers: 1019 SwarmTag: 1020 description: "Tag UID" 1021 schema: 1022 $ref: "SwarmCommon.yaml#/components/schemas/Uid" 1023 1024 SwarmFeedIndex: 1025 description: "The index of the found update" 1026 schema: 1027 $ref: "#/components/schemas/HexString" 1028 1029 SwarmFeedIndexNext: 1030 description: "The index of the next possible update" 1031 schema: 1032 $ref: "#/components/schemas/HexString" 1033 1034 SwarmActHistoryAddress: 1035 description: "Swarm address reference to the new ACT history entry" 1036 schema: 1037 $ref: "#/components/schemas/SwarmAddress" 1038 required: false 1039 1040 ETag: 1041 description: | 1042 The RFC7232 ETag header field in a response provides the current entity- 1043 tag for the selected resource. An entity-tag is an opaque identifier for 1044 different versions of a resource over time, regardless whether multiple 1045 versions are valid at the same time. An entity-tag consists of an opaque 1046 quoted string, possibly prefixed by a weakness indicator. 1047 schema: 1048 type: string 1049 1050 parameters: 1051 GasPriceParameter: 1052 in: header 1053 name: gas-price 1054 schema: 1055 $ref: "SwarmCommon.yaml#/components/schemas/GasPrice" 1056 required: false 1057 description: "Gas price for transaction" 1058 1059 GasLimitParameter: 1060 in: header 1061 name: gas-limit 1062 schema: 1063 $ref: "SwarmCommon.yaml#/components/schemas/GasLimit" 1064 required: false 1065 description: "Gas limit for transaction" 1066 1067 SwarmTagParameter: 1068 in: header 1069 name: swarm-tag 1070 schema: 1071 $ref: "SwarmCommon.yaml#/components/schemas/Uid" 1072 required: false 1073 description: Associate upload with an existing Tag UID 1074 1075 SwarmPinParameter: 1076 in: header 1077 name: swarm-pin 1078 schema: 1079 type: boolean 1080 required: false 1081 description: > 1082 Represents if the uploaded data should be also locally pinned on the node. 1083 1084 SwarmEncryptParameter: 1085 in: header 1086 name: swarm-encrypt 1087 schema: 1088 type: boolean 1089 required: false 1090 description: > 1091 Represents the encrypting state of the file 1092 1093 SwarmRedundancyLevelParameter: 1094 in: header 1095 name: swarm-redundancy-level 1096 schema: 1097 type: integer 1098 enum: [0, 1, 2, 3, 4] 1099 required: false 1100 description: > 1101 Add redundancy to the data being uploaded so that downloaders can download it with better UX. 1102 0 value is default and does not add any redundancy to the file. 1103 1104 SwarmRedundancyStrategyParameter: 1105 in: header 1106 name: swarm-redundancy-strategy 1107 schema: 1108 type: integer 1109 enum: [0, 1, 2, 3] 1110 required: false 1111 description: > 1112 Specify the retrieve strategy on redundant data. 1113 The numbers stand for NONE, DATA, PROX and RACE, respectively. 1114 Strategy NONE means no prefetching takes place. 1115 Strategy DATA means only data chunks are prefetched. 1116 Strategy PROX means only chunks that are close to the node are prefetched. 1117 Strategy RACE means all chunks are prefetched: n data chunks and k parity chunks. The first n chunks to arrive are used to reconstruct the file. 1118 Multiple strategies can be used in a fallback cascade if the swarm redundancy fallback mode is set to true. 1119 The default strategy is NONE, DATA, falling back to PROX, falling back to RACE 1120 1121 SwarmRedundancyFallbackModeParameter: 1122 in: header 1123 name: swarm-redundancy-fallback-mode 1124 schema: 1125 type: boolean 1126 required: false 1127 description: > 1128 Specify if the retrieve strategies (chunk prefetching on redundant data) are used in a fallback cascade. The default is true. 1129 1130 SwarmChunkRetrievalTimeoutParameter: 1131 in: header 1132 name: swarm-chunk-retrieval-timeout 1133 schema: 1134 $ref: "#/components/schemas/Duration" 1135 required: false 1136 description: > 1137 Specify the timeout for chunk retrieval. The default is 30 seconds. 1138 1139 ContentTypePreserved: 1140 in: header 1141 name: Content-Type 1142 schema: 1143 type: string 1144 description: The specified content-type is preserved for download of the asset 1145 1146 SwarmIndexDocumentParameter: 1147 in: header 1148 name: swarm-index-document 1149 schema: 1150 type: string 1151 example: index.html 1152 required: false 1153 description: Default file to be referenced on path, if exists under that path 1154 1155 SwarmErrorDocumentParameter: 1156 in: header 1157 name: swarm-error-document 1158 schema: 1159 type: string 1160 example: error.html 1161 required: false 1162 description: Configure custom error document to be returned when a specified path can not be found in collection 1163 1164 SwarmCollection: 1165 in: header 1166 name: swarm-collection 1167 schema: 1168 type: boolean 1169 required: false 1170 description: Upload file/files as a collection 1171 1172 SwarmPostageBatchId: 1173 in: header 1174 name: swarm-postage-batch-id 1175 description: "ID of Postage Batch that is used to upload data with" 1176 required: true 1177 schema: 1178 $ref: "#/components/schemas/SwarmAddress" 1179 1180 SwarmPostageStamp: 1181 in: header 1182 name: swarm-postage-stamp 1183 description: | 1184 Postage stamp for the corresponding chunk in the request. \ 1185 It is required if Swarm-Postage-Batch-Id header is missing \ 1186 It consists of: \ 1187 - batch ID - 0:32 bytes \ 1188 - postage index (bucket and bucket index) - 32:40 bytes \ 1189 - timestamp - 40:48 bytes \ 1190 - signature - 48:113 bytes 1191 schema: 1192 $ref: "#/components/schemas/HexString" 1193 1194 SwarmDeferredUpload: 1195 in: header 1196 name: swarm-deferred-upload 1197 schema: 1198 type: boolean 1199 default: "false" 1200 required: false 1201 description: > 1202 Determines if the uploaded data should be sent to the network immediately or in a deferred fashion. By default the upload will be direct. 1203 1204 SwarmCache: 1205 in: header 1206 name: swarm-cache 1207 schema: 1208 type: boolean 1209 default: "true" 1210 required: false 1211 description: "Determines if the download data should be cached on the node. By default the download will be cached" 1212 1213 SwarmAct: 1214 in: header 1215 name: swarm-act 1216 schema: 1217 type: boolean 1218 default: "false" 1219 required: false 1220 description: "Determines if the uploaded data should be treated as ACT content" 1221 1222 SwarmActPublisher: 1223 in: header 1224 name: swarm-act-publisher 1225 schema: 1226 $ref: "#/components/schemas/PublicKey" 1227 required: false 1228 description: "ACT content publisher's public key" 1229 1230 SwarmActHistoryAddress: 1231 in: header 1232 name: swarm-act-history-address 1233 schema: 1234 $ref: "#/components/schemas/SwarmAddress" 1235 required: false 1236 description: "ACT history reference address" 1237 1238 SwarmActTimestamp: 1239 in: header 1240 name: swarm-act-timestamp 1241 schema: 1242 type: integer 1243 format: int64 1244 required: false 1245 description: "ACT history Unix timestamp" 1246 1247 responses: 1248 "200": 1249 description: OK. 1250 "204": 1251 description: The resource was deleted successfully. 1252 "400": 1253 description: Bad request 1254 content: 1255 application/problem+json: 1256 schema: 1257 $ref: "#/components/schemas/ProblemDetails" 1258 "401": 1259 description: Unauthorized 1260 content: 1261 application/problem+json: 1262 schema: 1263 $ref: "#/components/schemas/ProblemDetails" 1264 "402": 1265 description: Payment Required 1266 content: 1267 application/problem+json: 1268 schema: 1269 $ref: "#/components/schemas/ProblemDetails" 1270 "404": 1271 description: Not Found 1272 content: 1273 application/problem+json: 1274 schema: 1275 $ref: "#/components/schemas/ProblemDetails" 1276 "429": 1277 description: Too many requests 1278 content: 1279 application/problem+json: 1280 schema: 1281 $ref: "#/components/schemas/ProblemDetails" 1282 "500": 1283 description: Internal Server Error 1284 content: 1285 application/problem+json: 1286 schema: 1287 $ref: "#/components/schemas/ProblemDetails"