CheckImageExists。
使用说明
本接口用于根据图片查询图像搜索实例中的图片信息。
QPS限制
查询操作默认的最大访问频率可在控制台中查看,为您购买时所选择的访问频次(QPS),当前支持1QPS、5QPS、10QPS。
SDK版本说明
图像SDK版本升级到V3.1.1,可使用“多主体识别”、“相似性分数”功能。请参见Java SDK。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
|
名称 |
类型 |
是否必选 |
示例值 |
描述 |
| Action | String | 是 | CheckImageExists | 系统规定参数。取值:CheckImageExists。 |
| InstanceName | String | 是 | demoinstance1 | 图搜实例名称。最多支持20个字符。 如果已经购买图搜实例可登录图像搜索管控台查看。 说明 这里的实例名称并非实例ID,使用时请区分。 |
| ProductId | String | 是 | 2092061_1 | 商品ID。 |
| PicName | String | 是 | 2092061_1 | 图片名称。 |
返回数据
名称 |
类型 |
示例值 |
描述 |
| Msg | String | success | 错误信息。 |
| RequestId | String | B3137727-7D6E-488C-BA21-0E034C38A879 | 请求ID。 |
| Auctions | Object | 所有返回的商品描述信息。 |
|
| ProductId | String | 2092061_1 | 商品ID。 |
| PicName | String | 2092061_1.jpg | 图片名称。 |
| CategoryId | Integer | 88888888 | 图片类目。 |
| CustomContent | String | zidingyi | 用户自定义的内容。 |
| IntAttr | Integer | 2 | 整数类型属性。 |
| IntAttr2 | Integer | 2 | 整数类型属性。 |
| StrAttr | String | test | 字符串类型属性。 |
| StrAttr2 | String | test | 字符串类型属性。 |
| StrAttr3 | String | test | 字符串类型属性。 |
| StrAttr4 | String | test | 字符串类型属性。 |
| IntAttr3 | Integer | 2 | 整数类型属性。 |
| IntAttr4 | Integer | 2 | 整数类型属性。 |
| Code | Integer | 0 | 错误码。
|
| Success | Boolean | true | 请求是否成功。 |
| Exists | Boolean | true | 图片是否存在。 |
示例
请求示例
http(s)://[Endpoint]/?Action=CheckImageExists
&InstanceName=demoinstance1
&ProductId=2092061_1
&PicName=2092061_1
&公共请求参数
正常返回示例
XML格式
HTTP/1.1 200 OK
Content-Type:application/xml
<CheckImageExistsResponse>
<Msg>success</Msg>
<RequestId>B3137727-7D6E-488C-BA21-0E034C38A879</RequestId>
<Auctions>
<ProductId>2092061_1</ProductId>
<PicName>2092061_1.jpg</PicName>
<CategoryId>88888888</CategoryId>
<CustomContent>zidingyi</CustomContent>
<IntAttr>2</IntAttr>
<IntAttr2>2</IntAttr2>
<StrAttr>test</StrAttr>
<StrAttr2>test</StrAttr2>
<StrAttr3>test</StrAttr3>
<StrAttr4>test</StrAttr4>
<IntAttr3>2</IntAttr3>
<IntAttr4>2</IntAttr4>
</Auctions>
<Code>0</Code>
<Success>true</Success>
<Exists>true</Exists>
</CheckImageExistsResponse>
JSON格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"Msg" : "success",
"RequestId" : "B3137727-7D6E-488C-BA21-0E034C38A879",
"Auctions" : {
"ProductId" : "2092061_1",
"PicName" : "2092061_1.jpg",
"CategoryId" : 88888888,
"CustomContent" : "zidingyi",
"IntAttr" : 2,
"IntAttr2" : 2,
"StrAttr" : "test",
"StrAttr2" : "test",
"StrAttr3" : "test",
"StrAttr4" : "test",
"IntAttr3" : 2,
"IntAttr4" : 2
},
"Code" : 0,
"Success" : true,
"Exists" : true
}
该文章对您有帮助吗?