Search Projects endpoint returns 500 error

Hello! When trying to use the search projects endpoint for the API, we get a 500 "Unsupported search request filter" error. The same happens if we delete the filter. Any ideas what we may be doing wrong?

Screenshot of a WorldServer Developers forum API request in a dark interface with a POST method to the search projects endpoint resulting in a 500 Internal Server Error with a message 'Unsupported search request filter'.



Generated Image Alt-Text
[edited by: RWS Community AI at 2:12 PM (GMT 1) on 4 Sep 2024]
Parents
  • Hi Cecilia,

    These are examples that you can paste in request body:

    //all projects with name containing the string "test"

    {"operator":"and","filters":[{"field":"projects(name)","value":"test","operator":"like"}]}

    //all projects with name containing the string "test" that have between 2 and 5 tasks

    {"operator":"and","filters":[{"field":"projects(name)","value":"test","operator":"like"},{"field":"projects(totalTasks)","value":"2,5","operator":"between"}]}

    If you want the result to display only the project ID and project name, you can specify only those fields in the URL (http://hostname/ws-api/v2/projectGroups/search?fields=id,name)

    Alternatively, if you want to identify various filtering options, you can:

    • log in the WSXI UI
    • open the browser developer tools (F12), go to network tab
    • in WorldServer Projects page open the filters menu (screenshot #1 below)
    • apply your filtering parameters
    • in developer tools select the search API call and go to Payload tab
    • click on "View Source" near Request Payload (screenshot #2)

    screenshot #1:

    Screenshot of WorldServer Developers forum showing the Projects page with a filter menu open, indicating a filter for projects with a translation percentage from 50%.

    screenshot #2:

    Screenshot of a browser developer tools Payload tab with a JSON request payload visible, containing search parameters for WorldServer projects with a translation progress between 0 and 50%.

    Best regards,

    Adrian



    Generated Image Alt-Text
    [edited by: RWS Community AI at 1:04 PM (GMT 1) on 9 Sep 2024]
Reply
  • Hi Cecilia,

    These are examples that you can paste in request body:

    //all projects with name containing the string "test"

    {"operator":"and","filters":[{"field":"projects(name)","value":"test","operator":"like"}]}

    //all projects with name containing the string "test" that have between 2 and 5 tasks

    {"operator":"and","filters":[{"field":"projects(name)","value":"test","operator":"like"},{"field":"projects(totalTasks)","value":"2,5","operator":"between"}]}

    If you want the result to display only the project ID and project name, you can specify only those fields in the URL (http://hostname/ws-api/v2/projectGroups/search?fields=id,name)

    Alternatively, if you want to identify various filtering options, you can:

    • log in the WSXI UI
    • open the browser developer tools (F12), go to network tab
    • in WorldServer Projects page open the filters menu (screenshot #1 below)
    • apply your filtering parameters
    • in developer tools select the search API call and go to Payload tab
    • click on "View Source" near Request Payload (screenshot #2)

    screenshot #1:

    Screenshot of WorldServer Developers forum showing the Projects page with a filter menu open, indicating a filter for projects with a translation percentage from 50%.

    screenshot #2:

    Screenshot of a browser developer tools Payload tab with a JSON request payload visible, containing search parameters for WorldServer projects with a translation progress between 0 and 50%.

    Best regards,

    Adrian



    Generated Image Alt-Text
    [edited by: RWS Community AI at 1:04 PM (GMT 1) on 9 Sep 2024]
Children
No Data