API概览
MRS提供的符合RESTful API的设计规范的接口,如表1和表2所示。
MRS 版本演进过程中逐步废弃部分接口,具体请参见表3。
接口 |
功能 |
API URI |
---|---|---|
集群管理接口 |
POST /v2/{project_id}/clusters |
|
作业对象接口 |
POST /v2/{project_id}/clusters/{cluster_id}/job-executions |
|
GET /v2/{project_id}/clusters/{cluster_id}/job-executions/{job_execution_id} |
||
GET /v2/{project_id}/clusters/{cluster_id}/job-executions |
||
POST /v2/{project_id}/clusters/{cluster_id}/job-executions/{job_execution_id}/kill |
||
POST /v2/{project_id}/clusters/{cluster_id}/job-executions/batch-delete |
||
GET /v2/{project_id}/clusters/{cluster_id}/job-executions/{job_execution_id}/sql-result |
||
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 |
||
集群HDFS文件接口(V2) |
GET /v2/{project_id}/clusters/{cluster_id}/files?path={directory}&offset={offset}&limit={limit}&sort_key={sort_key}&order={order} |
|
委托管理(V2) |
GET /v2/{project_id}/clusters/{cluster_id}/agency-mapping |
|
PUT /v2/{project_id}/clusters/{cluster_id}/agency-mapping |
接口 |
功能 |
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} |
||
DELETE /v1.1/{project_id}/clusters/{cluster_id} |
||
GET /v1.1/{project_id}/clusters/{cluster_id}/hosts |
||
作业对象接口 |
POST /v1.1/{project_id}/jobs/submit-job |
|
GET /v1.1/{project_id}/job-exes |
||
GET /v1.1/{project_id}/job-exes/{job_exe_id} |
||
作业执行对象接口 |
DELETE /v1.1/{project_id}/job-executions/{job_execution_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 |
||
GET /v1.1/{project_id}/clusters/tags |
||
POST /v1.1/{project_id}/clusters/resource_instances/action |