Serial Number Webhook API


PLTcloud webhooks can be used to invoke cloud-based actions from a PLT test plan, for example for serial number allocation or provisioning of a DUT.

Webhook Request payload

The configured webhook endpoint will be sent an HTTP POST request containing a JSON payload like below:

JSON payload for HTTP POST request
{
    "dut_id": "<DUT IDENTIFIER>",
    "extra": {
       "ble_mac": "<BLE MAC>",
       "mcu_id": "<MCU ID>",
       "MYCUSTOMKEY": "my custom value"
    }
}

For security reasons, you probably want to limit requests to those coming from PLTcloud. This can be accomplished by setting an authentication token, and validating the X-Hub-Signature-256 header sent in the webhook request. More details can be found in Webhook Signature Validation guide.

Webhook Response

The API endpoint should return something like:

JSON payload for HTTP POST response
{
    "serial_number": "<SERIAL NUMBER>",
    "extra": {
       "MYCUSTOMKEY": "my custom value"
    }
}