{"_id":"57ec3b22bafb170e000f56a3","category":{"_id":"591e4c3d094c5b0f006769fe","project":"56008ba98c0c9d0d00dcaeb0","version":"5719767ec863120e0012a042","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2017-05-19T01:37:01.634Z","from_sync":false,"order":2,"slug":"events","title":"Events"},"parentDoc":null,"user":"56008b651503430d007cc929","version":{"_id":"5719767ec863120e0012a042","hasDoc":true,"project":"56008ba98c0c9d0d00dcaeb0","__v":7,"hasReference":true,"createdAt":"2016-04-22T00:55:26.295Z","releaseDate":"2016-04-22T00:55:26.295Z","categories":["5719767ec863120e0012a043","5719767ec863120e0012a044","5719767ec863120e0012a045","5719767ec863120e0012a046","5719767ec863120e0012a047","5719767ec863120e0012a048","5719767ec863120e0012a049","57f45a18da14e71700d12e4a","582b71b15403840f008c0410","58c060cf3eee111b00a8b210","591e4c277f22100f00031521","591e4c3d094c5b0f006769fe","591e4c461e0dc20f0047b58b"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"2.0.0","version":"2.0"},"__v":4,"project":"56008ba98c0c9d0d00dcaeb0","updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-09-28T21:50:26.742Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"language":"shell","code":"# All events for all users for the last 7 days:\ncurl  -XGET --globoff \"https://api.thisdata.com/v1/events.json?api_key=REDACTED&after=2016-09-01\"\n\n# A single user's successful and unsuccessful login events:\ncurl  -XGET --globoff \"https://api.thisdata.com/v1/events.json?api_key=REDACTED&user_id=112233&verbs[]=log-in&verbs[]=log-in-denied\""}]},"method":"get","results":{"codes":[{"status":200,"language":"json","code":"{\n  \"total\": 2,\n  \"results\": [\n    {\n      \"published\": \"2016-09-28T00:01:27.608Z\",\n      \"verb\": \"log-in-denied\",\n      \"device\": {\n        \"user_agent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36\",\n        \"browser\": \"Chrome\",\n        \"platform\": \"Macintosh\",\n        \"os\": \"OS X 10.11.6\",\n        \"mobile\": false,\n        \"bot\": false,\n        \"version\": [\n          52,\n          0,\n          2743,\n          116\n        ],\n        \"comment\": [\n          \"Macintosh\",\n          \"Intel Mac OS X 10_11_6\"\n        ]\n      },\n      \"location\": {\n        \"ip\": \"125.236.200.125\",\n        \"coordinates\": {\n          \"latitude\": -36.8667,\n          \"ip\": \"125.236.220.125\",\n          \"longitude\": 174.7667\n        },\n        \"address\": {\n          \"country_name\": \"New Zealand\",\n          \"ip\": \"125.236.200.125\",\n          \"country_iso_code\": \"NZ\",\n          \"region_name\": \"Auckland\",\n          \"region_iso_code\": \"AUK\",\n          \"city_name\": \"Auckland\",\n          \"postal_code\": \"1150\",\n          \"timezone\": \"Pacific/Auckland\"\n        }\n      },\n      \"session\": null,\n      \"overall_score\": 0.0,\n      \"id\": \"AVduGJcvJD0DIuzSzIZf\",\n      \"user\": {\n        \"name\": \"Eve Smith\",\n        \"id\": \"112233\"\n      },\n      \"raw\": {\n        \"ip\": \"125.236.220.125\",\n        \"verb\": \"log-in-denied\",\n        \"user_agent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36\",\n        \"user\": {\n          \"id\": \"112233\",\n          \"name\": \"Eve Smith\",\n          \"email\": \"eve.smith:::at:::domain.com\",\n          \"mobile\": \"+64270000001\",\n          \"authenticated\": false\n        }\n      }\n    },\n    {\n      \"published\": \"2016-09-28T00:01:13.728Z\",\n      \"verb\": \"log-in\",\n      ...\n    }\n  ]\n}","name":""}]},"settings":"","auth":"required","params":[{"_id":"57ec45c6e7d4e70e00b99417","ref":"","in":"query","required":true,"desc":"Your API Key","default":"","type":"string","name":"api_key"},{"_id":"57ec45c6e7d4e70e00b99416","ref":"","in":"query","required":false,"desc":"Filter events to a single user ID (the user ID you send us in your other API calls)","default":"","type":"string","name":"user_id"},{"_id":"57ec45c6e7d4e70e00b99415","ref":"","in":"query","required":false,"desc":"Filter events to those at or after this iso8601 timestamp. Max 90 days ago.","default":"30 days ago","type":"timestamp","name":"after"},{"_id":"57ec45c6e7d4e70e00b99414","ref":"","in":"query","required":false,"desc":"Filter events those at or before this iso8601 timestamp","default":"","type":"timestamp","name":"before"},{"_id":"57ec45c6e7d4e70e00b99413","ref":"","in":"query","required":false,"desc":"Filter events to a single verb (e.g. `log-in`)","default":"","type":"string","name":"verb"},{"_id":"57ec45c6e7d4e70e00b99412","ref":"","in":"query","required":false,"desc":"Filter events to multiple verbs","default":"","type":"array_string","name":"verbs"},{"_id":"57edd9a2db415b0e002941d5","ref":"","in":"query","required":false,"desc":"Excludes events with this verb from the result set","default":"page-view","type":"string","name":"exclude_verb"},{"_id":"57edd9a2db415b0e002941d4","ref":"","in":"query","required":false,"desc":"Excludes events based on multiple verbs","default":"","type":"array_string","name":"exclude_verbs"},{"_id":"57edd9a2db415b0e002941d6","ref":"","in":"query","required":false,"desc":"Filter by Source Name (an optional field in the POST /events API)","default":"","type":"string","name":"source_name"},{"_id":"57ec45c6e7d4e70e00b99411","ref":"","in":"query","required":false,"desc":"The number of events to return. Max 200","default":"50","type":"int","name":"limit"},{"_id":"57ec45c6e7d4e70e00b99410","ref":"","in":"query","required":false,"desc":"Offsets the starting position for events returned, useful for pagination.","default":"0","type":"int","name":"offset"}],"url":"/:version/events"},"isReference":true,"order":1,"body":"The `GET /events` API endpoint is great for showing your users their recent activity, including device, location, and risk factors. It can also be useful for consuming [the events you've sent to ThisData](doc:apiv1events).\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Results\"\n}\n[/block]\nThe response includes the `total` number of events which match your query. \nIn `results` is an Array of Hashes which represent each event. \n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Pagination\"\n}\n[/block]\nUse the `limit` and `offset` parameters to paginate over a set. e.g.\n\n```\n...&limit=50&offset=0\n...&limit=50&offset=50\n```","excerpt":"Get a filtered list of previously submitted events","slug":"v1getevents","type":"endpoint","title":"Get events"}

getGet events

Get a filtered list of previously submitted events

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Query Params

api_key:
required
string
Your API Key
user_id:
string
Filter events to a single user ID (the user ID you send us in your other API calls)
after:
timestamp30 days ago
Filter events to those at or after this iso8601 timestamp. Max 90 days ago.
before:
timestamp
Filter events those at or before this iso8601 timestamp
verb:
string
Filter events to a single verb (e.g. `log-in`)
verbs:
array of strings
Filter events to multiple verbs
exclude_verb:
stringpage-view
Excludes events with this verb from the result set
exclude_verbs:
array of strings
Excludes events based on multiple verbs
source_name:
string
Filter by Source Name (an optional field in the POST /events API)
limit:
integer50
The number of events to return. Max 200
offset:
integer0
Offsets the starting position for events returned, useful for pagination.

Examples


Result Format


Documentation

The `GET /events` API endpoint is great for showing your users their recent activity, including device, location, and risk factors. It can also be useful for consuming [the events you've sent to ThisData](doc:apiv1events). [block:api-header] { "type": "basic", "title": "Results" } [/block] The response includes the `total` number of events which match your query. In `results` is an Array of Hashes which represent each event. [block:api-header] { "type": "basic", "title": "Pagination" } [/block] Use the `limit` and `offset` parameters to paginate over a set. e.g. ``` ...&limit=50&offset=0 ...&limit=50&offset=50 ```