This is a migrated thread and some comments may be shown as answers.

Problem filtering data relations with RESTful API

1 Answer 81 Views
REST API
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Matt
Top achievements
Rank 1
Matt asked on 30 Jul 2016, 12:32 AM

I have my data relations setup on the Telerik backend and I need to filter them based on a user's selection. When I add a filter(id) I get an error.

DataRelations:

https://api.everlive.com/v1/zqptwkzq293nmpyn/Systems?expand={"Service_Rel":{"TargetTypeName":"Systems"}}

Selecting a single item returns an error using the RESTful API but works fine in this URL:

https://api.everlive.com/v1/zqptwkzq293nmpyn/Systems/43440bf0-52b5-11e6-a2d0-bd4b32a72243?expand={%22Service_Rel%22:{%22TargetTypeName%22:%22Services%22}}

Any help is greatly appreciated.

MS

1 Answer, 1 is accepted

Sort by
0
Anton Dobrev
Telerik team
answered on 02 Aug 2016, 01:16 PM
Hello Matthew,

I am guessing that you have encountered two of the most possible errors:

- "Invalid expand expression"

You may need to check whether the expand expression is a valid JSON object, either URL encoded or not.

- "Filter and Sort are not allowed when expanding multiple items"

You may need to check whether you are not using a filter in the expand expression to tailor the expanded data in regard to the limitations outlined here.

On the other hand, you can use the standard X-Everlive-Filter header to supply a filter to tailor the parent data before expanding it.

I hope that this helps.

Regards,
Anton Dobrev
Telerik by Progress
 
Everlive is now Telerik Backend Services, and is part of the Telerik Platform.
 
Tags
REST API
Asked by
Matt
Top achievements
Rank 1
Answers by
Anton Dobrev
Telerik team
Share this question
or