StackStorm-Exchange / StackStorm-Exchange/stackstorm-netbox

id parameter of get.dcim.devices action

Open
#48 5 comments 0 reactions 1 assignee View on GitHub

@abhi1693 is already working on this.

Since Feb 28, 2024.

bug
Dominant language
Python
Stars
14
Forks
19
Avg merge
1d 2h
Merged PRs (30d)
1

Description

Hi everyone,

I played around with the netbox.get.dcim.devices action. When I execute it without any parameters, it returns all the devices, which is expected. There is also the 'id' parameter. I assumed that I can get the data from a specific device with it. I realized that I need to enter a list. So I executed the action with an 'id' of '[1]'.

The return value of the action is this:

{
  "raw": {},
  "status": 404
}

In the nginx access logs from Netbox there is the following entry:

25/Feb/2024:08:15:33 -0500] "GET /api/dcim/devices/%5B1%5D/?save_in_key_store=False&save_in_key_store_ttl=60 HTTP/1.1" 404 23 "-" "python-requests/2.31.0"

My understanding is that '%5B1%5D/' represents '[1]'. So the action tries to access '/api/dcim/device/[1]...'.
Am I using the id parameter in the wrong way?

Thank you
Remo

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.