- Edited
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"}' http://ticket.myhost.net/api/
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 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:
xxx.xxx.xx.xx - - "POST /api/ HTTP/1.1" 302 5 "-" "curl/7.26.0"
There are no errors in the logs.
So Curl found ticket.myhost.net/api/.
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