참고
그룹과 프로젝트는 동의어입니다. {PROJECT-ID}는 프로젝트 ID와 동일합니다. 기존 그룹의 경우, 그룹/프로젝트 ID가 동일하게 유지됩니다. 이 페이지에서는 설명에 대해 얘기할 때 더욱 친숙한 용어 그룹을 사용합니다. 엔드포인트는 문서에 명시된 대로 유지됩니다.
Use this endpoint to gracefully restart a running process. Ops Manager sets lastRestart for the process in the automation configuration and publishes the change. If the process is the current primary, the Automation Agent steps it down before it restarts the process.
The request is asynchronous: 200 OK means Ops Manager published the change, not that the process has restarted. Poll the automation status resource until the plan completes.
The restart endpoint returns 400 PROCESS_DISABLED_CANNOT_RESTART for a process that is shut down. To start it, use Start a Process instead.
기본 URL: https://{OPSMANAGER-HOST}:{PORT}/api/public/v1.0
Resource
POST /groups/{GROUP-ID}/process/{HOST-PORT}:restart필수 역할
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. lastRestart 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 restarts 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:restart?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, "lastRestart": "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 | PROCESS_DISABLED_CANNOT_RESTART | 해당 프로세스가 종료되었습니다. 대신 시작하세요. |
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는 나열된 순서대로 공유 오류를 확인합니다. 필수 조건 및 제한 사항은 프로세스 수명 주기를 참조하십시오.