Skip to main content

Trigger a task

This page documents the use of different Task endpoints. The endpoints authentication can be either by Project Token or Access Token.

Task Trigger#

POST

http://swarm.unmand.app/tasks/trigger?environment=:env

A task can be triggered at any time by invoking this endpoint.

Triggering a task involves placing the task on the queue to be served in a FIFO fashion.

A task will always need the initial data and therefore it is expected to be included in the body of the request message.

A task can be run in two modes: TEST or PROD. This is facilitated by the environment parameter where the consumer can specify the desired environment to run.

Headers#

Authentication (string) The project token.

Query Parameters#

env (string) Environment the task is expected to run: TEST or PROD. When it's empty, it defaults to TEST. For example ?environment=PROD

Body Parameters

REQUIRED (object) Task initial data JSON, for example:

{   "clean_dividend": "123"}