Create a Configuration for a Third-Party Service Integration¶
On this page
Groups and projects are synonymous terms. Your {GROUP-ID}
is the
same as your project ID. For existing groups, your group/project ID
remains the same. The resource and corresponding endpoints use the
term groups
.
Each project can only have one configuration per
{INTEGRATION-TYPE}
.
https://cloud.mongodb.com/api/atlas/v1.0
Syntax¶
POST /groups/{GROUP-ID}/integrations/{INTEGRATION-TYPE}
Request Path Parameters¶
Parameter | Required/Optional | Description |
---|---|---|
{GROUP-ID} | Required | Project identifier. |
{INTEGRATION-TYPE} | Required | Third-party service identifier. Accepted values are:
|
Request Query Parameters¶
This endpoint may use any of the HTTP request query parameters available to all Atlas Administration API resources. These are all optional.
Name | Type | Necessity | Description | Default |
---|---|---|---|---|
pageNum | integer | Optional | Page number, starting with one, that Atlas returns of the
total number of objects. | 1 |
itemsPerPage | integer | Optional | Number of items that Atlas returns per page, up to a maximum
of 500. | 100 |
includeCount | boolean | Optional | Flag that indicates whether Atlas returns the totalCount
parameter in the response body. | true |
pretty | boolean | Optional | Flag that indicates whether Atlas returns the JSON
response in the
prettyprint format. | false |
envelope | boolean | Optional | Flag that indicates whether Atlas wraps the response in an envelope. Some API clients cannot access the HTTP response headers or
status code. To remediate this, set Endpoints that return a list of results use the results object as an envelope. Atlas adds the status parameter to the response body. | false |
Request Body Parameters¶
The request body should be a single integration view (i.e. a JSON
configuration object) for a single third-party service to add to the
project. Always include a type
property equal to the third-party
service INTEGRATION_TYPE
.
Service | Configuration Options | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
PagerDuty | You must provide the following fields when you configure a PagerDuty integration:
| ||||||||||||
Slack | Important Slack integrations now use the OAuth2 verification method and must be initially configured, or updated from a legacy integration, through the Atlas third-party service integrations page. Legacy tokens will soon no longer be supported. You must provide the following fields when you reconfigure an existing Slack integration:
You may also include the following fields:
| ||||||||||||
Datadog | You must provide the following fields when you configure a Datadog integration:
| ||||||||||||
New Relic | You must provide the following fields when you configure a New Relic integration: Important Effective Wednesday, June 16th, 2021, New Relic no longer supports the plugin-based integration with MongoDB. We do not recommend that you sign up for the plugin-based integration. To learn more, see the New Relic Plugin EOL Statement. Consider configuring an alternative monitoring integration before June 16th to maintain visibility into your MongoDB deployments.
| ||||||||||||
Opsgenie | You must provide the following fields when you configure a Opsgenie integration:
| ||||||||||||
VictorOps | You must provide the following fields when you configure a VictorOps integration:
You may also include the following fields:
| ||||||||||||
Flowdock | You must provide the following fields when you configure a VictorOps integration:
| ||||||||||||
Webhook Settings | You must provide the following fields when you configure webhook settings:
You may also include the following fields:
|
Response Elements¶
The response includes a results
array which lists all third-party
integration configurations for the project as objects, and a
totalCount
of the services integrated with the project. The
results
array includes the integration view added by the request.
Each third-party integration configuration object includes a type
property equal to its own integration type (e.g. "type":
"PAGER_DUTY"
for the PagerDuty service). Additionally, each
third-party service configuration object provides details specific to
that service. The following lists the properties returned for each
third-party service configuration object:
Service | Result | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
PagerDuty | A returned PagerDuty integration configuration object will contain the following fields:
| ||||||||||||
Slack | A returned Slack integration configuration object will contain the following fields:
| ||||||||||||
Datadog | A returned Datadog integration configuration object will contain the following fields:
| ||||||||||||
New Relic | A returned New Relic integration configuration object will contain the following fields: Important Effective Wednesday, June 16th, 2021, New Relic no longer supports the plugin-based integration with MongoDB. We do not recommend that you sign up for the plugin-based integration. To learn more, see the New Relic Plugin EOL Statement. Consider configuring an alternative monitoring integration before June 16th to maintain visibility into your MongoDB deployments.
| ||||||||||||
Opsgenie | A returned Opsgenie integration configuration object will contain the following fields:
| ||||||||||||
VictorOps | A returned VictorOps integration configuration object will contain the following fields:
The configuration object may also contain the following fields, depending on your configuration:
| ||||||||||||
Flowdock | A returned Flowdock integration configuration object will contain the following fields:
| ||||||||||||
Webhook Settings | A returned webhook configuration object will contain the following fields:
The configuration object may also contain the following fields, depending on your configuration:
|
Example Request¶
curl -X POST -u "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest "https://cloud.mongodb.com/api/atlas/v1.0/groups/5d791c84ff7a2522cc4f9aa1/integrations/FLOWDOCK" \ -H 'Content-Type: application/json' \ -d '{ "type": "FLOWDOCK", "flowName": "myFlowName", "apiToken": "112233", "orgName": "myOrg" }'
Example Response¶
{ "links": [ { "href": "https://cloud.mongodb.com/api/atlas/v1.0/groups/5d791c84ff7a2522cc4f9aa1/integrations/FLOWDOCK?pageNum=1&itemsPerPage=100", "rel": "self" } ], "results": [ { "apiKey": "112233", "region": "US", "type": "DATADOG" }, { "apiToken": "112233", "channelName": "My Channel", "teamName": "My Team", "type": "SLACK" }, { "apiToken": "112233", "flowName": "myFlowName", "orgName": "myOrg", "type": "FLOWDOCK" } ], "totalCount": 3 }