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 every re-election job for a specific replica set.
Base URL: https://{OPSMANAGER-HOST}:{PORT}/api/public/v1.0
Resource
GET /groups/{GROUP-ID}/replicaSets/{RS-ID}/reElectionJobs
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 whose re-election jobs you want to list. |
Request Query Parameters
Name | Type | Description | Default |
|---|---|---|---|
pageNum | integer | Page number (1-index based). |
|
itemsPerPage | integer | Number of items to return per page, up to a maximum of 500. |
|
pretty | boolean | Indicates whether the response body should be in a prettyprint format. |
|
envelope | boolean | 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 one result, response body includes:
For endpoints that return a list of results, the | None |
Request Body Parameters
This endpoint doesn't use HTTP request body parameters.
Response
The response includes an array of re-election job objects and the total number of job objects retrieved.
Name | Type | Description |
|---|---|---|
results | array | Array of re-election jobs, sorted from most recently created to least recently created. See |
totalCount | number | Total number of items in the result set. This can exceed the number of items in |
results Embedded Document
Each element of results represents one 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. |
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?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 "results": [ 3 { 4 "id": "665a1234567890abcdef5678", 5 "groupId": "5c8100bcf2a30b12ff88258f", 6 "action": "STEP_UP", 7 "replicaSetName": "rs0", 8 "hostname": "node2.example.com", 9 "port": 27017, 10 "status": "COMPLETED", 11 "noOp": false, 12 "message": null, 13 "created": "2026-08-11T05:40:00Z", 14 "lastUpdated": "2026-08-11T05:41:15Z", 15 "expires": "2026-08-11T05:45:00Z" 16 }, 17 { 18 "id": "665a1234567890abcdef1234", 19 "groupId": "5c8100bcf2a30b12ff88258f", 20 "action": "STEP_DOWN", 21 "replicaSetName": "rs0", 22 "hostname": "node1.example.com", 23 "port": 27017, 24 "status": "COMPLETED", 25 "noOp": false, 26 "message": null, 27 "created": "2026-08-11T05:37:59Z", 28 "lastUpdated": "2026-08-11T05:38:30Z", 29 "expires": "2026-08-11T05:42:59Z" 30 } 31 ], 32 "totalCount": 2 33 }
Response Codes
HTTP Status | Error Code | Description |
|---|---|---|
200 | -- | Returns the array of re-election jobs. |
401 | USER_UNAUTHORIZED | The API key does not have the |