Data

Download a file from the network to the local node if it's not available locally. Note: Download is performed async. Call can return before download is completed.

post/data/{cid}/network

Path parameters

cidstring required

Content Identifier as specified at https://github.com/multiformats/cid

Example:QmYyQSo1c1Ym7orWxLYvCrM2EmxFTANf8wXmmE7DWjhx5N

File to be downloaded.

Query parameters

advertiseboolean

When false, the dataset is neither announced to the DHT nor served to peers. Defaults to true.

Response

Manifest information for download that has been started.

cidstring required

Content Identifier as specified at https://github.com/multiformats/cid

Example response

{
  "cid": "QmYyQSo1c1Ym7orWxLYvCrM2EmxFTANf8wXmmE7DWjhx5N",
  "manifest": {
    "treeCid": "QmYyQSo1c1Ym7orWxLYvCrM2EmxFTANf8wXmmE7DWjhx5N",
    "filename": "storage.png",
    "mimetype": "image/png"
  }
}

Changes

Changed in 8 of the 53 revisions of this API.5313

    • ○

      added the new optional query request parameter advertise

      new-optional-request-parameter

    • ▲

      removed the required property / from the response with the status

      response-required-property-removed

    This revision also has 17 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • ○

      the response property became required for the status

      response-property-became-required

    • ○

      the response property became required for the status

      response-property-became-required

    • ○

      the response property / became required for the status

      response-property-became-required

    • ○

      the response property / became required for the status

      response-property-became-required

    • ○

      the response property / became required for the status

      response-property-became-required

    • ○

      the response property / became required for the status

      response-property-became-required

    This revision also has 2 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • ●

      removed the optional property / from the response with the status

      response-optional-property-removed

  • a7a2448e76f2322See the full diff
    • ▲

      the response property / became nullable for the status

      response-property-became-nullable

    • ▲

      the response property / became nullable for the status

      response-property-became-nullable

    • ▲

      the response property / became nullable for the status

      response-property-became-nullable

    • ●

      removed the optional property / from the response with the status

      response-optional-property-removed

    • ●

      removed the optional property / from the response with the status

      response-optional-property-removed

    • ○

      added the optional property / to the response with the status

      response-optional-property-added

    • ○

      added the optional property / to the response with the status

      response-optional-property-added

    • ○

      added the optional property / to the response with the status

      response-optional-property-added

    • ○

      added the optional property / to the response with the status

      response-optional-property-added

    • ○

      added the optional property / to the response with the status

      response-optional-property-added

    • ○

      endpoint added

      endpoint-added

    • ▲

      api path removed without deprecation

      api-path-removed-without-deprecation

    This revision also has 11 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog