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.
Use this endpoint to retrieve a single re-election job by its unique identifier. Poll this endpoint until the job reaches a terminal status.
Base URL: https://{OPSMANAGER-HOST}:{PORT}/api/public/v1.0
Resource
GET /groups/{GROUP-ID}/replicaSets/{RS-ID}/reElectionJobs/{REELECTION-JOB-ID}
Required Roles
The API key that makes this request must have the Project Automation Admin role.
Request Path Parameters
Name | Type | Necessity | Description |
|---|---|---|---|
GROUP-ID | string | Required | Unique 24-hexadecimal digit string that identifies your project. |
RS-ID | string | Required | Name of the replica set that contains the re-election job. |
REELECTION-JOB-ID | string | Required | Unique 24-hexadecimal digit string that identifies the re-election job, as returned by the step down or step up endpoint. |
Request Query Parameters
The following query parameters are optional:
Name | Type | Necessity | Description | Default |
|---|---|---|---|---|
pretty | boolean | Optional | Flag indicating whether the response body is in a prettyprint format. |
|
envelope | boolean | Optional | Flag that indicates whether 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, the response body includes:
|
|
Request Body Parameters
This endpoint doesn't use HTTP request body parameters.
Response
The response returns a single re-election job.
Name | Type | Description |
|---|---|---|
id | string | Unique 24-hexadecimal digit string that identifies the re-election job. |
groupId | string | Unique 24-hexadecimal digit string that identifies the project. |
action | string | Action that this job performs. Returns one of the following values: |
replicaSetName | string | Name of the target replica set. |
hostname | string | Hostname of the target process. |
port | integer | Port of the target process. |
status | string | Status of the job. Returns one of the following values: |
noOp | boolean | Flag that indicates whether the operation completed as a no-op. |
message | string | Human-readable detail about the job. Ops Manager populates this field after the agent reports a result. |
created | string | Timestamp, in ISO 8601 UTC format, when Ops Manager created the job. |
lastUpdated | string | Timestamp, in ISO 8601 UTC format, when Ops Manager last updated the job. |
expires | string | Timestamp, in ISO 8601 UTC format, after which an Automation Agent no longer picks up this job. |
Job Status Values
Status | Terminal | Meaning |
|---|---|---|
QUEUED | No | Ops Manager created the job. It is waiting for the target host's Automation Agent to pick it up. |
RUNNING | No | The agent is running the job. |
COMPLETED | Yes | The operation finished. Check |
FAILED | Yes | The operation could not complete. See |
EXPIRED | Yes | No agent picked up the job before |
Example Request
1 curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest \ 2 --header "Accept: application/json" \ 3 --include \ 4 --request GET "https://<OpsManagerHost>:<Port>/api/public/v1.0/groups/{GROUP-ID}/replicaSets/{RS-ID}/reElectionJobs/{REELECTION-JOB-ID}?pretty=true"
Example Response
Response Header
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
200 OK Vary: Accept-Encoding Content-Type: application/json Strict-Transport-Security: max-age=300 Date: {dateInUnixFormat} Connection: keep-alive Content-Length: {requestLengthInBytes} X-MongoDB-Service-Version: gitHash={gitHash}; versionString={ApplicationVersion}
Response Body
1 { 2 "id": "665a1234567890abcdef1234", 3 "groupId": "5c8100bcf2a30b12ff88258f", 4 "action": "STEP_UP", 5 "replicaSetName": "rs0", 6 "hostname": "node2.example.com", 7 "port": 27017, 8 "status": "COMPLETED", 9 "noOp": false, 10 "message": null, 11 "created": "2026-08-11T05:37:59Z", 12 "lastUpdated": "2026-08-11T05:38:45Z", 13 "expires": "2026-08-11T05:39:59Z" 14 }
Response Codes
HTTP Status | Error Code | Description |
|---|---|---|
200 | -- | Returns the re-election job document. |
401 | USER_UNAUTHORIZED | The API key does not have the |
404 | REELECTION_JOB_NOT_FOUND |
|