Skip to content
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

Adding Tags to number through PATCH request does not add tags #39

Open
RickWinters opened this issue Aug 24, 2023 · 1 comment
Open

Comments

@RickWinters
Copy link

When adding tags through the API with a PATCH request on /api/plugins/phonebox/numbers/{id}, the API response will show the correct tags but looking in the history on Netbox there are no tags added. They will also not be visible in the netbox UI.
As you can see in this URL the PATCH request body only contains "{tags: [40, 41]}". These are 2 ID's of existing tags (/api/extras/tags/)
The Response does show the complete Tag object.
I blurred out any personal information such as the start of the URL, Usernames and Phonenumbers for privacy reasons
image

The netbox UI for changelogs only shows an update on the 'Created' field, only changing the datetime format.
image

@KeyDutch404
Copy link

Hello!
I have the same problem when adding tags using pyhton and pynetbox library.
I can get a tag but can't add it.

from pynetbox import api
from config import NETBOX_TOKEN, NETBOX_URL
nb = api(NETBOX_URL, token=NETBOX_TOKEN)

num = nb.plugins.phonebox.numbers.get(number='7751230')
print(num.tags)
num.tags.append(22)
num.save()
print(num.tags)
num = nb.plugins.phonebox.numbers.get(number='7751230')
print(num.tags)

print1 [incoming]
print2 [incoming, 22]
print3 [incoming]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants