github.com/jincm/wesharechain@v0.0.0-20210122032815-1537409ce26a/chain/swarm/storage/mock/explorer/swagger.yaml (about) 1 swagger: '2.0' 2 info: 3 title: Swarm Global Store API 4 version: 0.1.0 5 tags: 6 - name: Has Key 7 description: Checks if a Key is stored on a Node 8 - name: Keys 9 description: Lists Keys 10 - name: Nodes 11 description: Lists Node addresses 12 13 paths: 14 '/api/has-key/{node}/{key}': 15 get: 16 tags: 17 - Has Key 18 summary: Checks if a Key is stored on a Node 19 operationId: hasKey 20 produces: 21 - application/json 22 23 parameters: 24 - name: node 25 in: path 26 required: true 27 type: string 28 format: hex-endoded 29 description: Node address. 30 31 - name: key 32 in: path 33 required: true 34 type: string 35 format: hex-endoded 36 description: Key. 37 38 responses: 39 '200': 40 description: Key is stored on Node 41 schema: 42 $ref: '#/definitions/Status' 43 '404': 44 description: Key is not stored on Node 45 schema: 46 $ref: '#/definitions/Status' 47 '500': 48 description: Internal Server Error 49 schema: 50 $ref: '#/definitions/Status' 51 52 '/api/keys': 53 get: 54 tags: 55 - Keys 56 summary: Lists Keys 57 operationId: keys 58 produces: 59 - application/json 60 61 parameters: 62 - name: start 63 in: query 64 required: false 65 type: string 66 format: hex-encoded Key 67 description: A Key as the starting point for the returned list. It is usually a value from the returned "next" field in the Keys repsonse. 68 69 - name: limit 70 in: query 71 required: false 72 type: integer 73 default: 100 74 minimum: 1 75 maximum: 1000 76 description: Limits the number of Keys returned in on response. 77 78 - name: node 79 in: query 80 required: false 81 type: string 82 format: hex-encoded Node address 83 description: If this parameter is provided, only Keys that are stored on this Node be returned in the response. If not, all known Keys will be returned. 84 85 responses: 86 '200': 87 description: List of Keys 88 schema: 89 $ref: '#/definitions/Keys' 90 '500': 91 description: Internal Server Error 92 schema: 93 $ref: '#/definitions/Status' 94 95 '/api/nodes': 96 get: 97 tags: 98 - Nodes 99 summary: Lists Node addresses 100 operationId: nodes 101 produces: 102 - application/json 103 104 parameters: 105 - name: start 106 in: query 107 required: false 108 type: string 109 format: hex-encoded Node address 110 description: A Node address as the starting point for the returned list. It is usually a value from the returned "next" field in the Nodes repsonse. 111 112 - name: limit 113 in: query 114 required: false 115 type: integer 116 default: 100 117 minimum: 1 118 maximum: 1000 119 description: Limits the number of Node addresses returned in on response. 120 121 - name: key 122 in: query 123 required: false 124 type: string 125 format: hex-encoded Key 126 description: If this parameter is provided, only addresses of Nodes that store this Key will be returned in the response. If not, all known Node addresses will be returned. 127 128 responses: 129 '200': 130 description: List of Node addresses 131 schema: 132 $ref: '#/definitions/Nodes' 133 '500': 134 description: Internal Server Error 135 schema: 136 $ref: '#/definitions/Status' 137 138 definitions: 139 140 Status: 141 type: object 142 properties: 143 message: 144 type: string 145 description: HTTP Status Code name. 146 code: 147 type: integer 148 description: HTTP Status Code. 149 150 Keys: 151 type: object 152 properties: 153 keys: 154 type: array 155 description: A list of Keys. 156 items: 157 type: string 158 format: hex-encoded Key 159 next: 160 type: string 161 format: hex-encoded Key 162 description: If present, the next Key in listing. Can be passed as "start" query parameter to continue the listing. If not present, the end of the listing is reached. 163 164 Nodes: 165 type: object 166 properties: 167 nodes: 168 type: array 169 description: A list of Node addresses. 170 items: 171 type: string 172 format: hex-encoded Node address 173 next: 174 type: string 175 format: hex-encoded Node address 176 description: If present, the next Node address in listing. Can be passed as "start" query parameter to continue the listing. If not present, the end of the listing is reached.