Note
Groups and projects are synonymous terms. Your {PROJECT-ID} is the same as your project ID. For existing groups, your group/project ID remains the same. This page uses the more familiar term group when referring to descriptions. The endpoint remains as stated in the document.
Base URL: https://{OPSMANAGER-HOST}:{PORT}/api/public/v1.0
Syntax
PUT /groups/{PROJECT-ID}/integrations/{INTEGRATION-TYPE}
Request Path Parameters
Parameter | Necessity | Description |
|---|---|---|
| Required | Project identifier. |
| Required | Third-party service identifier. Accepted values are:
|
Request Query Parameters
Name | Type | Necessity | Description | Default |
|---|---|---|---|---|
pageNum | number | Optional | One-based integer that returns a subsection of results. |
|
itemsPerPage | number | Optional | Number of items to return per page, up to a maximum of 500. |
|
pretty | boolean | Optional | Flag that indicates whether the response body should be in a prettyprint format. |
|
envelope | boolean | Optional | Flag that indicates whether or not to wrap the response in an envelope. Some API clients cannot access the HTTP response headers or status code. To remediate this, set For endpoints that return a list of results, the |
|
Request Body Parameters
The request body should be a single integration view (like a JSON configuration object) for a single third-party service. If a configuration of the same type already exists, the request will update the changed fields. If a configuration of the same type does not exist, it will be added. Always include a type property equal to the third-party service INTEGRATION_TYPE.
PagerDuty
You must provide the following fields when you configure a PagerDuty integration:
Property | Description |
|---|---|
|
|
| Your Integration Key. IMPORTANT: Changing the Integration Key doesn't change any alerts that use this integration. Those alerts still use the previous Integration Key. Remove and re-add each PagerDuty notification to use the new key. All new PagerDuty keys use their Events API v2. If you have an Events API v1 key, you can continue to use that key with Ops Manager. After you create a third-party integration that requires an API or integration key, the key appears partially redacted when you:
|
Slack
Important
Slack integrations now use the OAuth2 verification method and must be initially configured, or updated from a legacy integration, through the MongoDB 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:
Property | Description |
|---|---|
|
|
| Your API Token. After you create a third-party integration that requires an API or integration key, the key appears partially redacted when you:
|
| Your team name. |
| Optional. The channel name to reconfigure. |
Datadog
You must provide the following fields when you configure a Datadog integration:
Property | Description |
|---|---|
|
|
| Your API Key. After you create a third-party integration that requires an API or integration key, the key appears partially redacted when you:
|
HipChat
You must provide the following fields when you configure a HipChat integration:
Property | Description |
|---|---|
|
|
| Notification token for your HipChat user account. After you create a third-party integration that requires an API or integration key, the key appears partially redacted when you:
|
| Your HipChat room name. |
Opsgenie
You must provide the following fields when you configure a Opsgenie integration:
Property | Description |
|---|---|
|
|
| Your API Key. After you create a third-party integration that requires an API or integration key, the key appears partially redacted when you:
|
| Indicates which API URL is used, either |
To set region to EU, you must set a custom setting of opsgenie.api.url.
VictorOps
You must provide the following fields when you configure a VictorOps integration:
Property | Description |
|---|---|
|
|
| Your API Key. After you create a third-party integration that requires an API or integration key, the key appears partially redacted when you:
|
| Optional. Your Routing Key. |
Webhook Settings
You must provide the following fields when you configure webhook settings:
Property | Description |
|---|---|
|
|
| Your webhook URL. |
| Optional. Your webhook secret. After creating a webhook notification, the URL is partially redacted when you view or edit the alert, and the secret is completely redacted. |
| Optional. OAuth 2.0 client credentials that Ops Manager uses to obtain a bearer access token for webhook notifications. If you specify this field, set |
| Token endpoint that Ops Manager calls to obtain a bearer access token. |
| Client identifier that Ops Manager uses when authenticating to the OAuth 2.0 token endpoint. |
| Client secret that Ops Manager uses with the client ID when authenticating to the OAuth 2.0 token endpoint. |
Microsoft Teams
You must provide the following fields when you configure a Microsoft Teams integration:
Property | Description |
|---|---|
|
|
| Your Microsoft Teams incoming webhook URL. When you view or edit the alert for a webhook notification, the URL appears partially redacted, and the secret appears completely redacted. |
Prometheus
You must provide the following fields when you configure a Prometheus integration:
Property | Description |
|---|---|
|
|
| Your Prometheus username. |
| Your Prometheus password. |
| The IP address and port your Prometheus instance will reach out to. |
| Indicates which service discovery method is used, either |
| Your Prometheus protocol scheme configured for requests, either |
| Whether your cluster has Prometheus enabled. |
| Optional. The password to your PEM file. |
| Optional. The absolute path to your PEM file. |
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.
Each third-party integration configuration object includes a type property equal to its own integration type ("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:
PagerDuty
A returned PagerDuty integration configuration object contains the following fields:
Property | Description |
|---|---|
|
|
| Your Service Key. After you create a third-party integration that requires an API or integration key, the key appears partially redacted when you:
|
Slack
A returned Slack integration configuration object contains the following fields:
Property | Description |
|---|---|
|
|
| Your API Token. After you create a third-party integration that requires an API or integration key, the key appears partially redacted when you:
|
| Your team name. This field may not be present with a legacy Slack integration. |
| The configured Slack channel name. An empty string if the value is not set. |
Datadog
A returned Datadog integration configuration object contains the following fields:
Property | Description |
|---|---|
|
|
| Your API Key. After you create a third-party integration that requires an API or integration key, the key appears partially redacted when you:
|
HipChat
A returned HipChat integration configuration object contains the following fields:
Property | Description |
|---|---|
|
|
| Notification token for your HipChat user account. After you create a third-party integration that requires an API or integration key, the key appears partially redacted when you:
|
| Your HipChat room name. |
Opsgenie
A returned Opsgenie integration configuration object contains the following fields:
Property | Description |
|---|---|
|
|
| Your API Key. After you create a third-party integration that requires an API or integration key, the key appears partially redacted when you:
|
| Indicates which API URL to use, either |
To set region to EU, you must set a custom setting of opsgenie.api.url.
VictorOps
A returned VictorOps integration configuration object contains the following fields:
Property | Description |
|---|---|
|
|
| Your API Key. After you create a third-party integration that requires an API or integration key, the key appears partially redacted when you:
|
| Conditional. Only returned if you have a Routing Key configured. |
Webhook Settings
A returned webhook configuration object contains the following fields:
Property | Description |
|---|---|
|
|
| Your webhook URL. After creating a webhook notification, the URL is partially redacted when you view or edit the alert, and the secret is completely redacted. |
| Conditional. Only returned if your webhook is configured with a secret. |
| OAuth 2.0 client credentials that Ops Manager uses to obtain a bearer access token for webhook notifications. Only returned if your webhook is configured with OAuth 2.0 client credentials. |
| Token endpoint that Ops Manager calls to obtain a bearer access token. |
| Client identifier that Ops Manager uses when authenticating to the OAuth 2.0 token endpoint. |
| Client secret that Ops Manager uses with the client ID when authenticating to the OAuth 2.0 token endpoint. |
Microsoft Teams
A returned Microsoft Teams configuration object will contain the following fields:
Property | Description |
|---|---|
|
|
| Your Microsoft Teams incoming webhook URL. When you view or edit the alert for a webhook notification, the URL appears partially redacted, and the secret appears completely redacted. |
Prometheus
A returned Prometheus configuration object will contain the following fields:
Property | Description |
|---|---|
|
|
| Your Prometheus username. |
| The IP address and port your Prometheus instance will reach out to. |
| Indicates which service discovery method is used, either |
| Your Prometheus protocol scheme configured for requests, either |
| Whether your cluster has Prometheus enabled. |
| Conditional. Only returned if you have a password for your PEM file. |
| Conditional. Only returned if you have an absolute path to your PEM file. |
Example Request
1 curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest \ 2 --header "Accept: application/json" \ 3 --header "Content-Type: application/json" \ 4 --include \ 5 --request PUT "https://cloud.mongodb.com/api/public/v1.0/groups/{PROJECT-ID}/integrations/SLACK" \ 6 --data ' 7 { 8 "type": "SLACK", 9 "apiToken": "1234567890", 10 "teamName": "My Team" 11 }'
Example Response
1 { 2 "links": [ 3 { 4 "href": "https://cloud.mongodb.com/api/public/v1.0/groups/{PROJECT-ID}/integrations/SLACK?pageNum=1&itemsPerPage=100", 5 "rel": "self" 6 } 7 ], 8 "results": [ 9 { 10 "serviceKey": "******7890", 11 "type": "PAGER_DUTY" 12 }, 13 { 14 "apiToken": "******7890", 15 "channelName": "My Channel", 16 "teamName": "My Team", 17 "type": "SLACK" 18 } 19 ], 20 "totalCount": 2 21 }