Welcome to the new Schneider Electric Community

It's your place to connect with experts and peers, get continuous support, and share knowledge.

  • Explore the new navigation for even easier access to your community.
  • Bookmark and use our new, easy-to-remember address (community.se.com).
  • Get ready for more content and an improved experience.

Contact SchneiderCommunity.Support@se.com if you have any questions.

Close
Invite a Co-worker
Send a co-worker an invite to the Exchange portal.Just enter their email address and we’ll connect them to register. After joining, they will belong to the same company.
Send Invite Cancel
84777members
354220posts

How to get the servers per rack name

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.

Jerry.Mersel
Crewman
Crewman
0 Likes
3
272

How to get the servers per rack name

Hi:

 

     I need to get the name of the servers that are on a particular rack.

     I got from a colleague this get request:

      <ip>/api/v8.1/assets/search?q=Rack%20C2"  But it only returns partial results. When I put the server name in the same request it returns the results correctly.

 

   Any help will be greatly appreciated, Thank you

 

  Jerry

      

Tags (1)
3 Replies 3
Greg.Sterling
Cadet
0 Likes
1
232

Re: How to get the servers per rack name

Hello Jerry

 

Are you trying to search for the results like in your example or do you know the specific rack id and you're trying to list the servers in that specific rack.

 

If searching, you can add a type qualifier to your search to list only devices of type server. In my below example I searched by a specific rack name "Rack-1" and asked for only devices of type server be returned in the output.

 

https://<ITA-Server>/api/v8.1/assets/search?q=Rack-1&type=server

 

If you use the search api call to return the actual rack id. You can use get asset by id to get a list of the assets contained in the rack using this syntax which includes the "children" parameter. In this example my rack UUID is 3672a2ce-a174-4d90-88fe-790631242cf9

 

https://<ITA-Server>/api/v8.1/assets/3672a2ce-a174-4d90-88fe-790631242cf9?include=children

 

The above command returns all devices in the rack, so its not limited to servers, but you can parse that output

 

Regards

 

Greg Sterling

Tags (1)
Jerry.Mersel
Crewman
Crewman
0 Likes
0
186

Re: How to get the servers per rack name

Thanks,

Unfortunately, it didn't work for me.

 I just looped through the hosts in the end in order to find which racks they are located. Not the most efficient but it can do.

 

Best regards,

Jerry

 

Tags (1)
Jerry.Mersel
Crewman
Crewman
0 Likes
0
184

Re: How to get the servers per rack name

Thanks for your reply.,

I don't have the rights in the DC to do that.

In the end, I just loop through the hosts and got the racks that way.

 

 

Best regards,

Jerry

 

 

Tags (1)