Problem filtering data relations with RESTful API

2 posts, 0 answers
  1. Matt
    Matt avatar
    1 posts
    Member since:
    Mar 2016

    Posted 29 Jul Link to this post

    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

  2. Anton Dobrev
    Admin
    Anton Dobrev avatar
    539 posts

    Posted 02 Aug Link to this post

    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.
     
Back to Top