Skip to content

Creating Cables with API #16950

Answered by otterbaub
Avitium asked this question in Q&A
Jul 19, 2024 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

I do most of my stuff in Python, but what I usually do is create a dummy connection and perform a GET call on the particular endpoint via Swagger.
Thus, a GET call of the cable path ID I created in the GUI, will give me the following output:

    {
      "id": 2075,
      "url": "https://netbox.netboxServer.com/api/dcim/cable-terminations/2075/",
      "display": "Cable #1037 to test",
      "cable": 1037,
      "cable_end": "A",
      "termination_type": "dcim.interface"}

So "object_type" should be something similar to the sluggified version on the interface type (interface, front, console, ....), depending on Interface type it could be "dcim.interface", "dcim.frontport", "dcim.console".

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Avitium
Comment options

Answer selected by Avitium
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