Task subscriptions
Task Subscription Management
Subscribe to Task
Submits a transaction to subscribe a node to a specific task.
Request Body
Request Fields
task_small_id
(integer): ID of the task to subscribe tonode_small_id
(integer, optional): ID of the node to subscribe (if omitted, uses all registered nodes)price_per_compute_unit
(integer): Price per compute unit the node will chargemax_num_compute_units
(integer): Maximum compute units the node will process per stackgas
(string): Object ID of the gas object to pay for the transactiongas_budget
(integer): Maximum gas units allowed for the transactiongas_price
(integer): Price per gas unit in MIST
Response Status Codes
200 OK
: Successfully submitted task subscription transaction500 Internal Server Error
: Failed to submit the transaction
Response
Update Task Subscription
Updates an already existing node subscription to a Task.
Request Body:
Request Fields
task_small_id (integer): ID of the task subscription to update
node_badge_id (string): Object ID of the node badge
price_per_compute_unit (integer): New price per compute unit the node will charge
max_num_compute_units (integer): New maximum compute units the node will process per stack
gas (string): Object ID of the gas object to pay for the transaction
gas_budget (integer): Maximum gas units allowed for the transaction
gas_price (integer): Price per gas unit in MIST
Response Status Codes
200 OK: Successfully submitted task subscription update transaction
500 Internal Server Error: Failed to submit the transaction
Unsubscribe from Task
Submits a transaction to unsubscribe a node from a specific task.
Request Body
Request Fields
task_small_id
(integer): ID of the task to unsubscribe fromnode_small_id
(integer, optional): ID of the node to unsubscribe (if omitted, uses all registered nodes)gas
(string): Object ID of the gas object to pay for the transactiongas_budget
(integer): Maximum gas units allowed for the transactiongas_price
(integer): Price per gas unit in MIST
Response Status Codes
200 OK
: Successfully submitted task unsubscription transaction500 Internal Server Error
: Failed to submit the transaction
Response
Notes
A node must be registered before subscribing to tasks
The
price_per_compute_unit
determines the node's compensation for processing requestsThe
max_num_compute_units
limits the size of stacks the node will acceptUnsubscribing from a task:
Prevents the node from receiving new stacks for that task
Does not affect existing stack commitments
Can be reversed by subscribing again
Both operations return a transaction digest for tracking the transaction status
Example Error Responses
Last updated