2 Replies Latest reply: Dec 7, 2016 12:00 PM by praveena mundolimoole RSS

    Cannot get task by app name with QRS API

    Mengyi Yuan

      Hello,

       

      I am trying to get a list of tasks that are related to a task. Normally I would use a GET request to the QRS API with a filter, so the query is like "https://<server name>/qrs/task/full?xrfkey=0123456789abcdef&filter=app.name eq 'MyWorkApp1'"

       

      But for some reason, this query does not work, giving the error:

      "Cannot convert the constant value: app.name"

       

      On the other hand, if I use similar query to get apps based on owner name is returning valid results, the query is:

      https://<server name>/qrs/app/full?xrfkey=asdfghjklzxcvbnm&filter=owner.name eq 'myemail@domain'

       

      Why one is returning results while the other gives errors?

       

      Thanks a lot!

       

      Mengyi

        • Re: Cannot get task by app name with QRS API
          Mengyi Yuan

          Hello,

           

          I have solved the problem myself, two points to notice:

          - I need to use reloadtask as the endpoint not task

          - If I need to filter based on app.id, there should not be quotes around the GUID

           

          The query that works for me now is:

          https://<server name>/qrs/reloadtask/full?xrfkey=0123456789abcdef&filter=app.id eq <GUID>

           

          Hope this will help anyone who has the same problem.

           

          By any chance, does anyone know why using task as endpoint won't work?

           

          Thanks!

          • Re: Cannot get task by app name with QRS API
            praveena mundolimoole

            mengyi.yuan Qlik has 2 types of tasks

            1. User synchronization
            2. Reload task.

            Since you want to fetch reload task you should use /qrs/reloadtask/full endpoint in particular. Task may or may not have app association. Hence the filter is not allowed by app name/id.

             

            Note :  If you feel this is the right answer please mark as Correct answer.