API Quickstart

Jump to Section

We created a process and ran it as a task from the UI in Quickstart in the MPO overview. In this section, we will run the task using an API call.

  1. Go to the login page of your MPO instance.
  2. Log in using the provided details.
  3. Select Workspace in the top menu and select the process that you would like to run as a task.
  4. Select the Start node of the process and then select Copy webhook via JSON in the bottom-right of the info box. This will give you the URL we will use to run the task.

Copy the webhook URL here

If you can not see this option make sure Direct url for tasks upload is selected.

  1. Open your command-line terminal and enter the following command replacing the parts between the curly braces with the URL you got from Step 4.
curl --location --request POST '{{replace-with-the-url-from-step-4}}' \
--header 'Content-Type: application/json' \
--data-raw '{}'
  1. You should receive a response body like this confirming that the task ran successfully.
{
     "request_proc": "ok",
          "ops": {
               "proc": "ok",
               "obj": "task",
               "ref": null,
               "obj_id": "5f3d452f82ba960c30188781"
          }
}
  1. To confirm in the UI that the task was run go to the View tab of your process. Select the Final node.

The task archive with results of all previous uploads

  1. The Archive tab in the info box on the right-hand side shows you the task history and you should see the returned JSON from the last API call.