Discussion:
[Netdot-users] REST API: getting the top level ipblocks
Sparks, Alan
2016-07-19 20:37:02 UTC
Permalink
Apologize if this is a FAQ, but can't otherwise find the answer.... Is there a means to query the REST interface for a level of ipblocks? For instance, the top-level ipblocks? Have been trying to use Python clients, I can get /all/ the ipblocks returned, or specific ones returned, but no obvious way to get only the ones that are "top level".

Would like to create a drillable hierarchy of blocks and children, to show their descriptions, etc. I can get all of them and do the work in the client, but that "all" request is a slow hit, so was hoping for something a bit more efficient. Thanks in advance for any tips.
-Alan
Carlos Vicente
2016-07-19 20:41:13 UTC
Permalink
Hi Alan,

Good question. The criteria to match top-level blocks is that the parent field is undefined.

I _think_ that the last time I checked it wasn’t possible to specify “undef” as a field value using the REST API.

I don’t really have time right now to fix that, but I’d be very glad to receive a patch or pull request.

Best regards,

cv
Apologize if this is a FAQ, but can’t otherwise find the answer…. Is there a means to query the REST interface for a level of ipblocks? For instance, the top-level ipblocks? Have been trying to use Python clients, I can get /all/ the ipblocks returned, or specific ones returned, but no obvious way to get only the ones that are “top level”.
Would like to create a drillable hierarchy of blocks and children, to show their descriptions, etc. I can get all of them and do the work in the client, but that “all” request is a slow hit, so was hoping for something a bit more efficient. Thanks in advance for any tips.
-Alan
_______________________________________________
Netdot-users mailing list
https://osl.uoregon.edu/mailman/listinfo/netdot-users
Loading...