cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post

Rest API need to return required data

Hi

Our requirement is that we need a rest  api  that returns data in a json format. For example, we will send server name i.e  krishna123  to rest api and it should return necessary information such as

  1. 1) Node status
  2. 2) Polling IP Address:
  3. 3) Machine Type:
  4. 4) Packet Loss
  5. 5) CPU Load
  6. 6) Memory Used:
  7. 7) App Health:
  8. 😎 Operational State:
  9. 9) Guest Status: Up

thanks

K

0 Kudos
4 Replies
Level 19

POST to https://server-name:17778/SolarWinds/InformationService/v3/Json/Query

With this body:

{

"query": "SELECT Status, IP, MachineType, PercentLoss, CPULoad, MemoryUsed FROM Orion.Nodes WHERE Caption=@name",

"parameters": { "name": "krishna123" }

}

Can you clarify what you mean by "app health, operational state, guest status"?

0 Kudos

please suggest on my below comment, if i am on correct path to do.

Hi,

Thanks for revert, as i am new for API, should i use the query in below way.

https://Servername:17778/SolarWinds/InformationService/v3/Json/{"SELECT Status, IP, MachineType, PercentLoss, CPULoad, MemoryUsed FROM Orion.Nodes WHERE Caption=@name",

"parameters": { "name": "nodename" }

}

0 Kudos

Hi Krishna

As TDanner has indicated, you create a POST connection to that URI and you send in your POST BODY the query, where the format needs to be correct:

{

"query": "SELECT Status, IP, MachineType, PercentLoss, CPULoad, MemoryUsed FROM Orion.Nodes WHERE Caption=@name",

"parameters": { "name": "krishna123" }

}

You do not append that text onto the end of the URI

0 Kudos

Hi,

Thanks for revert, as i am new for API, should i use the query in below way.

https://Servername:17778/SolarWinds/InformationService/v3/Json/{"SELECT Status, IP, MachineType, PercentLoss, CPULoad, MemoryUsed FROM Orion.Nodes WHERE Caption=@name",

"parameters": { "name": "nodename" }

}

0 Kudos