ipfs / ipfs/ipfs-docs

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

Open
#1,980 2 comments 0 reactions 0 assignees View on GitHub
help wanted P2 topic/docs
Dominant language
Go
Stars
332
Forks
499
Avg merge
8d 14h
Merged PRs (30d)
2

Description

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

```json
{
"Root": {
"Cid": {
"/": ""
},
"PinErrorMsg": ""
},
"Stats": {
"BlockBytesCount": "",
"BlockCount": ""
}
}
```

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

```jsonl
{"Root":{"Cid":{"/":""},"PinErrorMsg":"string"}}
{"Stats":{"BlockCount":,"BlockBytesCount":}}
```

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.