This endpoint performs retrieving datalists from filter fields that marked with datalist flag. Included are two query parameters: source and field denoting the source identifier and field name the datalist is to be grabbed for.

Request

The POST body includes a JSON serialized authentication object formatted according to the authentication scheme provided in the initial GET / request:

//POST BODY /datalist?source=supersource&field=country
{
  'auth': 'basic', // the identifier of the account type
  'username': 'Superman', // all fields according to the account format
  'password': 'annoyingj0k3r',
  /*...*/
}

The app should utilize these authentication credentials to gather possible values for the field provided.

Response

The response from your API should be a JSON-serialized list of name-value objects:

//POST /datalist?source=supersource&field=country
[
  {'title': 'United States', 'value': 'US'},
  {'title': 'Belarus', 'value': 'BY'},
  /*...*/
]

The title in each object is what is displayed to the end-user for each value in a combobox and the value is what is stored with the filter and what will be passed with subsequent requests that utilize the user-created filter.