Created a class "Promotion" extending "DataObject" and set $api_access = true. I now have some has_one relations, like below:
class Promotion extends DataObject
static $api_access = true;
public static $has_one = array(
"TeaserImage" => "Reference_TeaserImage",
"Themenseite" => "Page"
I would now like to call this page via Restful-Server, so I typed:
As from here it works fine. I get data like this
<Themenseite linktype="has_one" href="http://localhost/silverstripe/api/v1/Page/6.xml" id="6"/>
As you can see, I can not recieve the location / filename of the TeaserImage, and not the URLSegment of the linked Page. There is a URL Parameter called "relationdepth" in the RestfulServer, but it has no effect to the result.
Can anyone tell me, how I can get the dataobject with image path and path to the linked page within one request?