交易计划

List all schedules for a preparation

GET//localhost:9090/api/preparation/{id}/schedules
Path parameters
id*string

Preparation ID or name

Response

OK

Body
allowedPieceCidsarray of string
announceToIpniboolean
createdAtstring
durationinteger
errorMessagestring
forceboolean
httpHeadersmodel.ConfigMap (object)
idinteger
keepUnsealedboolean
maxPendingDealNumberinteger
maxPendingDealSizeinteger
notesstring
preparationIdinteger

Associations

pricePerDealnumber
pricePerGbnumber
pricePerGbEpochnumber
providerstring
scheduleCronstring
scheduleCronPerpetualboolean
scheduleDealNumberinteger
scheduleDealSizeinteger
startDelayinteger
statemodel.ScheduleState (enum)
activepausederrorcompleted
totalDealNumberinteger
totalDealSizeinteger
updatedAtstring
urlTemplatestring
verifiedboolean
Request
const response = await fetch('//localhost:9090/api/preparation/{id}/schedules', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
[
  {
    "allowedPieceCids": [
      "text"
    ],
    "announceToIpni": false,
    "createdAt": "text",
    "duration": 0,
    "errorMessage": "text",
    "force": false,
    "id": 0,
    "keepUnsealed": false,
    "maxPendingDealNumber": 0,
    "maxPendingDealSize": 0,
    "notes": "text",
    "preparationId": 0,
    "pricePerDeal": 0,
    "pricePerGb": 0,
    "pricePerGbEpoch": 0,
    "provider": "text",
    "scheduleCron": "text",
    "scheduleCronPerpetual": false,
    "scheduleDealNumber": 0,
    "scheduleDealSize": 0,
    "startDelay": 0,
    "state": "active",
    "totalDealNumber": 0,
    "totalDealSize": 0,
    "updatedAt": "text",
    "urlTemplate": "text",
    "verified": false
  }
]

Create a new schedule

Create a new schedule

POST//localhost:9090/api/schedule
Body

CreateRequest

allowedPieceCidsarray of string

Allowed piece CIDs in this schedule

durationstring

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

forceboolean

Force to send out deals regardless of replication restriction

httpHeadersarray of string

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

ipniboolean

Whether the deal should be IPNI

keepUnsealedboolean

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

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

Whether the deal should be verified

Response

OK

Body
allowedPieceCidsarray of string
announceToIpniboolean
createdAtstring
durationinteger
errorMessagestring
forceboolean
httpHeadersmodel.ConfigMap (object)
idinteger
keepUnsealedboolean
maxPendingDealNumberinteger
maxPendingDealSizeinteger
notesstring
preparationIdinteger

Associations

pricePerDealnumber
pricePerGbnumber
pricePerGbEpochnumber
providerstring
scheduleCronstring
scheduleCronPerpetualboolean
scheduleDealNumberinteger
scheduleDealSizeinteger
startDelayinteger
statemodel.ScheduleState (enum)
activepausederrorcompleted
totalDealNumberinteger
totalDealSizeinteger
updatedAtstring
urlTemplatestring
verifiedboolean
Request
const response = await fetch('//localhost:9090/api/schedule', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "allowedPieceCids": [
    "text"
  ],
  "announceToIpni": false,
  "createdAt": "text",
  "duration": 0,
  "errorMessage": "text",
  "force": false,
  "id": 0,
  "keepUnsealed": false,
  "maxPendingDealNumber": 0,
  "maxPendingDealSize": 0,
  "notes": "text",
  "preparationId": 0,
  "pricePerDeal": 0,
  "pricePerGb": 0,
  "pricePerGbEpoch": 0,
  "provider": "text",
  "scheduleCron": "text",
  "scheduleCronPerpetual": false,
  "scheduleDealNumber": 0,
  "scheduleDealSize": 0,
  "startDelay": 0,
  "state": "active",
  "totalDealNumber": 0,
  "totalDealSize": 0,
  "updatedAt": "text",
  "urlTemplate": "text",
  "verified": false
}

Pause a specific schedule

POST//localhost:9090/api/schedule/{id}/pause
Path parameters
id*integer

Schedule ID

Response

OK

Body
allowedPieceCidsarray of string
announceToIpniboolean
createdAtstring
durationinteger
errorMessagestring
forceboolean
httpHeadersmodel.ConfigMap (object)
idinteger
keepUnsealedboolean
maxPendingDealNumberinteger
maxPendingDealSizeinteger
notesstring
preparationIdinteger

Associations

pricePerDealnumber
pricePerGbnumber
pricePerGbEpochnumber
providerstring
scheduleCronstring
scheduleCronPerpetualboolean
scheduleDealNumberinteger
scheduleDealSizeinteger
startDelayinteger
statemodel.ScheduleState (enum)
activepausederrorcompleted
totalDealNumberinteger
totalDealSizeinteger
updatedAtstring
urlTemplatestring
verifiedboolean
Request
const response = await fetch('//localhost:9090/api/schedule/{id}/pause', {
    method: 'POST',
    headers: {},
});
const data = await response.json();
Response
{
  "allowedPieceCids": [
    "text"
  ],
  "announceToIpni": false,
  "createdAt": "text",
  "duration": 0,
  "errorMessage": "text",
  "force": false,
  "id": 0,
  "keepUnsealed": false,
  "maxPendingDealNumber": 0,
  "maxPendingDealSize": 0,
  "notes": "text",
  "preparationId": 0,
  "pricePerDeal": 0,
  "pricePerGb": 0,
  "pricePerGbEpoch": 0,
  "provider": "text",
  "scheduleCron": "text",
  "scheduleCronPerpetual": false,
  "scheduleDealNumber": 0,
  "scheduleDealSize": 0,
  "startDelay": 0,
  "state": "active",
  "totalDealNumber": 0,
  "totalDealSize": 0,
  "updatedAt": "text",
  "urlTemplate": "text",
  "verified": false
}

Resume a specific schedule

POST//localhost:9090/api/schedule/{id}/resume
Path parameters
id*integer

Schedule ID

Response

OK

Body
allowedPieceCidsarray of string
announceToIpniboolean
createdAtstring
durationinteger
errorMessagestring
forceboolean
httpHeadersmodel.ConfigMap (object)
idinteger
keepUnsealedboolean
maxPendingDealNumberinteger
maxPendingDealSizeinteger
notesstring
preparationIdinteger

Associations

pricePerDealnumber
pricePerGbnumber
pricePerGbEpochnumber
providerstring
scheduleCronstring
scheduleCronPerpetualboolean
scheduleDealNumberinteger
scheduleDealSizeinteger
startDelayinteger
statemodel.ScheduleState (enum)
activepausederrorcompleted
totalDealNumberinteger
totalDealSizeinteger
updatedAtstring
urlTemplatestring
verifiedboolean
Request
const response = await fetch('//localhost:9090/api/schedule/{id}/resume', {
    method: 'POST',
    headers: {},
});
const data = await response.json();
Response
{
  "allowedPieceCids": [
    "text"
  ],
  "announceToIpni": false,
  "createdAt": "text",
  "duration": 0,
  "errorMessage": "text",
  "force": false,
  "id": 0,
  "keepUnsealed": false,
  "maxPendingDealNumber": 0,
  "maxPendingDealSize": 0,
  "notes": "text",
  "preparationId": 0,
  "pricePerDeal": 0,
  "pricePerGb": 0,
  "pricePerGbEpoch": 0,
  "provider": "text",
  "scheduleCron": "text",
  "scheduleCronPerpetual": false,
  "scheduleDealNumber": 0,
  "scheduleDealSize": 0,
  "startDelay": 0,
  "state": "active",
  "totalDealNumber": 0,
  "totalDealSize": 0,
  "updatedAt": "text",
  "urlTemplate": "text",
  "verified": false
}

Last updated