API Overview

Table 1 describes MRS APIs that meet RESTful API design standards.

Table 2 lists MRS Manager APIs provided by MRS.

Table 1 APIs

API

Function

API URI

Data source APIs

Creating a Data Source

POST /v1.1/{project_id}/data-sources

Updating a Data Source

PUT /v1.1/{project_id}/data-sources/{data_source_id}

Querying the Data Source List

GET /v1.1/{project_id}/data-sources

Querying the Data Source Details

GET /v1.1/{project_id}/data-sources/{data_source_id}

Deleting a Data Source

DELETE /v1.1/{project_id}/data-sources/{data_source_id}

Cluster management APIs (V2)

Creating Clusters

POST /v2/{project_id}/clusters

Cluster management APIs (V1)

Creating a Cluster and Running a Job

POST /v1.1/{project_id}/run-job-flow

Resizing a Cluster

PUT /v1.1/{project_id}/cluster_infos/{cluster_id}

Querying a Cluster List

GET /v1.1/{project_id}/cluster_infos

Querying Cluster Details

GET /v1.1/{project_id}/cluster_infos/{cluster_id}

Deleting a Cluster

DELETE /v1.1/{project_id}/clusters/{cluster_id}

Querying a Host List

GET /v1.1/{project_id}/clusters/{cluster_id}/hosts

Job binary object APIs

Creating a Job Binary Object

POST /v1.1/{project_id}/job-binaries

Updating a Job Binary Object

PUT /v1.1/{project_id}/job-binaries/{job_binary_id}

Querying the Binary Object List

GET /v1.1/{project_id}/job-binaries

Querying the Binary Object Details

GET /v1.1/{project_id}/job-binaries/{job_binary_id}

Deleting a Job Binary Object

DELETE /v1.1/{project_id}/job-binaries/{job_binary_id}

Job object APIs (V1)

Adding a Job and Executing the Job

POST /v1.1/{project_id}/jobs/submit-job

Creating a Job Object

POST /v1.1/{project_id}/jobs

Updating a Job Object

PATCH /v1.1/{project_id}/jobs/{job_id}

Executing a Job Object

POST /v1.1/{project_id}/jobs/{job_id}/execute

Querying the Job Object List

GET /v1.1/{project_id}/jobs

Querying Job Object Details

GET /v1.1/{project_id}/jobs/{job_id}

Querying the exe Object List of Jobs

GET /v1.1/{project_id}/job-exes

Querying exe Object Details

GET /v1.1/{project_id}/job-exes/{job_exe_id}

Deleting a Job Object

DELETE /v1.1/{project_id}/jobs/{job_id}

Job execution object APIs (V1)

Querying the Job Execution Object List

GET /v1.1/{project_id}/job-executions

Querying Job Execution Object Details

GET /v1.1/{project_id}/job-executions/{job_execution_id}

Canceling Job Execution

GET /v1.1/{project_id}/job-executions/{job_execution_id}/cancel

Deleting a Job Execution Object

DELETE /v1.1/{project_id}/job-executions/{job_execution_id}

Job object APIs (V2)

Adding and Executing a Job

POST /v2/{project_id}/clusters/{cluster_id}/job-executions

Querying Information About a Job

GET /v2/{project_id}/clusters/{cluster_id}/job-executions/{job_execution_id}

Querying a List of Jobs

GET /v2/{project_id}/clusters/{cluster_id}/job-executions

Terminating a Job

POST /v2/{project_id}/clusters/{cluster_id}/job-executions/{job_execution_id}/kill

Deleting Jobs in Batches

POST /v2/{project_id}/clusters/{cluster_id}/job-executions/batch-delete

Obtain the SQL Result

GET /v2/{project_id}/clusters/{cluster_id}/job-executions/{job_execution_id}/sql-result

Auto scaling APIs

Configuring an Auto Scaling Rule

POST /v1.1/{project_id}/autoscaling-policy/{cluster_id}

Tag Management APIs

Adding a Tag to a Specified Cluster

POST /v1.1/{project_id}/clusters/{cluster_id}/tags

Deleting a Tag of a Specified Cluster

DELETE /v1.1/{project_id}/clusters/{cluster_id}/tags/{key}

Querying Tags of a Specified Cluster

GET /v1.1/{project_id}/clusters/{cluster_id}/tags

Adding or Deleting Cluster Tags in Batches

POST /v1.1/{project_id}/clusters/{cluster_id}/tags/action

Querying All Tags

GET /v1.1/{project_id}/clusters/tags

Querying a List of Clusters with Specified Tags

POST /v1.1/{project_id}/clusters/resource_instances/action

Table 2 MRS Manager API

API

Function

API URI

MRS Manager CAS API

Logging In to the CAS

POST /cas/login

Logging Out of the CAS

POST /cas/logout

MRS Manager WEB API

Checking the Login

GET /web/v1/access/login_check

Modifying the Password of the Current Login User

POST /web/v1/access/modify_self_password

Querying the Health Status of a Specified Cluster

GET /web/v1/cluster/{cluster_id}/status

Querying Basic Information About a Specified Cluster

GET /web/v1/clusters

Querying the Command Execution Progress

GET /web/v1/common/command/{command_id}/progress

Saving Configurations

POST /web/v1/config/cluster/{cluster_id}/save

Logging Out Of a Session

GET /web/v1/logout_action

Starting a Service

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

Stopping a Service

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

Querying Monitoring Data

GET /web/v1/monitor/metrics_info

Querying Summary of a Specified Service

GET /web/v1/cluster/{cluster_id}/services/{service_name}