Replies: 2 comments
-
did you ever find a solution to this error? I am getting the same. |
Beta Was this translation helpful? Give feedback.
0 replies
-
If you want to create a cable in NetBox using the API (v3+), use the 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": "connected",
# Optionally add label, length, length_unit, etc.
} Notes:
This format should work with the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I have this script to test the creation of a cable using pynetbox (7.4.1) on Netbox 4.2.5:
But when I run it, got this error:
If I feed the contents of cable_data into Cable Bulk Import --> Direct Import the cable is successfully created.
Can anyone point me to what am I doing wrong?
TIA
Beta Was this translation helpful? Give feedback.
All reactions