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-07-03 10:04 PM . Last Modified: 2024-04-07 11:13 PM
For the life of me I can't figure out how to perform the equivalent of "getAllDataCenterItems" or "getDataCenterItemsIn" using the Rest API. Maybe its just me, but it seems like the SOAP API was much easier to work with.
Any help is much appreciated.
(CID:123996374)
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-07-03 10:04 PM . Last Modified: 2024-04-07 11:13 PM
Hi David,
A few options:
Try get/asset/{asset ID} and use children option
These might be related:
1.get / assets/search, where you can specify the asset type, like location, server-room, rack for the query.
Leaving the type empty, and providing the room name will output all the assets within the room, from rack, down to server, so this might be of use to you.
2.get/assets/types, listing all the available asset type, that can be used with get/assets/search
Regards,
Chris
(CID:123996408)
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-07-03 10:04 PM . Last Modified: 2024-04-07 11:12 PM
As an entry point GET /assets will return the top-level elements the user has access to.
Just a note on the GET /assets/search operation: for performance reasons there is a limit to how many elements will be returned. I am pretty sure the limit is 50 items.
(CID:123996470)
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-07-03 10:05 PM . Last Modified: 2024-04-07 11:12 PM
I did notice the 50 item return limit. I couldn't locate any info on increasing this limit such as "maxResults=XXXX"
(CID:123996733)
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-07-03 10:05 PM . Last Modified: 2024-04-07 11:12 PM
That is a hardcoded limit that cannot be manipulated at runtime.
(CID:123997063)
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-07-03 10:05 PM . Last Modified: 2024-04-07 11:12 PM
a 50 count limit makes the api calls not useful at all. what if we have more than 50 items to pull back... ?
(CID:128760602)
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-07-03 10:05 PM . Last Modified: 2024-04-07 11:12 PM
The item limit is only for the search API.
If you use the approach Christopherus Laurentius mentioned above with the GET /assets/{asset ID} API with the children option approach you will be able to retrieve all your items. That might require more than one call though.
(CID:128760802)
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-07-03 10:05 PM . Last Modified: 2024-04-07 11:12 PM
Soooo since the ID strings aren't sequential, I have to DDOS the site in order have a script cycle through the search ID call, then pass any hits on and determine if there are available child datasets? Am I missing something?
(CID:129403586)
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-07-03 10:05 PM . Last Modified: 2024-04-07 11:12 PM
Joe, what we have resorted to is use the ETL for queries, then use the API from that point on. The ci_id is the {asset ID}. Maybe there is a better way, but that's what I've been able to use to accomplish most of my tasks. Plus ETL give you everything you may need. Im sorta disappointed with all the API limitation. I really hope that SE sees the value of automation and further development of API functionality on this side of things.
(CID:129404374)
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-07-03 10:05 PM . Last Modified: 2024-04-07 11:12 PM
jda4u - what is your use case? If you want to extract all devices you can follow the scenario I described in the first comment to have a starting point for ids. Then afterwards use the GET /asset/{asset ID} with the children option as suggested by Christopherus Laurentius
That will make you able to create a script that extracts all assets without using the search API.
(CID:129405001)
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-07-03 10:05 PM . Last Modified: 2024-04-07 11:12 PM
I agree with Joe: it's so not useful a search api with with a hardcoded limit of 50 items.
I've tried to used GET /asset/{asset ID}, but at the moment I can find all devices I've in my rooms.
Please give us some other hints or examples.
(CID:129407521)
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-07-03 10:05 PM . Last Modified: 2024-04-07 11:12 PM
Not being able to pull everything I want whenever I want via the search API made me drop the automated ingestion from my project... For the love of god remove the hardcoded limit on the search API and allow customers to set whatever limit they want and monitor our own resources. It's not like I'm going to be pulling the data every minute. It's likely to be a monthly data pull. I've told our DCIM console admin that it's a bad vendor design/decision and to log a DCIM support ticket/feature request on this. If/when the hardcoded cap is removed we would circle back to automate easily/in 5 minutes. Our other engineer said that some of the parent/child relationships aren't actually there to make what was described above to be able to work. I just want to pull all data into our log server for tracking/have other more pressing items to do.
(CID:129407603)
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-07-03 10:06 PM . Last Modified: 2024-04-07 11:12 PM
Please give us an answer: I must read some devices properties in my datacenter (every day or else less frequently).
I can't find a parent/child relation in my doc assets, so at the moment Christopherus Laurentiushint isn't useful for me.
I completely agree with Joe: remove hardcoded limit, or give useful suggestions to retry devices
thanks
(CID:129407922)
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-07-03 10:06 PM . Last Modified: 2024-04-07 11:12 PM
Hi all,
The search functionality is viable for searching specific rooms, locations or assets. It is an indexed search and limited to 50 items.
It is not build to return all assets from a server.
If the need is to have an API that could return all assets, then that may be posted as a feature request (Feature requests).
Thanks,
Kind regards
(CID:129409017)
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-07-03 10:06 PM . Last Modified: 2024-04-07 11:12 PM
Yep thanks, That's what I advised our internal DCIM admin to request from Support. I recommend having the default limit set to 50, but allow us an option via the API to pull all items where 0=unlimited or such.
(CID:129409194)
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-07-03 10:06 PM . Last Modified: 2024-04-07 11:12 PM
I've just submitted a Feature request as well - thanks.
"I advised our internal DCIM admin to request this, however here is my request as well. I recommend having the default API search limit set to 50, but allow us an option via the API to pull all items where 0=unlimited or such. This would make ingestion into our Log collector much easier and reduce the time needed to spend on developing a script and supporting such a script/process etc. Instead we can just pull all of the data stored in DCIM into our Logs for correlation/metrics etc just one API search command and we're done. Having a hard cap on the API search command forces an undue burden on us and limits the usefulness of the API.
See below for the related thread that I've been commenting on:
http://sxwhelpcenter.ecostruxureit.com/questions/123996374/dco-8.1-rest-api
Thanks for your time and consideration,
Joe Agler"
(CID:129409211)
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-07-03 10:06 PM . Last Modified: 2024-04-07 11:12 PM
Thanks Joe,
Your posted feature request is registered as well, thanks.
Kind regards
(CID:129409255)
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-07-03 10:06 PM . Last Modified: 2023-10-22 01:31 AM
This question is closed for comments. You're welcome to start a new topic if you have further comments on this issue.
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.