Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

osTicket API

I just installed today - the install process went without warning or error. Because I do not want tickets created via email, I have created a new API key and the associated IP address to use with my Sensu monitoring platform to create tickets directly. Even though the interface is not documented I am testing using curl. I am sending a JSON payload and assume a POST is required: curl -H "Accept: application/json" -H "Content-type: application/json" -H "Authorization: Token token=D4EE57DD2D584C184256FAB77894C100" -X POST -d '{"status":"alert", "details":"this_is_a_test"}' I get no response and no ticket is created. I tried other paths and I see PHP codes or the "URL not supported" message. So I have a good connection. I am running: Debian Wheezy 2.6.32-042stab084.12 #1 SMP Mon Jan 27 00:40:08 MSK 2014 x86_64 GNU/Linux Mysql Server version: 5.5.33-0+wheezy1 nginx version: nginx/1.4.4 //using the working osTicket configuration from the nginx site Nginx log for osTicket: - - [11/Feb/2014:16:29:38 -0700] "POST /api/ HTTP/1.1" 302 5 "-" "curl/7.26.0" There are no errors in the logs. So Curl found Is this a configuration issue? Can I use the API with JSON to create tickets? Do I need to change the JSON payload? Thanks Dan


  • The api_ticket_create.php code works - tickets are being created I will see how I can integrate with the monitoring platform. I'll be back...
  • edited August 2016
    Hi cano,
    Please have you find the error? I have the same issue, I use apache as local server when I create ticket using API everything works fine, I use the url like 'url'=>'http://localhost/osticket/api/http.php/tickets.json', and the key, but recently they've changed the production server from apache to nginx and the API doesn't work. I've tried to go through http://localhost/osticket/api/http.php/tickets.json the result I received is "URL not supported" message = good connection but in production server using the result displayed is file not found or using url until http.php result "url not supported", but when I use the same URL to use API no error is displayed. How could I acces to api folder in nginx?
Sign In or Register to comment.