I'm trying to create support tickets using API and I couldn't find a good guide on how to achieve this.

https://docs.osticket.com/en/latest/Developer%20Documentation/API%20Docs.html seems to be the only available and does not contain much help.

Can anyone share a sample PHP code that you may have used to setup ticket creation?

The current documentation is very limited, but there are a few cases i've seen it work.

However, im working on a plugin-style API for OSTicket.
Maybe this will help you.

https://github.com/BMSVieira/osticket-api

EDIT:

After a quick search, i found this:
https://raw.githubusercontent.com/RockefellerArchiveCenter/osTicket/master/setup/scripts/api_ticket_create.php

Give it a try.
As i said, im not sure it will work.

    BMSVieira Actually, I already referred to your project. Good work and keep it up mate! Only thing is as far as I saw, your API does not support creation of new tickets yet right?

      17 days later

      BMSVieira

      HI, great work you did with the OsTicket API.

      Do you think it's possible to also add to the custom added fields?

      I lost the values of those fields in a upgrade. (the app works fine, the custom added fields are still definied after upgrade but que content of the fields of the records became "empty" during the upgrade.
      I need to recover the lost data.

      Thank's a lot.

      @gfuente

      Hey, thanks!
      I'm currently working on adding new features and "custom fields" are definitely on the to-do list.
      I'm not sure when it will be out, im short on time this couple weeks... but it will be very soon.

        Thank you very much for answering.

        I'm new to osticket...for now in my role as administrator and trainer of end users.

        But I can also help from the programming side if I could have access to the documentation in the development environment.

        For example, I don't know what the persistence of custom aggregate fields looks like... nor of the (I imagine) classes and methods defined for their manipulation.

        Do you know where I can find more info? for now I plan to see the ERD published in the documentation for developers...

        a month later

        http://happytohelptech.com/myhelpangels/ost_wbs/?query=user&condition=specific&sort=id&parameters={id=2}

        @BMSVieira am I writing this right according to osticket-api [link removed by admin]

          mdshkarif

          Yea but that's a 3rd party mod. Please don't link directly to 3rd party mods on this forum.

          Cheers.

          2 years later

          BMSVieira

          I would like to be able to 'send' tasks from OSTicket into a calendar app, such as Google Calendar.

          Could you add this capability to your API?

            JRayfield

            This is not a support forum for 3rd party mods. Go open an issue in their GitHub.

            Cheers.

            Write a Reply...