Menu

#402 API returns ip address in decimal when searching by tags

1.2
open
nobody
None
4
2016-03-12
2016-03-12
No

Hi Miha,

I've found this behaviour when testing the API. We find the "search by tag" very useful after we added some custom tags, but the API v2 search results returns the IPs in decimal instead of octet. When searching for an IP direclty it retunrs it in the correct format:

curl -s -X GET https://ipam/api/security/addresses/tags/5/addresses/
{"code":200,"success":true,"data":[{"id":"112","subnetId":"18","ip":"1193992922","is_gateway":null,"description":"reth5","hostname":"foo.com","mac":"","owner":null,"tag":"5","deviceId":null,"port":null,"note":"","lastSeen":"0000-00-00 00:00:00","excludePing":"0","PTRignore":"0","PTR":"0","firewallAddressObject":null,"editDate":"2016-03-12 00:36:57","links":[{"rel":"self","href":"\/api\/security\/addresses\/112\/"}]}]}

Thanks for looking into this,

Max

Discussion

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.