AnsweredAssumed Answered

How do I find Incidents by Requester via API?

Question asked by Thomas DiCiaccio on Sep 16, 2016
Latest reply on Sep 22, 2016 by Thomas DiCiaccio

I'm trying to use the API to pull a list of incidents created by a particular user.  Typically I format the HTTP request to get the result I want instead of parsing through the 11,000 or so tickets we have in our system.


When I try to pull a list of incidents I use a GET request from the following URL:[]=[user_id_number]


This did not work as intended and produced zero results.  I looked into the Requester object in the .xml file for a test Incident and found that there are two different ID numbers assigned as shown below:



     <account_id>[Account ID]</account_id>



     <name>User Name</name>



     <customer_satisfaction_survey_time nil="true"/>


When plugging  <id>1260128</id> into user_id_number in the original URL, I get the intended result.


The problem arises, however, that I cannot find that ID number anywhere else.  In the user .xml object, there is the following information:



     <name>User Name</name>


     <title nil="true"/>



     <last_login nil="true"/>

     <phone nil="true"/>

     <mobile_phone nil="true"/>

     <department nil="true"/>


Is there a smarter way to pull a list of incidents via API by a requester without parsing through them all?  Or alternatively, is there a way to find the <id>Requester ID<id> field?