Hi everyone,
I’m having some trouble working with the analytics endpoint on the Amity API. I’m following what’s in the docs (Amity API), but I’m not sure if I’m constructing my request correctly.
Here’s the curl
command I’m using, to help with the debugging…
curl -X POST 'https://apix.us.amity.co/api/v1/analytics/activities' \
-H 'Accept: */*' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <bearer_token>' \
-d '{"activities": [{"contentId": "67227475cb3de54ce13a0e9f", "contentType": "post", "activityType": "impression", "timestamp": {}}]}'
My main questions are:
- Timestamp Format:
The request currently sends an empty object for"timestamp": {}
. Is this the correct format? Should I pass an actual timestamp (e.g., as a Unix epoch number or an ISO8601 string) instead of an empty object? What timestamp should I pass, given the fact that I already identify the post through it’s ID? - Additional Parameters or Headers:
Are there any additional parameters or headers required by this endpoint that I might be missing?
Any guidance or pointers to documentation would be greatly appreciated!