/api/v0/dag/import
Import the contents of .car files
Arguments
pin-roots[bool]: Pin optional roots listed in the .car headers after importing. Default:true. Required: no.silent[bool]: No output. Required: no.stats[bool]: Output stats. Required: no.allow-big-block[bool]: Disable block size check and allow creation of blocks bigger than 1MiB. WARNING: such blocks won't be transferable over the standard bitswap. Default:false. Required: no.
Request Body
Argument path is of file type. This endpoint expects one or several files (depending on the command) in the body of the request as 'multipart/form-data'.
Response
On success, the call to this endpoint will return with 200 and the following body:
{
"Root": {
"Cid": {
"/": "<cid-string>"
},
"PinErrorMsg": "<string>"
},
"Stats": {
"BlockBytesCount": "<uint64>",
"BlockCount": "<uint64>"
}
}
cURL Example
curl -X POST -F file=@myfile "http://127.0.0.1:5001/api/v0/dag/import?pin-roots=true&silent=<value>&stats=<value>&allow-big-block=false"
Last updated