Listing Event Categories and Names
These requests are used to get a list of event names and categories that have been reported by your application to Usage Intelligence, know which ones have been enabled for collection, and also set which ones should be collected.
POST /eventTracking/listEventNames
The request and response are both JSON objects. The following is a summary of the properties inside the request and response objects.
Property |
Description |
|||||||||||||||
Request JSON Object |
|
|||||||||||||||
Response JSON Object |
status (string)—Contains OK if successful or SYNTAX ERROR or AUTH ERROR. reason (string)—Present only if status is not OK. Contains error message (reason). results (object)—Contains the results as requested represented as a JSON array. Present only if status is OK. Each array element represents a category. Each of these category elements is formatted as a JSON object and contains the following:
|
In the example below, we are requesting for a complete list of all known event names. If we request for only events that have been enabled for basic event tracking, or similarly if we want only those that have been enabled for advanced tracking, the showEvents value should be [“basic”] or [“advanced”] respectively. If you are only requesting a single type, and not all or basic and advanced in a single request, the basic and advanced boolean properties would not be included in the response.
Example Request
POST /eventTracking/listEventNames HTTP/1.1
Host: api.revulytics.com
Content-Type: application/json
Accept: application/json
{
"user": "testuser@test.com",
"sessionId": "VSB8E2BzSC2eZSJm4QmTpA",
"productId": 12345678901,
"showEvents": ["all"]
}
Example Response
HTTP/1.1 200 OK
Content-Type: application/json
"status": "OK",
"results": [
{
"category": "File Operations",
"categoryEventNames": [
{
"eventName": "Open",
"basic": true,
"advanced": true
},
{
"eventName": "Save",
"basic": true,
"advanced": true
}
]
},
{
"category": "Install Wizard",
"categoryEventNames": [
{
"eventName": "Step 1",
"basic": true,
"advanced": false
},
{
"eventName": "Step 2",
"basic": true,
"advanced": false
}
]
}
]