Portal Community
DAG vs. Block: dag operations understand IPLD codecs (dag-json, dag-cbor) and can walk/resolve paths through linked data. block operations (next page) are one layer lower — raw bytes addressed by CID, with no codec awareness.

get

FieldTypeRequiredDefault
cidPathtext✓ Yes
outputCodectextNodag-json

Missing path → CFG_MISSING_CID_PATH. Response: { cid, data }data is the dag-json text body, passed through verbatim (no binary handling needed).

put

Binary input.

FieldTypeRequiredDefault
inputDataKeytextNodata
dataModeselectNobase64 (or text)
inlineContenttextNo
codectextNodag-json — store codec (also dag-cbor, raw)
inputCodectextNodag-json
pinboolNofalse
hashtextNosha2-256

Content resolved from InputData[inputDataKey], else inlineContent; empty → MISSING_CONTENT, bad base64 → INVALID_CONTENT_ENCODING. Response: { cid }.

resolve

FieldTypeRequired
ipldPathtext✓ Yes

Missing path → CFG_MISSING_IPLD_PATH. Response: { cid, remainderPath } — the terminal CID plus any unconsumed path segment.

import

Binary input (CAR archive).

FieldTypeRequiredDefault
inputDataKeytextNodata
dataModeselectNobase64
inlineContenttextNo
pinRootsboolNotrue
localOnlyboolNofalse
statsboolNofalse

List-shaped output: count = number of imported roots; when stats=true also blockCount and blockBytesCount. Each item: { cid, pinned, pinErrorMessage }pinned: false means the block imported but its pin failed.

export

Binary output (CAR archive).

FieldTypeRequiredDefault
cidtext✓ Yes
localOnlyboolNofalse — export only locally-present blocks; fail rather than fetch remotely

Missing cid → CFG_MISSING_CID. Response: { cid, data, size, fileName, mimeType }data is the raw CAR-archive byte[]. The read stream's trailer is checked for a trailing error before the bytes are trusted complete.

stat

FieldTypeRequired
cidtext✓ Yes

Missing cid → CFG_MISSING_CID. Response: { cid, size, blockCount } — a single final aggregate, not incremental progress events.