Event Logs

Event Log Attributes

Attribute
Description
id
Event ID
timestamp
DateTime of the Event in ISO 8601 format Date String
type
Event Type
actor
User who initiated the event. This is currently only applicable for DEVICE_SHARE and DEVICE_CONNECT. You can get user ID and email
owner
User who owns the device when the event affects a device/service. You can get user ID and email
users
An array of users affected by the event. For example on a DEVICE_SHARE it is the users whose access to a device/service was added or removed. On a DEVICESTATE event it is the users who were notified of the event.
state
The service state (online or offline)
target
The services affected by the event. For example the services that changed state, the services that where share access was changed, or the services connected

Additional Attributes by Type

For each event type extends the general EventType. Please refer to the schema documentation for the available attributes.

Event Log Parameters

Event Logs support pagination which is described here. Event response are sorted chronologically descending.
Additional parameters
Parameter
Type
Description
Default
types
Array of EventTypes
"DEVICE_STATE", "DEVICE_CONNECT", "DEVICE_SHARE"
More types will be become available. Please refer to the schema for current list
All
maxDate
DateTime
The last date you wish to be included in the result set. Accepts ISO 8601 format Date String with or without the timestamp
Today with 1000 events being the max size
minDate
DateTime
The first date you wish to be included in the result set. Accepts ISO 8601 format Date String with or without the timestamp
1 month ago with 1000 events being the max size

Get All Event Logs

These examples will fetch 1000 connection logs for all of your devices in the last month. See above for other event types. Min and max dates should not exceed 1 month.

JSON

1
query getEvents($size: Int, $from: Int, $minDate: DateTime, $maxDate: DateTime, $types: [EventType!]){
2
login {
3
events(size: $size, from: $from, minDate: $minDate, maxDate: $maxDate, types: $types) {
4
hasMore
5
total
6
items {
7
type
8
owner {
9
email
10
}
11
actor {
12
email
13
}
14
target {
15
created
16
id
17
name
18
}
19
users {
20
email
21
}
22
timestamp
23
}
24
}
25
}
26
}
27
28
#Variables
29
{
30
"size": 1000,
31
"from": 0,
32
"minDate": "2021-06-01",
33
"maxDate": "2021-07-01"
34
"types": ["DEVICE_CONNECT"]
35
}
Copied!
Response Example
1
{
2
"data": {
3
"login": {
4
"events": {
5
"hasMore": false,
6
"total": 4,
7
"items": [
8
{
9
"type": "DEVICE_CONNECT",
10
"owner": {
11
"email": "[email protected]"
12
},
13
"actor": {
14
"email": "[email protected]"
15
},
16
"target": [
17
{
18
"created": "2021-03-24T09:56:16.873Z",
19
"id": "80:XX:00:00:01:0A:FF:00",
20
"name": "ssh"
21
}
22
],
23
"users": [],
24
"timestamp": "2021-07-16T20:53:59.644Z"
25
},
26
{
27
"type": "DEVICE_CONNECT",
28
"owner": {
29
"email": "[email protected]"
30
},
31
"actor": {
32
"email": "[email protected]"
33
},
34
"target": [
35
{
36
"created": "2021-03-24T09:56:16.873Z",
37
"id": "80:XX:00:00:01:0A:FF:00",
38
"name": "ssh"
39
}
40
],
41
"users": [],
42
"timestamp": "2021-07-16T20:35:06.215Z"
43
},
44
{
45
"type": "DEVICE_CONNECT",
46
"owner": {
47
"email": "[email protected]"
48
},
49
"actor": {
50
"email": "[email protected]"
51
},
52
"target": [
53
{
54
"created": "2021-03-24T09:56:16.873Z",
55
"id": "80:XX:00:00:01:0A:FF:00",
56
"name": "ssh"
57
}
58
],
59
"users": [],
60
"timestamp": "2021-07-16T20:20:41.601Z"
61
},
62
{
63
"type": "DEVICE_CONNECT",
64
"owner": {
65
"email": "[email protected]"
66
},
67
"actor": {
68
"email": "[email protected]"
69
},
70
"target": [
71
{
72
"created": "2021-03-24T09:56:16.873Z",
73
"id": "80:XX:00:00:01:0A:FF:00",
74
"name": "ssh"
75
}
76
],
77
"users": [],
78
"timestamp": "2021-07-16T18:56:31.453Z"
79
}
80
]
81
}
82
}
83
}
84
}
Copied!

CSV

This returns a url which you can use to download the results in a csv format. The url will expire in 1 hour. Max 10000 lines or 28 seconds of execution.
1
{
2
login {
3
eventsUrl(minDate: "2021-06-01", maxDate: "2021-07-01", types: ["DEVICE_CONNECT"])
4
}
5
}
Copied!
Response example
1
{
2
"data": {
3
"login": {
4
"eventsUrl": "https://api.remote.it/graphql/v1/files/e60xxxx-8a71-4870-bxxf-xxxdd2021f7.csv"
5
}
6
}
7
}
Copied!

Get Event Logs for Specific Devices

This request will fetch state logs for a specified device in a csv format using graphQL. In these examples we want to get the external IP address each time it comes online to track the device location.

JSON Result

1
#query
2
query getEvents($deviceID: [String!]!, $minDate: DateTime, $maxDate: DateTime, $types: [EventType!]) {
3
login {
4
device(id: $deviceID) {
5
events(minDate: $minDate, maxDate: $maxDate, types: $types) {
6
hasMore
7
total
8
items {
9
state
10
timestamp
11
target {
12
name
13
id
14
}
15
... on DeviceStateEvent {
16
externalAddress
17
geo {
18
connectionType
19
isp
20
}
21
}
22
}
23
}
24
}
25
}
26
}
27
28
#variables
29
{
30
"deviceID": ["80:XX:00:00:01:05:82:22"],
31
"minDate": "2021-06-01",
32
"maxDate": "2021-07-01",
33
"types": ["DEVICE_STATE"]
34
}
Copied!
Response Example
1
{
2
"data": {
3
"login": {
4
"device": [
5
{
6
"events": {
7
"hasMore": false,
8
"total": 76,
9
"items": [
10
{
11
"state": "inactive",
12
"timestamp": "2021-07-17T22:16:11.921Z",
13
"target": [
14
{
15
"name": "MacBook-Pro-15 - vnc",
16
"id": "80:XX:00:00:01:05:82:23"
17
}
18
],
19
"externalAddress": "73.189.XX.XXX:53190",
20
"geo": {
21
"connectionType": "Cable/DSL",
22
"isp": "Comcast Cable"
23
}
24
},
25
{
26
"state": "inactive",
27
"timestamp": "2021-07-17T22:16:07.479Z",
28
"target": [
29
{
30
"name": "New ssh",
31
"id": "80:XX:00:00:01:1A:4A:AB"
32
}
33
],
34
"externalAddress": "73.189.XX.XXX:56236",
35
"geo": {
36
"connectionType": "Cable/DSL",
37
"isp": "Comcast Cable"
38
}
39
},
40
...
41
]
42
}
43
}
44
]
45
}
46
}
47
}
Copied!

CSV Result

This request will return a url for a CSV download. The url will expire in 1 hour. Max 10000 lines or 28 seconds of execution. Min and max dates should not exceed 1 month.
1
query getEventsUrl($deviceID: [String!]!, $minDate: DateTime, $maxDate: DateTime, $types: [EventType!]) {
2
login {
3
device(id: $deviceID) {
4
eventsUrl(minDate: $minDate, maxDate: $maxDate, types: $types)
5
}
6
}
7
}
Copied!
Response Example
1
{
2
"data": {
3
"login": {
4
"device": [
5
{
6
"eventsUrl": "https://api.remote.it/graphql/v1/files/af7xxx-82x7-464c-xxxc-132xxxx.csv"
7
}
8
]
9
}
10
}
11
}
Copied!

Last modified 3mo ago