참고
그룹과 프로젝트는 동의어입니다. {PROJECT-ID}는 프로젝트 ID와 동일합니다. 기존 그룹의 경우, 그룹/프로젝트 ID가 동일하게 유지됩니다. 이 페이지에서는 설명에 대해 얘기할 때 더욱 친숙한 용어 그룹을 사용합니다. 엔드포인트는 문서에 명시된 대로 유지됩니다.
Use this endpoint to trigger an initial sync on a replica set member. Ops Manager sets lastResync for the process in the automation configuration and publishes the change. Use resync to recover a member stuck in RECOVERING because it fell behind the oplog window.
성공적인 실행을 보장하기 위해 재동기화 요청은 복제 세트의 보조 멤버로 제한하십시오. 각 복제 세트는 동시에 하나의 재동기화만 허용하며, 배포가 목표 상태에 도달할 때까지 활성 상태로 유지됩니다. 기본 멤버에 대한 재동기화 요청은 피하십시오. 자동화 에이전트가 해당 요청을 실행하지 않으며, 수동 개입이 필요합니다.
The request is asynchronous: 200 OK means Ops Manager published the change, not that the resync has finished. Poll the automation status resource until the plan completes, then poll v2.0 Get One Host by ID until replicaStateName is SECONDARY. An initial sync can take a long time on large data sets.
기본 URL: https://{OPSMANAGER-HOST}:{PORT}/api/public/v1.0
Resource
POST /groups/{GROUP-ID}/process/{HOST-PORT}:resync필수 역할
The API key that makes this request must have the Project Automation Admin role.
요청 경로 매개변수
이름 | 유형 | 필요성 | 설명 |
|---|---|---|---|
그룹 ID | 문자열 | 필수 사항 | 프로젝트를 식별하는 고유한 24자리 16진수 문자열입니다. |
호스팅하다-포트 | 문자열 | 필수 사항 | Target process, as |
요청 쿼리 매개변수
이름 | 유형 | 필요성 | 설명 | 기본값 |
|---|---|---|---|---|
드라이런 | 부울 | 옵션 | If |
|
다음 쿼리 매개변수는 선택 사항입니다.
이름 | 유형 | 필요성 | 설명 | 기본값 |
|---|---|---|---|---|
pretty | 부울 | 옵션 | 응답 본문이 pretty-print 형식인지 여부를 나타내는 플래그입니다. |
|
envelope | 부울 | 옵션 | 응답을 엔벨로프에 래핑할지 여부를 나타내는 플래그입니다. 일부 API 클라이언트는 HTTP 응답 헤더 또는 상태 코드에 액세스할 수 없습니다. 이 문제를 해결하려면 쿼리에서 envelope=true를 설정합니다. 하나의 결과를 반환하는 엔드포인트의 경우 응답 본문에는 다음이 포함됩니다.
|
|
요청 본문 매개변수
이 엔드포인트는 HTTP 요청 본문 매개변수를 사용하지 않습니다.
응답
Ops Manager returns 200 OK and the target process as it appears in the automation configuration, with the change applied. lastResync is set. The body is the same whether you set dryRun or not.
이름 | 유형 | 설명 |
|---|---|---|
이름 | 문자열 | 자동화 구성에서 프로세스의 이름입니다. |
호스트 이름 | 문자열 | 프로세스의 호스트 이름입니다. |
프로세스 유형 | 문자열 | Type of process, for example |
버전 | 문자열 | MongoDB 버전의 프로세스입니다. |
비활성화 | 부울 |
|
lastRestart | 문자열 | Timestamp, in ISO 8601 UTC format, of the last requested restart. |
lastResync | 문자열 | Timestamp, in ISO 8601 UTC format, of the last requested resync. |
The document also contains the rest of the process's automation configuration, such as args2_6, featureCompatibilityVersion, and authSchemaVersion. See the Automation Configuration reference.
요청 예시
The following example triggers an initial sync on the process running on node1.example.com:27017.
curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest \ --header "Accept: application/json" \ --include \ --request POST "https://<OpsManagerHost>:<Port>/api/public/v1.0/groups/{GROUP-ID}/process/node1.example.com:27017:resync?pretty=true"응답 예시
응답 헤더
HTTP/1.1 401 UnauthorizedContent-Type: application/json;charset=ISO-8859-1Date: {dateInUnixFormat}WWW-Authenticate: Digest realm="MMS Public API", domain="", nonce="{nonce}", algorithm=MD5, op="auth", stale=falseContent-Length: {requestLengthInBytes}Connection: keep-aliveHTTP/1.1 200 OKVary: Accept-EncodingContent-Type: application/jsonStrict-Transport-Security: max-age=300Date: {dateInUnixFormat}Connection: keep-aliveContent-Length: {requestLengthInBytes}X-MongoDB-Service-Version: gitHash={gitHash}; versionString={ApplicationVersion}응답 본문
{ "name": "rs0_1", "processType": "mongod", "version": "8.0.4", "hostname": "node1.example.com", "disabled": false, "lastResync": "2026-10-06T09:15:20Z", "authSchemaVersion": 5, "featureCompatibilityVersion": "8.0", "args2_6": { "net": { "port": 27017 }, "replication": { "replSetName": "rs0" }, "storage": { "dbPath": "/data/rs0_1" }, "systemLog": { "destination": "file", "path": "/data/rs0_1/mongodb.log" } }}응답 코드
HTTP Status | 오류 코드 | 설명 |
|---|---|---|
200 | -- | The change was published, or computed with |
400 | 프로세스 재동기화가 지원되지 않습니다 | The target is a |
409 | 프로세스_재동기화_진행중 | 대상의 복제본 세트에 대해 또 다른 재동기화 작업이 이미 진행 중입니다. |
409 | 프로세스 에이전트가 보고하지 않음 | 대상 호스트의 자동화 에이전트가 Ops Manager에 보고한 적이 없습니다. |
409 | GROUP_IN_RESTORATION_MODE | 복원 후 프로젝트가 정상 작동 상태로 돌아가고 있습니다. |
403 | 외부에서 관리되는 프로세스 | 프로젝트 진행 과정은 외부 시스템에 의해 관리됩니다. |
409 | AUTOMATION_CONFIG_DRAFT_ALREADY_EXISTS | 프로젝트에 게시되지 않은 자동화 구성 초안이 있습니다. |
404 | 프로세스를 찾을 수 없습니다 |
|
400 | 잘못된 쿼리 매개변수 |
|
409 | AUTOMATION_CONFIG_CONCURRENT_MODIFICATION | 이 요청이 진행 중인 동안 누군가 변경 사항을 게시했습니다. Ops Manager는 실제 요청에 대해서만 이 코드를 반환합니다. |
Ops Manager는 나열된 순서대로 공유 오류를 확인합니다. 필수 조건 및 제한 사항은 프로세스 수명 주기를 참조하십시오.