githubEdit

片段

Get metadata for a piece

get

Get metadata for a piece for how it may be reassembled from the data source

Path parameters
idstringRequired

Piece CID

Responses
chevron-right
200

OK

application/json
objectOptional
get
/piece/{id}/metadata

List all prepared pieces for a preparation

get
Path parameters
idstringRequired

Preparation ID or name

Responses
chevron-right
200

OK

application/json
attachmentIdintegerOptional
storageIdintegerOptional
get
/preparation/{id}/piece

Add a piece to a preparation

post
Path parameters
idstringRequired

Preparation ID or name

Body
fileSizeintegerOptional

File size of the CAR file, this is required for boost online deal

pieceCidstringRequired

CID of the piece

pieceSizestringOptional

Size of the piece (required for external import, optional if piece exists in DB)

rootCidstringOptional

Root CID of the CAR file, used to populate the label field of storage deal

Responses
chevron-right
200

OK

application/json
attachmentIdintegerOptional
createdAtstringOptional
fileSizeintegerOptional
idintegerOptional
jobIdintegerOptional
minPieceSizePaddingintegerOptional

MinPieceSizePadding tracks virtual padding for inline mode only. Inline: stores padding amount, PieceReader serves zeros virtually. Non-inline: always 0, literal zeros are written to CAR file for Curio TreeD compatibility.

numOfFilesintegerOptional
pieceCidstringOptional
pieceSizeintegerOptional
pieceTypestringOptional

PieceType indicates whether this is a data piece or DAG piece

preparationIdintegerOptional

Association - SET NULL for fast prep deletion, async cleanup

rootCidstringOptional
storageIdintegerOptional
storagePathstringOptional

StoragePath is the path to the CAR file inside the storage. If the StorageID is nil but StoragePath is not empty, it means the CAR file is stored at the local absolute path.

post
/preparation/{id}/piece

Last updated

Was this helpful?