Skip to content

The documented JSON output for /api/v0/dag/import is incorrect #1980

@smoyer64

Description

@smoyer64

The current documentation describes /api/v0/dag/import as returning a JSON body with the following structure:

{
  "Root": {
    "Cid": {
      "/": "<cid-string>"
    },
    "PinErrorMsg": "<string>"
  },
  "Stats": {
    "BlockBytesCount": "<uint64>",
    "BlockCount": "<uint64>"
  }
}

What is actually returned is a JSONL body with the following structure:

{"Root":{"Cid":{"/":"<cid-string>"},"PinErrorMsg":"string"}}
{"Stats":{"BlockCount":<uint64>,"BlockBytesCount":<uint64>}}

Note that the Stats "record" is only returned if the stats=true argument is provided.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium: Good to have, but can wait until someone steps uphelp wantedSeeking public contribution on this issuetopic/docsDocumentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions