View events (API)

How to view the UP42 events that trigger webhooks.


Introduction

In the first part of this guide, you will learn how to view the events that can be used to trigger webhooks. In the second part of this guide, you will learn more about the significance of each event by reading the detailed explanations. After selecting the appropriate event, you can start building your own webhook.

Authenticate

Before getting started, please make sure you authenticated. For more information: Authenticate.

How to view events

Before creating the webhooks, the user needs to view the available events provided by UP42 that can be used to trigger the webhook.

curl -s -L -X GET -H "Authorization: Bearer $PTOKEN" \
https://api.up42.com/webhooks/events | jq '.data[].name'

The response body contains an array of objects associated with the available events:

{
   "data": [{"name": "job.status",
             "title": "Job Status Updates",
             "category": "job",
             "description": "Sent when job/task status is updated",
             "documentation": "https://docs.up42.com/developers/"
            },
            {
             "name": "order.status",
             "title": "Order Status Updates",
             "category": "order",
             "description": "Sent when order status is updated",
             "documentation": "https://docs.up42.com/developers/"
            }],
   "error": null
}

Event types

The two events are explained in the table below.

Event nameDescription
Job task statusThe webhook is triggered when the job is launched. Once started, each job task automatically gets assigned to a status, depending on the progress. For more information about the task status types: Run job.
Order statusAfter an order gets placed, the webhook is triggered when the order was successfully completed or failed.

To proceed with creating a webhook, please go to one of the following guides:

  1. Create webhooks (API)
  2. Create webhooks (console)