Push notifications
Introduction
The Astrocast API enables you to receive Push notifications from the Astrocast Network.
Requirements
You can configure Push notifications at the Device Group level. Therefore, your devices must be assigned to a Device Group if you want to receive their messages through Push notifications.
Configuration
- Go to the Astrocast Portal.
- Click on
Settings
in the sidebar. - Click on
Callbacks
to access the device group details. - Click on
Configure Callback
on the top right. - Enter the
Callback URL
and theKey
andValue
of the header(s) of your callback. - Click on
Save
.
Message delivery notification
Definition
Receive a Push notification message every time an Uplink Message is received by the Astrocast network.
JSON Body
{
"messageGuid": "00000000-0000-0000-0000-000000000000",
"deviceGuid": "00000000-0000-0000-0000-000000000000",
"deviceGroupGuid": "00000000-0000-0000-0000-000000000000",
"createdDate": "2022-01-01T00:00:00Z",
"receivedDate": "2022-01-02T00:00:00Z",
"latitude": null,
"longitude": null,
"data": "",
"messageSize": 0
}
Command acknowledgement notification
Definition
Receive a Push notification message every time a Downlink Command is successfully received by a device.
JSON Body
{
"commandGuid": "00000000-0000-0000-0000-000000000000",
"commandReference": "My Custom Reference",
"deviceGuid": "00000000-0000-0000-0000-000000000000",
"createdDate": "2022-01-01T00:00:00Z",
"expirationDate": "2023-03-01T00:00:00Z",
"receivedDate": "2022-01-01T00:00:00Z",
"ackReceivedDate": "2022-01-01T00:00:00Z",
"cancelledDate": null,
"commandData": "EACurq6uEBA=",
"commandSize": 8,
"commandStatus": 4
}
Retry mechanism
An HTTP 200 OK
success status response code is expected when the Callback URL is requested. In this case, the message callbackDelivered parameter will be set to true
in the Astrocast API.
In any other case, such as a different HTTP response code or timeout, the following retry cubic sequence will be attempted, until a 200 OK
is received or the end of the sequence is reached.
# retry attempt | Delay (min) | Delay (hh:mm) |
---|---|---|
1 | 5 | 00:05 |
2 | 25 | 00:25 |
3 | 70 | 01:10 |
4 | 150 | 02:30 |
5 | 275 | 04:35 |
6 | 455 | 07:35 |
7 | 700 | 11:40 |
8 | 1020 | 17:00 |
9 | 1425 | 23:45 |