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

Problem with the PRTG API

Votes:

1

I am trying to write a script for building groups of new devices. For doing this I need to get the new ID of the Group. But it is not possible to get the ID out of the redirected Page, because I first would have to login. Is there any way of getting through or around the login procedure without the existence of a browser (just inside a script that only can read the headers).

api login script

Created on Sep 1, 2014 5:47:28 AM



4 Replies

Votes:

0

Hi,
you might just add the username/password to the URL you are accessing. Please find below an example:

http://PRTG_SERVER/APICALL&username=USER&password=PASSWORD

This will authenticate the call explicitly without the need of creating a session (like in the browser).
Best regards

Created on Sep 1, 2014 7:33:59 AM by  Konstantin Wolff [Paessler Support]



Votes:

0

Hi,

thanks for the quick reply, unfortunately I am using the Authentication. The link I am trying is: http://mysvr01/api/duplicateobject.htm?id=5154&name=test&targetid=5168&username=user&passhash=123456789 but unfortunately i am being redirected to the Login Page. as the Headers I do not get any Information about the redirected page. I am using Perl and the LWP::UserAgent

Created on Sep 1, 2014 7:40:38 AM



Votes:

0

Hi,
could you try using password instead of passhash?
Also what kind of user are you using for the call? Does the same have Admin permissions?

Created on Sep 2, 2014 11:54:19 AM by  Konstantin Wolff [Paessler Support]



Votes:

0

This did not help. But I found a way around to get the redirected URL. Thank you for your Help. Greetings Robin Hörner

Created on Sep 2, 2014 12:41:49 PM




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.