AI 에이전트의 경우: 문서 인덱스는 https://www.mongodb.com/ko-kr/docs/llms.txt에서 사용할 수 있으며, 모든 페이지의 마크다운 버전은 어떤 URL 경로에 .md를 추가하여 사용할 수 있습니다.

공개 API를 사용하여 프로세스 시작

참고

그룹과 프로젝트는 동의어입니다. {PROJECT-ID}는 프로젝트 ID와 동일합니다. 기존 그룹의 경우, 그룹/프로젝트 ID가 동일하게 유지됩니다. 이 페이지에서는 설명에 대해 얘기할 때 더욱 친숙한 용어 그룹을 사용합니다. 엔드포인트는 문서에 명시된 대로 유지됩니다.

Use this endpoint to start a process that was previously shut down. Ops Manager sets disabled to false for the process in the automation configuration and publishes the change.

The request is asynchronous: 200 OK means Ops Manager published the change, not that the process is running. Poll the automation status resource until the plan completes. Then confirm that the member's replicaStateName on the v2.0 Get One Host by ID endpoint returns to SECONDARY or PRIMARY.

If the process is already running, nothing changes and the agent takes no action, but Ops Manager still publishes the configuration and records the event. If the oplog rolled over while the process was down, the member stays in RECOVERING and doesn't resync on its own. Use Resync a Process instead.

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

POST /groups/{GROUP-ID}/process/{HOST-PORT}:startup

The API key that makes this request must have the Project Automation Admin role.

이름
유형
필요성
설명

그룹 ID

문자열

필수 사항

프로젝트를 식별하는 고유한 24자리 16진수 문자열입니다.

호스팅하다-포트

문자열

필수 사항

Target process, as hostname:port. For example, node1.example.com:27017.

이름
유형
필요성
설명
기본값

드라이런

부울

옵션

If true, Ops Manager validates the request and returns the changed process without publishing it or adding an activity feed event. Ops Manager rejects any value other than true or false with 400 INVALID_QUERY_PARAMETER.

false

다음 쿼리 매개변수는 선택 사항입니다.

이름
유형
필요성
설명
기본값

pretty

부울

옵션

응답 본문이 pretty-print 형식인지 여부를 나타내는 플래그입니다.

false

envelope

부울

옵션

응답을 엔벨로프에 래핑할지 여부를 나타내는 플래그입니다.

일부 API 클라이언트는 HTTP 응답 헤더 또는 상태 코드에 액세스할 수 없습니다. 이 문제를 해결하려면 쿼리에서 envelope=true를 설정합니다.

하나의 결과를 반환하는 엔드포인트의 경우 응답 본문에는 다음이 포함됩니다.

  • status: HTTP 응답 코드

  • content예상되는 응답 본문

false

이 엔드포인트는 HTTP 요청 본문 매개변수를 사용하지 않습니다.

Ops Manager returns 200 OK and the target process as it appears in the automation configuration, with the change applied. disabled is false. The body is the same whether you set dryRun or not.

이름
유형
설명

이름

문자열

자동화 구성에서 프로세스의 이름입니다.

호스트 이름

문자열

프로세스의 호스트 이름입니다.

프로세스 유형

문자열

Type of process, for example mongod.

버전

문자열

MongoDB 버전의 프로세스입니다.

비활성화

부울

true 프로세스가 종료되면.

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 starts 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:startup?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-alive
HTTP/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, "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 dryRun=true. Returns the process document.

400

--

프로세스가 수동 모드이거나 자동화 구성 유효성 검사에 실패했습니다. 메시지에 이유가 설명되어 있습니다. 시뮬레이션 실행(dry run) 결과는 반환되지 않습니다.

409

GROUP_IN_RESTORATION_MODE

복원 후 프로젝트가 정상 작동 상태로 돌아가고 있습니다.

403

외부에서 관리되는 프로세스

프로젝트 진행 과정은 외부 시스템에 의해 관리됩니다.

409

AUTOMATION_CONFIG_DRAFT_ALREADY_EXISTS

프로젝트에 게시되지 않은 자동화 구성 초안이 있습니다.

404

프로세스를 찾을 수 없습니다

HOST-PORT 프로젝트 자동화 구성의 프로세스와 일치하지 않습니다.

400

잘못된 쿼리 매개변수

dryRun isn't true or false.

409

AUTOMATION_CONFIG_CONCURRENT_MODIFICATION

이 요청이 진행 중인 동안 누군가 변경 사항을 게시했습니다. Ops Manager는 실제 요청에 대해서만 이 코드를 반환합니다.

Ops Manager는 나열된 순서대로 공유 오류를 확인합니다. 필수 조건 및 제한 사항은 프로세스 수명 주기를 참조하십시오.