summaryrefslogtreecommitdiff
path: root/data/zh_cn/imgsearch
diff options
context:
space:
mode:
Diffstat (limited to 'data/zh_cn/imgsearch')
-rw-r--r--data/zh_cn/imgsearch/2020-03-20/api-docs.php888
1 files changed, 450 insertions, 438 deletions
diff --git a/data/zh_cn/imgsearch/2020-03-20/api-docs.php b/data/zh_cn/imgsearch/2020-03-20/api-docs.php
index 9e3b9f6..00daade 100644
--- a/data/zh_cn/imgsearch/2020-03-20/api-docs.php
+++ b/data/zh_cn/imgsearch/2020-03-20/api-docs.php
@@ -1,39 +1,129 @@
<?php return [
'version' => '1.0',
- 'info' => [
- 'style' => 'RPC',
- 'product' => 'imgsearch',
- 'version' => '2020-03-20',
- ],
+ 'info' => ['style' => 'RPC', 'product' => 'imgsearch', 'version' => '2020-03-20'],
'directories' => [
[
- 'id' => 64439,
+ 'children' => ['CreateImageDb', 'ListImageDbs', 'SearchImage', 'DeleteImageDb'],
+ 'type' => 'directory',
'title' => '同图检测',
+ 'id' => 434547,
+ ],
+ [
+ 'children' => ['AddImage', 'DeleteImage', 'ListImages'],
+ 'title' => '其他',
'type' => 'directory',
- 'children' => [
- 'CreateImageDb',
- 'ListImageDbs',
- 'AddImage',
- 'ListImages',
- 'SearchImage',
- 'DeleteImageDb',
- 'DeleteImage',
- ],
],
],
'components' => [
'schemas' => [],
],
'apis' => [
- 'CreateImageDb' => [
- 'methods' => [
- 'post',
- 'get',
+ 'AddImage' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
+ 'security' => [
+ [
+ 'AK' => [],
+ ],
+ ],
+ 'operationType' => 'read',
+ 'deprecated' => false,
+ 'systemTags' => ['operationType' => 'create'],
+ 'parameters' => [
+ [
+ 'name' => 'DbName',
+ 'in' => 'formData',
+ 'schema' => ['description' => '数据库名称。支持小写字母、数字、下划线组合,长度2~64。', 'type' => 'string', 'required' => true, 'example' => 'default'],
+ ],
+ [
+ 'name' => 'ImageUrl',
+ 'in' => 'formData',
+ 'schema' => ['description' => '图像URL地址。推荐使用上海地域的OSS链接,对于文件在本地或者非上海地域OSS链接的情况,请参见[文件URL处理](~~155645~~)。', 'type' => 'string', 'required' => true, 'example' => 'https://viapi-test.oss-cn-shanghai.aliyuncs.com/test/imgsearch/xxxx.png', 'isFileTransferUrl' => true],
+ ],
+ [
+ 'name' => 'ExtraData',
+ 'in' => 'formData',
+ 'schema' => ['description' => '自定义数据。支持字母、数据、标点符号、汉字。长度0~512。', 'type' => 'string', 'required' => false, 'example' => '风景'],
+ ],
+ [
+ 'name' => 'EntityId',
+ 'in' => 'formData',
+ 'schema' => ['description' => '实体ID,可以作为数据分组的ID。支持小写字母、数字、下划线的组合,长度1~64。', 'type' => 'string', 'required' => true, 'example' => '001'],
+ ],
],
- 'schemes' => [
- 'http',
- 'https',
+ 'responses' => [
+ 200 => [
+ 'schema' => [
+ 'type' => 'object',
+ 'properties' => [
+ 'RequestId' => ['description' => '请求ID。', 'type' => 'string', 'example' => '4DC6BB62-06D1-4242-939A-4AC500662E33'],
+ 'Data' => [
+ 'description' => '返回的结果数据内容。',
+ 'type' => 'object',
+ 'properties' => [
+ 'DataId' => ['description' => '数据ID。', 'type' => 'string', 'example' => '1585903814940000'],
+ ],
+ ],
+ ],
+ 'description' => '',
+ ],
+ ],
],
+ 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"4DC6BB62-06D1-4242-939A-4AC500662E33\\",\\n \\"Data\\": {\\n \\"DataId\\": \\"1585903814940000\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"<RequestId>4DC6BB62-06D1-4242-939A-4AC500662E33</RequestId>\\n<Data>\\n <DataId>1585903814940000</DataId>\\n</Data>","errorExample":""}]',
+ 'title' => '添加图片数据',
+ 'summary' => '本文档介绍添加图片数据AddImage的语法及示例。',
+ 'description' => '## 功能描述'."\n"
+ .'添加图片数据能力可以为指定数据库添加图片数据。'."\n"
+ ."\n\n"
+ .'> - 每个数据库最多可以添加5万张图片。'."\n"
+ .'- 阿里云视觉智能开放平台视觉AI能力API接入、接口使用或问题咨询等,请通过钉钉群(23109592)加入阿里云视觉智能开放平台咨询群联系我们。'."\n"
+ ."\n"
+ .'## 服务说明'."\n"
+ .'视觉搜索服务将于2023年2月15日起停止更新,后续不再支持新用户开通接入服务,新用户请使用[新版图像搜索](https://ai.aliyun.com/imagesearch)。2023年2月15日之后,会继续支持老用户,老用户如果对视觉搜索服务使用有疑问,可通过搜索钉钉群(23109592)加入阿里云视觉智能开放平台咨询群联系我们。'."\n"
+ ."\n"
+ .'## 输入限制'."\n"
+ .'- 图像格式:JPG、JPEG、PNG。'."\n"
+ ."\n"
+ .'- 图像大小:不超过2 MB。'."\n"
+ ."\n"
+ .'- 图像分辨率:大于128×128像素,小于1024×1024像素。'."\n"
+ ."\n"
+ .'- URL地址不能包含中文字符。',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => '## SDK参考'."\n"
+ .'阿里云视觉AI能力推荐使用SDK调用,支持多种编程语言,文件参数通过SDK调用可支持本地文件及任意URL,具体可参见[SDK总览](~~145033~~)。'."\n"
+ ."\n",
+ 'extraInfo' => '## 错误码'."\n"
+ .'关于添加图片数据的错误码,详情请参见[常见错误码](~~159136~~)。'."\n"
+ ."\n"
+ .'## 安全声明'."\n"
+ .'- 请确保上传的图片或文件来源符合相应的法律法规。'."\n"
+ .'- 通过体验调试上传的临时文件有效期为1小时,在24小时后会被系统自动清理删除。',
+ 'changeSet' => [
+ ['createdAt' => '2022-11-07T01:48:22.000Z', 'description' => '错误码发生变更'],
+ ],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'AddImage'],
+ ],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => 'create',
+ 'ramAction' => [
+ 'action' => 'viapi-imgsearch:AddImage',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => '全部资源', 'arn' => '*'],
+ ],
+ ],
+ ],
+ ],
+ ],
+ 'CreateImageDb' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -41,20 +131,13 @@
],
'operationType' => 'read',
'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'create',
- ],
+ 'systemTags' => ['operationType' => 'create'],
'parameters' => [
[
'name' => 'Name',
'in' => 'formData',
- 'schema' => [
- 'description' => '数据库名称。支持小写字母、数字、下划线的组合,长度2~64。'."\n"
- .'> 每个开通视觉搜索服务的阿里云账号默认只能新建一个数据库。',
- 'type' => 'string',
- 'required' => true,
- 'example' => 'default',
- ],
+ 'schema' => ['description' => '数据库名称。支持小写字母、数字、下划线的组合,长度2~64。'."\n"
+ .'> 每个开通视觉搜索服务的阿里云账号默认只能新建一个数据库。', 'type' => 'string', 'required' => true, 'example' => 'default'],
],
],
'responses' => [
@@ -62,12 +145,9 @@
'schema' => [
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '请求ID。',
- 'type' => 'string',
- 'example' => 'DD106AE3-838A-41D7-8CD0-B902DC2BC109',
- ],
+ 'RequestId' => ['description' => '请求ID。', 'type' => 'string', 'example' => 'DD106AE3-838A-41D7-8CD0-B902DC2BC109'],
],
+ 'description' => '',
],
],
],
@@ -92,16 +172,11 @@
.'## 安全声明'."\n"
.'- 请确保上传的图片或文件来源符合相应的法律法规。'."\n"
.'- 通过体验调试上传的临时文件有效期为1小时,在24小时后会被系统自动清理删除。',
+ 'changeSet' => [],
],
- 'ListImageDbs' => [
- 'methods' => [
- 'post',
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'DeleteImage' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -109,49 +184,35 @@
],
'operationType' => 'read',
'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'get',
+ 'systemTags' => ['operationType' => 'delete'],
+ 'parameters' => [
+ [
+ 'name' => 'DbName',
+ 'in' => 'formData',
+ 'schema' => ['description' => '数据库名称。', 'type' => 'string', 'required' => true, 'example' => 'default'],
+ ],
+ [
+ 'name' => 'EntityId',
+ 'in' => 'formData',
+ 'schema' => ['description' => '待删除数据的实体ID。', 'type' => 'string', 'required' => true, 'example' => '1'],
+ ],
],
- 'parameters' => [],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '请求ID。',
- 'type' => 'string',
- 'example' => '4E010B89-B370-458A-A586-B9A9F3BC3058',
- ],
- 'Data' => [
- 'description' => '返回的结果数据内容。',
- 'type' => 'object',
- 'properties' => [
- 'DbList' => [
- 'description' => '数据库列表。',
- 'type' => 'array',
- 'items' => [
- 'type' => 'object',
- 'properties' => [
- 'Name' => [
- 'description' => '数据库名称。',
- 'type' => 'string',
- 'example' => 'default',
- ],
- ],
- ],
- ],
- ],
- ],
+ 'RequestId' => ['description' => '请求ID。', 'type' => 'string', 'example' => '3F3F81A5-4C37-4716-AE5C-518D2537365C'],
],
+ 'description' => '',
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"4E010B89-B370-458A-A586-B9A9F3BC3058\\",\\n \\"Data\\": {\\n \\"DbList\\": [\\n {\\n \\"Name\\": \\"default\\"\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<RequestId>4E010B89-B370-458A-A586-B9A9F3BC3058</RequestId>\\n<Data>\\n <DbList>\\n <Name>default</Name>\\n </DbList>\\n</Data>","errorExample":""}]',
- 'title' => '查看数据库列表',
- 'summary' => '本文档介绍查看数据库列表ListImageDbs的语法及示例。',
+ 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"3F3F81A5-4C37-4716-AE5C-518D2537365C\\"\\n}","errorExample":""},{"type":"xml","example":"<RequestId>3F3F81A5-4C37-4716-AE5C-518D2537365C</RequestId>","errorExample":""}]',
+ 'title' => '删除图片',
+ 'summary' => '本文介绍删除图片DeleteImage的语法及示例。',
'description' => '## 功能描述'."\n"
- .'查看数据库列表能力可以查看数据库的列表。'."\n"
+ .'删除图片能力可以删除指定数据库中的图片。'."\n"
."\n\n"
.'> 阿里云视觉智能开放平台视觉AI能力API接入、接口使用或问题咨询等,请通过钉钉群(23109592)加入阿里云视觉智能开放平台咨询群联系我们。'."\n"
."\n"
@@ -161,22 +222,37 @@
'responseParamsDescription' => '## SDK参考'."\n"
.'阿里云视觉AI能力推荐使用SDK调用,支持多种编程语言,文件参数通过SDK调用可支持本地文件及任意URL,具体可参见[SDK总览](~~145033~~)。',
'extraInfo' => '## 错误码'."\n"
- .'关于查看数据库列表的错误码,详情请参见[常见错误码](~~159136~~)。'."\n"
+ .'关于删除图片的错误码,详情请参见[常见错误码](~~159136~~)。'."\n"
."\n\n"
."\n"
.'## 安全声明'."\n"
.'- 请确保上传的图片或文件来源符合相应的法律法规。'."\n"
.'- 通过体验调试上传的临时文件有效期为1小时,在24小时后会被系统自动清理删除。',
- ],
- 'AddImage' => [
- 'methods' => [
- 'post',
- 'get',
+ 'changeSet' => [
+ ['createdAt' => '2022-11-07T01:48:22.000Z', 'description' => '错误码发生变更'],
],
- 'schemes' => [
- 'http',
- 'https',
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'DeleteImage'],
+ ],
],
+ 'ramActions' => [
+ [
+ 'operationType' => 'delete',
+ 'ramAction' => [
+ 'action' => 'viapi-imgsearch:DeleteImage',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => '全部资源', 'arn' => '*'],
+ ],
+ ],
+ ],
+ ],
+ ],
+ 'DeleteImageDb' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -184,117 +260,114 @@
],
'operationType' => 'read',
'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'create',
- ],
+ 'systemTags' => ['operationType' => 'delete'],
'parameters' => [
[
- 'name' => 'DbName',
- 'in' => 'formData',
- 'schema' => [
- 'description' => '数据库名称。支持小写字母、数字、下划线组合,长度2~64。',
- 'type' => 'string',
- 'required' => true,
- 'example' => 'default',
- ],
- ],
- [
- 'name' => 'ImageUrl',
+ 'name' => 'Name',
'in' => 'formData',
- 'schema' => [
- 'description' => '图像URL地址。推荐使用上海地域的OSS链接,对于文件在本地或者非上海地域OSS链接的情况,请参见[文件URL处理](~~155645~~)。',
- 'type' => 'string',
- 'required' => true,
- 'example' => 'https://viapi-test.oss-cn-shanghai.aliyuncs.com/test/imgsearch/xxxx.png',
- 'isFileTransferUrl' => true,
- ],
+ 'schema' => ['description' => '数据库名称。', 'type' => 'string', 'required' => true, 'example' => 'default'],
],
- [
- 'name' => 'ExtraData',
- 'in' => 'formData',
+ ],
+ 'responses' => [
+ 200 => [
'schema' => [
- 'description' => '自定义数据。支持字母、数据、标点符号、汉字。长度0~512。',
- 'type' => 'string',
- 'required' => false,
- 'example' => '风景',
+ 'type' => 'object',
+ 'properties' => [
+ 'RequestId' => ['description' => '请求ID。', 'type' => 'string', 'example' => '3F3F81A5-4C37-4716-AE5C-518D2537365C'],
+ ],
+ 'description' => '',
],
],
+ ],
+ 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"3F3F81A5-4C37-4716-AE5C-518D2537365C\\"\\n}","errorExample":""},{"type":"xml","example":"<RequestId>3F3F81A5-4C37-4716-AE5C-518D2537365C</RequestId>","errorExample":""}]',
+ 'title' => '删除数据库',
+ 'summary' => '本文档介绍删除数据库DeleteImageDb的语法及示例。',
+ 'description' => '## 功能描述'."\n"
+ .'删除数据库能力用于删除指定数据库。'."\n"
+ ."\n"
+ .'><warning>'."\n"
+ .'数据库删除后不可恢复。请谨慎操作。'."\n"
+ .'></warning>'."\n"
+ ."\n"
+ .'## 服务说明'."\n"
+ .'视觉搜索服务将于2023年2月15日起停止更新,后续不再支持新用户开通接入服务,新用户请使用[新版图像搜索](https://ai.aliyun.com/imagesearch)。2023年2月15日之后,会继续支持老用户,老用户如果对视觉搜索服务使用有疑问,可通过搜索钉钉群(23109592)加入阿里云视觉智能开放平台咨询群联系我们。',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => '## SDK参考'."\n"
+ .'阿里云视觉AI能力推荐使用SDK调用,支持多种编程语言,文件参数通过SDK调用可支持本地文件及任意URL,具体可参见[SDK总览](~~145033~~)。',
+ 'extraInfo' => '## 错误码'."\n"
+ .'关于删除数据库的错误码,详情请参见[常见错误码](~~159136~~)。'."\n"
+ ."\n\n"
+ ."\n"
+ .'## 安全声明'."\n"
+ .'- 请确保上传的图片或文件来源符合相应的法律法规。'."\n"
+ .'- 通过体验调试上传的临时文件有效期为1小时,在24小时后会被系统自动清理删除。',
+ 'changeSet' => [],
+ ],
+ 'ListImageDbs' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
+ 'security' => [
[
- 'name' => 'EntityId',
- 'in' => 'formData',
- 'schema' => [
- 'description' => '实体ID,可以作为数据分组的ID。支持小写字母、数字、下划线的组合,长度1~64。',
- 'type' => 'string',
- 'required' => true,
- 'example' => '001',
- ],
+ 'AK' => [],
],
],
+ 'operationType' => 'read',
+ 'deprecated' => false,
+ 'systemTags' => ['operationType' => 'get'],
+ 'parameters' => [],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '请求ID。',
- 'type' => 'string',
- 'example' => '4DC6BB62-06D1-4242-939A-4AC500662E33',
- ],
+ 'RequestId' => ['description' => '请求ID。', 'type' => 'string', 'example' => '4E010B89-B370-458A-A586-B9A9F3BC3058'],
'Data' => [
'description' => '返回的结果数据内容。',
'type' => 'object',
'properties' => [
- 'DataId' => [
- 'description' => '数据ID。',
- 'type' => 'string',
- 'example' => '1585903814940000',
+ 'DbList' => [
+ 'description' => '数据库列表。',
+ 'type' => 'array',
+ 'items' => [
+ 'type' => 'object',
+ 'properties' => [
+ 'Name' => ['description' => '数据库名称。', 'type' => 'string', 'example' => 'default'],
+ ],
+ 'description' => '',
+ ],
],
],
],
],
+ 'description' => '',
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"4DC6BB62-06D1-4242-939A-4AC500662E33\\",\\n \\"Data\\": {\\n \\"DataId\\": \\"1585903814940000\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"<RequestId>4DC6BB62-06D1-4242-939A-4AC500662E33</RequestId>\\n<Data>\\n <DataId>1585903814940000</DataId>\\n</Data>","errorExample":""}]',
- 'title' => '添加图片数据',
- 'summary' => '本文档介绍添加图片数据AddImage的语法及示例。',
+ 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"4E010B89-B370-458A-A586-B9A9F3BC3058\\",\\n \\"Data\\": {\\n \\"DbList\\": [\\n {\\n \\"Name\\": \\"default\\"\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<RequestId>4E010B89-B370-458A-A586-B9A9F3BC3058</RequestId>\\n<Data>\\n <DbList>\\n <Name>default</Name>\\n </DbList>\\n</Data>","errorExample":""}]',
+ 'title' => '查看数据库列表',
+ 'summary' => '本文档介绍查看数据库列表ListImageDbs的语法及示例。',
'description' => '## 功能描述'."\n"
- .'添加图片数据能力可以为指定数据库添加图片数据。'."\n"
+ .'查看数据库列表能力可以查看数据库的列表。'."\n"
."\n\n"
- .'> - 每个数据库最多可以添加5万张图片。'."\n"
- .'- 阿里云视觉智能开放平台视觉AI能力API接入、接口使用或问题咨询等,请通过钉钉群(23109592)加入阿里云视觉智能开放平台咨询群联系我们。'."\n"
+ .'> 阿里云视觉智能开放平台视觉AI能力API接入、接口使用或问题咨询等,请通过钉钉群(23109592)加入阿里云视觉智能开放平台咨询群联系我们。'."\n"
."\n"
.'## 服务说明'."\n"
- .'视觉搜索服务将于2023年2月15日起停止更新,后续不再支持新用户开通接入服务,新用户请使用[新版图像搜索](https://ai.aliyun.com/imagesearch)。2023年2月15日之后,会继续支持老用户,老用户如果对视觉搜索服务使用有疑问,可通过搜索钉钉群(23109592)加入阿里云视觉智能开放平台咨询群联系我们。'."\n"
- ."\n"
- .'## 输入限制'."\n"
- .'- 图像格式:JPG、JPEG、PNG。'."\n"
- ."\n"
- .'- 图像大小:不超过2 MB。'."\n"
- ."\n"
- .'- 图像分辨率:大于128×128像素,小于1024×1024像素。'."\n"
- ."\n"
- .'- URL地址不能包含中文字符。',
+ .'视觉搜索服务将于2023年2月15日起停止更新,后续不再支持新用户开通接入服务,新用户请使用[新版图像搜索](https://ai.aliyun.com/imagesearch)。2023年2月15日之后,会继续支持老用户,老用户如果对视觉搜索服务使用有疑问,可通过搜索钉钉群(23109592)加入阿里云视觉智能开放平台咨询群联系我们。',
'requestParamsDescription' => ' ',
'responseParamsDescription' => '## SDK参考'."\n"
- .'阿里云视觉AI能力推荐使用SDK调用,支持多种编程语言,文件参数通过SDK调用可支持本地文件及任意URL,具体可参见[SDK总览](~~145033~~)。'."\n"
- ."\n",
+ .'阿里云视觉AI能力推荐使用SDK调用,支持多种编程语言,文件参数通过SDK调用可支持本地文件及任意URL,具体可参见[SDK总览](~~145033~~)。',
'extraInfo' => '## 错误码'."\n"
- .'关于添加图片数据的错误码,详情请参见[常见错误码](~~159136~~)。'."\n"
+ .'关于查看数据库列表的错误码,详情请参见[常见错误码](~~159136~~)。'."\n"
+ ."\n\n"
."\n"
.'## 安全声明'."\n"
.'- 请确保上传的图片或文件来源符合相应的法律法规。'."\n"
.'- 通过体验调试上传的临时文件有效期为1小时,在24小时后会被系统自动清理删除。',
+ 'changeSet' => [],
],
'ListImages' => [
- 'methods' => [
- 'post',
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -302,71 +375,37 @@
],
'operationType' => 'read',
'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'get',
- ],
+ 'systemTags' => ['operationType' => 'get'],
'parameters' => [
[
'name' => 'DbName',
'in' => 'formData',
- 'schema' => [
- 'description' => '数据库名称。',
- 'type' => 'string',
- 'required' => true,
- 'example' => 'default',
- ],
+ 'schema' => ['description' => '数据库名称。', 'type' => 'string', 'required' => true, 'example' => 'default'],
],
[
'name' => 'Token',
'in' => 'formData',
- 'schema' => [
- 'description' => 'Offset和Limit组合的分页方式只支持前2000条记录。当超过2000条时,需要使用上一次请求返回的Token作为请求下一页的参数。',
- 'type' => 'string',
- 'required' => false,
- 'example' => '2',
- ],
+ 'schema' => ['description' => 'Offset和Limit组合的分页方式只支持前2000条记录。当超过2000条时,需要使用上一次请求返回的Token作为请求下一页的参数。', 'type' => 'string', 'required' => false, 'example' => '2'],
],
[
'name' => 'Offset',
'in' => 'formData',
- 'schema' => [
- 'description' => '起始记录。',
- 'type' => 'integer',
- 'format' => 'int32',
- 'required' => false,
- 'example' => '1',
- ],
+ 'schema' => ['description' => '起始记录。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '1'],
],
[
'name' => 'Limit',
'in' => 'formData',
- 'schema' => [
- 'description' => '每页最多显示的条数。',
- 'type' => 'integer',
- 'format' => 'int32',
- 'required' => false,
- 'example' => '50',
- ],
+ 'schema' => ['description' => '每页最多显示的条数。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '50'],
],
[
'name' => 'Order',
'in' => 'formData',
- 'schema' => [
- 'description' => '排列方式。包括升序(asc)和降序(desc)。',
- 'type' => 'string',
- 'required' => false,
- 'example' => 'asc',
- ],
+ 'schema' => ['description' => '排列方式。包括升序(asc)和降序(desc)。', 'type' => 'string', 'required' => false, 'example' => 'asc'],
],
[
'name' => 'EntityIdPrefix',
'in' => 'formData',
- 'schema' => [
- 'description' => '样本ID前缀。',
- 'type' => 'string',
- 'required' => false,
- 'example' => 'U1',
- ],
+ 'schema' => ['description' => '样本ID前缀。', 'type' => 'string', 'required' => false, 'example' => 'U1'],
],
],
'responses' => [
@@ -374,11 +413,7 @@
'schema' => [
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '请求ID。',
- 'type' => 'string',
- 'example' => '2B93C43A-F824-40C8-AF79-844342B0F43A',
- ],
+ 'RequestId' => ['description' => '请求ID。', 'type' => 'string', 'example' => '2B93C43A-F824-40C8-AF79-844342B0F43A'],
'Data' => [
'description' => '返回的结果数据内容。',
'type' => 'object',
@@ -389,51 +424,22 @@
'items' => [
'type' => 'object',
'properties' => [
- 'EntityId' => [
- 'description' => '实体ID或分组ID。',
- 'type' => 'string',
- 'example' => '5',
- ],
- 'CreatedAt' => [
- 'description' => '创建数据的时间。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '1582838489213',
- ],
- 'UpdatedAt' => [
- 'description' => '更新数据的时间。',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '1582838489213',
- ],
- 'DataId' => [
- 'description' => '数据ID。',
- 'type' => 'string',
- 'example' => '001',
- ],
- 'ExtraData' => [
- 'description' => '自定义数据内容。',
- 'type' => 'string',
- 'example' => '元素',
- ],
+ 'EntityId' => ['description' => '实体ID或分组ID。', 'type' => 'string', 'example' => '5'],
+ 'CreatedAt' => ['description' => '创建数据的时间。', 'type' => 'integer', 'format' => 'int64', 'example' => '1582838489213'],
+ 'UpdatedAt' => ['description' => '更新数据的时间。', 'type' => 'integer', 'format' => 'int64', 'example' => '1582838489213'],
+ 'DataId' => ['description' => '数据ID。', 'type' => 'string', 'example' => '001'],
+ 'ExtraData' => ['description' => '自定义数据内容。', 'type' => 'string', 'example' => '元素'],
],
+ 'description' => '',
],
],
- 'Token' => [
- 'description' => 'Offset和Limit组合的分页方式只支持前2000条记录。'."\n"
- .'当超过2000时,需要使用上一次请求返回的Token作为请求下一页的参数。',
- 'type' => 'string',
- 'example' => '2',
- ],
- 'TotalCount' => [
- 'description' => '总数量。',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '100',
- ],
+ 'Token' => ['description' => 'Offset和Limit组合的分页方式只支持前2000条记录。'."\n"
+ .'当超过2000时,需要使用上一次请求返回的Token作为请求下一页的参数。', 'type' => 'string', 'example' => '2'],
+ 'TotalCount' => ['description' => '总数量。', 'type' => 'integer', 'format' => 'int32', 'example' => '100'],
],
],
],
+ 'description' => '',
],
],
],
@@ -456,16 +462,11 @@
.'## 安全声明'."\n"
.'- 请确保上传的图片或文件来源符合相应的法律法规。'."\n"
.'- 通过体验调试上传的临时文件有效期为1小时,在24小时后会被系统自动清理删除。',
+ 'changeSet' => [],
],
'SearchImage' => [
- 'methods' => [
- 'post',
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -473,43 +474,22 @@
],
'operationType' => 'read',
'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'get',
- ],
+ 'systemTags' => ['operationType' => 'get'],
'parameters' => [
[
'name' => 'DbName',
'in' => 'formData',
- 'schema' => [
- 'description' => '数据库名称。',
- 'type' => 'string',
- 'required' => true,
- 'example' => 'default',
- ],
+ 'schema' => ['description' => '数据库名称。', 'type' => 'string', 'required' => true, 'example' => 'default'],
],
[
'name' => 'ImageUrl',
'in' => 'formData',
- 'schema' => [
- 'description' => '图像URL地址。推荐使用上海地域的OSS链接,对于文件在本地或者非上海地域OSS链接的情况,请参见[文件URL处理](~~155645~~)。',
- 'type' => 'string',
- 'required' => true,
- 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imgsearch/SearchImage/SearchImage-ku8.png',
- 'isFileTransferUrl' => true,
- ],
+ 'schema' => ['description' => '图像URL地址。推荐使用上海地域的OSS链接,对于文件在本地或者非上海地域OSS链接的情况,请参见[文件URL处理](~~155645~~)。', 'type' => 'string', 'required' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imgsearch/SearchImage/SearchImage-ku8.png', 'isFileTransferUrl' => true],
],
[
'name' => 'Limit',
'in' => 'formData',
- 'schema' => [
- 'description' => '获取结果数量上限,取值范围1~200。',
- 'type' => 'integer',
- 'format' => 'int32',
- 'required' => true,
- 'maximum' => '1000',
- 'minimum' => '0',
- 'example' => '5',
- ],
+ 'schema' => ['description' => '获取结果数量上限,取值范围1~200。', 'type' => 'integer', 'format' => 'int32', 'required' => true, 'maximum' => '1000', 'minimum' => '0', 'example' => '5'],
],
],
'responses' => [
@@ -518,11 +498,7 @@
'description' => '1',
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '请求ID。',
- 'type' => 'string',
- 'example' => 'A98DBCEB-45E2-5F5F-B5ED-F2340182FD87',
- ],
+ 'RequestId' => ['description' => '请求ID。', 'type' => 'string', 'example' => 'A98DBCEB-45E2-5F5F-B5ED-F2340182FD87'],
'Data' => [
'description' => '返回的结果数据内容。',
'type' => 'object',
@@ -534,35 +510,14 @@
'description' => '1',
'type' => 'object',
'properties' => [
- 'ImageUrl' => [
- 'description' => '查找结果,相似图像的URL地址。'."\n"
- ."\n\n"
- .'> - 建议您使用**EntryId**来做结果判断,这里返回的**ImageURL**仅是您在建图片库输入的字符串,平台服务端不保留用户图片库的原始图片。如果上传图片库时使用的是有时效性的访问链接,需要您本地保留图片,并保存**EntryID**和图片的映射关系。'."\n"
- .'- 该URL地址为临时地址,有效期为30分钟,过期后将无法访问。',
- 'type' => 'string',
- 'example' => 'http://vision-console.oss-cn-shanghai.aliyuncs.com/1902352443710590/kv6dvd1ie0c6-ipvnszc8584116.jpg?Expires=1635150265&OSSAccessKeyId=LTAI****************&Signature=8rj0%2Bxg%2Bni5NxQAcEQqISX5j1w****',
- ],
- 'EntityId' => [
- 'description' => '实体ID。',
- 'type' => 'string',
- 'example' => '123456',
- ],
- 'Score' => [
- 'description' => '相似得分,取值0~10,分数越大,相似度越高。',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '10',
- ],
- 'DataId' => [
- 'description' => '数据ID。',
- 'type' => 'string',
- 'example' => '001',
- ],
- 'ExtraData' => [
- 'description' => '自定义数据。',
- 'type' => 'string',
- 'example' => 'tangyan',
- ],
+ 'ImageUrl' => ['description' => '查找结果,相似图像的URL地址。'."\n"
+ ."\n\n"
+ .'> - 建议您使用**EntryId**来做结果判断,这里返回的**ImageURL**仅是您在建图片库输入的字符串,平台服务端不保留用户图片库的原始图片。如果上传图片库时使用的是有时效性的访问链接,需要您本地保留图片,并保存**EntryID**和图片的映射关系。'."\n"
+ .'- 该URL地址为临时地址,有效期为30分钟,过期后将无法访问。', 'type' => 'string', 'example' => 'http://vision-console.oss-cn-shanghai.aliyuncs.com/1902352443710590/kv6dvd1ie0c6-ipvnszc8584116.jpg?Expires=1635150265&OSSAccessKeyId=LTAI****************&Signature=8rj0%2Bxg%2Bni5NxQAcEQqISX5j1w****'],
+ 'EntityId' => ['description' => '实体ID。', 'type' => 'string', 'example' => '123456'],
+ 'Score' => ['description' => '相似得分,取值0~10,分数越大,相似度越高。', 'type' => 'number', 'format' => 'float', 'example' => '10'],
+ 'DataId' => ['description' => '数据ID。', 'type' => 'string', 'example' => '001'],
+ 'ExtraData' => ['description' => '自定义数据。', 'type' => 'string', 'example' => 'tangyan'],
],
],
],
@@ -605,156 +560,213 @@
.'## 安全声明'."\n"
.'- 请确保上传的图片或文件来源符合相应的法律法规。'."\n"
.'- 通过体验调试上传的临时文件有效期为1小时,在24小时后会被系统自动清理删除。',
- ],
- 'DeleteImageDb' => [
- 'methods' => [
- 'post',
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
+ 'changeSet' => [
+ ['createdAt' => '2022-11-07T01:48:22.000Z', 'description' => '错误码发生变更'],
],
- 'security' => [
- [
- 'AK' => [],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'SearchImage'],
],
],
- 'operationType' => 'read',
- 'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'delete',
- ],
- 'parameters' => [
+ 'ramActions' => [
[
- 'name' => 'Name',
- 'in' => 'formData',
- 'schema' => [
- 'description' => '数据库名称。',
- 'type' => 'string',
- 'required' => true,
- 'example' => 'default',
+ 'operationType' => 'get',
+ 'ramAction' => [
+ 'action' => 'viapi-imgsearch:SearchImage',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => '全部资源', 'arn' => '*'],
+ ],
],
],
],
- 'responses' => [
- 200 => [
- 'schema' => [
- 'type' => 'object',
- 'properties' => [
- 'RequestId' => [
- 'description' => '请求ID。',
- 'type' => 'string',
- 'example' => '3F3F81A5-4C37-4716-AE5C-518D2537365C',
- ],
- ],
+ ],
+ ],
+ 'endpoints' => [
+ ['regionId' => 'cn-shanghai', 'regionName' => '华东2(上海)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'imgsearch.cn-shanghai.aliyuncs.com', 'endpoint' => 'imgsearch.cn-shanghai.aliyuncs.com', 'vpc' => 'imgsearch-vpc.cn-shanghai.aliyuncs.com'],
+ ],
+ 'errorCodes' => [
+ ['code' => 'AuthFailed', 'message' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'http_code' => 403, 'description' => '授权失败,请检查RAM权限配置,操作流程可参考https://help.aliyun.com/document_detail/145025.htm。'],
+ ['code' => 'ClientError.IllegalArgument', 'message' => '请检查参数,如参数值所代表的数据库是否存在', 'http_code' => 400, 'description' => '请检查参数,如参数值所代表的数据库是否存在'],
+ ['code' => 'EntityNotExist.Role', 'message' => '没有Ram权限,请联系主账号给你添加AliyunVIAPIFullAccess权限,操作流程可参考https://help.aliyun.com/document_detail/145025.htmv', 'http_code' => 403, 'description' => '没有Ram权限,请联系主账号给你添加AliyunVIAPIFullAccess权限,操作流程可参考https://help.aliyun.com/document_detail/145025.htm'],
+ ['code' => 'IllegalUrlParameter', 'message' => 'Url不合法,请检查url能否正常打开', 'http_code' => 400, 'description' => 'Url不合法,请检查url能否正常打开 - 非上海OSS图片链接请参考:https://help.aliyun.com/document\\_detail/155645.html '],
+ ['code' => 'InternalError.Algo', 'message' => 'An algorithm error occurred.', 'http_code' => 586, 'description' => '算法服务报错,请稍后重试。如重试后还报错请通过钉钉搜索群号23109592,加入阿里云视觉智能开放平台咨询群,与平台取得联系。 '],
+ ['code' => 'InternalError.Timeout', 'message' => '算法服务报错,请稍后重试', 'http_code' => 500, 'description' => '算法服务报错,请稍后重试。如重试后还报错请通过钉钉搜索群号23109592,加入阿里云视觉智能开放平台咨询群,与平台取得联系。 '],
+ ['code' => 'InvalidAccessKeyId.Inactive', 'message' => 'AccessKeyId非法,请检查AccessKeyId是否被禁用,或者AccessKeyId和AccessKeySecret是否填写正确。', 'http_code' => 400, 'description' => 'AccessKeyId非法,请检查AccessKeyId是否被禁用,或者AccessKeyId和AccessKeySecret是否填写正确。请参考文档:https://help.aliyun.com/document\\_detail/175144.html,进入控制台,将对应的AccessKey启用。 '],
+ ['code' => 'InvalidAccessKeyId.NotFound', 'message' => 'AccessKeyId未找到,请检查AccessKeyId和AccessKeySecret是否填写正确。', 'http_code' => 400, 'description' => 'AccessKeyId未找到,请检查AccessKeyId和AccessKeySecret是否填写正确。请参考文档:https://help.aliyun.com/document\\_detail/175144.html,进入控制台,找到对应的AccessKeyId和AccessKeySecret。如果AccessKeySecret未保存,主账号可以通过查看Secret找回,子账号无法找回,可以新建一个AccessKey。 '],
+ ['code' => 'InvalidAccessKeySecret', 'message' => 'AccessKeyId或AccessKeySecret填写错误,请检查AccessKeyId和AccessKeySecret是否填写正确。', 'http_code' => 400, 'description' => 'AccessKeyId或AccessKeySecret填写错误,请检查AccessKeyId和AccessKeySecret是否填写正确。请参考文档:https://help.aliyun.com/document\\_detail/175144.html,进入控制台,找到对应的AccessKeyId和AccessKeySecret。如果AccessKeySecret未保存,主账号可以通过查看Secret找回,子账号无法找回,可以新建一个AccessKey。 '],
+ ['code' => 'InvalidAction.NotFound', 'message' => '能力未找到,请检查类目与能力是否匹配,检查访问域名与能力是否匹配,关于访问域名可参考:https://help.aliyun.com/document_detail/143103.htm。SDK接入请参考:https://help.aliyun.com/document_detail/145033.html,选择合适编程语言根据实例代码作相关修改进行接入。', 'http_code' => 400, 'description' => '能力未找到,请检查类目与能力是否匹配,检查访问域名与能力是否匹配,关于访问域名可参考:https://help.aliyun.com/document_detail/143103.htm。SDK接入请参考:https://help.aliyun.com/document_detail/145033.html,选择合适编程语言根据实例代码作相关修改进行接入。'],
+ ['code' => 'InvalidApi.ForbiddenInvoke', 'message' => '调用受限,请检查您调用的能力是否为受限能力,受限能力需要在控制台https://vision.console.aliyun.com/找到相应能力申请经过审批之后才能调用。如非上述情况,请检查账号是否欠费', 'http_code' => 400, 'description' => '调用受限,请检查您调用的能力是否为受限能力,受限能力需要在控制台https://vision.console.aliyun.com/找到相应能力申请经过审批之后才能调用。如非上述情况,请检查账号是否欠费'],
+ ['code' => 'InvalidApi.NotPurchase', 'message' => '产品未开通,请开通产品:https://common-buy.aliyun.com/?commodityCode=viapi_imgsearch_public_cn#/open', 'http_code' => 400, 'description' => '产品未开通,请开通产品:https://common-buy.aliyun.com/?commodityCode=viapi_imgsearch_public_cn#/open'],
+ ['code' => 'InvalidApi.OutOfService', 'message' => '产品未开通,请开通产品:https://common-buy.aliyun.com/?commodityCode=viapi_imgsearch_public_cn#/open', 'http_code' => 403, 'description' => '产品未开通,请开通产品:https://common-buy.aliyun.com/?commodityCode=viapi_imgsearch_public_cn#/open'],
+ ['code' => 'InvalidFile.Content', 'message' => '请参考算法文档检查文件内容,更换包含符合算法要求的', 'http_code' => 400, 'description' => '请参考算法文档检查文件内容,更换包含符合算法要求的'],
+ ['code' => 'InvalidFile.Decode', 'message' => '请检查文件是否能够正常打开', 'http_code' => 400, 'description' => '请检查文件是否能够正常打开'],
+ ['code' => 'InvalidFile.Download', 'message' => '文件无法下载,请检查链接是否可访问和本地网络情况 - 非上海OSS文件链接请参考:https://help.aliyun.com/document_detail/155645.html', 'http_code' => 400, 'description' => '文件无法下载,请检查链接是否可访问和本地网络情况 - 非上海OSS文件链接请参考:https://help.aliyun.com/document_detail/155645.html'],
+ ['code' => 'InvalidFile.REGION', 'message' => '文件链接地域不对,非上海OSS文件链接请参考:https://help.aliyun.com/document_detail/155645.html', 'http_code' => 400, 'description' => '文件链接地域不对,非上海OSS文件链接请参考:https://help.aliyun.com/document_detail/155645.html'],
+ ['code' => 'InvalidFile.Resolution', 'message' => '文件分辨率超出限制,请检查文件分辨率和内容,修改文件分辨率后重试', 'http_code' => 400, 'description' => '文件分辨率超出限制,请检查文件分辨率和内容,修改文件分辨率后重试'],
+ ['code' => 'InvalidFile.Type', 'message' => '文件类型错误,请检查文件类型 - 请参考算法API文档,使用算法支持的文件类型', 'http_code' => 400, 'description' => '文件类型错误,请检查文件类型 - 请参考算法API文档,使用算法支持的文件类型。阿里云视觉智能开放平台能够读取文件并获取真实的文件类型,不是通过文件后缀名进行类型判断,只看文件后缀名是无效的,关于更多文件类型判断和处理信息可参考:https://help.aliyun.com/document_detail/470250.html'],
+ ['code' => 'InvalidFile.URL', 'message' => '文件无法下载,请检查链接是否可访问和本地网络情况 - 非上海OSS文件链接请参考:https://help.aliyun.com/document_detail/155645.html', 'http_code' => 400, 'description' => '文件无法下载,请检查链接是否可访问和本地网络情况 - 非上海OSS文件链接请参考:https://help.aliyun.com/document_detail/155645.html'],
+ ['code' => 'InvalidImage.Content', 'message' => '请参考算法文档检查图片内容,更换包含符合算法要求的', 'http_code' => 400, 'description' => '请参考算法文档检查图片内容,更换包含符合算法要求的'],
+ ['code' => 'InvalidImage.Decode', 'message' => '请检查图片是否能够正常打开', 'http_code' => 400, 'description' => '请检查图片是否能够正常打开'],
+ ['code' => 'InvalidImage.Download', 'message' => '图片无法下载,请检查链接是否可访问和本地网络情况 - 非上海OSS图片链接请参考:https://help.aliyun.com/document_detail/155645.html', 'http_code' => 400, 'description' => '图片无法下载,请检查链接是否可访问和本地网络情况 - 非上海OSS图片链接请参考:https://help.aliyun.com/document_detail/155645.html'],
+ ['code' => 'InvalidImage.NotFoundFace', 'message' => '图像中没找到人脸,请检查您的图像中是否包含人脸或人脸太小', 'http_code' => 400, 'description' => '图像中没找到人脸,请检查您的图像中是否包含人脸或人脸太小'],
+ ['code' => 'InvalidImage.REGION', 'message' => '图片链接地域不对,非上海OSS图片链接请参考:https://help.aliyun.com/document_detail/155645.html', 'http_code' => 400, 'description' => '图片链接地域不对,非上海OSS图片链接请参考:https://help.aliyun.com/document_detail/155645.html'],
+ ['code' => 'InvalidImage.Resolution', 'message' => '文件分辨率超出限制,请检查文件分辨率和内容,修改文件分辨率后重试', 'http_code' => 400, 'description' => '文件分辨率超出限制,请检查文件分辨率和内容,修改文件分辨率后重试'],
+ ['code' => 'InvalidImage.Timeout', 'message' => '图片下载超时,请检查链接是否可访问和本地网络情况 - 非上海OSS图片链接请参考:https://help.aliyun.com/document_detail/155645.html。请检查OSS链接是否过期等。', 'http_code' => 400, 'description' => '图片下载超时,请检查链接是否可访问和本地网络情况 - 非上海OSS图片链接请参考:https://help.aliyun.com/document_detail/155645.html。请检查OSS链接是否过期等。'],
+ ['code' => 'InvalidImage.Type', 'message' => '图片类型错误,请检查图片类型 - 请参考算法API文档,使用算法支持的图片类型', 'http_code' => 400, 'description' => '图片类型错误,请检查图片类型 - 请参考算法API文档,使用算法支持的图片类型'],
+ ['code' => 'InvalidImage.URL', 'message' => '图片链接非法,请检查图片链接是否可访问 - 非上海OSS图片链接请参考:https://help.aliyun.com/document_detail/155645.html', 'http_code' => 400, 'description' => '图片链接非法,请检查图片链接是否可访问 - 非上海OSS图片链接请参考:https://help.aliyun.com/document_detail/155645.html'],
+ ['code' => 'InvalidParameter', 'message' => 'The request parameter is invalid.', 'http_code' => 400, 'description' => '参数错误,请根据算法API文档和报错Message检查参数值。是否参数值前后多了空格或者其他特殊字符等。 '],
+ ['code' => 'InvalidParameter.BadRequest', 'message' => 'The request parameter or the data has an error.', 'http_code' => 400, 'description' => '参数错误,请根据算法API文档和报错Message检查参数值。是否参数值前后多了空格或者其他特殊字符等。 '],
+ ['code' => 'InvalidParameter.NotFound', 'message' => '参数错误,请根据算法API文档和报错Message检查参数值。是否参数值前后多了空格或者其他特殊字符等。', 'http_code' => 400, 'description' => '参数错误,请根据算法API文档和报错Message检查参数值。是否参数值前后多了空格或者其他特殊字符等。'],
+ ['code' => 'InvalidParameter.TooLarge', 'message' => '参数错误,文件大小超出限制,请参考算法API文档调整文件大小', 'http_code' => 400, 'description' => '参数错误,文件大小超出限制,请参考算法API文档调整文件大小'],
+ ['code' => 'InvalidRamRole', 'message' => '没有Ram权限,请联系主账号给你添加AliyunVIAPIFullAccess权限,操作流程可参考https://help.aliyun.com/document_detail/145025.htm', 'http_code' => 403, 'description' => '没有Ram权限,请联系主账号给你添加AliyunVIAPIFullAccess权限,操作流程可参考https://help.aliyun.com/document_detail/145025.htm'],
+ ['code' => 'InvalidResult', 'message' => '参数错误,请参考文档检查参数值,检查文件内容。请检查是否图片内容不完整或者太模糊等。', 'http_code' => 400, 'description' => '参数错误,请参考文档检查参数值,检查文件内容。请检查是否图片内容不完整或者太模糊等。'],
+ ['code' => 'InvalidSide', 'message' => 'Specified parameter Side is not valid. 请参考文档填写正确的Side参数', 'http_code' => 400, 'description' => 'Specified parameter Side is not valid. 请参考文档填写正确的Side参数'],
+ ['code' => 'InvalidTimeStamp.Expired', 'message' => '时间戳过期,请更新时间戳', 'http_code' => 400, 'description' => '时间戳过期,请更新时间戳。可以参考https://help.aliyun.com/document\\_detail/144904.html文档计算请求签名。如果您的语言比较常用,推荐使用SDK进行调用,详情可参考:https://help.aliyun.com/document\\_detail/145033.html '],
+ ['code' => 'InvalidVersion', 'message' => 'Specified parameter Version is not valid', 'http_code' => 400, 'description' => '版本未找到,请检查SDK版本是否匹配,检查版本与类目和能力是否匹配,关于SDK版本可参考:https://help.aliyun.com/document_detail/145033.html'],
+ ['code' => 'MissingAccessKeyId', 'message' => 'AccessKeyId未填写,请检查AccessKeyId和AccessKeySecret是否填写正确。', 'http_code' => 400, 'description' => 'AccessKeyId未填写,请检查AccessKeyId和AccessKeySecret是否填写正确。请参考文档:https://help.aliyun.com/document\\_detail/175144.html,进入控制台,找到对应的AccessKeyId和AccessKeySecret。如果AccessKeySecret未保存,主账号可以通过查看Secret找回,子账号无法找回,可以新建一个AccessKey。 '],
+ ['code' => 'MissingFileURL', 'message' => 'FileURL is required for this operation.', 'http_code' => 400, 'description' => '缺少文件参数FileURL,该参数为文件URL地址,文件输入推荐使用华东2(上海)区域的OSS链接-非上海OSS文件链接请参考:'."\n"
+ .'https://help.aliyun.com/document_detail/155645.html'],
+ ['code' => 'MissingImageURL', 'message' => 'ImageURL is required for this operation.', 'http_code' => 400, 'description' => '缺少图像参数ImageURL,该参数为图片URL地址,文件输入推荐使用华东2(上海)区域的OSS链接-非上海OSS文件链接请参考:'."\n"
+ .'https://help.aliyun.com/document_detail/155645.html'],
+ ['code' => 'MissingLimit', 'message' => 'Limit is required for this operation', 'http_code' => 400, 'description' => '缺少Limit参数,该参数是接口必填参数。推荐使用对应类目的SDK进行调用:https://help.aliyun.com/document_detail/145033.html'],
+ ['code' => 'MissingParameter', 'message' => 'A required parameter is not specified.', 'http_code' => 400, 'description' => '参数缺失,请参考文档检查参数值'],
+ ['code' => 'MissingTasks', 'message' => 'Tasks is required for this operation.', 'http_code' => 400, 'description' => '缺少Tasks参数,该参数是接口必填参数。推荐使用对应类目的SDK进行调用:https://help.aliyun.com/document_detail/145033.html'],
+ ['code' => 'ParameterError', 'message' => 'The parameter is invalid. Please check again.', 'http_code' => 400, 'description' => '参数错误,请检查参数值。'],
+ ['code' => 'ServiceUnavailable', 'message' => 'The service is unavailable.', 'http_code' => 503, 'description' => '算法服务报错,请稍后重试。如重试后还报错请通过钉钉搜索群号23109592,加入阿里云视觉智能开放平台咨询群,与平台取得联系。 '],
+ ['code' => 'SignatureDoesNotMatch', 'message' => '签名不正确,请重新计算签名。关于签名可参考文档:https://help.aliyun.com/document_detail/144904.html', 'http_code' => 400, 'description' => '签名不正确,请重新计算签名。可以参考https://help.aliyun.com/document\\_detail/144904.html文档计算请求签名。如果您的语言比较常用,推荐使用SDK进行调用,详情可参考:https://help.aliyun.com/document\\_detail/145033.html '],
+ ['code' => 'SignatureNonceUsed', 'message' => '签名已经被使用过,请重新计算签名。关于签名可参考文档:https://help.aliyun.com/document_detail/144904.html', 'http_code' => 400, 'description' => '签名已经被使用过,请重新计算签名。可以参考https://help.aliyun.com/document\\_detail/144904.html文档计算请求签名。如果您的语言比较常用,推荐使用SDK进行调用,详情可参考:https://help.aliyun.com/document\\_detail/145033.html '],
+ ['code' => 'Throttling', 'message' => 'The request was denied due to QPS limits.', 'http_code' => 400, 'description' => '调用被限流,请稍后再调用,或者购买QPS提升调用限制。关于QPS限制提升流程和处理请参考:https://help.aliyun.com/document_detail/604963.html。如果因业务需求需要更多QPS可通过钉钉搜索群号23109592,加入阿里云视觉智能开放平台咨询群与平台取得联系。'],
+ ['code' => 'Throttling.User', 'message' => 'The request was denied due to QPS limits.', 'http_code' => 400, 'description' => '调用被限流,请稍后再调用,或者购买QPS提升调用限制。关于QPS限制提升流程和处理请参考:https://help.aliyun.com/document_detail/604963.html。如果因业务需求需要更多QPS可通过钉钉搜索群号23109592,加入阿里云视觉智能开放平台咨询群与平台取得联系。 '],
+ ['code' => 'Timeout', 'message' => 'The request has timed out.', 'http_code' => 408, 'description' => '请求超时,请稍后重试。如重试后还报错请通过钉钉搜索群号23109592,加入阿里云视觉智能开放平台咨询群,与平台取得联系。'],
+ ['code' => 'Unauthorized', 'message' => '没有Ram权限,请联系主账号给你添加AliyunVIAPIFullAccess权限,操作流程可参考https://help.aliyun.com/document_detail/145025.htm', 'http_code' => 400, 'description' => '没有Ram权限,请联系主账号给你添加AliyunVIAPIFullAccess权限,操作流程可参考https://help.aliyun.com/document_detail/145025.htm'],
+ ],
+ 'changeSet' => [
+ [
+ 'apis' => [
+ ['description' => '错误码发生变更', 'api' => 'AddImage'],
+ ['description' => '错误码发生变更', 'api' => 'CreateImageDb'],
+ ['description' => '错误码发生变更', 'api' => 'DeleteImage'],
+ ['description' => '错误码发生变更', 'api' => 'DeleteImageDb'],
+ ['description' => '错误码发生变更', 'api' => 'ListImageDbs'],
+ ['description' => '错误码发生变更', 'api' => 'ListImages'],
+ ['description' => '错误码发生变更', 'api' => 'SearchImage'],
+ ],
+ 'createdAt' => '2022-11-07T01:48:42.000Z',
+ 'description' => '调整用户和API调用频率',
+ ],
+ ],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListImageDbs'],
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'CreateImageDb'],
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'DeleteImage'],
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'AddImage'],
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'DeleteImageDb'],
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListImages'],
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'SearchImage'],
+ ],
+ ],
+ 'ram' => [
+ 'productCode' => 'VisualIntelligenceAPI',
+ 'productName' => '视觉智能开放平台',
+ 'ramCodes' => ['viapi-imageseg', 'viapi-imageaudit', 'viapi-ocr', 'viapi-objectdet', 'viapi-imageenhan', 'viapi-videorecog', 'viapi-imageprocess', 'viapi', 'viapi-ekyc', 'viapi-imgsearch', 'viapi-goodstech', 'viapi-facebody', 'viapi-threedvision', 'viapi-videoenhan', 'viapi-imagerecog', 'viapi-videoseg', 'viapi-regen', 'viapi-aigen'],
+ 'ramLevel' => '服务级',
+ 'ramConditions' => [],
+ 'ramActions' => [
+ [
+ 'apiName' => 'AddImage',
+ 'description' => '添加图片数据',
+ 'operationType' => 'create',
+ 'ramAction' => [
+ 'action' => 'viapi-imgsearch:AddImage',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => '全部资源', 'arn' => '*'],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"3F3F81A5-4C37-4716-AE5C-518D2537365C\\"\\n}","errorExample":""},{"type":"xml","example":"<RequestId>3F3F81A5-4C37-4716-AE5C-518D2537365C</RequestId>","errorExample":""}]',
- 'title' => '删除数据库',
- 'summary' => '本文档介绍删除数据库DeleteImageDb的语法及示例。',
- 'description' => '## 功能描述'."\n"
- .'删除数据库能力用于删除指定数据库。'."\n"
- ."\n"
- .'><warning>'."\n"
- .'数据库删除后不可恢复。请谨慎操作。'."\n"
- .'></warning>'."\n"
- ."\n"
- .'## 服务说明'."\n"
- .'视觉搜索服务将于2023年2月15日起停止更新,后续不再支持新用户开通接入服务,新用户请使用[新版图像搜索](https://ai.aliyun.com/imagesearch)。2023年2月15日之后,会继续支持老用户,老用户如果对视觉搜索服务使用有疑问,可通过搜索钉钉群(23109592)加入阿里云视觉智能开放平台咨询群联系我们。',
- 'requestParamsDescription' => ' ',
- 'responseParamsDescription' => '## SDK参考'."\n"
- .'阿里云视觉AI能力推荐使用SDK调用,支持多种编程语言,文件参数通过SDK调用可支持本地文件及任意URL,具体可参见[SDK总览](~~145033~~)。',
- 'extraInfo' => '## 错误码'."\n"
- .'关于删除数据库的错误码,详情请参见[常见错误码](~~159136~~)。'."\n"
- ."\n\n"
- ."\n"
- .'## 安全声明'."\n"
- .'- 请确保上传的图片或文件来源符合相应的法律法规。'."\n"
- .'- 通过体验调试上传的临时文件有效期为1小时,在24小时后会被系统自动清理删除。',
- ],
- 'DeleteImage' => [
- 'methods' => [
- 'post',
- 'get',
+ [
+ 'apiName' => 'CreateImageDb',
+ 'description' => '创建数据库',
+ 'operationType' => 'create',
+ 'ramAction' => [
+ 'action' => 'viapi-imgsearch:CreateImageDb',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => '全部资源', 'arn' => '*'],
+ ],
+ ],
],
- 'schemes' => [
- 'http',
- 'https',
+ [
+ 'apiName' => 'ListImageDbs',
+ 'description' => '查看数据库列表',
+ 'operationType' => 'get',
+ 'ramAction' => [
+ 'action' => 'viapi-imgsearch:ListImageDbs',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => '全部资源', 'arn' => '*'],
+ ],
+ ],
],
- 'security' => [
- [
- 'AK' => [],
+ [
+ 'apiName' => 'SearchImage',
+ 'description' => '搜索图片',
+ 'operationType' => 'get',
+ 'ramAction' => [
+ 'action' => 'viapi-imgsearch:SearchImage',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => '全部资源', 'arn' => '*'],
+ ],
],
],
- 'operationType' => 'read',
- 'deprecated' => false,
- 'systemTags' => [
+ [
+ 'apiName' => 'DeleteImageDb',
+ 'description' => '删除数据库',
'operationType' => 'delete',
- ],
- 'parameters' => [
- [
- 'name' => 'DbName',
- 'in' => 'formData',
- 'schema' => [
- 'description' => '数据库名称。',
- 'type' => 'string',
- 'required' => true,
- 'example' => 'default',
+ 'ramAction' => [
+ 'action' => 'viapi-imgsearch:DeleteImageDb',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => '全部资源', 'arn' => '*'],
],
],
- [
- 'name' => 'EntityId',
- 'in' => 'formData',
- 'schema' => [
- 'description' => '待删除数据的实体ID。',
- 'type' => 'string',
- 'required' => true,
- 'example' => '1',
+ ],
+ [
+ 'apiName' => 'DeleteImage',
+ 'description' => '删除图片',
+ 'operationType' => 'delete',
+ 'ramAction' => [
+ 'action' => 'viapi-imgsearch:DeleteImage',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => '全部资源', 'arn' => '*'],
],
],
],
- 'responses' => [
- 200 => [
- 'schema' => [
- 'type' => 'object',
- 'properties' => [
- 'RequestId' => [
- 'description' => '请求ID。',
- 'type' => 'string',
- 'example' => '3F3F81A5-4C37-4716-AE5C-518D2537365C',
- ],
- ],
+ [
+ 'apiName' => 'ListImages',
+ 'description' => '查看图片数据列表',
+ 'operationType' => 'get',
+ 'ramAction' => [
+ 'action' => 'viapi-imgsearch:ListImages',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => '全部资源', 'arn' => '*'],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"3F3F81A5-4C37-4716-AE5C-518D2537365C\\"\\n}","errorExample":""},{"type":"xml","example":"<RequestId>3F3F81A5-4C37-4716-AE5C-518D2537365C</RequestId>","errorExample":""}]',
- 'title' => '删除图片',
- 'summary' => '本文介绍删除图片DeleteImage的语法及示例。',
- 'description' => '## 功能描述'."\n"
- .'删除图片能力可以删除指定数据库中的图片。'."\n"
- ."\n\n"
- .'> 阿里云视觉智能开放平台视觉AI能力API接入、接口使用或问题咨询等,请通过钉钉群(23109592)加入阿里云视觉智能开放平台咨询群联系我们。'."\n"
- ."\n"
- .'## 服务说明'."\n"
- .'视觉搜索服务将于2023年2月15日起停止更新,后续不再支持新用户开通接入服务,新用户请使用[新版图像搜索](https://ai.aliyun.com/imagesearch)。2023年2月15日之后,会继续支持老用户,老用户如果对视觉搜索服务使用有疑问,可通过搜索钉钉群(23109592)加入阿里云视觉智能开放平台咨询群联系我们。',
- 'requestParamsDescription' => ' ',
- 'responseParamsDescription' => '## SDK参考'."\n"
- .'阿里云视觉AI能力推荐使用SDK调用,支持多种编程语言,文件参数通过SDK调用可支持本地文件及任意URL,具体可参见[SDK总览](~~145033~~)。',
- 'extraInfo' => '## 错误码'."\n"
- .'关于删除图片的错误码,详情请参见[常见错误码](~~159136~~)。'."\n"
- ."\n\n"
- ."\n"
- .'## 安全声明'."\n"
- .'- 请确保上传的图片或文件来源符合相应的法律法规。'."\n"
- .'- 通过体验调试上传的临时文件有效期为1小时,在24小时后会被系统自动清理删除。',
- ],
- ],
- 'endpoints' => [
- [
- 'regionId' => 'cn-shanghai',
- 'endpoint' => 'imgsearch.cn-shanghai.aliyuncs.com',
],
+ 'resourceTypes' => [],
],
];