GIS云套件
componentName/interfaceName
URI
http://{server}:{port}/manager/web/api/service/instances/{componentName}/{interfaceName}
支持的方法
GET
父资源
instances
介绍
通过API获取服务实例。
支持的表述格式:JSON
HTTP 请求方法
对如下 URI 执行 HTTP 请求,其中,{server}
是服务网关的服务器名,需用实际网关IP进行替换;{port}
是服务实例端口,需用实际端口替换;{componentName}
是服务组件名称,{interfaceName}
是服务接口名称,需用服务实例名称替换。
http://{server}:{port}/manager/web/api/service/instances/{componentName}/{interfaceName}
GET 请求
获取服务实例信息。
请求头格式
content-type: application/json
authorization: Bearer {access_token}
响应结构
返回服务详情,其中包含服务实例基本信息,由以下字段组成:
字段 | 类型 | 说明 | |
---|---|---|---|
componentName | String | 服务组件名称 | |
interfaceName | String | 服务接口名称 | |
componentType | String | 服务组件类型 | |
address | String | 服务实例的地址 | |
dataSourceInfo | type | String | 数据源类型 |
name | 数据源名称 |
响应示例
在管理员登录的状态下,对http://192.168.17.145:31803/manager/web/api/service/instances/map-ml_R_4c19b918-e6b5-45d8-bd9a-73f151cfbb61-zst8abnai9/rest
执行GET请求,获取服务实例map-mlR4c19b918-e6b5-45d8-bd9a-73f151cfbb61-zst8abnai9/rest的信息,返回的json格式的响应结果如下:
{
"componentName": "map-ml_R_4c19b918-e6b5-45d8-bd9a-73f151cfbb61-zst8abnai9",
"interfaceName": "rest",
"alias": "Instance-map-ml_R_4c19b918-e6b5-45d8-bd9a-73f151cfbb61-zst8abnai9-rest",
"createTime": 1608125335790,
"componentType": "Map",
"address": "http://192.168.17.145:31803/iserver/services/map-ml_R_4c19b918-e6b5-45d8-bd9a-73f151cfbb61-zst8abnai9/rest",
"dataSourceInfo": {
"type": "workspace",
"name": "文件型工作空间"
},
"items": [
{
"location": "providers:provider:config:workspacePath",
"required": true,
"defaultValue": null,
"basic": true,
"serviceName": false,
"option": null,
"children": [],
"cascadeItems": null,
"columns": null,
"disableArrayOperation": false,
"hideDetail": false,
"pageSize": 0,
"placeholder": null,
"subtitle": null,
"tipMessage": null,
"validation": [
{
"regex": ".+\\.(sxwu|smwu|sxw|smw)$",
"message": "请选择工作空间类型文件(.sxwu, .smwu, .sxw, .smw)"
}
],
"type": "file",
"description": "工作空间路径",
"display": true,
"readonly": false,
"name": "workspacePath",
"value": "/opt/MachineLearningResult/ml_R_4c19b918-e6b5-45d8-bd9a-73f151cfbb61.smwu"
},
{
"location": null,
"required": false,
"defaultValue": null,
"basic": true,
"serviceName": false,
"option": null,
"children": [],
"cascadeItems": null,
"columns": null,
"disableArrayOperation": false,
"hideDetail": false,
"pageSize": 0,
"placeholder": null,
"subtitle": null,
"tipMessage": null,
"validation": null,
"type": "password",
"description": "工作空间密码",
"display": true,
"readonly": false,
"name": "password",
"value": null
}
]
}