查询微服务详情
最近更新时间: 2026-09-17 00:04:00
1. 接口描述
接口请求域名: tsf.api3.fincloud.tencent.cn。
查询微服务详情
默认接口请求频率限制:20次/秒。
接口更新时间:2024-09-14 11:55:39。
接口既验签名又鉴权。
2. 输入参数
以下请求参数列表仅列出了接口请求参数和部分公共参数,完整公共参数列表见公共请求参数。
| 参数名称 | 必选 | 允许NULL | 类型 | 描述 |
|---|---|---|---|---|
| Action | 是 | 否 | String | 公共参数,本接口取值:DescribeMicroservice |
| Version | 是 | 否 | String | 公共参数,本接口取值:2018-03-26 |
| Region | 是 | 否 | String | 公共参数,地域信息可通过DescribeRegions接口查看产品支持的地域列表 |
| MicroserviceId | 是 | 否 | String | 微服务ID 示例值: |
| Offset | 否 | 否 | Int64 | 偏移量 示例值: |
| Limit | 否 | 否 | Int64 | 分页个数 示例值: |
| GroupIds | 否 | 否 | Array of String | 可选,根据部署组ID进行过滤 示例值: |
| Filters | 否 | 否 | Array of Filter | 过滤条件。多个 filter 之间是与关系,单个 filter 多个 value 之间是或关系。filter name 取值有:id(实例id)、name(实例名)、lan-ip(内网ip)、node-ip(所在节点ip) 示例值:查看 |
3. 输出参数
| 参数名称 | 类型 | 描述 |
|---|---|---|
| Result | TsfPageMsInstance | 微服务详情实例列表 示例值:查看 |
| RequestId | String | 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 |
4. 错误码
以下仅列出了接口业务逻辑相关的错误码,其他错误码详见公共错误码。
| 错误码 | 描述 |
|---|---|
| FailedOperation.ServiceQueryFailed | 服务查询失败。 |
| ResourceNotFound.ServiceNotExist | 无法获取服务,无法执行该操作。 |
| UnauthorizedOperation.NoPrivilege | 用户无权限访问该接口。。 |
| FailedOperation.GroupQueryFaild | 部署组查询失败。 |
| FailedOperation.TsfPrivilegeError | TSF权限模块异常,请联系系统管理员。。 |
| InternalError.CloudApiProxyError | TSF云API请求调用失败。 |
| InternalError.UnhandledException | [%s]模块未处理异常。。 |
| MissingParameter.ServiceIdRequired | 未填写服务Id。 |
| ResourceNotFound.MicroserviceOffline | 目标微服务已离线[%s]。。 |
| UnauthorizedOperation.NoLicense | 缺少License。。 |
| FailedOperation.UnhandledException | 模块未处理异常。 |
5. 示例
示例1 查询微服务实例详情
输入示例
POST / HTTP/1.1
Host: tsf.api3.<no value>
Content-Type: application/json
X-TC-Action: DescribeMicroservice
<公共请求参数>
{
"MicroserviceId": "ms-xxxxxxx",
"Limit": "20",
"Offset": "0"
}
输出示例
{
"Response": {
"RequestId": "4d967308-2667-4fa3-ae84-d3fb19960c37",
"Result": {
"TotalCount": 1,
"Content": [
{
"InstanceId": "ins-xxxxxxx",
"InstanceName": "test3",
"Port": "18083",
"LanIp": "172.30.0.10",
"WanIp": "94.191.90.25",
"ApplicationId": "application-xxxxxxx",
"ApplicationName": "test",
"GroupId": "group-xxxxxxx",
"GroupName": "coumser-test",
"NamespaceId": null,
"NamespaceName": null,
"ClusterId": null,
"ClusterName": null,
"ClusterType": "V",
"InstanceStatus": null,
"InstanceAvailableStatus": null,
"ServiceInstanceStatus": "Running",
"HealthCheckUrl": null,
"ApplicationPackageVersion": "1.14.1_Finchley",
"ApplicationType": "V"
}
]
}
}
}