#Buyer IoT History
https://apiv2.telecomsxchange.com/buyers/iothistoryEndpoint: POST /buyers/iothistory
Description
The POST /buyers/iothistory endpoint from the TelecomsXchange API allows users to fetch the history of their Internet of Things (IoT) events. The user can filter the history based on a range of dates, allowing a better analysis of specific time periods.
Request
The API expects a POST request at the https://apiv2.telecomsxchange.com/buyers/iothistory URL.
Headers:
Content-Type: This should beapplication/x-www-form-urlencoded.
Parameters:
date_from(required): The beginning date and time of the period you want to analyze. This should be in the formatYYYY-MM-DD HH:MM:SS.date_to(required): The ending date and time of the period you want to analyze. This should be in the formatYYYY-MM-DD HH:MM:SS.
Response
The API will return a JSON object containing a list of all IoT events within the specified date range. Each object will contain detailed information about the event, such as the device used, the time, the type of event, etc.
Success Response Code: 200 OK
Note: Please refer to the API's error handling documentation for information on how the API behaves when an error occurs or if incorrect data is submitted.
Rate Limiting
Please refer to the documentation of the TelecomsXchange API for details on rate limiting.
Body parameters
application/x-www-form-urlencodeddate_fromdatetimerequiredFrom Date YYYY-MM-DD hh:mm:ss
Example
2021-01-01 00:00:00date_todatetimerequiredTo Date YYYY-MM-DD hh:mm:ss
Example
2023-06-15 00:00:00
curl --digest \
-u "$TCXC_USERNAME:$TCXC_API_KEY" \
-X POST \
"https://apiv2.telecomsxchange.com/buyers/iothistory" \
-d "date_from=2021-01-01 00:00:00" \
-d "date_to=2023-06-15 00:00:00"| Time | Topic | Payload | Direction | Charged |
|---|---|---|---|---|
| 2023-05-22 · 16:11:05 | weather | Amman 12°C and Mostly Cloudy | inbound | $0.0001 |
| 2023-05-21 · 21:32:19 | IOS | Off | inbound | $0.0001 |
| 2023-05-20 · 13:49:40 | IOS | Off | inbound | $0.0001 |