Updated on 2026-01-04 GMT+08:00

API Overview

Table 1 and Table 2 describe the RESTful APIs provided by MRS.

Some APIs are gradually discarded during MRS version evolution. For details, see Table 3.

Table 1 V2 APIs

API

Function

API URI

Cluster management APIs

Creating a Cluster - CreateCluster

POST /v2/{project_id}/clusters

Changing a Cluster Name - UpdateClusterName

PUT /v2/{project_id}/clusters/{cluster_id}/cluster-name

Creating a Cluster and Submitting a Job - CreateClusterAndSubmitJob

POST /v2/{project_id}/run-job-flow

Obtaining the Cluster Communication Security Authorization Status - ListSecurityRuleStatus

GET /v2/{project_id}/clusters/{cluster_id}/security-rule/status

Scaling Out a Cluster - ExpandCluster

POST /v2/{project_id}/clusters/{cluster_id}/expand

Scaling In a Cluster - ShrinkCluster

POST /v2/{project_id}/clusters/{cluster_id}/shrink

Adding Components to a Cluster - AddComponent

POST /v2/{project_id}/clusters/{cluster_id}/components

Querying the Cluster Node List - ListNodes

GET /v2/{project_id}/clusters/{cluster_id}/nodes

Job object APIs

Adding and Executing a Job - CreateExecuteJob

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

Querying Information About a Job - ShowJobList

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

Querying a List of Jobs - ShowSingleJob

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

Terminating a Job - StopJob

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

Obtaining SQL Results - ShowSqlResultWithJob

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

Deleting Jobs in Batches - BatchDeleteJobs

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

Auto scaling APIs

Viewing Auto Scaling Policies - ShowAutoScalingPolicy

GET /v2/{project_id}/autoscaling-policy/{cluster_id}

Updating an Auto Scaling Policy - UpdateAutoScalingPolicy

PUT /v2/{project_id}/autoscaling-policy/{cluster_id}

Deleting an Auto Scaling Policy - DeleteAutoScalingPolicy

DELETE /v2/{project_id}/autoscaling-policy/{cluster_id}

Creating an Auto Scaling policy - CreateAutoScalingPolicy

POST /v2/{project_id}/autoscaling-policy/{cluster_id}

Cluster HDFS file APIs (V2)

Obtaining the List of Files from a Specified Directory - ShowHdfsFileList

GET /v2/{project_id}/clusters/{cluster_id}/files?path={directory}&offset={offset}&limit={limit}&sort_key={sort_key}&order={order}

SQL APIs

Submitting a SQL Statement - ExecuteSql

POST /v2/{project_id}/clusters/{cluster_id}/sql-execution

Querying SQL Results - ShowSqlResult

GET /v2/{project_id}/clusters/{cluster_id}/sql-execution/{sql_id}

Canceling a SQL Execution Task - CancelSql

POST /v2/{project_id}/clusters/{cluster_id}/sql-execution/{sql_id}/cancel

Agency management APIs (V2)

Querying the Mapping Between a User (Group) and an IAM Agency - ShowAgencyMapping

GET /v2/{project_id}/clusters/{cluster_id}/agency-mapping

Updating the Mapping Between a User (Group) and an IAM Agency - UpdateAgencyMapping

PUT /v2/{project_id}/clusters/{cluster_id}/agency-mapping

Data connection management APIs

Creating a Data Connection - CreateDataConnector

POST /v2/{project_id}/data-connectors

Querying the Data Connection List - ListDataConnector

GET /v2/{project_id}/data-connectors

Updating a Data Connection - UpdateDataConnector

PUT /v2/{project_id}/data-connectors/{connector_id}

Deleting a Data Connection - DeleteDataConnector

DELETE /v2/{project_id}/data-connectors/{connector_id}

Version metadata query APIs

Obtaining the MRS Version List - ShowMrsVersionList

GET /v2/{project_id}/metadata/versions

Querying Available Specifications of an MRS Cluster Version - ShowMrsFlavors

GET /v2/{project_id}/metadata/version/{version_name}/available-flavor

IAM synchronization management APIs

Checking Ongoing IAM User Synchronization in a Cluster - ListClusterSyncTaskStatus

GET /v2/{project_id}/clusters/{cluster_id}/iam-sync

Querying IAM User Synchronization Status of a Specified Cluster - ListClusterSyncStatus

GET /v2/{project_id}/clusters/{cluster_id}/iam-sync/is-synchronous

Obtaining Synchronized IAM Users and User Groups - ShowSyncIamUser

GET /v2/{project_id}/clusters/{cluster_id}/iam-sync-user

IAM Synchronization - UpdateSyncIamUser

POST /v2/{project_id}/clusters/{cluster_id}/iam-sync-user

Cancelling Synchronization of Specified Users and User Groups - CancelSyncIamUser

DELETE /v2/{project_id}/clusters/{cluster_id}/iam-sync-user

Tag Management APIs

Enabling or Disabling the Default Tag of a Cluster - SwitchClusterTags

POST /v2/{project_id}/clusters/{cluster_id}/tags/switch

Querying the Default Cluster Tag Status - ShowDefaultTagStatus

GET /v2/{project_id}/clusters/{cluster_id}/tags/status

Querying Tag Quotas - ShowTagQuota

GET /v2/{project_id}/clusters/{cluster_id}/tags/quota

Table 2 V1.1 APIs

API

Function

API URI

Cluster management APIs

Creating a Cluster and Executing a Job - CreateClusterAndSubmitJob

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

Resizing a Cluster - ModifyClusterNode

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

Querying a Cluster List - ListClusters

GET /v1.1/{project_id}/cluster_infos

Querying Cluster Details - ShowClusterDetails

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

Querying a Host List - ListHosts

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

Terminating a Cluster - DeleteCluster

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

Querying the Status of an Agency Switch Task in a Specified Cluster- ListAgencyTaskStatus

GET /v1/{project_id}/clusters/{cluster_id}/async_task_status/update_ecs_agency

Job object APIs

Adding and Executing a Job (Deprecated)

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

Querying the exe Object List of Jobs (Deprecated)

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

Querying exe Object Details (Deprecated)

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

Job execution object APIs

Deleting a Job Execution Object (Deprecated)

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

Auto scaling APIs

Configuring an Auto Scaling Rule - CreateAutoScalingPolicy

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

AZ APIs

Querying AZ Information - ListAvailableZones

GET /v1.1/{region_id}/available-zones

Version metadata

Querying the Metadata of a Cluster Version - ShowMrsVersionMetadata

GET /v1.1/{project_id}/metadata/versions/{version_name}

Tag management APIs

Adding Tags to a Specified Cluster - CreateClusterTag

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

Querying Tags of a Specified Cluster - ListClusterTags

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

Deleting Tags from a Specified Cluster - DeleteClusterTag

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

Adding Tags to a Cluster in Batches - BatchCreateClusterTags

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

Deleting Tags from a Cluster in Batches - BatchDeleteClusterTags

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

Querying All Tags - ListAllTags

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

Querying a List of Clusters with Specified Tags - ListClustersByTags

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

Table 3 Historical APIs

API

Function

API URI

V1.1 Job Management API

Adding and Executing a Job

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

Querying the exe Object List

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

Querying exe Object Details

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

Deleting a Job Execution Object

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