EcoStruxure IT forum
A support forum for Data Center Operation, Data Center Expert, and EcoStruxure IT product users to share knowledge on installation, configuration, and general product use.
Posted: 2020-07-03 10:04 PM
This question was originally posted on DCIM Support by David Romero on 2017-08-22
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)
Posted: 2020-07-03 10:04 PM
This answer was originally posted on DCIM Support by Christopherus Laurentius on 2017-08-22
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)
Posted: 2020-07-03 10:04 PM
This comment was originally posted on DCIM Support by Kresten P. Vester on 2017-08-22
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)
Posted: 2020-07-03 10:05 PM
This comment was originally posted on DCIM Support by David Romero on 2017-08-22
I did notice the 50 item return limit. I couldn't locate any info on increasing this limit such as "maxResults=XXXX"
(CID:123996733)
Posted: 2020-07-03 10:05 PM
This comment was originally posted on DCIM Support by Kresten P. Vester on 2017-08-23
That is a hardcoded limit that cannot be manipulated at runtime.
(CID:123997063)
Posted: 2020-07-03 10:05 PM
This comment was originally posted on DCIM Support by jda4u on 2018-02-23
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)
Posted: 2020-07-03 10:05 PM
This comment was originally posted on DCIM Support by Kresten P. Vester on 2018-02-26
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)
Posted: 2020-07-03 10:05 PM
This comment was originally posted on DCIM Support by jda4u on 2018-03-06
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)
Posted: 2020-07-03 10:05 PM
This comment was originally posted on DCIM Support by David Romero on 2018-03-07
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)
Posted: 2020-07-03 10:05 PM
This comment was originally posted on DCIM Support by Kresten P. Vester on 2018-03-09
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)
Posted: 2020-07-03 10:05 PM
This comment was originally posted on DCIM Support by lucama on 2018-03-15
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)
Posted: 2020-07-03 10:05 PM
This comment was originally posted on DCIM Support by jda4u on 2018-03-15
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)
Posted: 2020-07-03 10:06 PM
This comment was originally posted on DCIM Support by lucama on 2018-03-16
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)
Posted: 2020-07-03 10:06 PM
This comment was originally posted on DCIM Support by Jef Faridi on 2018-03-20
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)
Posted: 2020-07-03 10:06 PM
This comment was originally posted on DCIM Support by jda4u on 2018-03-20
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)
Posted: 2020-07-03 10:06 PM
This comment was originally posted on DCIM Support by jda4u on 2018-03-20
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)
Posted: 2020-07-03 10:06 PM
This comment was originally posted on DCIM Support by Jef Faridi on 2018-03-20
Thanks Joe,
Your posted feature request is registered as well, thanks.
Kind regards
(CID:129409255)
Posted: 2020-07-03 10:06 PM
This question is closed for comments. You're welcome to start a new topic if you have further comments on this issue.
Create your free account or log in to subscribe to the forum - and gain access to more than 10,000+ support articles along with insights from experts and peers.