| GET | 3/surveys |
In this example we will show you how to use the select parameter when querying results. We will combine the select parameter with a filter parameter to only retrieve the surveys which are currently LIVE.
curl "https://api-us.agileresearch.medallia.com/3/surveys?select=Id,Title,StartDate&filter=SurveyStatusId%20eq%202"
-H "X-Master-Key:{MasterKey}"
-H "X-Key:{Key}"
-k
System.Net.Http.HttpClient client = new System.Net.Http.HttpClient();
client.BaseAddress = new Uri("https://api-us.agileresearch.medallia.com/");
client.DefaultRequestHeaders.Add("X-Master-Key", "{MasterKey}");
client.DefaultRequestHeaders.Add("X-Key", "{Key}");
client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json"));
string fields = "Id,Title,StartDate";
string filter = "SurveyStatusId%20eq%202";
System.Net.Http.HttpResponseMessage response = client.GetAsync(string.Format("3/surveys?select={0}&filter={1}", fields, filter)).Result;
selectIf you would like to combine several columns in a select parameter, you can combine them seperated with a comma. The order of the columns is not important.
filterThe list of survey statusses can be retrieved with GET - 3/lookup/surveystatus.
We have used the following methods in this example. You can find all details regarding each request in the API Reference.
| GET | 3/surveys |