Deal Schedule

List all schedules for a preparation

get

/preparation/{id}/schedules

Path parameters
idstringrequired

Preparation ID or name

Responses
curl -L \
  --url '//localhost:9090/api/preparation/{id}/schedules'
[
  {
    "announceToIpni": true,
    "createdAt": "text",
    "duration": 1,
    "errorMessage": "text",
    "force": true,
    "httpHeaders": {
      "ANY_ADDITIONAL_PROPERTY": "text"
    },
    "id": 1,
    "keepUnsealed": true,
    "maxPendingDealNumber": 1,
    "maxPendingDealSize": 1,
    "notes": "text",
    "preparationId": 1,
    "pricePerDeal": 1,
    "pricePerGb": 1,
    "pricePerGbEpoch": 1,
    "provider": "text",
    "scheduleCron": "text",
    "scheduleCronPerpetual": true,
    "scheduleDealNumber": 1,
    "scheduleDealSize": 1,
    "startDelay": 1,
    "state": "active",
    "totalDealNumber": 1,
    "totalDealSize": 1,
    "updatedAt": "text",
    "urlTemplate": "text",
    "verified": true,
    "allowedPieceCids": [
      "text"
    ]
  }
]

List all deal making schedules

get

/schedule

Responses
curl -L \
  --url '//localhost:9090/api/schedule'
[
  {
    "announceToIpni": true,
    "createdAt": "text",
    "duration": 1,
    "errorMessage": "text",
    "force": true,
    "httpHeaders": {
      "ANY_ADDITIONAL_PROPERTY": "text"
    },
    "id": 1,
    "keepUnsealed": true,
    "maxPendingDealNumber": 1,
    "maxPendingDealSize": 1,
    "notes": "text",
    "preparationId": 1,
    "pricePerDeal": 1,
    "pricePerGb": 1,
    "pricePerGbEpoch": 1,
    "provider": "text",
    "scheduleCron": "text",
    "scheduleCronPerpetual": true,
    "scheduleDealNumber": 1,
    "scheduleDealSize": 1,
    "startDelay": 1,
    "state": "active",
    "totalDealNumber": 1,
    "totalDealSize": 1,
    "updatedAt": "text",
    "urlTemplate": "text",
    "verified": true,
    "allowedPieceCids": [
      "text"
    ]
  }
]

Create a new schedule

Create a new schedule

post

/schedule

Body
durationstring · default: 12840h

Duration in epoch or in duration format, i.e. 1500000, 2400h

forceboolean

Force to send out deals regardless of replication restriction

ipniboolean · default: true

Whether the deal should be IPNI

keepUnsealedboolean · default: true

Whether the deal should be kept unsealed

maxPendingDealNumberinteger

Max pending deal number

maxPendingDealSizestring

Max pending deal size in human readable format, i.e. 100 TiB

notesstring

Notes

preparationstring

Preparation ID or name

pricePerDealnumber

Price in FIL per deal

pricePerGbnumber

Price in FIL per GiB

pricePerGbEpochnumber

Price in FIL per GiB per epoch

providerstring

Provider

scheduleCronstring

Schedule cron pattern

scheduleCronPerpetualboolean

Whether a cron schedule should run in definitely

scheduleDealNumberinteger

Number of deals per scheduled time

scheduleDealSizestring

Size of deals per schedule trigger in human readable format, i.e. 100 TiB

startDelaystring · default: 72h

Deal start delay in epoch or in duration format, i.e. 1000, 72h

totalDealNumberinteger

Total number of deals

totalDealSizestring

Total size of deals in human readable format, i.e. 100 TiB

urlTemplatestring

URL template with PIECE_CID placeholder for boost to fetch the CAR file, i.e. http://127.0.0.1/piece/{PIECE_CID}.car

verifiedboolean · default: true

Whether the deal should be verified

allowedPieceCidsstring[]

Allowed piece CIDs in this schedule

httpHeadersstring[]

http headers to be passed with the request (i.e. key=value)

Responses
curl -L \
  --request POST \
  --url '//localhost:9090/api/schedule' \
  --header 'Content-Type: application/json' \
  --data '{"duration":"12840h","ipni":true,"keepUnsealed":true,"pricePerDeal":0,"pricePerGb":0,"pricePerGbEpoch":0,"startDelay":"72h","verified":true,"allowedPieceCids":[null],"httpHeaders":[null]}'
{
  "announceToIpni": true,
  "createdAt": "text",
  "duration": 1,
  "errorMessage": "text",
  "force": true,
  "httpHeaders": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "id": 1,
  "keepUnsealed": true,
  "maxPendingDealNumber": 1,
  "maxPendingDealSize": 1,
  "notes": "text",
  "preparationId": 1,
  "pricePerDeal": 1,
  "pricePerGb": 1,
  "pricePerGbEpoch": 1,
  "provider": "text",
  "scheduleCron": "text",
  "scheduleCronPerpetual": true,
  "scheduleDealNumber": 1,
  "scheduleDealSize": 1,
  "startDelay": 1,
  "state": "active",
  "totalDealNumber": 1,
  "totalDealSize": 1,
  "updatedAt": "text",
  "urlTemplate": "text",
  "verified": true,
  "allowedPieceCids": [
    "text"
  ]
}

Delete a specific schedule

delete

/schedule/{id}

Path parameters
idintegerrequired

Schedule ID

Responses
curl -L \
  --request DELETE \
  --url '//localhost:9090/api/schedule/{id}'

No body

Update a schedule

Update a schedule

patch

/schedule/{id}

Path parameters
idintegerrequired

Schedule ID

Body
durationstring · default: 12840h

Duration in epoch or in duration format, i.e. 1500000, 2400h

forceboolean

Force to send out deals regardless of replication restriction

ipniboolean · default: true

Whether the deal should be IPNI

keepUnsealedboolean · default: true

Whether the deal should be kept unsealed

maxPendingDealNumberinteger

Max pending deal number

maxPendingDealSizestring

Max pending deal size in human readable format, i.e. 100 TiB

notesstring

Notes

pricePerDealnumber

Price in FIL per deal

pricePerGbnumber

Price in FIL per GiB

pricePerGbEpochnumber

Price in FIL per GiB per epoch

scheduleCronstring

Schedule cron pattern

scheduleCronPerpetualboolean

Whether a cron schedule should run in definitely

scheduleDealNumberinteger

Number of deals per scheduled time

scheduleDealSizestring

Size of deals per schedule trigger in human readable format, i.e. 100 TiB

startDelaystring · default: 72h

Deal start delay in epoch or in duration format, i.e. 1000, 72h

totalDealNumberinteger

Total number of deals

totalDealSizestring

Total size of deals in human readable format, i.e. 100 TiB

urlTemplatestring

URL template with PIECE_CID placeholder for boost to fetch the CAR file, i.e. http://127.0.0.1/piece/{PIECE_CID}.car

verifiedboolean · default: true

Whether the deal should be verified

allowedPieceCidsstring[]

Allowed piece CIDs in this schedule

httpHeadersstring[]

http headers to be passed with the request (i.e. key=value)

Responses
curl -L \
  --request PATCH \
  --url '//localhost:9090/api/schedule/{id}' \
  --header 'Content-Type: application/json' \
  --data '{"duration":"12840h","ipni":true,"keepUnsealed":true,"pricePerDeal":0,"pricePerGb":0,"pricePerGbEpoch":0,"startDelay":"72h","verified":true,"allowedPieceCids":[null],"httpHeaders":[null]}'
{
  "announceToIpni": true,
  "createdAt": "text",
  "duration": 1,
  "errorMessage": "text",
  "force": true,
  "httpHeaders": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "id": 1,
  "keepUnsealed": true,
  "maxPendingDealNumber": 1,
  "maxPendingDealSize": 1,
  "notes": "text",
  "preparationId": 1,
  "pricePerDeal": 1,
  "pricePerGb": 1,
  "pricePerGbEpoch": 1,
  "provider": "text",
  "scheduleCron": "text",
  "scheduleCronPerpetual": true,
  "scheduleDealNumber": 1,
  "scheduleDealSize": 1,
  "startDelay": 1,
  "state": "active",
  "totalDealNumber": 1,
  "totalDealSize": 1,
  "updatedAt": "text",
  "urlTemplate": "text",
  "verified": true,
  "allowedPieceCids": [
    "text"
  ]
}

Pause a specific schedule

post

/schedule/{id}/pause

Path parameters
idintegerrequired

Schedule ID

Responses
curl -L \
  --request POST \
  --url '//localhost:9090/api/schedule/{id}/pause'
{
  "announceToIpni": true,
  "createdAt": "text",
  "duration": 1,
  "errorMessage": "text",
  "force": true,
  "httpHeaders": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "id": 1,
  "keepUnsealed": true,
  "maxPendingDealNumber": 1,
  "maxPendingDealSize": 1,
  "notes": "text",
  "preparationId": 1,
  "pricePerDeal": 1,
  "pricePerGb": 1,
  "pricePerGbEpoch": 1,
  "provider": "text",
  "scheduleCron": "text",
  "scheduleCronPerpetual": true,
  "scheduleDealNumber": 1,
  "scheduleDealSize": 1,
  "startDelay": 1,
  "state": "active",
  "totalDealNumber": 1,
  "totalDealSize": 1,
  "updatedAt": "text",
  "urlTemplate": "text",
  "verified": true,
  "allowedPieceCids": [
    "text"
  ]
}

Resume a specific schedule

post

/schedule/{id}/resume

Path parameters
idintegerrequired

Schedule ID

Responses
curl -L \
  --request POST \
  --url '//localhost:9090/api/schedule/{id}/resume'
{
  "announceToIpni": true,
  "createdAt": "text",
  "duration": 1,
  "errorMessage": "text",
  "force": true,
  "httpHeaders": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "id": 1,
  "keepUnsealed": true,
  "maxPendingDealNumber": 1,
  "maxPendingDealSize": 1,
  "notes": "text",
  "preparationId": 1,
  "pricePerDeal": 1,
  "pricePerGb": 1,
  "pricePerGbEpoch": 1,
  "provider": "text",
  "scheduleCron": "text",
  "scheduleCronPerpetual": true,
  "scheduleDealNumber": 1,
  "scheduleDealSize": 1,
  "startDelay": 1,
  "state": "active",
  "totalDealNumber": 1,
  "totalDealSize": 1,
  "updatedAt": "text",
  "urlTemplate": "text",
  "verified": true,
  "allowedPieceCids": [
    "text"
  ]
}

Last updated

Was this helpful?