-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
id parameter of get.dcim.devices action #48
Comments
I think you are right, when I test creating a workflow using the action like this:
I get: When I try in NetBox API /api/dcim/devices/{id}/ I get:
And If I tries
I get
But I want something like: So I think it looks like the action get.dcim.devices is a combination of two API endpoints: /api/dcim/devices/ |
Looks like its her in the run.py:
For this to work it must be only one ID used in the get, and the [] must be stripped. And it may be hitting all the get actions when ID is used. |
Do you mean something like tihs: |
No, I just pointed out the api request is changed when ID is used. If other fields is used it works with more than one. When the api is the way it is it support just one. I don't use the ID in my workflows, so I have not been hit by this. |
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:
In the nginx access logs from Netbox there is the following entry:
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
The text was updated successfully, but these errors were encountered: