How to Query a Cable by ID in NetBox

How to Query a Cable by ID in NetBox

NetBox Query Tip!
If you need to search for a cable by its ID, use GraphQL by visiting: https://your_nb_instance/graphql/

Then run the following query, replacing YOUR_CABLE_ID with the actual cable ID:

query {
  cable(id: YOUR_CABLE_ID) {
    id
    label
    type
    status
    color
    length
    length_unit
    a_terminations {
      ... on InterfaceType {
        id
        name
        device {
          name
        }
      }
    }
    b_terminations {
      ... on InterfaceType {
        id
        name
        device {
          name
        }
      }
    }
  }
}

Subscribe to our newsletter and stay updated.

Don't miss anything. Get all the latest posts delivered straight to your inbox.
Great! Check your inbox and click the link to confirm your subscription.
Error! Please enter a valid email address!