I am trying to make Networker REST API call using curl command. I am getting 401 unauthorized error message when trying to using basic authentication using my LDAP service account and password. I am able to login to the NMC console using the same credentials and do all the operations. But getting unauthorized exception. Do we need to give any permission in Networker for service account for REST API calls? Please suggest.
@grahanam. 401 means that you are not authenticated which means that the user name and password that you had supplied is not recognized by the API server. Can you describe how you are testing the API ?
2019-12-08 18:19:40.136 INFO [https-jsse-nio-9090-exec-7] c.e.n.w.WebApiRequest - Request method 'GET', URL 'v3/global/protectiongroups 2019-12-08 18:19:40.146 INFO [https-jsse-nio-9090-exec-7] c.e.n.w.WebApiResponse - Response status Method: 'GET', URI:'v3/global/protectiongroups', Status '401'
With same credentials we are able to login to the NMC web console and do all the required operations.
When we tried to browse the url "https://networkerserver:9090/nwrestapi/v2/global/protectiongroups" and tried to login with same credentails, it is failing and in log showing 401 error.
Are we missing any access permission to service account wrt to Networker REST API .
crazyrov
6 Operator
•
1319 Posts
1148
0
Posted December 9th, 2019 22:00
@grahanam. 401 means that you are not authenticated which means that the user name and password that you had supplied is not recognized by the API server. Can you describe how you are testing the API ?