Difference between revisions of "AddEvent"
(21 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{Api_Method_Spec| | {{Api_Method_Spec| | ||
− | Description=The AddEvent is a method to send a request with personalized information to be used by the BI team. This information is responsible to track any actions in the client app that use | + | Description=The AddEvent is a method to send a request with personalized information to be used by the BI team. This information is responsible to track any actions in the client app that use GVP. The data record on the GVP is completely personalized. The information is recorded in a Mongo Data Base, it has a scalable resources to storage all information. |
− | The data record on the GVP is completely personalized | ||
− | The information is recorded in a Mongo Data Base, | ||
− | + | The Object send to the Event service three parameters: Token, MediaInfo and EventData. | |
− | + | - The Token can be use logged or anonymous user. | |
− | - Token can be use logged or anonymous. | ||
− | |||
− | |||
+ | - The mediaInfo parameter is a cryptograph info that can be got in any methods that return the media url. ( see PlaybackService -> [[GetMediaUrl]] ). By default the value is a empty string. | ||
+ | : "MediaInfo": "eyJNb3ZpZUlkIjozNTkzNiwiTWVkaWFJZCI6 … XlsaXN0SWQiOjAsIk1lZGlhVHlwZSI6MSwiRHVyYXRpb24iOjU4MjB9", | ||
+ | : This encrypted string has: | ||
+ | :: - MovieID | ||
+ | :: - MediaID | ||
+ | :: - AccessReason | ||
+ | :: - SubscriptionID | ||
+ | :: - PlaylistID | ||
+ | :: - MediaType | ||
+ | :: - Duration. | ||
+ | - The eventData is the object represented by the [[AnalyticsEventItem]] and has all information about the event that wants to be storage. | ||
+ | |||
+ | |||
+ | NOTE: To register the User information (context) in each event, a parameter Context should be set to true inside the AnalyticsEventItem. To don't get the information from the Token, the parameter should be set to false. By default, the context parameter is true, it means that by default all values will be obtained from the token. | ||
+ | |||
+ | To visualize all data recorded, a tool will be developed to access on the MIB Tools, graphics, summarize, statistics and more. Predict to 2.4.6 GVP version. | ||
|Parameters= | |Parameters= | ||
Line 24: | Line 35: | ||
|ParamType=[[AnalyticsEventItem]] | |ParamType=[[AnalyticsEventItem]] | ||
|ParamRequired=required | |ParamRequired=required | ||
− | |ParamDescription=The eventData parameter is an | + | |ParamDescription=The eventData parameter is an [[AnalyticsEventItem]] object type and represent a set of data to register the event in the Mongo data base. |
: e.g. | : e.g. | ||
:: { | :: { | ||
Line 37: | Line 48: | ||
|ParamType=String | |ParamType=String | ||
|ParamRequired=optional | |ParamRequired=optional | ||
− | |ParamDescription= | + | |ParamDescription=This parameter can be found in the [[GetMediaUrl]] and has all information about the Movie. Is passed, it will be used to assign the eventData with the movie. The default value is empty. |
+ | : e.g. | ||
+ | :: "MediaInfo": "eyJNb3ZpZUlkIjozNTkzNiwiTWVkaWFJZCI6 … XlsaXN0SWQiOjAsIk1lZGlhVHlwZSI6MSwiRHVyYXRpb24iOjU4MjB9" | ||
}} | }} | ||
+ | |||
+ | |||
|Returns= | |Returns= | ||
Returns a JSON object containing the information if the event is registered on server. | Returns a JSON object containing the information if the event is registered on server. | ||
Line 52: | Line 67: | ||
|Exceptions= | |Exceptions= | ||
− | + | * [[InvalidEventDataException]] | |
|Cache= | |Cache= | ||
Line 76: | Line 91: | ||
! 2.4 | ! 2.4 | ||
{{!}} | {{!}} | ||
− | {{!}} | + | {{!}} Rafael Landim |
Line 82: | Line 97: | ||
|SeeAlso= | |SeeAlso= | ||
+ | * [[AddEventBatch]] | ||
+ | * [[GetMediaUrl]] | ||
+ | * [[AnalyticsEventItem]] | ||
}} | }} |
Latest revision as of 12:54, 10 September 2014
Description
The AddEvent is a method to send a request with personalized information to be used by the BI team. This information is responsible to track any actions in the client app that use GVP. The data record on the GVP is completely personalized. The information is recorded in a Mongo Data Base, it has a scalable resources to storage all information.
The Object send to the Event service three parameters: Token, MediaInfo and EventData.
- The Token can be use logged or anonymous user.
- The mediaInfo parameter is a cryptograph info that can be got in any methods that return the media url. ( see PlaybackService -> GetMediaUrl ). By default the value is a empty string.
- "MediaInfo": "eyJNb3ZpZUlkIjozNTkzNiwiTWVkaWFJZCI6 … XlsaXN0SWQiOjAsIk1lZGlhVHlwZSI6MSwiRHVyYXRpb24iOjU4MjB9",
- This encrypted string has:
- - MovieID
- - MediaID
- - AccessReason
- - SubscriptionID
- - PlaylistID
- - MediaType
- - Duration.
- The eventData is the object represented by the AnalyticsEventItem and has all information about the event that wants to be storage.
NOTE: To register the User information (context) in each event, a parameter Context should be set to true inside the AnalyticsEventItem. To don't get the information from the Token, the parameter should be set to false. By default, the context parameter is true, it means that by default all values will be obtained from the token.
To visualize all data recorded, a tool will be developed to access on the MIB Tools, graphics, summarize, statistics and more. Predict to 2.4.6 GVP version.
Parameters
- token (String, required)
- A valid token for identifying the API session context. The token can be anonymous or logged.
- eventData (AnalyticsEventItem, required)
- The eventData parameter is an AnalyticsEventItem object type and represent a set of data to register the event in the Mongo data base.
- e.g.
- {
- "Timestamp" : "4315435114",
- "Event" : "Play",
- "Data" :
- {"Param": "Value", "Param2": "Value2" }
- }
- {
- mediaInfo (String, optional)
- This parameter can be found in the GetMediaUrl and has all information about the Movie. Is passed, it will be used to assign the eventData with the movie. The default value is empty.
- e.g.
- "MediaInfo": "eyJNb3ZpZUlkIjozNTkzNiwiTWVkaWFJZCI6 … XlsaXN0SWQiOjAsIk1lZGlhVHlwZSI6MSwiRHVyYXRpb24iOjU4MjB9"
Returns
Returns a JSON object containing the information if the event is registered on server.
Example:
{
- "StatusCode": 0,
- "Severity": 1,
- "StatusMessage": "OK",
- "Content": true
}
Exceptions
Caching
This method is not cached.
Known issues
None
Version history
API Version Number | Change description | Changes author |
---|---|---|
1.0 | Initial method design | Harley Cabral |
2.4 | Rafael Landim
|