Hello All,

I have just started looking into using the api for certain tasks but run
into some difficulties.

Icinga: 2.5.4-1

The client I am using to access the api is MS PowerShell's
Invoke-WebRequest (I know I know).

I also have the api configured according to the documentation with a single
user and the permissions just like in the example.

When I issue a GET request using the uri /v1 I do get a response and all
looks well.
However the log looks like this:
*[2017-05-25 11:57:16 +0100] information/HttpServerConnection: Request: GET
/v1 (from [192.168.0.10]:49586, user: <unauthenticated>)*
*[2017-05-25 11:57:16 +0100] warning/HttpServerConnection: Unauthorized
request: GET /v1*
*[2017-05-25 11:57:16 +0100] information/HttpServerConnection: Request: GET
/v1 (from [192.168.0.10]:49586, user: root)*

There is always this triplet of lines for each GET /v1.

The bigger problem however is when I try to issue a POST using the same
credentials to have a pki ticket generated.

POST /v1/actions/generate-ticket results in a 400 and the following log:
*[2017-05-25 12:17:18 +0100] information/HttpServerConnection: Request:
POST /v1/actions/generate-ticket (from [192.168.0.10]:49592, user:
<unauthenticated>)*

What am I doing wrong?
Any help would be appreciated.
_______________________________________________
icinga-users mailing list
[email protected]
https://lists.icinga.org/mailman/listinfo/icinga-users

Reply via email to