Skip to content
Discussion options

You must be logged in to vote

If you want to create a cable in NetBox using the API (v3+), use the a_terminations and b_terminations fields as shown below. This matches the format required by the NetBox Swagger documentation.

cable_data = {
    "type": "mmf-om4",  # Cable type (adjust as needed)
    "a_terminations": [
        {
            "object_type": "dcim.interface",
            "object_id": local_interface_id  # The NetBox ID of the local interface
        }
    ],
    "b_terminations": [
        {
            "object_type": "dcim.interface",
            "object_id": remote_interface_id  # The NetBox ID of the remote interface
        }
    ],
    "color": "00ffff",   # Cable color (6-char hex, no #)
    "status"

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 jnovinger
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants