Relations Master - Retreive Related Data with API

I appear to have completed this successfully, but it is not showing as done. I issued the following GET call from a REST client:

https://api.backendless.com/00BEB388-B69B-7A27-FF42-7CFDF3C66300/[REST-KEY]/data/Person/17223537-82BC-4938-B749-5A6F35D10A0A

Which returned the following data:

{
“created”: 1598755117000,
“name”: “Joe”,
“___class”: “Person”,
“ownerId”: null,
“updated”: 1598755123000,
“age”: 30,
“objectId”: “17223537-82BC-4938-B749-5A6F35D10A0A”,
“cityOfResidence”: {
“created”: 1584136433000,
“___class”: “City”,
“Population”: 234323,
“ownerId”: null,
“updated”: 1594441927000,
“District”: “Utrecht”,
“objectId”: “8”,
“Name”: “Utrecht”,
“Location”: {
“type”: “Point”,
“coordinates”: [
5.12,
52.1003
],
“srsId”: 4326,
“___class”: “com.backendless.persistence.Point”
}
}
}

Am I doing something wrong here?

My app id is: 00BEB388-B69B-7A27-FF42-7CFDF3C66300

Hello @Andrew_Schox

Could you please provide the entire URL (without REST API KEY) but with all query parameter

Regards, Vlad

Here is the full URL:

GET /00BEB388-B69B-7A27-FF42-7CFDF3C66300/[Rest-Key]/data/Person/17223537-82BC-4938-B749-5A6F35D10A0A?loadRelations=cityOfResidence

Response is as given before.

With https://api.backendless.com/ at the front of the URL

looks like I see where the issue, you use “findById” API route but you have to use “find”, that’s mean to retrieve the object you need to use “whereClause” instead of specifying its id in the URL

https://backendless.com/docs/rest/data_search_with_where_clause.html

Regards, Vlad

That was it! Thanks :slight_smile: