Ask our Experts
Didn't find what you are looking for? Ask our experts!
Launch of Consumer/Home Owner registration process! We are pleased to announce the commencement of the Consumer/Home Owner Registration Process on Community. Consumers/Home Owners may now proceed to register by clicking on Login/Register. The process is straightforward and designed to be completed in just a few steps.
Schneider Electric support forum about installation and configuration for DCIM including EcoStruxure IT Expert, IT Advisor, Data Center Expert, and NetBotz
Search in
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-06-10 12:38 PM
I am attempting to try to automate tasks in EcoStruxure IT DCE 8.1.0 and i am having a difficult time obtaining the access token. When reading the REST API information on my server's webpage, it indicates that I need to perform the following command:
POST /oauth/token username username password password grant_type password
However the issue is that when I use the cURL command, it will fail.
In documentation, it appears that to access the API i need to user https://hostname/isxg/rest however this will fail as i cant POST to it, as it tries to redirect to this webpage instead https://hostname/isxg/dce-rest-api.html.
I have also attempted to access the api using /isxg/api and /isxg/oauth/token
This is also my first introduction to using APIs.
If i could get some guidance on where i should be making this POST request to, that will be great.
I am able to get access using the API if i use the webUI to create my token and provide it, but again, Id like to try and achieve only using linux commands.
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: 2024-06-11 07:36 AM
Hi @scoop263,
Here is an example cURL command for getting a token:
curl --location --request POST 'https://10.10.10.10/isxg/oauth/token?grant_type=password&password=apc&username=apc' \
To refresh the token use the REFRESH token that you received in your original token request above. This will provide you with a new token and new refresh token.
curl --location --request POST 'https://10.10.10.10/isxg/oauth/token?grant_type=refresh_token&refresh_token=f13f9d94-839e-44e9-b681-55f18aa2119e&=' \
Kind Regards,
Cory
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: 2024-06-11 07:36 AM
Hi @scoop263,
Here is an example cURL command for getting a token:
curl --location --request POST 'https://10.10.10.10/isxg/oauth/token?grant_type=password&password=apc&username=apc' \
To refresh the token use the REFRESH token that you received in your original token request above. This will provide you with a new token and new refresh token.
curl --location --request POST 'https://10.10.10.10/isxg/oauth/token?grant_type=refresh_token&refresh_token=f13f9d94-839e-44e9-b681-55f18aa2119e&=' \
Kind Regards,
Cory
Link copied. Please paste this link to share this article on your social media post.
You’ve reached the end of your document
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.