This guide explains how to use the POSTv2 endpoint from Postman for sending uplink data for testing. It combines the provided Postman screenshot and details from the POSTv2 documentation.
Overview
- Endpoint: https://data.alphax.cloud/post/v2
- Method: POST
- Content Type: application/json
- Authentication: Requires a valid token from AlphaX Cloud.
For the full API documentation, refer to: AlphaX Cloud API Docs
Request Body Explanation
The POST body must be in JSON format and includes the following fields:
Field | Type | Description |
token | String | Required. Obtain from the AlphaX Cloud portal. |
networkId | String | Required. The device network ID. |
timestamp | Integer | Required. 13-digit Unix timestamp in milliseconds. |
data | Array | Required. Sensor data containing channel objects. |
Sample JSON Body
{
"token": "XXXXXXXXXXXXXXXXXXXXXXXX",
"networkId": "MIN-SW-TEST-001",
"timestamp": "1704021406991",
"data": [
{"channelId": 1, "value": 19.2},
{"channelId": 2, "value": 19.2},
{"channelId": 3, "value": 19.2}
]
}
Instructions to Use in Postman
- Open Postman and create a new request.
- Set the request method to POST.
- Paste the endpoint URL: https://data.alphax.cloud/post/v2
- Navigate to the Body tab.
- Select raw and choose JSON from the dropdown.
- Paste the sample JSON body above.
- Modify the fields:
- Replace token with your AlphaX Cloud token.
- Set the networkId to your device network ID.
- Use a valid timestamp (13-digit Unix time).
- Adjust the data values to meet your alert condition.
- Click Send to post the data and trigger the alert.
Triggering Alerts
- Alerts are triggered when the value field in the data array meets the alert conditions.
- For example, if the alert condition is value > 25.0, you need to send a value above 25.0:
- "data": [ {"channelId": 1, "value": 26.5}]
Setup Example in Postman
This video shows the setup in Postman, including the endpoint, headers, and body
configuration used to trigger an alert.