Get your first time series data from your machine using the iX4.0 API.
The iX4.0 API provides several HTTP-GET endpoints for retrieving data of a specific machine. The iX4.0 API can be used on a server (e.g. Tomcat, PHP), browser (e.g. using the Fetch API), or in local applications (e.g. Excel, Postman). On this page, we will show you how to retrieve a time series of historic machine data using one of the endpoints. More details about the endpoints are described in the API reference section.
Every iX4.0 go customer is eligible to get an iX4.0 API key to retrieve time series data for their iX4.0 go machines. If your iX4.0 go period has already ended, iX4.0 API packages are available on request. For testing purposes, you can get an API key that allows you to fetch mock data. Please request your API key by sending us an email to ix40@index-traub.com.
The base url of the API is https://iot-api.ixworld.com
. The timeseries
data of a machine can be retrieved using the GET /v1/data
endpoint. You need to provide the
following query parameters:
Parameter | Explanation | Format | Example |
---|---|---|---|
apiKey | Your API key | UUIDv4 | a31e1565-9a3e-426b-80c5-0cabcba777a4 |
machineId | Machine number | String | 10610004 |
propertySet | Property set identifier | String | Zustandswerte |
timeFrom | Start of time interval | ISO 8601 date string | 2021-12-01T11:00:00.000Z |
timeTo | End of time interval | ISO 8601 date string | 2021-12-01T12:00:00.000Z |
You can also provide your API key in the Authorization header of your request. You need to prefix the API key in the header with apiKey
. Please make sure that you do not include the API key as a query parameter if you provide it in the Authorization header.
You can just paste to following URL in the address bar of your browser:
https://iot-api.ixworld.com/v1/data?machineId=10610004&propertySet=Zustandswerte&timeFrom=2021-12-01T11:00:00.000Z&timeTo=2021-12-01T11:00:00.000Z&apiKey=a31e1565-9a3e-426b-80c5-0cabcba777a4
Open a terminal window (e.g. run "cmd" or "terminal") and paste the following command:
curl --location --request GET "https://iot-api.ixworld.com/v1/data?machineId=10610004&propertySet=Zustandswerte&timeFrom=2021-12-01T11:00:00.000Z&timeTo=2021-12-01T11:00:00.000Z&apiKey=a31e1565-9a3e-426b-80c5-0cabcba777a4"
Same example using the Authorization header:
curl --location -H "Authorization:apiKey a31e1565-9a3e-426b-80c5-0cabcba777a4" --request GET "https://iot-api.ixworld.com/v1/data?machineId=10610004&propertySet=Zustandswerte&timeFrom=2021-12-01T11:00:00.000Z&timeTo=2021-12-01T11:00:00.000Z"
If your API call was successful, the status code of the response is 200 OK
. The response content
type is application/json
. In case of a successful response, the response will always contain a value
attribute consisting of a flat array that holds the timeseries data. The elements of the array always include the _time
attribute, which is a ISO 8601 date string. The rest depends on the property set and is described in the Reference section. If there is no data available, the array will be empty. The following code listing shows an example response body for the property set Zustandswerte
.
{
"value": [
{
"_time": "2021-12-01T11:00:00.000Z",
"not_running_w_error": false,
"production_100": true,
"not_running_wo_error": false,
"production_lt_100": false,
"not_switched_on": false,
"program_interruption": false,
"warmup": false
},
{
"_time": "2021-12-01T11:00:10.000Z",
"not_running_w_error": false,
"production_100": true,
"not_running_wo_error": false,
"production_lt_100": false,
"not_switched_on": false,
"program_interruption": false,
"warmup": false
},
{
"_time": "2021-12-01T11:00:20.000Z",
"not_running_w_error": false,
"production_100": true,
"not_running_wo_error": false,
"production_lt_100": false,
"not_switched_on": false,
"program_interruption": false,
"warmup": false
}
]
}