User Tools

Site Tools

A PCRE internal error occured. This might be caused by a faulty plugin

version_4:get_statistics_events-per-hour

====== Requesting the mean events per hour ====== To compare the behavior of a certain user with the whole group, this interface can be used to count the number of generated events for the current user and for the whole group. ===== Authentication required ===== Yes, please take a look at [[version_3:authentication|Authentication]]. To keep it simple, only the //data// parameter is mentioned on this page, but keep in mind that the other parameters are also necessary. ===== Response ===== JSON ===== Method ===== GET ===== Resource URL ===== http://api.learning-context.de/3/statistics/events_per_hour ===== Parameters ===== The sent JSON object //data// should contain the following parameters: ==== start ==== A mandatory value. This is a UNIX timestamp the beginning of the time period. ==== end ==== A mandatory value. This is a UNIX timestamp the end of the time period. ==== category ==== An optional whitelist filter to return only those events of a certain [[version_3:get_env_categories|category]]. ==== source ==== An optional whitelist filter to return only those events of a certain [[version_3:get_env_sources|source]]. ==== type ==== An optional whitelist filter to return only those events of a certain [[version_3:get_env_types|type]]. ==== category_bl ==== A blacklist filter to return only those events which aren't of a certain [[version_3:get_env_categories|category]]. ==== source_bl ==== An optional blacklist filter to return only those events which aren't of a certain [[version_3:get_env_sources|source]]. ==== type_bl ==== A blacklist filter to return only those events which aren't of a certain [[version_3:get_env_types|type]]. ===== Example ===== ==== Request ==== <code js-script> data={ "start":1377986400, "end":1380578400 } </code> ==== Response ==== <code js-script> { "APIVersion":3, "result":1, "avg_events_user":"26.258", "avg_events_all":"23.485" } </code> In case of an error, a different response is sent. Please take a look at [[version_3:errors|Error Responses]].

version_4/get_statistics_events-per-hour.txt · Last modified: 01.05.2016 21:57 (external edit)