Quantcast
Channel: THWACK: Discussion List - All Communities
Viewing all articles
Browse latest Browse all 16365

WHD API - How to search for tickets by creation date?

$
0
0

I've had a rough relationship with the WHD api.  The documentation is pretty brief for my skill level and leaves me confused about how to find some parameters. 

Currently, I'm trying to search on tickets by their creation date.  This appears to be the reportDateUtc field, but I can't seem to get it to work in any of the qualifier parameter statements.

 

Something like this works fine (as a general example - I use python):

 

import tortilla

whd = tortilla.wrap('https://my.fancy.website/helpdesk/WebObjects/Helpdesk.woa/ra/')

tot = whd.Tickets.get(params={'style': 'details',

                              'qualifier': "((problemtype.parentId = 10)and(statustype.statusTypeName != 'Closed'))",

                              'apiKey': 'mysupersecretapikey'}, debug=True)

print('Open tickets: ', len(tot))

 

To start searching on dates I can change it to something like this:

                              'qualifier': "((problemtype.parentId = 10)and(lastUpdated > '2015-06-01T00:00:00Z'))",

and I'll have the items updated after June 1, never mind the zulu time for now.

 

The lastUpdated can be swapped out for closeDate, but what I really want is reportDateUtc.  That doesn't work.  How do I get the created date of the tickets?  That's what I want.  The parameter sure seems to be reportDateUtc but I can't manage to reference it.  It seems to be at the same level in the JSON, from the API docs, as these other dates and I know I have the date format correct...  

 

I'm even specifically getting 'style': 'details' because the reportDateUtc doesn't show up in short.   What am I doing wrong?  Probably something simple...


Viewing all articles
Browse latest Browse all 16365

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>