1 Reply Latest reply on Jun 19, 2013 3:48 AM by optic14

    Rest API - attribute not reachable from entity 'JobTicket'

    optic14

      Hello there,


      I am trying to get a report from WHD using the REST API using the example found here: http://www.webhelpdesk.com/api/#rest-support

      The example I am refining is "Searching for Tickets" where you use the qualifier query parameter. The example shown for using "location.locationName" as the qualifier attribute works fine for me.

      I want to change this attribute to search for tickets using a specific request type. Looking at the the list of variables it seems that the correct qualifier attribute to do this should be "problemtype.id" And the Request type ID is 33 based on what is listed in Setup -> Tickets -> Request Types.

      I then inputted the query as:
      curl "http://helpdesk.server.com:8081/helpdesk/WebObjects/Helpdesk.woa\
      /ra/Tickets?qualifier=(problemtype.id%3D'33')\
      &username=USERNAME&password=PASSWORD"

      Unfortunately this gets returned:
      sqlStringForKeyValueQualifier: attempt to generate SQL for com.webobjects.eocontrol.EOKeyValueQualifier (problemtype.id = '33') failed because attribute identified by key 'problemtype.id' was not reachable from from entity 'JobTicket'.

      It seems I can't access the request type attribute using /ra/Tickets ? Am I doing something wrong or can you advise if there's another way to do this?

      Your help would greatly be appreciated.