Create ticket using an API

Good day!

We are just starting to use LibreNMS and i know very little about APIs. Is there a way to use an API to create a ticket once an alert is triggered?

I know the API URL and options:


but where do I put this in the alerts setup? Is there some code from LibreNMS that i can put wire in a subject and description?


You could consider creating tickets from an email otherwise,

For API transport, it should support the same format in the URL as the alert templates use

I imagine it could look something like


Thank you for getting back to me.

I am playing with LibreNMS to our tst ticket system. The test ticket system does not have email attached to it.

thanks for the Subject={{$alert->title}}&Description={{$alert->description}}, just one quick question, where does the title and description come from?

I am guessing the API does not like Subject={{$alert->;title}}, because the subject of the ticket is {{$alert->;title}}

Should the system put in the template title or is that not supported via the API?

Ahh the api transport is still using the old template syntax see here for work in progress to switch to current format , looks like it’s close to working so you might be better to wait.

If you need it right now, then it looks like you will need to go back in time and use old template syntax

Thank you for all your help!!!

switching it to Subject=%title worked.

however, Description=%description did not.

But at least we can now create a ticket and the ticket shows the device that is down and it time stamped from the API.

Great :slight_smile:

and that’s the description of device which might not be set. Not description of alert. You’ll have to go through the template doc to see what you want to get out of it