This doesn't happen with every device, but only some of them.
Is there anywhere to look on Filewave's side to see what would cause the custom field update to issue a 500 response?
Here's the component that works for virtually every device in Filewave, short of a small handful:
# update the custom field using the device id
api = filewave + 'inv/api/v1/client/' + device_id
params = {
"CustomFields": {
"customfield_one": {
"exitCode": 0,
"status": 0,
"updateTime": datetime.now().isoformat(),
"value": value_one
},
"customfield_two": {
"exitCode": 0,
"status": 0,
"updateTime": datetime.now().isoformat(),
"value": value_two
},
"customfield_three": {
"exitCode": 0,
"status": 0,
"updateTime": datetime.now().isoformat(),
"value": value_three
}
}
}
params = json.dumps(params)
update_fields = requests.patch(api, params, headers=headers, timeout=2)