AR System Server REST API FAQs
Issues with authentication
The 401 Unauthorized error indicates that you could not be authenticated using the token expected in the HTTP "Authorization" header. Several reasons could cause this problem:
- The "Authorization" header itself is missing or invalid.
- The token is missing from the header or is invalid.
- The token has expired.
Note that tokens only expire if they are generated from the /api/token endpoint (as opposed to being generated in the user interface).
In this case, you can generate a new one with another call to the same endpoint. If you are using the Swagger UI, the interaction with /api/token is hidden from you, but you can trigger another call to the endpoint by refreshing the Swagger UI and entering your username and password again. - The user that owns the token has been deactivated or deleted.
Both the new UI and the REST APIs run on Jetty.
Can't connect to the API at all over HTTPS
Configure HTTPS or enable API access over HTTP.
Getting 403 Forbidden errors back from the API
This error occurs if you have configured HTTPS and you try to access HTTP.
If your HTTP(S) configuration is correct, but you still receive 403 errors, the user accessing the API might not have permission to perform the actions required by the endpoint.
The Jetty server does not respond to client REST API request
This issue is observed when you configure the Jetty server by using a Secured Socket Layer (SSL). Perform the following steps:
- Open the arserver.config file, located in the InstallationDirectory\ARSystem folder.
- Add the following line in the arserver.config file:
jvm.option.<next_no>=-Dorg.apache.activemq.broker.BouncyCastlePosition=100
How to turn on logging for REST API-related issues
For information about turning on logging for REST API-related issues, see Setting-log-files-options or the BMC Communities article, How to turn logging on for RESTAPI problems.