I
Immich2y ago
ral23

Date format for API call to memory-lane

Hi, can someone confirm the date format expected by an API call to memory lane please? I've got the call itself working but receive an invalid date error in response. Thanks and apologies if I've missed this in the documentation.
7 Replies
Alex Tran
Alex Tran2y ago
Iso standard should work
jrasm91
jrasm912y ago
2022-10-05T00:00:00.000Z I believe
ral23
ral23OP2y ago
Thanks but I'm still having problems. The curl command I'm using is: curl -L -X GET '192.168.1.50:2283/api/asset/memory-lane' -H 'Content-Type: application/json' -H 'Accept: application/json' --data-raw '{"timestamp": "2022-08-20T00:00:00.000Z"}' -H 'x-api-key: 'MY-API-KEY'' I get back: {"statusCode":400,"message":["timestamp must be a Date instance"],"error":"Bad Request"} I've tried each of these formats for the timestamp including Unix epoch time. Timestamp 1660998852 Atom 2022-08-20T12:34:12+00:00 W3C 2022-08-20T12:34:12+00:00 ISO 8601 2022-08-20T12:34:12+0000 RFC 2822 Sat, 20 Aug 2022 12:34:12 +0000
jrasm91
jrasm912y ago
It is a query param I believe You can't send a body in a get request
ral23
ral23OP2y ago
Makes sense, have included it in header as below. But still getting the same error. Any suggestions: curl -L -X GET '192.168.1.50:2283/api/asset/memory-lane' -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'timestamp: 2022-05-12T00:00:00.000Z' -H 'x-api-key: 'my api key''
Alex Tran
Alex Tran2y ago
curl -L -X GET '/api/asset/memory-lane?timestamp=Hhdhehdh' \ -H 'Accept: application/json'
ral23
ral23OP2y ago
Great works now. Thank you. Still learning!

Did you find this page helpful?