Authentication problem while getting the "serverinfo" - URL

Hi folks,

I’ve just set up a new nextcloud instance, which is working fine so far.
Now I would like to read ouf the serverinfo URL ("…/nextcloud/ocs/v2.php/apps/serverinfo/api/v1/info") by an external monitoring tool, but I’m struggeling to get around the authentication; whatever I call I end up with the logon page.

This doesn’t work

as well as this one:

Did somebody try this before and has a hint for me?


Doesn’t help with your authentication problem. Take a look at munin. That’s a software made for monitoring, especially over network.

Yeah, thanks for that hint.
But there must be a way to call this page, otherwise it’s completely useless. :wink:

You probably also need to send a OCS-APIRequest: true HTTP header. Then the endpoint should work.

Thanks Lukas, that pointed me to the right direction.

Unfortunately now I get a

(405) Method Not Allowed. when sending as a POST request,
997 Unauthorised when sending a GET request.

So I assume “POST” is the correct method, nevertheless I do not reach my goal.
Can I get more debug information anywhere ?