Unsolved

This post is more than 5 years old

1 Rookie

 • 

14 Posts

2091

September 26th, 2019 10:00

REST API Inventory Details

Where can I grab items such as total memory, total core count, operating system name, etc

I can only seem to get items like device name, model, management IP, etc

Ideally, i'd like to recreate the Server Overview Report via API. Running and export the report inside OME itself is not an option.

8 Posts

September 27th, 2019 08:00

There are API endpoints you can use to get the info. If you get a token, you can then hit the API at "https://OME_HOST/omc/api/Console/DeviceGroup/Devices/500" and you will get a return of all your devices, then using the "id" field in each entry (server) in the return list you loop through and return "https://OME_HOST/msm/api/Console/Inventory/ID" and you will have a highly detailed inventory of every server. If you want JSON and not XML, add in your headers: "accept: application/json". The return from "msm/api/Console/Inventory/ID" should contain all the information you want.: 

{
  "id": 25016,
  "ip": null,
  "hostname": "iDRAC-",
  "type": 1000,
  "serviceTag": "",
  "model": "PowerEdge R740",
  "status": 1000,
  "online": true,
  "connectionState": true,
  "powerState": 17,
  "systemId": "1813",
  "capabilities": [
.....
{
      "inventoryType": "serverProcessors",
      "inventoryTitle": "modules.device.inventoryGrids.procInfo",
      "inventoryInfo": [
        {
          "Id": 63.0,
          "Family": "Intel(R) Xeon(TM)",
          "MaxSpeed": 4000.0,
          "CurrentSpeed": 2300.0,
          "SlotNumber": "CPU.Socket.1",
          "Status": 1000.0,
          "NumberOfCores": 12.0,
          "NumberOfEnabledCores": 12.0,
          "BrandName": "Intel",
          "ModelName": "Intel(R) Xeon(R) Gold 5118 CPU @ 2.30GHz",
          "InstanceId": "CPU.Socket.1",
          "Voltage": "1.8"
        },
        {
          "Id": 64.0,
          "Family": "Intel(R) Xeon(TM)",
          "MaxSpeed": 4000.0,
          "CurrentSpeed": 2300.0,
          "SlotNumber": "CPU.Socket.2",
          "Status": 1000.0,
          "NumberOfCores": 12.0,
          "NumberOfEnabledCores": 12.0,
          "BrandName": "Intel",
          "ModelName": "Intel(R) Xeon(R) Gold 5118 CPU @ 2.30GHz",
          "InstanceId": "CPU.Socket.2",
          "Voltage": "1.8"
        }
....
{
      "inventoryType": "deviceManagement",
      "inventoryTitle": "modules.device.inventoryGrids.deviceManagementInfo",
      "inventoryInfo": [
        {
          "ManagementId": 5022.0,
          "Device": 0.0,
          "IpAddress": "10.25.28.22",
          "MacAddress": "d0:94:66:13:d3:54",
          "ManagementType": {
            "Name": "PUBLIC",
            "Description": "Public Management Interface",
            "ManagementType": 2.0
          },
          "InstrumentationName": "iDRAC-",
          "DnsName": "",
          "EndPointAgents": [
            {
              "ManagementProfileId": 5022.0,
              "ProfileId": "WSMAN_OOB",
              "AgentName": "iDRAC",
              "HasCreds": 1.0,
              "Version": "3.34.34.34",
              "ManagementURL": "https://10.25.28.22:443",
              "Status": 1000.0,
              "StatusDateTime": 1.56823400071E12
            }
          ]
        }
....
{
      "inventoryType": "serverMemoryDevices",
      "inventoryTitle": "modules.device.inventoryGrids.memInfo",
      "inventoryInfo": [
        {
          "Id": 377.0,
          "Name": "DIMM.Socket.A1",
          "BankName": "A",
          "Size": 32768.0,
          "Status": 1000.0,
          "Manufacturer": "Samsung",
          "PartNumber": "M393A4K40BB2-CTD",
          "SerialNumber": "--267F37E0--",
          "TypeDetails": "DDR4 DIMM",
          "ManufacturerDate": "Mon Aug 14 12:00:00 2017 UTC",
          "Speed": 2666.0,
          "CurrentOperatingSpeed": 2400.0,
          "Rank": "Double Rank",
          "InstanceId": "DIMM.Socket.A1",
          "DeviceDescription": "DIMM A1"
        },
        {
          "Id": 378.0,
          "Name": "DIMM.Socket.A5",
          "BankName": "A",
          "Size": 32768.0,
          "Status": 1000.0,
          "Manufacturer": "Samsung",
          "PartNumber": "M393A4K40BB2-CTD",
          "SerialNumber": "--267F37E1--",
          "TypeDetails": "DDR4 DIMM",
          "ManufacturerDate": "Mon Aug 14 12:00:00 2017 UTC",
          "Speed": 2666.0,
          "CurrentOperatingSpeed": 2400.0,
          "Rank": "Double Rank",
          "InstanceId": "DIMM.Socket.A5",
          "DeviceDescription": "DIMM A5"
        },
....

 

1 Message

April 14th, 2020 12:00

Sorry, late to the party.

Can anyone direct me to the documentation for

"https://OME_HOST/omc/api/Console/DeviceGroup/Devices/500"

and

"https://OME_HOST/msm/api/Console/Inventory/ID"

Thanks!

No Events found!

Top