文件

Get details about a file

get
Path parameters
idintegerRequired

File ID

Responses
200

OK

application/json
get
/file/{id}
GET /api/file/{id} HTTP/1.1
Host: localhost:9090
Accept: */*
{
  "attachmentId": 1,
  "cid": "text",
  "directoryId": 1,
  "fileRanges": [
    {
      "cid": "text",
      "fileId": 1,
      "id": 1,
      "jobId": 1,
      "length": 1,
      "offset": 1
    }
  ],
  "hash": "text",
  "id": 1,
  "lastModifiedNano": 1,
  "path": "text",
  "size": 1
}

Get all deals that have been made for a file

get
Path parameters
idintegerRequired

File ID

Responses
200

OK

application/json
get
/file/{id}/deals
GET /api/file/{id}/deals HTTP/1.1
Host: localhost:9090
Accept: */*
[
  {
    "deals": [
      {
        "clientId": "text",
        "createdAt": "text",
        "dealId": 1,
        "endEpoch": 1,
        "errorMessage": "text",
        "id": 1,
        "label": "text",
        "lastVerifiedAt": "text",
        "pieceCid": "text",
        "pieceSize": 1,
        "price": "text",
        "proposalId": "text",
        "provider": "text",
        "scheduleId": 1,
        "sectorStartEpoch": 1,
        "startEpoch": 1,
        "state": "proposed",
        "updatedAt": "text",
        "verified": true
      }
    ],
    "fileRange": {
      "cid": "text",
      "fileId": 1,
      "id": 1,
      "jobId": 1,
      "length": 1,
      "offset": 1
    }
  }
]

prepare job for a given item

post
Path parameters
idintegerRequired

File ID

Responses
200

OK

application/json
Responseinteger
post
/file/{id}/prepare_to_pack
POST /api/file/{id}/prepare_to_pack HTTP/1.1
Host: localhost:9090
Accept: */*
1

Push a file to be queued

post

Tells Singularity that something is ready to be grabbed for data preparation

Path parameters
idstringRequired

Preparation ID or name

namestringRequired

Source storage ID or name

Body
pathstringOptional

Path to the new file, relative to the source

Responses
200

OK

application/json
post
/preparation/{id}/source/{name}/file
POST /api/preparation/{id}/source/{name}/file HTTP/1.1
Host: localhost:9090
Content-Type: application/json
Accept: */*
Content-Length: 15

{
  "path": "text"
}
{
  "attachmentId": 1,
  "cid": "text",
  "directoryId": 1,
  "fileRanges": [
    {
      "cid": "text",
      "fileId": 1,
      "id": 1,
      "jobId": 1,
      "length": 1,
      "offset": 1
    }
  ],
  "hash": "text",
  "id": 1,
  "lastModifiedNano": 1,
  "path": "text",
  "size": 1
}

Last updated

Was this helpful?