Task not registering as completed

Mission: DATA MINER
Task: Retrieve Data With Aggregate Functions

I have completed the task but it is not showing as completed.

Below is the URL I used to access the REST API (where I replaced <my-backendless-subdomain> with mine):

https://<my-backendless-subdomain>.backendless.app/api/data/Country?property=Continent&property=Count(%60created%60)%20as%20CountryCount&property=Min(%60LifeExpectancy%60)%20as%20MinLifeExpectancy&property=Max(%20LifeExpectancy)%20as%20MaxLifeExpectancy&groupBy=%20Continent

I am getting output which matches Mark’s in the video:


and it includes all the conditions of the task:

  • I am using the REST API
  • I am working with table Country
  • I am grouping data by the values in the Continent column
  • I am retrieving aggregate values CountryCount and MinLifeExpectancy
  • The Continent property is included in the response

Could you help me understand what else I need to do to trigger task completion?

Hi John,

You are correct, the query you constructed does exactly what the task asks you to do. However, the algorithm that validates the task checks not only the response, but the format of the query as well (I’d say it is unfortunate because tasks should be more oriented around the goal, rather than the means, but it is what it is…).

If you notice in the video, the URL I construct used the props query argument instead of property as in your case:

Try modifying the query where all the properties you request are separate by a comma in the props parameter in the request URL. I suspect that should do the trick.

Regards,
Mark

Thankyou! I replaced property with props as you said, to get the following query string (where I replaced <my-backendless-subdomain> with mine):

https://<my-backendless-subdomain>.backendless.app/api/data/Country?props=Count(%60created%60)%20as%20CountryCount,Continent,Min(%60LifeExpectancy%60)%20as%20MinLifeExpectancy&groupBy=%20Continent

which produces the correct output:

but that still didn’t trigger the task to register as complete. But, then while further playing around to make mine look more like yours, I took out the %60 special characters in my query string, and then the task registered as complete!

TL;DR
For anyone who copies their REST API string from the REST CONSOLE like I did, make sure to take out the %60 characters before submitting it.

1 Like