lordmilko / PrtgAPI

C#/PowerShell interface for PRTG Network Monitor
MIT License
301 stars 37 forks source link

Support API Key Authentication #388

Closed TheUdK closed 5 months ago

TheUdK commented 5 months ago

What are you trying to do, and to what extent does PrtgAPI provide existing functionality around this?

Currently you don't seem to support API Key authentication as documented here and here

Would be great if API Key authentication could be supported in addition to Username/Password and Username/Passhasch.

Tested and confirmed working with:

curl -s 'https://<prtg server>/api/table.json?content=sensors&columns=objid,name,probe,group,favorite,lastvalue,device,downtime,downtimetime,downtimesince,uptime,uptimetime,uptimesince,knowntime,cumsince,lastcheck,lastup,lastdown,minigraph,schedule,basetype,baselink,notifiesx,intervalx,access,dependency,position,status,comments,priority,message,parentid,tags,type,active&count=*&filter_status=5&apitoken=<apikey>'

Is this something that has some sort of parallel in the PRTG UI? If so where do you go/how do you normally do it?

Not really. Except create API keys using https://<prtg server>/myaccount.htm?tabid=5

Due Dilligance

lordmilko commented 5 months ago

It's not clear to me whether these new API keys work with the legacy V1 API or whether this is something that relates to the new V2 API.

PrtgAPI does not support the new V2 API, and as I have mostly moved onto other projects, unfortunately this is not something I will be looking to implement.