Starting a Service

Function

This API is used to start a specified service.

URI

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

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

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

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

  • FAILED: The command failed to be executed.
  • COMPLETE: The command is executed successfully.
  • IN_PROGRESS: 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.