--
You received this message because you are subscribed to the Google Groups "NetBox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netbox-discuss+unsubscribe@googlegroups.com.
To post to this group, send email to netbox-discuss@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netbox-discuss/9af13f4b-d234-47be-9edf-0207aff68352%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
POST is for creating new objects, e.g. through /api/dcim/devices/.Use PATCH for updating existing devices (e.g. /api/dcim/devices/5/).
On Tue, Sep 4, 2018 at 11:29 AM, Luis N <luis....@gmail.com> wrote:
I can pull requests from netbox using curl in some of my bash scripts but when trying to post a change or update, it says"detail": "Method \"POST\" not allowed."Using Python 3.5.2 and Netbox 2.4.4 on Ubuntucurl -X POST -H "Content-Type: application/json" -H "Authorization: Token <TOKEN>" -H "Accept: application/json; indent=2" --data '{ "custom_fields":, "Requested":, "value": 6, "label": Yes }' 'http://netbox01/api/dcim/devices/5/'
--
You received this message because you are subscribed to the Google Groups "NetBox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netbox-discus...@googlegroups.com.
To post to this group, send email to netbox-...@googlegroups.com.
The complete exception is provided below:
<class 'TypeError'>
int() argument must be a string, a bytes-like object or a number, not 'dict'
updated it to
'{"custom_fields": {"Requested": {"value": "6","label": "Yes"}}}'
NetBox: v2.4.3
Python: 2.7.5
OS: RHEL 7.5
<class 'TypeError'>
int() argument must be a string, a bytes-like object or a number, not 'dict'