조각

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
200
OK
application/json
Responseobject
get
GET /api/piece/{id}/metadata HTTP/1.1
Host: localhost:9090
Accept: */*
{}

List all prepared pieces for a preparation

get
Path parameters
idstringRequired

Preparation ID or name

Responses
200
OK
application/json
get
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",
          "dealConfig": {
            "autoCreateDeals": true,
            "dealAnnounceToIpni": true,
            "dealDuration": 1,
            "dealHttpHeaders": {},
            "dealKeepUnsealed": true,
            "dealPricePerDeal": 1,
            "dealPricePerGb": 1,
            "dealPricePerGbEpoch": 1,
            "dealProvider": "text",
            "dealStartDelay": 1,
            "dealTemplate": "text",
            "dealUrlTemplate": "text",
            "dealVerified": true
          },
          "dealTemplateId": 1,
          "deleteAfterExport": true,
          "id": 1,
          "maxSize": 1,
          "minPieceSize": 1,
          "name": "text",
          "noDag": true,
          "noInline": true,
          "outputStorages": [
            "[Circular Reference]"
          ],
          "pieceSize": 1,
          "sourceStorages": [
            "[Circular Reference]"
          ],
          "spValidation": true,
          "updatedAt": "text",
          "walletValidation": true
        }
      ],
      "preparationsAsSource": [
        {
          "createdAt": "text",
          "dealConfig": {
            "autoCreateDeals": true,
            "dealAnnounceToIpni": true,
            "dealDuration": 1,
            "dealHttpHeaders": {},
            "dealKeepUnsealed": true,
            "dealPricePerDeal": 1,
            "dealPricePerGb": 1,
            "dealPricePerGbEpoch": 1,
            "dealProvider": "text",
            "dealStartDelay": 1,
            "dealTemplate": "text",
            "dealUrlTemplate": "text",
            "dealVerified": true
          },
          "dealTemplateId": 1,
          "deleteAfterExport": true,
          "id": 1,
          "maxSize": 1,
          "minPieceSize": 1,
          "name": "text",
          "noDag": true,
          "noInline": true,
          "outputStorages": [
            "[Circular Reference]"
          ],
          "pieceSize": 1,
          "sourceStorages": [
            "[Circular Reference]"
          ],
          "spValidation": true,
          "updatedAt": "text",
          "walletValidation": true
        }
      ],
      "type": "text",
      "updatedAt": "text"
    },
    "storageId": 1
  }
]

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

pieceSizestringRequired

Size of the piece

rootCidstringOptional

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

Responses
200
OK
application/json
post
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"
}

Last updated

Was this helpful?