I’m trying to use the OttoFMS Admin API to restart the wpe processes on the server. I have created and Admin API key in OttoFMS and have successfully tested that key by calling the https://{FMS Name Here}/otto/api/info endpoint.
When I POST to https://{FMS Name Here}/otto/api/fms-process endpoint with the following body:
{“command”:“restart”,“service”:“wpe”}
and the following cURL:
-X POST -H “Content-Type: application/json” -H “Accept: application/json” -u “Authorization: Bearer {apiKey Here}”
I get the following response:
“Unable to validate credentials: Local Admin API error: Fetch failed: Unauthorized code: 1703 - Invalid username or password, or JSON Web Token; Path: /fmi/admin/api/v2/user/auth”
I’ve tried a bunch of things and have read through the OttoFMS Developer API docs and am stuck.
Can anyone offer some assistance here? What am I missing?