• MapReduce Service

mrs
  1. Help Center
  2. MapReduce Service
  3. API Reference
  4. MRS Manager APIs
  5. MRS Manager Web APIs
  6. Starting a Service

Starting a Service

Function

This API is used to start a specified service.

URI

  • Format

POST /web/v1/maintain/cluster/{cluster_id}/service/{service_name}/start

  • URI parameter description

Parameter

Mandatory or Not

Description

service_name

Yes

Name of the service to be started

cluster_id

Yes

Cluster ID that is displayed on MRS Manager. The default cluster ID is 1, because MRS Manager supports management of only one cluster currently.

Request

  • Example:
    POST /web/v1/maintain/cluster/{cluster_id}/service/{service_name}/start HTTP/1.1
    Host: example.com
    Content-Type: application/json
    Accept:application/json
    {
      "user_password": "string",
      "only_self": true
    }
  • Parameter description
Table 1 Request parameter description

Parameter

Mandatory or Not

Description

user_password

No

Password of the login user. This parameter is used for secondary authentication. You do not need to enter a specific value when starting the service. The parameter value can be null.

only_self

No

Whether to operate only the specified service

false: The services on which the service depends are also started.

true: Only the specified service is started.

Response

  • Example:
    HTTP/1.1 200 OK
    Data:Wed,02 May 2018 10:10:01 GMT
    Server: example-server
    Content-Type: application/json
    {
      "id": 0,
      "state": "COMPLETE",
      "error_code": 0,
      "error_description": "string",
      "total_progress": 0
    }
  • Response parameter description

Parameter

Mandatory or Not

Type

Description

id

No

LONG

Asynchronous task ID (meaningless in other scenarios). The default value is -1.

state

No

STRING

Cluster status. The value FAILED indicates that the command fails to be executed. The value COMPLETE indicates that the command is successfully executed. The value IN_PROGRESS indicates that the command is being executed.

error_code

No

INTEGER

Error code returned

error_description

No

STRING

Error code description

total_progress

No

FLOAT

Total progress

Status Code

Status Code

Description

200

The operation is successful.

For details about error status codes, see Status Codes.