Network Change & Configuration Management

Reply
Accepted Solution

NetMRI API showing custom fields event when not part of select input

Authority
Posts: 20
3352     0

I have a device group I created using a device custom field and that works great. I am using the API to get a list of DeviceID, DeviceName and DeviceIPDotted back to do some integration work into another system. When execute the URI query below I am getting more data then I expect based on the select statement. I am also getting all of the custom fields I have defined. Should that be happening?

 

https://netmriip/api/3/device/index/?GroupID=10&select=DeviceID,DeviceName,DeviceIPDotted

 

 

Re: NetMRI API showing custom fields event when not part of select input

Adviser
Posts: 357
3352     0
Yes, custom fields are always returned.

Re: NetMRI API showing custom fields event when not part of select input

Authority
Posts: 20
3352     0

Is there anyway to filter them out?  I have some data in the custom fields that I do not want to share, This is an integration to a 3rd party and I have some data in the custom fields I would like to not give out.

Re: NetMRI API showing custom fields event when not part of select input

Adviser
Posts: 357
3352     0
This is a direct call from the third party system? If so, no matter what you aren’t really hiding them because they have the credentials and can just modify the args. If not, then you can filter them out in your script. But I don’t think there is a way to have the API do it for you automatically.

John

Re: NetMRI API showing custom fields event when not part of select input

skuchynski
Techie
Posts: 18
3352     0

Which NetMRI version are you using? I believe since 7.1.4 custom fields are no longer provided if not requested

Re: NetMRI API showing custom fields event when not part of select input

Authority
Posts: 20
3352     0

I was on 7.0.5 when I submitted this but have recently upgraded to 7.2.1 and you are correct post upgrade the custom fields are not comming back in the JSON response unless I request them.

Re: NetMRI API showing custom fields event when not part of select input

skuchynski
Techie
Posts: 18
3352     0

The issue is solved then?

Highlighted

Re: NetMRI API showing custom fields event when not part of select input

Authority
Posts: 20
3352     0

Yes it is resoloved

Showing results for 
Search instead for 
Do you mean 

Recommended for You