Many of our customers use the kooaba image recognition API in mobile apps. We are happy to announce a new feature that will improve tracking and analysing queries in such a scenario. (This is the first new feature for API v4 just one week after our initial public release).
For many (mobile) applications knowing about the context a user made a query is essential. Context can include for example the geographic location, a user id, or any other data you consider relevant. This context can be used for serving contextual (e.g. personalised) results, statistics, or just debugging purposes.
The new feature allows you to transmit such user data with your queries. (User here refers to you, the API user). You are free to transmit any kind of data that is useful to you, by adding it to the new user_data field of the query API in JSON format. The data is stored and is then available in the web UI.
We also parse this data for certain parameters that are known to our system. At this time our system reacts to the geographic location (latitude and longitude are the keywords to use here) and to a user identifier (with the key user_id). The idea of the latter is to allow for tracking and grouping queries by users or devices. User id can be any kind of identifier string, for instance a device uuid or an e-mail-address.
These parsed fields are displayed separately in the query views of the web interface.
Here’s an example query executed with curl, which sets the user data to a combination of known and unknown keys:
curl -i -X POST \
-F image=@image.jpg \
-F user_data='{"user_id": "1234", "device_type": "iPhone 5, iOS 6", "longitude": 47.3690, "latitude": 8.5380}' \
-H 'Authorization: Token ' \
-H 'Accept: application/json' \
'https://query-api.kooaba.ch/v4/query'
The query shows up in the backend interface like this:
