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: 2020-04-10 03:40 AM
We are looking for some tip/tricks in how to use the API webservices.
At the moment we use the export table function from the equipment browser (desktop client) to get all the assets from every location we have. (includes columns are rack name, asset name, U height and a few custom property's)
We are looking for a few to simplify this proces (maybe with the use op API webservices)
the idea is to dump the data in MS EXCEL for making management reports
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: 2020-04-10 04:33 AM
Hello Mark
Have to tried using the REST api's which are provided with ITA?
If you use a browser to connect to your ITA server at https://<ita-server-host-or-ip>/api/current
You'll be asked for credentials for an ITA user account, enter valid credentials and you should see this view. The great thing about this view is that its fully interactive in that you can walk through individual API calls and test them so you get a better understanding of how they work. I'll run through one example below using the assets api GET call.
If you click on any of the entry headers (like assets) or the "Show/Hide" button each entry can be expanded so you can see its API options and features. As an example I have pasted info for the assets api call below
The individual items in this section can also be expanded so you can see the details of each individual call.
I expanded the "GET /assets" entry below. You'll see a full explanation of the call, the required and/or optional parameters and an opportunity to test it.
Please NOTE: my below example is a GET command so its a query. There are also PUT, POST, and DELETE commands to update, create, and delete assets. Any operations performed in this view are worked against the ITA server to which you're connected ... so if you update, create or delete, you are changing data on your ITA server. So if you are experimenting make sure your experimenting on non-important data.
I changed the above optional field "recursive" to true so I don't get only the top level asset and then click "Try it out!". The output from "Try it out!" might look like this (from my demo server).
You'll notice you'll be provided with two examples for making the call yourself via "curl" for linux users and "https" if using a browser or trying to do something via an excel macro or other method.
The output from all of the REST calls is JSON format, so for this example the response body section/results include JSON output of all of the high level rooms/locations (folders) in ITA to which the account I used has access ... so yes, what you see is based on the security of the user account used to connect to ITA.
There are other calls in the assets section which allow you to query "children", so once you have this high list of rooms and folders, you can run a GET /asset/<asset-id> call to get a specific room and its "children" which would include floor devices, racks and so on. Some programming skills are required to make this work as you need to loop and test.
Hope this helps get you started.
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: 2020-04-10 04:33 AM
Hello Mark
Have to tried using the REST api's which are provided with ITA?
If you use a browser to connect to your ITA server at https://<ita-server-host-or-ip>/api/current
You'll be asked for credentials for an ITA user account, enter valid credentials and you should see this view. The great thing about this view is that its fully interactive in that you can walk through individual API calls and test them so you get a better understanding of how they work. I'll run through one example below using the assets api GET call.
If you click on any of the entry headers (like assets) or the "Show/Hide" button each entry can be expanded so you can see its API options and features. As an example I have pasted info for the assets api call below
The individual items in this section can also be expanded so you can see the details of each individual call.
I expanded the "GET /assets" entry below. You'll see a full explanation of the call, the required and/or optional parameters and an opportunity to test it.
Please NOTE: my below example is a GET command so its a query. There are also PUT, POST, and DELETE commands to update, create, and delete assets. Any operations performed in this view are worked against the ITA server to which you're connected ... so if you update, create or delete, you are changing data on your ITA server. So if you are experimenting make sure your experimenting on non-important data.
I changed the above optional field "recursive" to true so I don't get only the top level asset and then click "Try it out!". The output from "Try it out!" might look like this (from my demo server).
You'll notice you'll be provided with two examples for making the call yourself via "curl" for linux users and "https" if using a browser or trying to do something via an excel macro or other method.
The output from all of the REST calls is JSON format, so for this example the response body section/results include JSON output of all of the high level rooms/locations (folders) in ITA to which the account I used has access ... so yes, what you see is based on the security of the user account used to connect to ITA.
There are other calls in the assets section which allow you to query "children", so once you have this high list of rooms and folders, you can run a GET /asset/<asset-id> call to get a specific room and its "children" which would include floor devices, racks and so on. Some programming skills are required to make this work as you need to loop and test.
Hope this helps get you started.
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: 2020-04-13 06:06 PM
Alternatively, use ITA web client's equipment browser, select all columns, remove filters, or filter by location and export it out.
This filter can be saved, for future generation.
If going thru api ways, see Greg's explanation below. You'll need way to convert the response to CSV e,g
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.