Navigation

Automation Status

Note

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. This page uses the more familiar term group when referring to descriptions. The endpoint remains as stated in the document.

Overview

The Public API provides the automationStatus endpoint to let you see whether each MongoDB process is up-to-date with the current automation configuration. The endpoint returns the goalVersion field to report the current version of the automation configuration and the lastGoalVersionAchieved fields to report the versions of the configuration running on each server.

Base URL: https://{OPSMANAGER-HOST}:{PORT}/api/public/v1.0

Resource

GET /groups/GROUP-ID/automationStatus

Request Parameters

Request Path Parameters

Parameter Type Description
GROUP-ID string (Required.) The unique identifier for the group.

Request Query Parameters

This endpoint may use any of the HTTP request query parameters available to all Ops Manager API resources. These are all optional.

Name Type Description Default
pretty boolean Flag indicating whether the response body should be in a prettyprint format. false
envelope boolean

Flag indicating 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 one result, response body includes:

status
HTTP response code
envelope
The expected response body
false

Request Body Parameters

This endpoint does not use HTTP request body parameters.

Response

Name Type Description
goalVersion number The version of the most recently submitted automation configuration. If there is a conflict in submissions of automation configurations, this field lists the winning configuration.
processes array The group’s deployed MongoDB instances.
processes.hostname string The fully qualified domain name (retrieved by issuing hostname -f) of the server on which the MongoDB process and Automation Agent are hosted.
processes.name string The process name as specified in the automation configuration.
processes.lastGoalVersionAchieved number The last version of the automation configuration with which this process had deployed as configured. If the processes.lastGoalVersionAchieved number is not equal to the goalVersion number, the process has not yet deployed according to the current configuration.
processes.plan array Describes how a process that is not yet up-to-date with the configuration will achieve the goal state.

Example Request

curl --user '{USERNAME}:{APIKEY}' --digest \
 --header 'Accept: application/json' \
 --include \
 --request GET "https://{opsManagerHost}:{port}/api/public/v1.0/groups/533c5895b91030606f21033a/automationStatus"

Example Response

Response Header

HTTP/1.1 401 Unauthorized
Content-Type: application/json;charset=ISO-8859-1
Date: {dateInUnixFormat}
WWW-Authenticate: Digest realm="MMS Public API", domain="", nonce="{nonce}", algorithm=MD5, op="auth", stale=false
Content-Length: {requestLengthInBytes}
Connection: keep-alive
HTTP/1.1 200 OK
Vary: Accept-Encoding
Content-Type: application/json
Strict-Transport-Security: max-age=300
Date: {dateInUnixFormat}
Connection: keep-alive
Content-Length: {requestLengthInBytes}

Response Body

{
  "processes": [
    {
      "plan": [],
      "lastGoalVersionAchieved": 2,
      "name": "shardedCluster_myShard_0_0",
      "hostname": "testDeploy-0"
    },
    {
      "plan": [],
      "lastGoalVersionAchieved": 2,
      "name": "shardedCluster_myShard_0_1",
      "hostname": "testDeploy-1"
    },
    {
      "plan": ["Download", "Start", "WaitRsInit"],
      "lastGoalVersionAchieved": 2,
      "name": "shardedCluster_myShard_0_2",
      "hostname": "testDeploy-2"
    },
    {
      "plan": [],
      "lastGoalVersionAchieved": 2,
      "name": "shardedCluster_myShard_1_3",
      "hostname": "testDeploy-3"
    },
    {
      "plan": [],
      "lastGoalVersionAchieved": 2,
      "name": "shardedCluster_myShard_1_4",
      "hostname": "testDeploy-4"
    },
    {
      "plan": [],
      "lastGoalVersionAchieved": 2,
      "name": "shardedCluster_myShard_1_5",
      "hostname": "testDeploy-5"
    },
    {
      "plan": [],
      "lastGoalVersionAchieved": 2,
      "name": "shardedCluster_config_6",
      "hostname": "testDeploy-6"
    },
    {
      "plan": [],
      "lastGoalVersionAchieved": 2,
      "name": "shardedCluster_config_7",
      "hostname": "testDeploy-7"
    },
    {
      "plan": [],
      "lastGoalVersionAchieved": 2,
      "name": "shardedCluster_config_8",
      "hostname": "testDeploy-8"
    },
    {
      "plan": [],
      "lastGoalVersionAchieved": 2,
      "name": "shardedCluster_mongos_9",
      "hostname": "testDeploy-9"
    }
  ],
  "goalVersion": 2
}