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

Need Help with Querying IPAM API

Jump to solution

Hello All,

I’m having a hard time retrieving IPAM data from the REST API and the Python OrionSDK, specifically I am trying to query the IPAM.Subnet endpoint to create new subnets and make IP reservations but I keep getting empty results list.

I might be querying the wrong endpoint or I have the wrong schema, is there a way I can get help on this issue ?

Version: Orion Platform HF5, IPAM HF1, NCM HF1: 2019.4

example:

sw_results = swis.query(
"SELECT TOP 10 DisplayName, Address, CIDR, Status FROM IPAM.Subnet")
pprint(sw_results)
 
Output:
{'results': []}

 

REST call to /SolarWinds/InformationService/v3/Json/Query?query=SELECT+DisplayName+FROM+IPAM.Subnet

return the same results as well:

{
    "results": []
}
Labels (1)
Tags (1)
0 Kudos
1 Solution
Level 8

I created a new Orion type user account and it worked. The other account I was using is windows AD account.

View solution in original post

0 Kudos
4 Replies
Level 8

I created a new Orion type user account and it worked. The other account I was using is windows AD account.

View solution in original post

0 Kudos
Level 10

Aloha....

I am running the same version of IPAM, however I do not see the column name of DisplayName.  Maybe you need to reference FriendlyName.  I might also suggest using StatusName rather than Status, unless there is a reason to use the integer value.   Other than that, I am able to retrieve data with the same query in SWQL.

You may need to put some WHERE clause in as well, my data returns Nulls for the remainder of the data, for some FriendlyName. 

Mahalo...

DaHaole

Mahalo....

DaHaole
`A`ohe lokomaika`i i nele i ke pâna`i.
0 Kudos

Hi DaHaole,

I tried referencing FriendlyName and DisplayName but got the same results. I am new to solarwinds and I might be using the wrong schema.

how can i see all the columns in IPAM.Subnet?

the schema I'm using is here: https://solarwinds.github.io/OrionSDK/schema/IPAM.Subnet.html

Regards,

Shadi 

0 Kudos

Aloha...

If you install the SDK, it includes SWQL studio.  Or on the main server you can connect to the Database using Database Manager.  I do see the item DisplayName, but the only way I could get it to pull from the query was to use "with Inherited Properties".

Mahalo...

DaHaole

Mahalo....

DaHaole
`A`ohe lokomaika`i i nele i ke pâna`i.