The easyfeedback interface is a REST-based API. Basic data from easyfeedback are provided via the API. The documentation refers to the V2 of the easyfeedback API.
Sign in & authentication
You can sign in to the API by using the following method. To create the required credentials (API access), go to your easyfeedback account and click on “Account > Account data” and open the “Integration” tab. Here you can create and manage your credentials.
Please note: According to the user administration, your personal credentials only give you access to the survey data that are assigned to your user group.
Base URL |
https://app.easy-feedback.com/api/v2 |
Grant Type |
ClientCredentials |
Credentials |
Basic Auth Header |
Token URL |
https://app.easy-feedback.com/api/v2/token |
Authentication method |
OAuth2 |
Only the “Client Credentials” grant type is available.
Example: Authentication – Retrieve access token
<?php
// Authentication - Retrieve access token ($accessToken)
// getAccessToken.php
// v1.0.1
// https://app.easy-feedback.com > Account > Accountdata > Integration > Set up new client access
// Enter client ID here
$clientId = 'YOUR_CLIENTID';
// Enter security ID here
$clientSecret = 'YOUR_CLIENTSECRET';
$accessTokenUrl = 'https://app.easy-feedback.com/api/v2/token';
// Compile data for the enquiry
$data = array(
'grant_type' => 'client_credentials',
'client_id' => $clientId,
'client_secret' => $clientSecret,
);
// Configure cURL options
$ch = curl_init($accessTokenUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
// Carry out enquiry
$response = curl_exec($ch);
// Process the result (e.g. extract the access token)
$result = json_decode($response, true);
if ($result && isset($result['access_token'])) {
$accessToken = $result['access_token'];
echo 'Access Token: ' . $accessToken;
} else {
echo 'Fehler beim Abrufen des Access Tokens.';
}
echo '<br><br>JSON-Antwort: <pre>' . json_encode($result, JSON_PRETTY_PRINT)."</pre>";
// Close cURL connection
curl_close($ch);
?>
Restrictions
Access to the API is limited to a total of 60 requests per minute per method.
Queries can be restricted using the “page” and “limit” parameters in order to avoid upper limits for queries. The total results are returned in several pages with the number of results specified for “limit”.
With “page = n” you get the respective page of the results.
Use of parameters
The parameters are appended to the URL as URL-encoded GET parameters.
Example:
All participants in survey 42 should be called up via “/api/v2/members”. As the survey has a large number of participants, pagination is used to obtain a maximum of 100 results from page 1. The parameter part of the URL begins with a question mark, followed by the parameters as pairs, each with name and value, connected with an equals sign. The individual parameter pairs are connected with an “ampersand” (&). More information on the structure of URL parameters: https://wiki.selfhtml.org/wiki/URL-Parameter
Parameter:
surveyid=42
page=1
limit=100
Results as query URL:
https://app.easy-feedback.com/api/v2/members/?surveyid=42&page=1&limit=100
Data format
The return format is JSON in each case. The results consist of two objects:
- meta – Contains meta information about the data and the query
- results – Contains the actual data as an array of objects
Dates are always in ATOM format. Example: 2003-12-13T18:30:02.25+01:00
The following return values are available for the “meta” object:
count |
Number of results returned on the page |
page |
Called page |
limit |
Maximum number of results per page |
lastPage |
Last available page |
total |
Total available results |
requestedAt |
Timestamp of the API call |
Example of a result with pagination:
{
"meta": {
"count": 1,
"page": 1,
"limit": 20,
"total": 1,
"requestedAt": "2023-09-07T08:33:40+00:00"
},
"results": [
{
"Id": 14079,
"Type": "String",
"MemberId": 32103,
"QuestionId": 959,
"AnswerId": 40,
"LevelId": 0,
"Text": "th.jpeg"
}
]
}