When updating or creating assets with a date via the REST api I receive the following error.
Your code had an error! Traceback (most recent call last): File "<string>", line 110, in the_function File "<string>", line 39, in update_object Exception: Failed to update object. Status code: 400. Response text: {"errorMessages":[],"errors":{"rlabs-insight-attribute-211":"2024-18-09T00:00:00.000+00:00 is not valid (Date)"}}What is the correct date format? I've tried:
2024-18-09T00:00:00.000+00:00
2024-18-09T00:00:00Z
2024-18-09T00:00:00.000Z
2024-18-09
18-09-2024
09-18-2024
All result in the same issue. I can only find this article that suggests my date format is correct.
I've also tested with a new Attribute using DateTime. This also doesn't work.
Your code had an error! Traceback (most recent call last): File "<string>", line 110, in the_function File "<string>", line 39, in update_object Exception: Failed to update object. Status code: 400. Response text: {"errorMessages":[],"errors":{"rlabs-insight-attribute-247":"\"2024-09-18T00:00:00.000Z\" is not valid (DateTime)"}}I've manually set the DateTime in the asset, copied the value that is returned for the DateTime value and it still fails.
"objectTypeAttributeId": "247",
"objectAttributeValues": [
{
"value": "2024-09-18T00:00:00.000Z",
"displayValue": "18/Sep/24 12:00 AM",
"searchValue": "2024-09-18T00:00:00.000Z",
"referencedType": false
}
],
"objectId": "7878"
I'm not sure if theres a bug in the Date and DateTime asset API or I'm making a very simple error. If I do not escape the quotes are the time it reports that its not serializable json, which is a bit odd...