Updated on 2026-11-20 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

Type

API

Description

Cluster management APIs

Creating a Cluster

This API is used to create an MRS cluster.

Renaming a Cluster

This API is used to change a cluster name.

Creating a Cluster and Submitting a Job

This API is used to create an MRS cluster, submit a job, and delete the cluster upon job completion.

Retrieving the Cluster Communication Security Authorization Status

This API is used to obtain the communication security authorization status of the current cluster.

Scaling Out a Cluster

This API is used to scale out an MRS cluster.

Scaling In a Cluster

This API is used to scale in an MRS cluster.

Adding Components to a Cluster

This API is used to add components to a cluster. This feature is supported only for custom clusters in MRS 3.1.2 or later regular versions, and MRS 3.1.2-LTS.2 or later LTS versions.

Listing Cluster Nodes

This API is used to query the list of cluster nodes.

Job object APIs

Creating and Submitting a Job

This API is used to add and submit a job in an MRS cluster.

Listing Jobs

This API is used to query the list of jobs submitted on the job management page of a specified MRS cluster.

Retrieving Job Details

This API is used to query the details of a specified job in an MRS cluster.

Terminating a Job

This API is used to terminate a specified job in an MRS cluster.

Retrieving SQL Results

This API is used to query the results returned after the execution of SQL statements for SparkSQL and SparkScript job types in an MRS cluster.

Deleting Jobs in Batches

This API is used to delete jobs in batches in an MRS cluster.

Auto scaling APIs

Viewing Auto Scaling Policies

This API is used to view all auto scaling policy information for a specified cluster.

Updating an Auto Scaling Policy

This API is used to update an auto scaling policy.

Deleting an Auto Scaling Policy

This API is used to delete an auto scaling policy.

Creating an Auto Scaling Policy

This API is used to create an auto scaling policy.

Cluster HDFS file APIs (V2)

Listing Files in a Specified Directory

This API is used to obtain the file list of a specified directory in an MRS cluster.

SQL APIs

Submitting a SQL Statement

This API is used to submit and execute a SQL statement in an MRS cluster.

Retrieving SQL Results

This API is used to query the execution result of a SQL statement in an MRS cluster.

Canceling SQL Execution

This API is used to cancel the execution task of a SQL statement in an MRS cluster.

Agency management APIs (V2)

Querying User (Group)-to-IAM Agency Mappings

This API is used to obtain the details of the mapping between users (or user groups) and IAM agencies.

Updating User (Group)-to-IAM Agency Mappings

This API is used to update the mapping between users (or user groups) and IAM agencies.

Data connection management APIs

Creating a Data Connection

This API is used to create a data connection.

Listing Data Connections

This API is used to query the list of data connections.

Updating a Data Connection

This API is used to update a data connection.

Deleting a Data Connection

This API is used to delete a data connection.

Version metadata query APIs

Listing MRS Versions

This API is used to display the list of MRS versions.

Listing Available Node Specifications for an MRS Cluster Version

This API is used to query the available specifications for an MRS cluster version.

IAM synchronization management APIs

Checking Whether IAM User Synchronization Is in Progress for the Current Cluster

This API is used to query whether the current cluster is undergoing IAM synchronization.

Retrieving IAM User Synchronization Status for a Specified Cluster

This API is used to query the IAM synchronization status of a specified cluster.

Retrieving Synchronized IAM Users and User Groups

This API is used to obtain the synchronized IAM users and user groups.

Synchronizing IAM Users and User Groups

This API is used to synchronize IAM users and user groups to Manager. If a specific user is specified, the IAM user groups associated with that user will also be synchronized to Manager.

Canceling IAM Synchronization for Specified Users and User Groups

This API is used to cancel synchronization for specified users and user groups.

Tag Management APIs

Enabling or Disabling Default Tags for a Cluster

This API is used to enable or disable the cluster default tag for an existing cluster. When enabled, nodes within the cluster will be tagged with the cluster default tag.

Retrieving the Default Tag Status

This API is used to query the status of the cluster default tag.

Retrieving Tag Quotas

This API is used to query tag quota information.

Table 2 V1.1 APIs

Type

API

Description

Cluster management APIs

Creating a Cluster and Submitting a Job

This API is used to create an MRS cluster and submit a job within the cluster. This API is not compatible with Sahara.

Resizing a Cluster

This API is used to scale out or scale in the Core or Task nodes of a cluster after creation. The number of Master nodes cannot be adjusted after an MRS cluster is successfully created, meaning scaling of Master nodes is not supported. This API is not compatible with Sahara.

Listing Clusters

This API is used to view the list of clusters created by a user. This API is not compatible with Sahara.

Retrieving Cluster Details

This API is used to view the details of a specified cluster. This API is not compatible with Sahara.

Listing Hosts

This API is used to query the host list details of a specified cluster.

Terminating a Cluster

This API is used to delete a cluster after data processing and analysis is complete, or when the cluster is running abnormally and cannot provide services. This API is compatible with Sahara.

Clusters in any of the following states cannot be deleted:
  • scaling-out: Scaling out
  • scaling-in: Scaling in
  • starting: Starting
  • terminating: Deleting
  • terminated: Deleted
  • failed: Failed

Retrieving the Status of the Agency Switch Task for a Specified Cluster

This API is used to query the status of the agency switching task for a specified cluster.

Auto scaling APIs

Configuring an Auto Scaling Rule

This API is used to configure auto scaling rules.

Auto scaling rules can also be created in the API for creating a cluster and executing a job.

AZ APIs

Listing AZs

This API is used to query the ID of an availability zone (AZ). When creating a cluster, the AZ ID for the instance must be configured, and this ID can be queried using this API.

Version metadata

Retrieving Metadata for a Cluster Version

This API is used to query the metadata of a corresponding version. If a cluster ID is specified in the parameters, the latest metadata after the cluster has been updated with patches can be queried.

Tag management APIs

Adding Tags to a Specified Cluster

This API is used to add a tag to a cluster.

Listing Tags for a Specified Cluster

This API is used to query the tag information of a cluster.

Deleting Tags from a Specified Cluster

This API is used to delete a tag from a cluster.

Adding Tags to a Cluster in Batches

This API is used to add tags to a cluster in batches.

Deleting Tags from a Cluster in Batches

This API is used to delete tags from a cluster in batches.

Listing All Tags

This API is used to query all tag collections of a tenant in a specified region.

Listing Clusters with Specified Tags

This API is used to filter clusters using tags.

Table 3 Historical APIs

Type

API

Description

V1.1 Job Management API

Adding and Executing a Job

This API is used to add a job to an MRS cluster and execute the job. This API is not compatible with Sahara.

Querying the exe Object List

This API is used to query the list of all job exe objects. This API is not compatible with Sahara.

Querying exe Object Details

This API is used to query the detailed information of a specified job exe object. This API is not compatible with Sahara.

Deleting a Job Execution Object

This API is used to delete a specified job execution object. This API is compatible with Sahara.