Quantcast
Channel: THWACK: All Content - All Communities
Viewing all articles
Browse latest Browse all 20518

Updating tickets in WHD using JavaScript

$
0
0

I'm trying to create a web form which would allow me to update WHD tickets using WHD's REST service. I found the documentation for the WHD API (http://www.solarwinds.com/documentation/WebHelpDesk/docs/WHD_API_12.1.0/Web%20Help%20Desk%20API.html), but all the examples are using a shell script. I was wondering if there was any info on using JavaScript instead. I have the following JQuery code in my script which should update a ticket's subject, but even though it runs successfully, nothing is changed in the ticket.

$.ajax({
url:
http://webhelpdesk.ourcompany.com/helpdesk/WebObjects/Helpdesk.woa/ra/Tickets/48672?apiKey=1234567890blahblahewrevegert,
type: 'PUT',
dataType: 'jsonp',
data:{
"subject":"new"
},
success: function (data) {
alert('success');
},
error: function (xhr, ajaxOptions, thrownError) {
alert(JSON.stringify(xhr));
alert(JSON.stringify(thrownError));
}
});

I can run GET commands just fine which allows me to retrieve data, but I can't update any tickets using the PUT command.

 


Viewing all articles
Browse latest Browse all 20518

Trending Articles



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