New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

200.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

 

Top Tags


View all Tags


Create a new ticket via API

Votes:

0

Your Vote:

Up

Down

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 by  Haerter (0) 1



19 Replies

Accepted Answer

Votes:

0

Your Vote:

Up

Down

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

Your Vote:

Up

Down

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 by  Haerter (0) 1



Votes:

0

Your Vote:

Up

Down

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

Your Vote:

Up

Down

Created on Jul 18, 2017 11:01:55 AM by  Eddy Ooi (0) 2



Votes:

0

Your Vote:

Up

Down

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

Your Vote:

Up

Down

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 by  Eddy Ooi (0) 2



Votes:

0

Your Vote:

Up

Down

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

Your Vote:

Up

Down

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

Your Vote:

Up

Down

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 by  Eddy Ooi (0) 2



Votes:

0

Your Vote:

Up

Down

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

Your Vote:

Up

Down

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 by  Eddy Ooi (0) 2



Votes:

0

Your Vote:

Up

Down

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

Your Vote:

Up

Down

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 by  Eddy Ooi (0) 2



Votes:

0

Your Vote:

Up

Down

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

Your Vote:

Up

Down

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

Your Vote:

Up

Down

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

Your Vote:

Up

Down

How do I check the user ID?

Created on Jul 27, 2017 10:50:08 AM by  Eddy Ooi (0) 2



Votes:

0

Your Vote:

Up

Down

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]



Please log in or register to enter your reply.


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.