User Tools

Site Tools

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

version_2:get_allvalues

====== Requesting all entities values ====== This interface does not only list all the possible values of one user’s entities but of all the users of this system. Values are sent back together with their number of occurrence that are assigned to the given //type// and //key//. As an optional filter, //start// and //end// can be used to request only the keys of a specific timeframe. ===== Authentication required ===== Yes, please take a look at [[version_2: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/2/allvalues ===== Parameters ===== The sent JSON object //data// should contain the following parameters: ==== type ==== The service knows a fixed number of [[version_2:get_types|types]]. One has to be selected here. ==== key ==== The key of the entities of which you want to have the values. ==== start ==== An optional timestamp to only request a certain time frame. ==== end ==== An optional timestamp to only request a certain time frame. ===== Example ===== ==== Request ==== <code js-script> data={ "type":"APPSTART", "key":"app", "start":1370553514, "end":1370847439 } </code> ==== Response ==== <code js-script> { "APIVersion":2, "result":1, "values":[ { "value":"9GAG", "count":"28" }, { "value":"Android System", "count":"4" }, { "value":"BeautifulWidgets", "count":"2" }, { "value":"BigBrother", "count":"2" }, { "value":"Calendar", "count":"2" }, { "value":"Chrome Beta", "count":"78" }, { "value":"Clock", "count":"14" }, { "value":"Contacts", "count":"10" }, { "value":"Document Viewer", "count":"8" }, { "value":"ES File Explorer", "count":"10" }, { "value":"FreeCell", "count":"4" }, { "value":"Gmail", "count":"14" }, { "value":"Google Play Store", "count":"8" }, { "value":"Google Search", "count":"6" }, { "value":"Google+", "count":"16" }, { "value":"Hangouts", "count":"42" }, { "value":"IMDb", "count":"2" }, { "value":"JEFIT", "count":"2" }, { "value":"Maps", "count":"34" }, { "value":"MensaPlaner", "count":"2" }, { "value":"Messaging", "count":"10" }, { "value":"NewsRob", "count":"34" }, { "value":"Phone", "count":"10" }, { "value":"Plume", "count":"38" }, { "value":"QuickDic", "count":"2" }, { "value":"RealCalc", "count":"4" }, { "value":"SeriesGuide X", "count":"4" }, { "value":"Settings", "count":"10" }, { "value":"System UI", "count":"2" }, { "value":"Threema", "count":"6" }, { "value":"TuneIn Radio Pro", "count":"8" } ] } </code> In case of an error, a different response is sent. Please take a look at [[version_2:errors|Error Responses]].

version_2/get_allvalues.txt · Last modified: 01.05.2016 21:57 (external edit)