Show / Hide Table of Contents

Webhook Notifications

The starprinter.online service can issue event notifications to your servers or applications via webhooks. If you are able to consume webhooks then this is almost always preferential to making requests to the web API as it is both more responsive and more efficient

Webhook Http Format

Webhooks are an http POST, issued to an http/https URL that you specify and with a JSON formatted body. Webhook consumers should respond as quickly as possible with a 200 or other 2xx status code to indicate success. No response body is required and will be ignored if included.

JSON Body

All webhook notifications follow the same JSON body structure:

{
  "EventType": <string>,
  "SubType": <string>,
  "DeviceGroup": {
    "Path": <string>,
    "Name": <string>
  },
  "Device": {
    "Mac": <string>,
    "Name": <string>,
    "AppID": <string>
  },
  "EventData": {}
}

Where the structure of EventData will vary depending on the EventType and SubType fields. Currently, all event types are connected with a specific Device with in a Device Group. In the case of events that do not directly reference a device, it is possible that Device will be missing or null.

In this article
Back to top Generated by DocFX