API概览
MRS提供的符合RESTful API的设计规范的接口,如表1和表2所示。如何选择不同版本的接口请参见API版本选择建议。
MRS版本演进过程中逐步废弃部分接口,具体请参见表3。
接口 |
功能 |
API URI |
---|---|---|
集群管理接口 |
POST /v2/{project_id}/clusters |
|
PUT /v2/{project_id}/clusters/{cluster_id}/cluster-name |
||
POST /v2/{project_id}/run-job-flow |
||
POST /v2/{project_id}/clusters/{cluster_id}/expand |
||
POST /v2/{project_id}/clusters/{cluster_id}/shrink |
||
POST /v2/{project_id}/clusters/{cluster_id}/components |
||
作业对象接口 |
POST /v2/{project_id}/clusters/{cluster_id}/job-executions |
|
GET /v2/{project_id}/clusters/{cluster_id}/job-executions |
||
GET /v2/{project_id}/clusters/{cluster_id}/job-executions/{job_execution_id} |
||
POST /v2/{project_id}/clusters/{cluster_id}/job-executions/{job_execution_id}/kill |
||
GET /v2/{project_id}/clusters/{cluster_id}/job-executions/{job_execution_id}/sql-result |
||
POST /v2/{project_id}/clusters/{cluster_id}/job-executions/batch-delete |
||
弹性伸缩接口 |
GET /v2/{project_id}/autoscaling-policy/{cluster_id} |
|
PUT /v2/{project_id}/autoscaling-policy/{cluster_id} |
||
DELETE /v2/{project_id}/autoscaling-policy/{cluster_id} |
||
POST /v2/{project_id}/autoscaling-policy/{cluster_id} |
||
集群HDFS文件接口 |
GET /v2/{project_id}/clusters/{cluster_id}/files?path={directory}&offset={offset}&limit={limit}&sort_key={sort_key}&order={order} |
|
SQL接口 |
POST /v2/{project_id}/clusters/{cluster_id}/sql-execution |
|
GET /v2/{project_id}/clusters/{cluster_id}/sql-execution/{sql_id} |
||
POST /v2/{project_id}/clusters/{cluster_id}/sql-execution/{sql_id}/cancel |
||
委托管理(V2) |
GET /v2/{project_id}/clusters/{cluster_id}/agency-mapping |
|
PUT /v2/{project_id}/clusters/{cluster_id}/agency-mapping |
||
数据连接管理 |
POST /v2/{project_id}/data-connectors |
|
GET /v2/{project_id}/data-connectors |
||
PUT /v2/{project_id}/data-connectors/{connector_id} |
||
DELETE /v2/{project_id}/data-connectors/{connector_id} |
||
版本元数据查询 |
GET /v2/{project_id}/metadata/versions |
|
GET /v2/{project_id}/metadata/version/{version_name}/available-flavor |
||
IAM同步管理接口 |
GET /v2/{project_id}/clusters/{cluster_id}/iam-sync-user |
|
POST /v2/{project_id}/clusters/{cluster_id}/iam-sync-user |
||
DELETE /v2/{project_id}/clusters/{cluster_id}/iam-sync-user |
||
标签管理接口 |
POST /v2/{project_id}/clusters/{cluster_id}/tags/switch |
|
GET /v2/{project_id}/clusters/{cluster_id}/tags/status |
||
GET /v2/{project_id}/clusters/{cluster_id}/tags/quota |
接口 |
功能 |
API URI |
---|---|---|
集群管理接口 |
POST /v1.1/{project_id}/run-job-flow |
|
PUT /v1.1/{project_id}/cluster_infos/{cluster_id} |
||
GET /v1.1/{project_id}/cluster_infos |
||
GET /v1.1/{project_id}/cluster_infos/{cluster_id} |
||
GET /v1.1/{project_id}/clusters/{cluster_id}/hosts |
||
DELETE /v1.1/{project_id}/clusters/{cluster_id} |
||
弹性伸缩接口 |
POST /v1.1/{project_id}/autoscaling-policy/{cluster_id} |
|
标签管理接口 |
POST /v1.1/{project_id}/clusters/{cluster_id}/tags |
|
DELETE /v1.1/{project_id}/clusters/{cluster_id}/tags/{key} |
||
GET /v1.1/{project_id}/clusters/{cluster_id}/tags |
||
POST /v1.1/{project_id}/clusters/{cluster_id}/tags/action |
||
POST /v1.1/{project_id}/clusters/{cluster_id}/tags/action |
||
GET /v1.1/{project_id}/clusters/tags |
||
POST /v1.1/{project_id}/clusters/resource_instances/action |
||
可用区 |
GET /v1.1/{region_id}/available-zones |
|
版本元数据查询 |
GET /v1.1/{project_id}/metadata/versions/{version_name} |