本文为您介绍Detail接口的语法及示例,用于根据名称查询图像搜索实例的相关信息。
使用说明
本接口用于向图像搜索实例中查询实例信息。
说明 如需了解更多产品详情和获取技术支持,请单击在线咨询或通过钉钉群(35035130)联系我们。
QPS限制
查询操作默认的并发量为1,也就是每秒钟最多处理1个请求。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
| 名称 | 类型 | 是否必选 | 示例值 | 描述 |
|---|---|---|---|---|
| Action | String | 是 | Detail | 系统规定参数。取值:Detail。 |
| InstanceName | String | 是 | imagesearchName | 图搜实例名称。最多支持20个字符。 如果已经购买图搜实例可登录图像搜索管控台查看。 说明 这里的实例名称并非实例ID,且实例名称同区域内唯一不可重复,使用时请区分。 |
返回数据
| 名称 | 类型 | 示例值 | 描述 |
|---|---|---|---|
| RequestId | String | 36C43E96-8F68-44AA-B1AF-B1F7AB94A6C1 | 请求ID。 |
| Success | Boolean | true | 请求是否成功。 |
| Instance | Object | 实例信息。 |
|
| Capacity | Integer | 10 | 套餐容量。单位万。 |
| UtcExpireTime | String | 1623081600000 | 实例到期时间。单位毫秒。 |
| UtcCreate | String | 1620382716000 | 实例创建时间。单位毫秒。 |
| ServiceType | Integer | 0 | 图搜模型。 0:商品搜索;1:通用图片搜索。 |
| Region | String | cn-shanghai | 地域信息。 |
| Name | String | imagesearchName | 实例名称。 |
| TotalCount | Long | 10063 | 图片数量。 |
| Qps | Integer | 1 | 套餐QPS。 |
示例
请求示例
{
"InstanceName":"xxxx"
}
正常返回示例
JSON格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "36C43E96-8F68-44AA-B1AF-B1F7AB94A6C1",
"Success" : true,
"Instance" : {
"Name" : "imagesearchName",
"UtcExpireTime" : 1623081600000,
"TotalCount" : 10063,
"UtcCreate" : 1620382716000,
"Capacity" : 10,
"Qps" : 1,
"ServiceType" : 0,
"Region" : "cn-shanghai"
}
}
错误码
| HttpCode | 错误码 | 错误信息 | 描述 |
|---|---|---|---|
| 400 | DeniedRequest | Your request was denied due to instance flow control. | 请求被限流 |
| 400 | InvalidInstance | The specified instance name is invalid. | 实例名错误 |
| 400 | Console.BadRequest | The request has invalid parameters. | 非法请求,请检查请求参数。 |
| 400 | Console.InstanceNotFound | The specified ImageSearch instance is not found. | 查找不到实例,检查购买的实例ID是否正确。 |
| 401 | Console.LoginError | Check login failed. | 登录失败,请检查用户名、密码、邮箱是否输入有误。 |
| 409 | Console.OrderStatusError | Current Order status not supported this opreate. | 用户订单错误,请确认订单处于有效状态 |
| 409 | Console.IncrementStatusError | Current Increment status not supported this opreate. | 增量更新状态错误,请确认当前实例增量状态。 |
| 500 | Console.InternalError | The request processing has failed due to some unknown error. | 服务器内部错误,请登录阿里云控制台提交工单。 |
访问错误中心查看更多错误码。
错误码
请参见错误码。