What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

Create a new ticket via API

Votes:

0

What ist the correct line for create a new ticket via prtg-api?

I tried http://[server]/api/addticket.htm?username=[myuser]&passhash=[mypasshash]&id=0&subject=Test&assigned=3301&content=contentcontentcontent&priority=3&comment=commentcommentcomment and the system answers "OK", but no new ticket was created.

(0 is the objectid of the main object in sensor-tree) (3301 is the id of a group i've created)

api create prtg tickets

Created on Aug 17, 2016 5:23:47 AM



19 Replies

Accepted Answer

Votes:

0

This will work:

http://<prtg-host>/api/addticket.htm?id=new&subject=<subject>&assigned=<group-or-user-id>&priority=<priority-1-to-5>&objectid=0&content=<the-ticket-comment>&username=<username>&passhash=<passhash>

When the creation was successful, PRTG will not return OK, but an integer, resembling the ticket ID.

Created on Aug 17, 2016 11:40:51 AM by  Stephan Linke [Paessler Support]

Last change on Aug 17, 2016 11:41:20 AM by  Stephan Linke [Paessler Support]



Votes:

0

Genius! That works!

Now I can redirect user generated mails to our ticketsystem (text-only) into prtg tickets

Created on Aug 17, 2016 12:12:14 PM



Votes:

0

Nice :)

Created on Aug 17, 2016 12:45:10 PM by  Stephan Linke [Paessler Support]

Last change on Aug 17, 2016 12:45:55 PM by  Stephan Linke [Paessler Support]



Votes:

0

Created on Jul 18, 2017 11:01:55 AM



Votes:

0

Hi there,

Did you check Tickets | All as well? The code above should work ...I'll check it.
[edit] Just tested, works as expected.


Kind regards,
Stephan Linke, Tech Support Team

Created on Jul 19, 2017 6:05:52 AM by  Stephan Linke [Paessler Support]

Last change on Jul 19, 2017 6:09:00 AM by  Stephan Linke [Paessler Support]



Votes:

0

Hi,

Yes checked for Tickets | All but the ticket is not there. Is there any setting to take note on? The option to enable user to use ticketing system is ON.

The result is OK, if it is working, it should return the ticket id?

Thanks.

Created on Jul 19, 2017 6:55:34 AM



Votes:

0

Correct, it should return the ID of the newly created ticket. Could you post the exact URL you're using, minus host/username/passhash?

Created on Jul 19, 2017 7:12:13 AM by  Stephan Linke [Paessler Support]




Votes:

0

Try using 200 as the user ID - does it work then? Does the user ID you're using actually exist?

Created on Jul 19, 2017 11:17:13 AM by  Stephan Linke [Paessler Support]



Votes:

0

Hi,

200 is working fine. The user ID does exist and ticket system option enabled. Is there any log we can check what is the problem?

Thanks.

Created on Jul 21, 2017 2:53:24 AM



Votes:

0

It works with every user ID, in principle at least. Did you try another user ID as well?
What PRTG version are you currently using?

Created on Jul 21, 2017 5:09:55 AM by  Stephan Linke [Paessler Support]

Last change on Jul 21, 2017 5:10:19 AM by  Stephan Linke [Paessler Support]



Votes:

0

Hi,

My version is 17.3.32.2339+. I tried with multiple user ids and switched objectid as well, but it still same.

Created on Jul 21, 2017 8:20:55 AM



Votes:

0

Are you logged in with the PRTG Administrator or a different one?

Created on Jul 21, 2017 8:26:18 AM by  Stephan Linke [Paessler Support]



Votes:

0

Hi, Below is my step,

Run API Url on browser -> returned "OK" -> Login as prtgadmin and check [Tickets]->[All Tickets]->[All] -> Ticket was not created.

I used prtgadmin account to run the API and assign to user (even tried assign to prtgadmin) with PRTG Admin rights.

Thanks

Created on Jul 21, 2017 8:38:44 AM



Votes:

0

Is your PRTG webinterface available via internet? Could you post the URL and some credentials
so I can test it myself? Of course these replies won't be published, no worries.

Created on Jul 21, 2017 8:44:33 AM by  Stephan Linke [Paessler Support]



Votes:

0

Could you provide me with a password as well so I can check the tickets? Thanks!

Created on Jul 26, 2017 6:55:13 AM by  Stephan Linke [Paessler Support]



Votes:

0

Works completely fine when using the user ID instead of the username (in this case, it's assigned=2221). The ticket ID is returned properly as well then. So please make sure to use the user's ID for the assigned parameter, not his actual username.

Created on Jul 27, 2017 8:38:39 AM by  Stephan Linke [Paessler Support]



Votes:

0

How do I check the user ID?

Created on Jul 27, 2017 10:50:08 AM



Votes:

0

Open up Setup | System Administration | User Accounts and click any account.
Their ID will be visible in the addressbar.

Created on Jul 27, 2017 11:37:48 AM by  Stephan Linke [Paessler Support]




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.