Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent
with a free APIs.io key —
sign in with
GitHub,
Google or
LinkedIn.
No form to fill in; signing in shares your email address with us (Privacy).
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.
openapi: 3.2.0
info:
title: Etherna Chunk API
version: 7.3.0
description: 'Operations tagged Chunk across 2 of this provider''s published API definitions: etherna-swarm-openapi.yml, etherna-openapi.yaml. Each path carries the servers of the definition it was published in.'
servers:
- url: http://{apiRoot}:{port}/v1
variables:
apiRoot:
default: localhost
description: Base address of the local bee node main API
port:
default: '1633'
description: Service port provided in bee node config
- url: http://{apiRoot}:{port}
variables:
apiRoot:
default: localhost
description: Base address of the local bee node main API
port:
default: '1633'
description: Service port provided in bee node config
tags:
- name: Chunk
paths:
/chunks:
post:
summary: Upload chunk
tags:
- Chunk
parameters:
- $ref: SwarmCommon.yaml#/components/parameters/SwarmTagParameter
- in: header
name: swarm-postage-batch-id
schema:
$ref: SwarmCommon.yaml#/components/parameters/SwarmPostageBatchId
required: false
- $ref: SwarmCommon.yaml#/components/parameters/SwarmPostageStamp
- $ref: SwarmCommon.yaml#/components/parameters/SwarmAct
- $ref: SwarmCommon.yaml#/components/parameters/SwarmActHistoryAddress
requestBody:
description: Chunk binary data that has to have at least 8 bytes.
content:
application/octet-stream:
schema:
type: string
format: binary
responses:
'201':
description: OK
headers:
swarm-tag:
description: Tag UID if it was passed to the request `swarm-tag` header.
schema:
$ref: SwarmCommon.yaml#/components/schemas/Uid
swarm-act-history-address:
$ref: SwarmCommon.yaml#/components/headers/SwarmActHistoryAddress
content:
application/json:
schema:
$ref: SwarmCommon.yaml#/components/schemas/ReferenceResponse
'400':
$ref: SwarmCommon.yaml#/components/responses/400
'402':
$ref: SwarmCommon.yaml#/components/responses/402
'500':
$ref: SwarmCommon.yaml#/components/responses/500
default:
description: Default response
operationId: postChunks
x-operation-id-source: derived
servers:
- url: http://{apiRoot}:{port}/v1
variables:
apiRoot:
default: localhost
description: Base address of the local bee node main API
port:
default: '1633'
description: Service port provided in bee node config
- url: http://{apiRoot}:{port}
variables:
apiRoot:
default: localhost
description: Base address of the local bee node main API
port:
default: '1633'
description: Service port provided in bee node config
/chunks/stream:
get:
summary: Upload stream of chunks
description: Returns a WebSocket connection on which stream of chunks can be uploaded. Each chunk sent is acknowledged using a binary response `0` which serves as confirmation of upload of single chunk. Chunks should be packaged as binary messages for uploading. If a tag is specified, the chunks will be streamed into local storage and then be uploaded to the network once the stream is closed. If a tag is not specified, the chunks will bypass local storage and be directly uploaded to the network through the stream as they arrive.
tags:
- Chunk
parameters:
- $ref: SwarmCommon.yaml#/components/parameters/SwarmTagParameter
- $ref: SwarmCommon.yaml#/components/parameters/SwarmPostageBatchId
responses:
'200':
description: Connection established
'400':
$ref: SwarmCommon.yaml#/components/responses/400
default:
description: Default response
operationId: getChunksStream
x-operation-id-source: derived
servers:
- url: http://{apiRoot}:{port}/v1
variables:
apiRoot:
default: localhost
description: Base address of the local bee node main API
port:
default: '1633'
description: Service port provided in bee node config
- url: http://{apiRoot}:{port}
variables:
apiRoot:
default: localhost
description: Base address of the local bee node main API
port:
default: '1633'
description: Service port provided in bee node config
/chunks/{reference}:
get:
summary: Get chunk
tags:
- Chunk
parameters:
- in: path
name: reference
schema:
$ref: SwarmCommon.yaml#/components/schemas/SwarmReference
required: true
description: Swarm address of chunk
- in: header
schema:
$ref: SwarmCommon.yaml#/components/parameters/SwarmCache
name: swarm-cache
required: false
- $ref: SwarmCommon.yaml#/components/parameters/SwarmActTimestamp
- $ref: SwarmCommon.yaml#/components/parameters/SwarmActPublisher
- $ref: SwarmCommon.yaml#/components/parameters/SwarmActHistoryAddress
responses:
'200':
description: Retrieved chunk content
content:
application/octet-stream:
schema:
type: string
format: binary
'400':
$ref: SwarmCommon.yaml#/components/responses/400
'404':
$ref: SwarmCommon.yaml#/components/responses/404
'500':
$ref: SwarmCommon.yaml#/components/responses/500
default:
description: Default response
operationId: getChunksByReference
x-operation-id-source: derived
head:
summary: Check if chunk at address exists locally
tags:
- Chunk
parameters:
- in: path
name: reference
schema:
$ref: SwarmCommon.yaml#/components/schemas/SwarmReference
required: true
description: Swarm address of chunk
- $ref: SwarmCommon.yaml#/components/parameters/SwarmActTimestamp
- $ref: SwarmCommon.yaml#/components/parameters/SwarmActPublisher
- $ref: SwarmCommon.yaml#/components/parameters/SwarmActHistoryAddress
responses:
'200':
description: Chunk exists
'400':
$ref: SwarmCommon.yaml#/components/responses/400
'404':
$ref: SwarmCommon.yaml#/components/responses/404
default:
description: Default response
operationId: headChunksByReference
x-operation-id-source: derived
servers:
- url: http://{apiRoot}:{port}/v1
variables:
apiRoot:
default: localhost
description: Base address of the local bee node main API
port:
default: '1633'
description: Service port provided in bee node config
- url: http://{apiRoot}:{port}
variables:
apiRoot:
default: localhost
description: Base address of the local bee node main API
port:
default: '1633'
description: Service port provided in bee node config
externalDocs:
description: Browse the documentation @ the Swarm Docs
url: https://docs.ethswarm.org
x-refined-from:
- etherna-swarm-openapi.yml
- etherna-openapi.yaml