片段
Last updated
Was this helpful?
Last updated
Was this helpful?
Get metadata for a piece for how it may be reassembled from the data source
Piece CID
GET /api/piece/{id}/metadata HTTP/1.1
Host: localhost:9090
Accept: */*
{}
Preparation ID or name
GET /api/preparation/{id}/piece HTTP/1.1
Host: localhost:9090
Accept: */*
[
{
"attachmentId": 1,
"pieces": [
{
"attachmentId": 1,
"createdAt": "text",
"fileSize": 1,
"id": 1,
"jobId": 1,
"numOfFiles": 1,
"pieceCid": "text",
"pieceSize": 1,
"pieceType": "text",
"preparationId": 1,
"rootCid": "text",
"storageId": 1,
"storagePath": "text"
}
],
"source": {
"clientConfig": {
"caCert": [
"text"
],
"clientCert": "text",
"clientKey": "text",
"connectTimeout": 1,
"disableHttp2": true,
"disableHttpKeepAlives": true,
"expectContinueTimeout": 1,
"headers": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"insecureSkipVerify": true,
"lowlevelRetries": 1,
"noGzip": true,
"retryBackoff": 1,
"retryBackoffExponential": 1,
"retryDelay": 1,
"retryMaxCount": 1,
"scanConcurrency": 1,
"skipInaccessibleFile": true,
"timeout": 1,
"useServerModTime": true,
"userAgent": "text"
},
"config": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"createdAt": "text",
"id": 1,
"name": "text",
"path": "text",
"preparationsAsOutput": [
{
"createdAt": "text",
"deleteAfterExport": true,
"id": 1,
"maxSize": 1,
"minPieceSize": 1,
"name": "text",
"noDag": true,
"noInline": true,
"outputStorages": [
"[Circular Reference]"
],
"pieceSize": 1,
"sourceStorages": [
"[Circular Reference]"
],
"updatedAt": "text"
}
],
"preparationsAsSource": [
{
"createdAt": "text",
"deleteAfterExport": true,
"id": 1,
"maxSize": 1,
"minPieceSize": 1,
"name": "text",
"noDag": true,
"noInline": true,
"outputStorages": [
"[Circular Reference]"
],
"pieceSize": 1,
"sourceStorages": [
"[Circular Reference]"
],
"updatedAt": "text"
}
],
"type": "text",
"updatedAt": "text"
},
"storageId": 1
}
]
Preparation ID or name
File size of the CAR file, this is required for boost online deal
CID of the piece
Size of the piece
Root CID of the CAR file, used to populate the label field of storage deal
POST /api/preparation/{id}/piece HTTP/1.1
Host: localhost:9090
Content-Type: application/json
Accept: */*
Content-Length: 68
{
"fileSize": 1,
"pieceCid": "text",
"pieceSize": "text",
"rootCid": "text"
}
{
"attachmentId": 1,
"createdAt": "text",
"fileSize": 1,
"id": 1,
"jobId": 1,
"numOfFiles": 1,
"pieceCid": "text",
"pieceSize": 1,
"pieceType": "text",
"preparationId": 1,
"rootCid": "text",
"storageId": 1,
"storagePath": "text"
}