Atlas#
This tutorial explains how to use Data Integration Center to send data to MongoDB Atlas using its API.
Prerequisites#
- MongoDB Atlas Account
- MongoDB Atlas cluster
Setup atlas#
- Enable Data API access.
- In the User tab, create a user and copy the API key.
- Copy
URL Endpoint
.
Info
To learn more details on MongoDB Atlas, see Introduction to the MongoDB Atlas Data API.
Create webhook#
-
From the previous section, get the API url and append
action/insertOne
to it. Example:https://europe-west1.gcp.data.mongodb-api.com/app/data-kjqsw/endpoint/data/v1/action/insertOne
-
As headers, set:
api-key: <api-key-from-previous-section>
Access-Control-Request-Headers: *
-
As a body template, set e.g:
{ "collection":"devices", "database":"coiote", "dataSource":"coiote", "document": { "endpointName": "$endpointName" } }
You can adjust the payload according to your needs.
Investigate database#
Now, go to Collections and verify if there is a new entity.
Previous
Slack
Next
Upgrade device firmware
Last update: November 29, 2024