query
Execute a customized query against MyWakes database returning a result in XML/JSON format.
Command's fields description:
-
txtUser1 field is the “username” of MyWakes account.
-
txtUser2 field is the “password” of MyWakes account.
-
txtCommand field contains the command: “query”.
-
txtFormat optional field specifies txtParameters and response formats. more info.
-
txtParameter field contains a structure like this:
Where
-
<schema> optional. Sets what have to be returned, can be:
-
0 (zero). Returns query data without schema.
-
1 (one). Returns query data along with the schema.
-
2. Returns only the schema.
-
<fields> optional. The list of fields, separated by “,” (comma). Special character “*” returns all fields.
-
<table> mandatory. The table on which execute the query. It is possibile to execute the query only on one table at a time. The list of allowed table is the following:
-
Actions. List of user defined actions.
-
Alarms. List of alarms and notifications.
-
AppLog. Log of your ApplicationId calls.
-
ChartFiles. List of users' maps.
-
Consumers. List of users' consumers.
-
EmailLog. List of sent mail.
-
GeoAreas. Virtual fences.
-
GoogleFiles. List of Kml/Kmz users' files.
-
GpsKeep. List of users' KeepWay.
-
GpsKitt. List of users' KittWay.
-
GpsPhone. List of users' PhoneWay.
-
GpsPhonePlus. List of users' PhoneWayPro.
-
GpsPick. List of users' PickWay.
-
GpsOthers. List of users' devices.
-
GpsTomTom. List of users' TomTom.
-
MessagesReceived. List of received messages.
-
MessagesSent. List of sent messages.
-
OBDII. Consumers' OBD data collection.
-
PhoneLog. List of vocal calls.
-
PointsOfInterest. List of POIs.
-
SmsLog. List of sent SMS.
-
Tracks. List of users' tracks.
-
TrackPoints. Users' tracks point.
-
Users. Users' details and preferences.
-
WebLog. List of WEB calls (GET and POST).
-
<where> optional. Clause WHERE of SELECT command. There can be more occurrences of this tag. If present it must contain the following tags:
-
<field> può contenere i seguenti elementi:
-
“(” open parenthesis. <comparision> and <value> tags are ignored and can be omitted.
-
“)” closed parenthesis. <comparision> and <value> tags are ignored and can be omitted.
-
“AND” logic operator. <comparision> e <value> tags are ignored and can be omitted.
-
“OR” logic operator. <comparision> e <value> tags are ignored and can be omitted.
-
“NOT” logic operator. <comparision> e <value> tags are ignored and can be omitted.
-
Field name: the name of the field to compare.
-
<comparision> Comparison operator. Can be:
-
“=”: equal.
-
“<”: lower then.
-
“>”: greater then.
-
“<=”: lower/equal then.
-
“>=”: greater/equal than.
-
“<>”: different.
-
“LIKE”: similar, jolly character can be:
-
“%”: any string of zero or more characters. For instance '%computer%' gets all strings that contain “computer” word.
-
“_”: any single character. For instance '_ean' gets all 4-characters words that ends with “ean” (like Dean, Sean etc).
-
“[]”: single character included into an interval ([a-f]) or between a given set ([abcdef]). For instance '[C-P]arsen' returns all strings ending with “arsen” and beginning with a character from “C” to “P” like Carsen, Larsen, Karsen etc.
-
“[^]”: single character not included ingo an interval ([^a-f]) or into specified set ([^abcdef]). For instance 'de[^l]%' gets all strings beginning with “de” and next letter is different from “l”.
-
“IS NULL”: is null. <value> tag is ignored and can be omitted.
-
“IS NOT NULL”: not null. <value> tag is ignored and can be omitted.
-
<value> contains the value to compare. For numeric values the decimal separator is <.> (dot), dates are in <yyyyMMddhhmmss> format expressed in UTC time
-
<order> optional. ORDER BY clause of SELECT command. It is possibile to order by more than one field separating them with <,> (comma). For each field it is mandatory to specify ASC or DESC option.
-
<minitem> optional. Used for paging results. If set returns rows greater than this value.
-
<maxitem> optional. Used for paging results. If set returns rows less than this value. Note that order to prevent your system from being flooded with oversized responses, the number of messages that will be returned on a single response is limited to 500.
-
<time> mandatory, date and time in UTC. The accepted format is “yyyyMMddhhmmss”.
-
txtProvider field must contain the application calling ID and generated characters.
-
txtSignature field must contain the signature based on the string made of “Command Name” + “table name” + “time” + “generated character to 32”.
Looking at the previous example, the string on which calculate the check will be:
“queryTracks2010102518300010xxxxx”
Therefore the txtProvider field will be:
“76a865d4-fab8-51cd-ba78-2da325f6955axxxxx”