Skip to content
Discussion options

You must be logged in to vote

Thanks for the GraphQL suggestion. I was able to acheive what I wanted with a single api call.

Query

{
  device_list(device_type:"<my_device_type>") {
    id
    name
    interfaces {
      name
      mac_address
      ip_addresses {
        address
      }
    }
  }
}

Result

{
  "data": {
    "device_list": [
      {
        "id": "14415",
        "name": "Some Device",
        "interfaces": [
          {
            "name": "eth1",
            "mac_address": "AB:CD:EF:AB:CD:EF",
            "ip_addresses": [
              {
                "address": "1.2.3.4/5"
              }
            ]
          },
          {
            "name": "eth2",
            "mac_address": "AB:CD:EF:AB:CD…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by akire0ne
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants