Sonar API Entity Endpoints


Is there a list somewhere of valid entities?

Search entity API instructions:

A valid entity to search for. See the other API endpoints to determine the proper naming convention  
here. For example, to search accounts, enter  `accounts` . To search invoices, enter  `invoices` . To search network sites, enter  `network_sites` .

ip_assignments for assigned ip addresses:

I’m looking to get assigned account name based on a specific assigned mac address through the API


ok, built another system to work around another weekspot.
v2… where are you…


It’s just the same entity names being used in the documentation. E.g. if the URL is network_sites, then the entity name would be the same. Is there one you’re stuck finding?


Good question: how do I use the search to find a user based on an inventoried mac address

/api/v1/search/ip_assignments -> works for IP addresses not mac’s
/api/v1/search/inventory -> not a valid endpoint.


UseCase: We have TV boxes that throw their mac in the POST request when accessing a specific page on the box, I’d like to be able to give them some basic general account specific information based on that. I would use referring IP but the server that loads the page is not in-net so some accounts will have a shared NAT address.


Neither of those are the entity for an uninventoried MAC. If you take a look at where you query them from a user, the URL is non_inventoried_mac_addresses, so if you use that as the search entity, it will let you search against that object.


/api/v1/search/non_inventoried_mac_addresses -> completes a search,

what about an INVENTORIED mac?
api/v1/search/inventoried_mac_addresses -> “inventoried_mac_addresses is not a valid entity to search for”


There is no inventoried MAC endpoints, but if you take a look at how you would grab a MAC from an inventory item, it’s the inventory_model_field_data relation under the inventory_item. So in that case, it would be inventory_model_field_data to look for the value of a field on an inventory item.


YAY! -> That works!
Anyone else looking -


"search": {