Execute API Tasks
Last updated
Was this helpful?
Last updated
Was this helpful?
Execute an API Task and retrieve the result.
You can configure the endpoint for either a synchronous or asynchronous response. In sync mode, if the result is ready within 60 seconds, it will be returned immediately. If not, you'll receive an executionId, which you can use to check the result later by calling the status endpoint.
When executing an API Task, your task input
will need to specify the API endpoint path, HTTP method type, and API input parameters. These parameters must match the schema defined in the API Task manifest.
You have two options for using this endpoint: call it with the taskId
or use a friendly name
along with the namespace and task name.
https://run.truebit.network/task/api/execute-by-name
To get authorized using an API Key, include the registered API Key in the call's header. This allows the dispatcher service to validate access and identify who will cover the cost of the task execution (the address associated with the API Key).
Example
Execute a API task using the provided task ID. Supports both synchronous and asynchronous execution.
API key for authentication.
The namespace of the task.
The name of the task to be executed.
Label of the task.
Version number of the task.
If true, the endpoint will retrieve the executionId; otherwise, it will try to return the execution result only if it completes within 60 seconds.
Input data required for task execution.
Timeout for task execution in seconds.
Successful execution of the API task.
Asynchronous response of task execution.