EcoStruxure IT forum
Schneider Electric support forum about installation and configuration for DCIM including EcoStruxure IT Expert, IT Advisor, Data Center Expert, and NetBotz
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-02-08 05:26 AM . Last Modified: 2022-10-19 01:07 AM
Hi,
When I tried to connect to api as describe in https://community.se.com/t5/EcoStruxure-IT-forum/are-there-any-examples-for-DCO-RestFul-API-usage-So...
I run:
curl -X GET --header 'Accept: application/json' 'https://<username>:<password>@<ServerIP>/api/v8.1/assets/search?q=<assetname>' -k
I got
Error: Unauthorized
The password does not contain special characters
What can be the problem?
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-02-15 01:00 AM
Hi,
I asked to add another new account. This account also did not worked ether.
Then we understood that all the account that have access to API must belong to a specific LDAP group. After the new account added to that group everything works.
I dont know how I worked at all with the old account for a while.
Now it's working.
Thx.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-02-08 02:23 PM
I'm not familiar with the product but it appears that the password does not meet the password policy.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-02-09 04:01 AM
Hello, the overall syntax you specified should work. I'm able to use the syntax against my own server.
curl -X GET --header 'Accept: application/json' 'https://<username>:<password>@<ServerIP>/api/v8.1/assets/search?q=<assetname>' -k
Couple of notes. As the other responder mentioned, unauthorized is a sign something is wrong with the credentials you specified or the access the user has in ITA.
The user account must be an ITA based user account, not a linux user. The user must be present in the users view of the ITA web client UI. The user must also have access to the data you're trying to access as the users permissions inside ITA determine the access the user has with REST.
Regards
Greg Sterling
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-02-13 06:09 AM
Hi,
I was able to connect to the api from web browser and now it's stoped too.
The administrator said my user defined as any other users.
But I saw that other users can connect to the api from a web browser and also with curl!
What I need to check in my account definition? and what happen that it worked from web and suddenly stop working?
Thanks.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-02-14 07:00 AM
If you cannot login to the ITA web client UI, then something is wrong with your account.
You are trying to login via the web client UI, using https://<ita-server>/, correct?
Is your user account local to ITA, or tied to Active Directory or LDAP.?
The permissions you have with REST api are based on the permissions defined in ITA, so solving the ability to logon to the web UI must occur first.
Regards
Greg Sterling
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-02-15 01:00 AM
Hi,
I asked to add another new account. This account also did not worked ether.
Then we understood that all the account that have access to API must belong to a specific LDAP group. After the new account added to that group everything works.
I dont know how I worked at all with the old account for a while.
Now it's working.
Thx.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-02-15 03:48 AM
Thanks for the update. We will assume your problem is now solved.
Regards
Greg Sterling
Link copied. Please paste this link to share this article on your social media post.
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.