get https://ioe.droplit.io/v0/api/environments//history
Details
View the action history of all devices in an environment.
The action history records the following types of events.
- Changed: A property changed event, which can be spawned explicitly by the user or implicitly by the system.
- Error: An error event, which spawns when an error occurs pertaining to a device.
- Event: A service event, triggered by device service classes.
- Get: An event triggered when the “refresh” flag is used to get the most current (not cached) value of a device property.
- Info: An event triggered when the user retrieves the cached value of a device property.
- Set: An event triggered when the user explicitly sets a device property.
An account token, server token, or user token may be used to run this endpoint.
Parameters
path
- id (required): The ID of the environment.
query
- continuationCount (optional): The page to read in the action history.
- continuationToken (optional): A system-generated token representing the page start.
- endDate (optional): The latest ISO 8601 datetime that should be included in the action history.
- index (optional): The index of a specific service to include in the action history.
- member (optional): The specific service member to include in the action history.
- pageSize (optional): The number of results that should be displayed per page of the action history.
- service (optional): The name of the service from which to get the action history.
- startDate (optional): The earliest ISO 8601 datetime that should be included in the action history.
- type (optional): The action type to view in the action history.
Responses
200
{
"items": [
{
"deviceId": "DEVICE-ID",
"environmentId": "ENVIRONMENT-ID",
"member": "SERVICE-MEMBER-NAME",
"recordKey": "INTERNAL-RECORD-KEY",
"service": "SERVICE-NAME",
"time": "DATE-TIME-MODIFIED YYYY-MM-DD HH:MM:SS ENCODED",
"transactionId": "TRANSACTION-ID",
"type": "ACTION-TYPE",
"value": "MEMBER-VALUE"
}
]
}
400
- History Continuation Count Invalid: The standard error structure defines this error as invalid parameters. In this context, it means that the continuation count is invalid because it was supposed to be a positive number.
- History End Date Invalid: The standard error structure defines this error as invalid parameters. In this context, it means that the end date for which to stop retrieving history records is incorrectly formatted, and needs to be in valid ISO 8601 datetime format.
- History Event Type Invalid: The standard error structure defines this error as invalid parameters and an invalid value. In this context, it means that the value given to the “type” flag is not valid, and cannot be used to filter history events.
- History Page Size Invalid: The standard error structure defines this error as invalid parameters. In this context, it means that the page size for viewing history records is invalid because it was supposed to be a positive number.
- History Start Date Invalid: The standard error structure defines this error as invalid parameters. In this context, it means that the begin date for which to start retrieving history records is incorrectly formatted, and needs to be in valid ISO 8601 datetime format.
- History Service Index Invalid: The standard error structure defines this error as invalid parameters. In this context, it means that the service index is invalid because it was supposed to be a non-negative number.
- Query Field Not Allowed: The standard error structure defines this error as invalid parameters, with additional parameters in the query string. In this context, it means that one or more query string fields are incorrect. They do not match the name(s) of the query string field(s) that are allowed for this endpoint.
- Environment Invalid: The standard error structure defines this error as invalid parameters, with an invalid ID linked to the parameter that designates the environment ID. In this context, it means that the ID given for an environment was not valid.
404
- Environment Not Found: This error means that an environment with the given ID was not found. This is distinct from an invalid environment ID being specified; this means that the environment ID once existed, but no longer does.
Examples
HTTP
GET https://ioe.droplit.io/api/environments/ENVIRONMENT-ID/history HTTP/1.1
authorization: TOKEN
Droplit Console
droplit environment history ENVIRONMENT-ID