I am using REST API call to get the tickets, in this case i am getting old tickets, But I want latest updated tickets using the REST API call, can u help me on this.
Using this I am getting old tickets:http://myserver:8050/caisd-rest/in
It is working now.
Thank you so much,
If you are trying to update a specific ticket, then you'd have to specific the URL of that ticket (example: http://SDMURL/caisd-rest/in/12345 and not the generic one ( http://SDMURL/caisd-rest/in )
Then you can update the ticket 12345 with something like:
<description> updating via REST </description> </in>
Hope this helps
This is for updating purpose,
But I need url to get the latest created tickets.
Nagarjuna, with the /in open query, your GET will return a lot of tickets and that is why you see old tickets. If you want to see new tickets or some specific tickets, then you would need to user WHERE clause. For example,
will return all incidents with priority=1
Hope this helps. Thanks _Chi
Sorry a mistake in my post...it should be
for priority=1 incidents not
Hi Chi chen,
This is for getting tickets based on priority.
But I want url for latest created tickets.
Nagarjuna, what tickets are "latest created tickets"? the tickets opened in the last week? last month? or last year?
Could your problem be related to a wrong sorting order and the paginating ?
By default many objects are sorted by their id value in a ascending order.
Additionaly you only get the first 25 records as far as I am aware of.
So try to use the following :
This should result in the 25 most recent incidents...
The problem is related to sorting order based on id.
Using SORT=id desc, getting invalid url error.
It works for me quite well.
what is different between your and mine test? Again my URL just for sure:
This is a Screenshot of my Soap ui test:
you might have to escape the space between id and desc:
Retrieving data ...