YI-MapReduce

Query Cluster Information by ID

2025-07-24 07:59:27

API Introduction

This API provides the function to query cluster information by ID. The system takes query conditions from user input and returns the details of clusters that meet these conditions.

API Restrictions

You can only query information of clusters that are in a running state.

Require API Approval or Not

No

URI

GET /v1/emr/openapi/cluster/clusterDetail/getById

Content-Type

application/json

Path Parameter

None

Query Parameter

Parameter

Required   or Not

Parameter   Type

Description

Example

id

Yes

String

Cluster   ID

00c3a04292996955752f073c995a1cc6

Request Header Parameter

Parameter

Required   or Not

Parameter   Type

Description

Example

Lower-level   Object

Cluster-Id

Yes

String

Cluster   ID

00c3a04292996955752f073c995a1cc6

/

Request Body Parameter

None

Response Parameter

Parameter

Parameter   Type

Description

Example

Lower-level   Object

statusCode

Integer

Status   Code

200

/

message

String

Brief   summary of the current API call status and necessary prompt information.

Requested

/

error

String

Error   code. This field is not returned when the request is successful.

EMR_400001

/

returnObj

Object

Return   result.

/

returnObj

Table returnObj

Parameter

Parameter   Type

Description

Example

Lower-level   Object

id

String

Cluster   ID

00c3a04292996955752f073c995a1cc6

/

managerClusterId

Integer

Cluster   ID as defined by the manager

1


iaasType

String

Platform

Public   Cloud

/

regionId

String

Resource   pool ID

bb9fdb42056f11eda1610242ac110002

/

regionName

String

Resource   pool name

East   China 1

/

availableZoneId

String

Availability   zone ID

cn-huadong1-jsnj1A-public-ctcloud

/

availableZoneName

String

Availability   zone name

AZ   1

/

clusterName

String

Cluster   Name

test_vpc_24

/

payType

String

Payment   Type

Annual   and Monthly Subscription

/

clusterType

String

Cluster   Type

Elastic   Search

/

clusterTypeVersion

String

Product   Version

YI-MapReduce-2.12.0

/

clusterPlanCode

String

Code   of the cluster plan

cloud-search

/

componentNameList

String

List   of component names

[{componentTitle:ElasticSearch,version:7.10.2},
  {componentTitle:Kibana,version:7.10.2}]]

/

datasourceConfigs

String

Information   about the data source

[]

/

vpcId

String

VPC   ID

vpc-0k5xl6w5

/

subnetId

String

Subnet   ID

subnet-i2ys8sp

/

securityGroupId

String

Security   Group ID

[sg-4h7w9cl1]

/

clusterDueTime

Integer

Expiry   time of the cluster

1709193751000

/

userId

String

User   ID

ba14c8e729e447d69698f81ac7d55555

/

accountId

String

Account   ID

ed24e4b414a048b0a9cb995f59cc85jj

/

clusterCreateTime

Integer

Creation   time of the cluster

1706515357000

/

clusterState

String

Cluster   Status

Running

/

createTime

Integer

Creation   time

1706515356000

/

updateTime

Integer

Update   time

1706515356000

/

pathMap

Map   of String

Component   Name: Component Link

{   "Kibana": "1,1", "ElasticSearch":   "1,1" }

/

Enumeration Parameters

None

Request Header Example

{
    "Cluster-Id":"00c3a04292996955752f073c995a1cc6"
}

Request URL Example

https://emr-global.ctapi.ctyun.cn/v1/emr/openapi/cluster/clusterDetail/getById?id=00c3a04292996955752f073c995a1cc6

Request Body Example

None

Response Example

Successful request return value example
{
    "statusCode": 200,
    "message": "success",
    "returnObj": {
        "id": "00c3a04292996955752f073c995a1cc6",
        "managerClusterId": 1,
        "iaasType": "Public Cloud",
        "regionId": "bb9fdb42056f11eda1610242ac110002",
        "regionName": "East China 1",
        "availableZoneId": "cn-huadong1-jsnj1A-public-ctcloud",
        "availableZoneName": "Availability Zone 1",
        "clusterName": "test1218",
        "payType": "Annual or Monthly",
        "clusterType": "Elastic Search",
        "clusterTypeVersion": "YI-MapReduce-2.12.0",
        "clusterPlanCode": "cloud-search",
        "componentNameList": "[{\"componentTitle\":\"ElasticSearch\",\"version\":\"7.10.2\"},{\"componentTitle\":\"Kibana\",\"version\":\"7.10.2\"}]",
        "datasourceConfigs": "[]",
        "vpcId": "vpc-vgo9wazk0m",
        "subnetId": "subnet-6hd5rpedsp",
        "securityGroupId": "[\"sg-mz2suubydc\"]",
        "clusterDueTime": 1705543555000,
        "userId": "ba14c8e729e447d69698f81ac7d506b5",
        "accountId": "ed24e4b414a048b0a9cb995f59cc85dd",
        "clusterCreateTime": 1702865155000,
        "clusterState": "Running",
        "createTime": 1702865154000,
        "updateTime": 1702979599000,
        "pathMap": {
          "Kibana": "1,1",
          "ElasticSearch": "1,1"
        }
    }
}

Failed request return value example
{
    "statusCode": 200,
    "error": "EMR_400019",
    "message": "Cluster ID is required",
    "returnObj": []
}

Status Code

Please refer to status codes

Error Codes

Please refer to error codes


2CEdOzDRqEt_