GetFeedback for Apps Campaigns let you survey your users from an Android or iOS app. After creating your Campaign, you’ll be able to analyze incoming feedback items through your GetFeedback Digital account or our public API.
This article is written for developers who want to request data using our public API. Before reading this article, we recommend you read our public API documentation.
The request URL for GetFeedback Digital for Apps Campaign data is:
The parameters below 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. |
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. |
Campaign Results returns the responses of one or all your Usabilla for Apps campaigns.
https://data.usabilla.com/live/apps/campaign/<id>/results
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. |
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 GetFeedback Digital 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 GetFeedback Digital 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. |
Before trying to make an API call, we need to make sure Python is installed on your computer. Some computers have Python pre-installed.
Open Terminal on your computer and type python
Based on the output above, we can see that Python 2.7 is installed. If you have version 2.7 (or 2.7.x), you can continue to step 2!
If you’re on a Windows computer, you may have to navigate to the Python installation folder for the Python interpreter to work.
If not, we will have to install Python 2.7:
Navigate to www.python.org/downloads. Click the download link for version 2.7 and follow the installation instructions. After installing python, open your Terminal and type the command python again. The Python interpreter should now show the version number.
Now, let’s create a Python file to test your setup.
Now that you have Python installed, it’s time to install the GetFeedback Digital python library on your computer.
Note: If you're using a Windows OS or have difficulties installing pip in step 1, then follow the guidelines here: https://pip.pypa.io/en/stable/installation/. If you're running into issues in step 2, then type sudo pip install usabilla-api on Mac. For Windows, run the terminal as Administrator and then try again
To get you started making API calls to our servers, let’s walk through an example of how you can retrieve all GetFeedback Digital buttons from your account
1. Start by creating a file in your Python folder which we will name getAllButtons.py
2. In the code editor, paste this code into your file:
3. Change the access key and secret key and then save the file.
4. Open Terminal and move into the Python folder by using cd
5. Once you’re in your python folder with the getAllButtons.py file, you can execute it from the Terminal by typing: python getAllButtons.py in the Terminal window.