API Call, "Unauthorized" but valid user/pwd?

I am attempting to execute a “activate changes” api call and getting a “Unauthorized” status response. However I CAN add a host and retrieve host data with the creds used for the activate changes API call.

Does this error look to mean something other than a failed bearer?

2021-11-05 17:56:59.852 -05:00 INFO Request Content:{"redirect":false,"sites":["primary"],"force_foreign_changes":false}
2021-11-05 17:56:59.854 -05:00 INFO Request URL: https://checkmk.[REDACTED]/primary/check_mk/api/1.0/domain-types/activation_run/actions/activate-changes/invoke
2021-11-05 17:56:59.917 -05:00 INFO Status code: 401
2021-11-05 17:56:59.918 -05:00 INFO Content as string: {"title": "Unauthorized", "status": 401, "detail": "401 Unauthorized: The operation has failed."}

“Activate changes” is a setting inside you role definition.
Can you please check if the role this user has, has the proper rights?

The role for the account is set to “Administrator”. Is there a log entry I can see incoming API calls and perhaps errors from them? I’ve poked around but unable to find anything meaningful on my own so far.

Figured out my problem. Not only was there automated changes in queue to apply, there was also changes from another user. The force was set to false, thus the error.

It would be really convenient to selectively apply changes.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.