Navigation

Update a Configuration for a Third-Party Service Integration

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/{GROUP-ID}/integrations/{INTEGRATION-TYPE}

Request Path Parameters

Parameter Necessity Description
{PROJECT-ID} Required Project identifier.
{INTEGRATION-TYPE} Required

Third-party service identifier. Accepted values are:

  • DATADOG
  • HIP_CHAT
  • PAGER_DUTY
  • SLACK
  • NEW_RELIC
  • OPS_GENIE
  • VICTOR_OPS
  • FLOWDOCK
  • WEBHOOK

Request Query Parameters

Name Type Description Default
pageNum number One-based integer that returns a subsection of results. 1
itemsPerPage number Number of items to return per page, up to a maximum of 500. 100
pretty boolean Flag that indicates whether the response body should be in a prettyprint format. false
envelope boolean

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 envelope : true in the query.

For endpoints that return a list of results, the results object is an envelope. Ops Manager adds the status field to the response body.

false

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.

Service Configuration Options
PagerDuty

You must provide the following fields when you configure a PagerDuty integration:

Property Description
type PAGER_DUTY
serviceKey Your Service Key.
Slack

Important

Slack integrations now use the OAuth2 verification method and must be initially configured, or updated from a legacy integration, through Ops Manager third-party service integrations.

Legacy tokens will soon no longer be supported.

You must provide the following fields when you reconfigure an existing Slack integration:

Property Description
type SLACK
apiToken Your API Token.
teamName Your team name.

You may also include the following fields:

Property Description
channelName The channel name to reconfigure.
New Relic

You must provide the following fields when you configure a New Relic integration:

Property Description
type NEW_RELIC
licenseKey Your License Key.
accountId Unique identifier of your New Relic account.
writeToken Your Insights Insert Key.
readToken Your Insights Query Key.
Datadog

You must provide the following fields when you configure a Datadog integration:

Property Description
type DATADOG
apiKey Your API Key.
region Indicates which API URL to use, either US or EU. Datadog will use US by default.
HipChat

You must provide the following fields when you configure a HipChat integration:

Property Description
type HIP_CHAT
notificationToken Notification token for your HipChat user account.
roomName Your HipChat room name.
Opsgenie

You must provide the following fields when you configure a Opsgenie integration:

Property Description
type OPS_GENIE
apiKey Your API Key.
region Indicates which API URL is used, either US or EU. Opsgenie will use US by default.

Note

To set region to EU, you must set a customer setting of opsgenie.api.eu.url.

VictorOps

You must provide the following fields when you configure a VictorOps integration:

Property Description
type VICTOR_OPS
apiKey Your API Key.

You may also include the following fields:

Property Description
routingKey An optional field for your Routing Key.
Flowdock

You must provide the following fields when you configure a VictorOps integration:

Property Description
type FLOWDOCK
flowName Your Flowdock Flow name.
apiToken Your API Token.
orgName Your Flowdock organization name.
Webhook Settings

You must provide the following fields when you configure webhook settings:

Property Description
type WEBHOOK
url Your webhook URL.

You may also include the following fields:

Property Description
secret An optional field for your webhook secret.

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:

Service Result
PagerDuty

PagerDuty integration configuration objects return the following fields:

Property Description
type PAGER_DUTY
serviceKey Your Service Key.
Slack

Slack integration configuration objects return the following fields:

Property Description
type SLACK
apiToken Your API Token.
teamName Your team name. This field may not be present with a legacy Slack integration.
channelName The configured Slack channel name. An empty string if the value is not set.
Datadog

Datadog integration configuration objects return the following fields:

Property Description
type DATADOG
apiKey Your API Key.
region Indicates which API URL is used, either US or EU. Datadog will use US by default.
New Relic

New Relic integration configuration objects return the following fields:

Property Description
type NEW_RELIC
licenseKey Your License Key.
accountId Unique identifier of your New Relic account.
writeToken Your Insights Insert Key.
readToken Your Insights Query Key.
HipChat

HipChat integration configuration objects return the following fields:

Property Description
type HIP_CHAT
notificationToken Notification token for your HipChat user account.
roomName Your HipChat room name.
Opsgenie

Opsgenie integration configuration objects return the following fields:

Property Description
type OPS_GENIE
apiKey Your API Key.
region Indicates which API URL to use, either US or EU. Opsgenie defaults to US.

Note

To set region to EU, you must set a customer setting of opsgenie.api.eu.url.

VictorOps

VictorOps integration configuration objects return the following fields:

Property Description
type VICTOR_OPS
apiKey Your API Key.

The configuration object may also contain the following fields, depending on your configuration:

Property Description
routingKey An optional field returned if you have a Routing Key configured.
Flowdock

Flowdock integration configuration objects return the following fields:

Property Description
type FLOWDOCK
flowName Your Flowdock Flow name.
apiToken Your API Token.
orgName Your Flowdock organization name.
Webhook Settings

Webhook configuration objects return the following fields:

Property Description
type WEBHOOK
url Your webhook URL.

The configuration object may also contain the following fields, depending on your configuration:

Property Description
secret An optional field returned if your webhook is configured with a secret.

Example Request

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest \
     --header "Accept: application/json" \
     --header "Content-Type: application/json" \
     --include \
     --request PUT "https://cloud.mongodb.com/api/public/v1.0/groups/{PROJECT-ID}/integrations/FLOWDOCK" \
     --data '
       {
         "type": "FLOWDOCK",
         "flowName": "newFlowName",
         "apiToken": "223344",
         "orgName": "newOrgName"
       }'

Example Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{
  "links": [
    {
      "href": "https://cloud.mongodb.com/api/public/v1.0/groups/{PROJECT-ID}/integrations/FLOWDOCK?pageNum=1&itemsPerPage=100",
      "rel": "self"
    }
  ],
  "results": [
    {
      "serviceKey": "112233",
      "type": "PAGER_DUTY"
    },
    {
      "apiToken": "112233",
      "channelName": "My Channel",
      "teamName": "My Team",
      "type": "SLACK"
    },
    {
      "apiToken": "223344",
      "flowName": "newFlowName",
      "orgName": "newOrgName",
      "type": "FLOWDOCK"
    }
  ],
  "totalCount": 3
 }