1. What to do when Basic Authentication fails in REST API monitor?
When Basic Authentication fails in the REST API monitor, follow the below steps to troubleshoot the error.
- Ensure the credentials provided in Applications Manager (Username and Password) are correct.
- Try manually sending the username and password in the Authorization request header by following the below steps to verify the credentials.
- To include credentials in the header, You need to encode the username and password in Base64 format. For example, if the username is admin and the password is test, the Base64 encoded value of admin:test is YWRtaW46dGVzdA==
- Provide the Base64 encoded value in Custom HTTP(S) Headers field in the format Authorization_sep_Basic <Base64 value>. For example, Authorization_sep_BASIC YWRtaW46dGVzdA==. If there are multiple headers, Use # to separate the header.
- After adding the credentials to the Custom HTTP(S) Headers, Perform Test Credential again to verify that the credentials pass successfully.

In Basic Authentication, the client first makes a request without credentials. If the server responds with a 401 Unauthorized response, the client retries with credentials. However, some server configurations close the connection after a 401 response if no credentials are sent initially, causing Basic Authentication to fail. In such cases, Custom HTTP(s) Headers should be used to send the credentials directly in the request to bypass this issue.
2. How to configure User-Agent of the browser in REST API monitor?
User-Agent header helps target server in identifying the client. To configure User-Agent of the browser, Follow the below steps.
- Go to google search in browser and search for My User-Agent. The top of the search result will show the User-Agent of the browser.
- Now provide that user agent value in Custom HTTP(S) Headers field in the format User-Agent_sep_<Value>. For example, User-Agent_sep_Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36. If there are multiple headers, use # to separate the headers.
- After providing User-Agent. Perform Test Credential and verify the response.
3. How to configure appropriate Content-Type in the request header?
Content-Type header helps target server in identifying the format of the payload (text, xml or json etc.) sent in request. To configure appropriate content-type, follow the below steps.
- Select the Content-Type header value based on the payload type mentioned below.
- For FORM -> application/x-www-form-urlencoded
- For Text -> text/plain
- For XML -> application/xml
- For JSON -> application/json
- Now provide the Content-Type value in Custom HTTP(S) Headers in the format Content-Type_sep_<Value>. For example, Content-Type_sep_application/json
- After providing Content-Type, Perform Test Credential and verify the response.