Hi,I'm creating a form on my website.I would like to push the form data into OSTicket.Is there an API for me to Create a new ticket &/or Update an existing ticket with this form data.Can someone please direct me to the documentation, could not find on GitHub or Google search,Thanks!Sans

This doesn't appear to be a "Suggestion and Feedback".  Moving to "General Discussion".Official documentationhttps://github.com/osTicket/osTicket/blob/43bf186db9e85c8ec218158ea4c0bc3e90bbe3eb/setup/doc/api.mdThis is a dated article but much of it is still accurate.http://tmib.net/using-osticket-1812-api

Hi @[deleted] Thanks for the links.I tried the suggested script, but no luck :(There is no tickets.json file in the "api" folder so I used /http.php/tickets.json urlMy script is here:https://pastebin.com/13dy7sBU When I execute the php script I get the following output:

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Courier; color: #dafeef; background-color: #000000} span.s1 {font-variant-ligatures: no-common-ligatures}

# php CP-to-OST.php 

Array

(

    => John Doe

    => john@gmail.com

    => 1234567890

    => Test API message

    => This is a test of the osTicket API

    => 192.168.4.7

    => 1

)

No ticket is created. Nothing in "_ticket" & "_thicket_thread" tables.Any ideas where should I start my debug? A bit lost.Any suggestions will be of help.Thanks

Hi @[deleted] Sorry, my bad. On reviewing the code again, I realized debug=1 was actually terminating the script.if($debug=='1') {  print_r($data);  die();}I set debug=0 and tickets are now getting added into OSTicket.Thanks for your help!

Look also here:https://docs.osticket.com/en/latest/Developer%20Documentation/API%20Docs.html

@rsclmumbai  does that mean I should close and mark this thread as resolved?

Write a Reply...