I’m trying to use the data api to write to a timeseries collection.
First I’m just trying to test it using postman.
I’ve copied the URL endpoint from Atlas
https://data.mongodb-api.com/app/data-gtvwb/endpoint/data/beta
And here’s the curl of my postman request
curl --location --request POST 'https://data.mongodb-api.com/app/data-gtvwb/endpoint/data/beta' \
--header 'api-key: 623162099d97dbf78443a478' \
--header 'Content-Type: application/json' \
--data-raw '{
"dataSource": "Beta",
"database": "Spot_Chair",
"collection": "Timeseries",
"document": {
"tstamp": { "$date": { "$numberLong": "1638551310749" } }
}
}'
I’m directly copy pasting the URL and the API-Key from the interface so I’m not really sure what’s going wrong here.
What’s even stranger is that the Data API log shows my requests with an OK status