Usabilla for Apps Campaigns allow you to actively survey your users in a native Android or iOS app. Once you've created your Campaign, you will be able to analyze your incoming feedback items through your Usabilla account or you may request your data through our public API.
This article is written for developers, planning to request Usabilla for Apps Campaign data using our public API. Before reading this article, we recommend you to read our general public API documentation.
Request URL
The request URL for Usabilla for Apps Campaign data is:
https://data.usabilla.com/live/apps/campaign
Parameters
Optionally, the following parameters can be added to the query string of the request URL:
Field |
Type |
Description |
limit |
Integer |
Optional URL query parameter that limits the number of retrieved results between 1 and 100. Defaults to 100 when omitted. |
since |
Timestamp |
[Optional] UTC Timestamp (in milliseconds) URL query parameter used to retrieve items of which creation date is after the supplied value. |
Request-Example
https://data.usabilla.com/live/apps/campaign?limit=1&since=1500336000
Success 200
Field |
Type |
Description |
id |
String |
Unique identifier for a campaign. |
createdAt |
Date |
The creation date of the campaign, in UTC. The format being used is %Y-%m-%dT%H:%M:%S.%fZ as defined in ISO 8601. |
lastModifiedAt |
Date |
The date the campaign was last modified, in UTC. The format being used is %Y-%m-%dT%H:%M:%S.%fZ as defined in ISO 8601. |
status |
String |
The status of the campaign. Possible values are active or inactive. |
name |
String |
The name of the campaign given when created. Can be updated in the campaign setup page. |
appIds |
Array |
An array containing the IDs of the mobile apps where the campaign is running. |
Sample success response
HTTP/1.1 200 OK
{
"id": "31b84ffe-cbde-4bde-ac08-2b87f2c92b83",
"createdAt": "2017-07-18T08:04:15.937Z",
"lastModifiedAt": "2017-07-18T08:04:17.173Z",
"status": "inactive",
"name": “Checkout Process Customer Satisfaction",
"appIds": [
"c3fc6dd8-aede-418e-aacc-ddcadd4b661e"
]
}
Campaign results
Campaign Results returns the responses of one or all your Usabilla for Apps campaigns.
https://data.usabilla.com/live/apps/campaign/<id>/results
Parameters
Field |
Type |
Description |
id |
String |
The campaign id. Use * (asterisk) to request feedback of all campaigns. |
limit |
Integer |
Optional URL query parameter that limits the number of retrieved results between 1 and 100. Defaults to 100 when omitted. |
since |
Timestamp |
[Optional] UTC Timestamp (in milliseconds) URL query parameter used to retrieve items of which creation date is after the supplied value. |
Request-Example
https://data.usabilla.com/live/apps/campaign/31b84ffe-cbde-4bde-ac08-2b87f2c92b83/results?limit=1&since=1500336000
Success 200
Field |
Type |
Description |
id |
String |
Unique identifier for a campaign response. |
date |
Date |
The date when the campaign response was received by the Usabilla server, in UTC. The format being used is %Y-%m-%dT%H:%M:%S.%fZ as defined in ISO 8601. |
campaignId |
String |
Unique identifier of the campaign the response belongs to. |
appId |
String |
Unique identifier of the mobile app through which the response was received. |
data |
Array |
An array containing the values of the answers to the campaign’s questions. |
context |
Array |
Custom variables that are provided by the mobile app. |
metadata |
Array |
An array containing the metadata of the user’s device and its configuration. |
app_name |
String |
Name of the mobile app. |
app_version |
String |
Version of the mobile app. |
battery |
Float |
Number from 0-1 that represents the percentage of battery of the user’s device. |
device |
String |
Device name on which the mobile app is running. |
language |
String |
Active system language of the user’s device followed by the region. |
network_connection |
String |
Type of internet connection of the user’s device when the response was submitted |
orientation |
String |
The orientation of the screen when the response was submitted (‘Portrait’or ‘Landscape’). |
os_version |
String |
Operating System version running on the user’s device. |
screen |
String |
Screen resolution of the user’s device |
sdk_version |
String |
The version of the Usabilla SDK running in the mobile app. |
system |
String |
Operating System running on the user’s device |
timestamp |
String |
Date and time (Unix timestamp) when the response was created in the mobile app. |
complete |
Boolean |
Whether the user has fully progressed throughout the campaign. |
Sample success response
HTTP/1.1 200 OK
{
"id": "4a5ef6c3-3a7c-4f51-b594-71820e7d8832",
"date": "2017-08-07T08:06:12.213Z",
"campaignId": "31b84ffe-cbde-4bde-ac08-2b87f2c92b83",
"appId": "c3fc6dd8-aede-418e-aacc-ddcadd4b661e",
"data": {
"app_satisfaction": "10",
"comment": "the checkout process went smooth"
},
"context”: {
"user_id": "97364879364",
"returning_customer": "true",
"email": "jane@usabilla.com"
},
"metadata": {
"app_name": “iOS Ecommerce App",
"app_version": "10.2.18",
"battery": 1,
"device": "iPhone 7 Plus",
"language": “en_US",
"network_connection": "Cellular",
"orientation": "portrait",
"os_version": "10.3.2",
"screen": "1080x1920",
"sdk_version": “4.0.3",
"system": "iOS",
"timestamp": "1494933327"
},
"complete": true
}