ACS相关接口

1.查询实例列表

通过REST Api调用ACS服务。

描述

  • 查询实例列表

URI

GET /acs/v1/instances/{pageNo}/{pageSize}

请求参数

名称 位置 类型 是否必须 描述
instanceName header String 实例名称
type header String 实力类型(联盟、成员)
pageNo path Number 当前页码
pageSize path Number 每页显示的条目

返回参数

名称 位置 类型 是否必须 描述
code body Integer 响应码,200成功;400失败
msg body String 提示信息
data body List(Instance) 调用返回实例列表

示例

请求示例

http://localhost:8762/acs/v1/instances/1/10?instanceName=&type=

响应示例

{
    "code": "200",
    "message": "操作成功!",
    "data": {
        "pageNo": 1,
        "pageSize": 10,
        "totalCount": 1,
        "data": [
            {
                "id": "480387391816794112",
                "instanceId": "a65711fe-9e4d-4a37-875d-6e374fb2e2d8",
                "instanceName": "org-q1",
                "serviceId": "ee2e3f21-83c4-4d0b-b580-58f3b324550f",
                "userId": "1d44bfda-8fd2-4e2b-a99c-21bdf690c753",
                "accountId": "inspurtest01",
                "userName": "inspurtest01",
                "instanceStatus": "running",
                "isOwner": "0",
                "consoleOrderFlowId": null,
                "instanceSpecs": null,
                "packageCode": "acs_pt_base",
                "billType": "monthly",
                "region": "cn-north-3",
                "duration": "1",
                "durationUnit": "M",
                "autoRenew": 0,
                "effectTime": "2021-08-18T14:47:59Z",
                "expiredTime": "2021-09-18 14:47:59",
                "createdTime": "2021-08-18 14:47:59",
                "updatedTime": "2021-08-18 14:48:03",
                "vmPassword": null,
                "token": null,
                "allianceType": "acs_server_org",
                "databaseType": "acs_goleveldb",
                "ordererType": "etcdraft"
            }
        ]
    }
}

2.检查实例名

描述

  • 检查实例名是否可用、重复

URI

GET /acs/v1/instances/check

请求参数

名称 位置 类型 是否必须 描述
instanceName header String 实例名称

返回参数

名称 位置 类型 是否必须 描述
code body Integer 响应码,200成功;400失败
msg body String 提示信息
data body Object 调用返回信息

示例

请求示例

http://localhost:8762/acs/v1/instances/check?instanceName=acs

响应示例

{
    "code": "200",
    "message": "实例名称符合要求",
    "data": null
}

3.查询原始订单报文

描述

  • 调用此接口查询联盟链实例购买的原始报文

URI

GET /acs/v1/instances/renew/{instanceId}

请求参数

名称 位置 类型 是否必须 描述
instanceId path String 实例ID

返回参数

名称 位置 类型 是否必须 描述
code body Integer 响应码,200成功;400失败
msg body String 提示信息
data body Json 返回原始订单订购消息

示例

请求示例

http://localhost:8762/acs/v1/instances/renew/38258373-87ec-4c56-a6ae-c6312a053cbd

响应示例

{
    "code": "200",
    "message": "操作成功!",
    "data": {
        "consoleOrderFlowId": "4839cf27-547c-4a1a-8132-b62c951eb9b0",
        "orderId": "480382431111610368",
        "orderStatus": "paySuccess",
        "statusTime": "2021-08-18 14:44:25",
        "token": "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJSS0hRaWhSWnBMWS1iQmlmRHdqSEdwSlJNU2JjTzdPQUZXODUzNUtnNlg4In0.eyJqdGkiOiI1N2Y4YWJjZS1kMDY4LTRmMTctYWE2NS0wOTZhODViOTExOWEiLCJleHAiOjE2MjkyNzQxNzQsIm5iZiI6MCwiaWF0IjoxNjI5MjY4Nzc0LCJpc3MiOiJodHRwczovL2F1dGgtY2xvdWQtZGV2Lmluc3B1cmNsb3VkLmNuL2F1dGgvcmVhbG1zL3BpY3AiLCJhdWQiOlsiY3NlLW1nci1kYXNoYm9hcmQiLCJncmFmYW5hIiwiY2xpZW50LWluc3B1cnRlc3QwMSIsImFjY291bnQiXSwic3ViIjoiMWQ0NGJmZGEtOGZkMi00ZTJiLWE5OWMtMjFiZGY2OTBjNzUzIiwidHlwIjoiQmVhcmVyIiwiYXpwIjoiY29uc29sZSIsIm5vbmNlIjoiZmU1NzU0MDEtYjk5Zi00Y2MxLWFhOGItZjkxMmRkZGM4YTk5IiwiYXV0aF90aW1lIjoxNjI5MjY4MDc4LCJzZXNzaW9uX3N0YXRlIjoiYzI2ZTRkNDktNWFhZS00NDRjLTlkNTMtODY1ZTg1YTE2YTkxIiwiYWNyIjoiMCIsImFsbG93ZWQtb3JpZ2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orderRoute": "ACS",
        "consoleCustomization": {
            "network": {
                "subnetId": "c0db4abd-8d5a-4efb-b330-770bd40d7e18",
                "networkId": "0a698733-61fc-422b-9b3a-0d95553e5aad",
                "eip": [
                    {
                        "eipAddress": "10.110.70.8",
                        "eipId": "03c53ebc-0f3e-489b-9a37-784e7fd9bfe5"
                    }
                ]
            }
        },
        "userId": "1d44bfda-8fd2-4e2b-a99c-21bdf690c753",
        "setCount": "1",
        "billType": "monthly",
        "orderType": "new",
        "duration": "1",
        "durationUnit": "M",
        "productList": [
            {
                "region": "cn-north-3",
                "availableZone": "",
                "productLineCode": "ACS",
                "productTypeCode": "ACS_PT",
                "instanceCount": "1",
                "itemList": [
                    {
                        "code": "instance",
                        "value": "1",
                        "name": "实例"
                    },
                    {
                        "code": "acs_edition_type",
                        "value": "acs_pt_base",
                        "name": "联盟链版本"
                    },
                    {
                        "code": "acs_server_type",
                        "value": "acs_server_org",
                        "name": "联盟链服务类型"
                    },
                    {
                        "code": "acs_instance_name",
                        "value": "org-q2",
                        "name": "联盟链实例名称"
                    },
                    {
                        "code": "acs_data",
                        "value": "acs_goleveldb",
                        "name": "联盟链账本数据存储方式"
                    }
                ]
            }
        ]
    }
}

4.查询实例下资源详情列表

描述

  • 查询实例下资源详情列表

URI

GET /acs/v1/instances/detail/{pageNo}/{pageSize}

请求参数

名称 位置 类型 是否必须 描述
vmName path String 资源名称
pageNo path Number 当前页码
pageSize path Number 每页显示的条目

返回参数

名称 位置 类型 是否必须 描述
code body Integer 响应码,200成功;400失败
msg body String 提示信息
data body List(InstanceDetail) 调用返回信息

示例

请求示例

http://localhost:8762/acs/v1/instances/detail/1/10?vmName=

响应示例

{
    "code": "200",
    "message": "操作成功!",
    "data": {
        "pageNo": 1,
        "pageSize": 10,
        "totalCount": 1,
        "data": [
            {
                "id": 2021081814531332605,
                "userId": "1d44bfda-8fd2-4e2b-a99c-21bdf690c753",
                "instanceId": "a65711fe-9e4d-4a37-875d-6e374fb2e2d8",
                "serverId": "bebb7454-dd6e-44b8-97f9-e1b162fb2739",
                "vmName": "acs_a65711fe-9e4d-4a37-875d-6e374fb2e2d8_0",
                "mngtIp": "100.114.1.163",
                "mngtPortId": "ddb10446-0ac1-4a12-a633-92fcf4a2abe5",
                "vpcIp": "192.168.1.126",
                "vpcPortId": "bfc5f8c8-29bb-40d9-b304-bb4918c60806",
                "eipId": "03c53ebc-0f3e-489b-9a37-784e7fd9bfe5",
                "eipAddress": "10.110.70.8",
                "detail": "",
                "createdTime": "2021-08-18 14:53:13",
                "updatedTime": "2021-08-18 14:53:13"
            }
        ]
    }
}

5.删除创建失败的实例信息

描述

  • 删除某个实例

URI

DELETE /acs/v1/instances/{id}

请求参数

名称 位置 类型 是否必须 描述
id path String 实例主键ID

返回参数

名称 位置 类型 是否必须 描述
code body Integer 响应码,200成功;400失败
msg body String 提示信息
data body Object 调用返回信息

示例

请求示例

http://localhost:8762/acs/v1/instances/480387391816794112

响应示例

{
    "code": "200",
    "message": "操作成功!",
    "data": ""
}