05-24-2024 05:45 AM
I have a Json Generator snap that contains the following snippet:
{ "filterGroups": [ { "filters": [ { "propertyName": "lastmodifieddate", "operator": "GT", "value":"2024-04-18T18:21:27.255Z" } ] } ] }
Then I have a mapper extracting the filterGroups object to pass to the RestPost snap. The Rest Post snap is configured as follows:
I am getting the following error from the RestPost snap when trying to validate:
"error_entity": "{"status":"error","message":"Invalid input JSON on line 1, column 3: Unexpected character ('-' (code 45)) in numeric value: expected digit (0-9) to follow minus sign, for valid numeric value","correlationId":"8a0113b5-82ac-4e25-ae27-9380e01b3e5f"}" "request_headers": [ {...} ] "statusCode": 400 "snap_details": { "label":"REST Post","instance_id":"e9e63d7c-0606-401a-87d7-545e3a4a26d3","class_id":"com-snaplogic->snaps-rest-post","build_tag":"main25112","views":{...} } "original": { "content":{...} } } ]
The same exact content snippet works fine in Postman. I get back the correct data. I tried removing the 'T' and the 'Z' and different variations and it still fails with the same error message.
Does anyone know how to resolve this?
I will eventually need to pass the date value as a parameter. If anyone can help me do that it would be great as well.
Solved! Go to Solution.
05-28-2024 08:07 AM
This error message went away when I used parameters to pass the datetime. I get the value from a query then I create the json using a script snap with this snippet:
05-28-2024 08:07 AM
This error message went away when I used parameters to pass the datetime. I get the value from a query then I create the json using a script snap with this snippet: