diff options
Diffstat (limited to 'data/zh_cn/nlp-automl/2019-07-01/api-docs.php')
| -rw-r--r-- | data/zh_cn/nlp-automl/2019-07-01/api-docs.php | 316 |
1 files changed, 130 insertions, 186 deletions
diff --git a/data/zh_cn/nlp-automl/2019-07-01/api-docs.php b/data/zh_cn/nlp-automl/2019-07-01/api-docs.php index d661e4e..d2cd65f 100644 --- a/data/zh_cn/nlp-automl/2019-07-01/api-docs.php +++ b/data/zh_cn/nlp-automl/2019-07-01/api-docs.php @@ -1,35 +1,14 @@ <?php return [ 'version' => '1.0', - 'info' => [ - 'style' => 'RPC', - 'product' => 'nlp-automl', - 'version' => '2019-07-01', - ], - 'directories' => [ - [ - 'id' => 0, - 'title' => '其它', - 'type' => 'directory', - 'children' => [ - 'AddMTInterveneWord', - 'GetPredictDoc', - 'PredictMTModelByDoc', - ], - ], - ], + 'info' => ['style' => 'RPC', 'product' => 'nlp-automl', 'version' => '2019-07-01'], + 'directories' => ['AddMTInterveneWord', 'GetPredictDoc', 'PredictMTModelByDoc'], 'components' => [ 'schemas' => [], ], 'apis' => [ 'AddMTInterveneWord' => [ - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -43,53 +22,27 @@ ], 'operationType' => 'write', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'update', - ], + 'systemTags' => ['operationType' => 'update'], 'parameters' => [ [ 'name' => 'SourceText', 'in' => 'query', - 'schema' => [ - 'description' => '原文', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'hello', - ], + 'schema' => ['description' => '原文', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'hello'], ], [ 'name' => 'TargetText', 'in' => 'query', - 'schema' => [ - 'description' => '译文', - 'type' => 'string', - 'required' => false, - 'example' => '你好', - ], + 'schema' => ['description' => '译文', 'type' => 'string', 'required' => false, 'example' => '你好'], ], [ 'name' => 'ProjectId', 'in' => 'query', - 'schema' => [ - 'description' => '项目id', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => '1', - ], + 'schema' => ['description' => '项目id', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => '1'], ], [ 'name' => 'PackageId', 'in' => 'query', - 'schema' => [ - 'description' => '词包id', - 'type' => 'string', - 'required' => false, - 'docRequired' => true, - 'example' => '1', - 'default' => 'mt_automl', - ], + 'schema' => ['description' => '词包id', 'type' => 'string', 'required' => false, 'docRequired' => true, 'example' => '1', 'default' => 'mt_automl'], ], ], 'responses' => [ @@ -97,30 +50,13 @@ 'schema' => [ 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => '接口返回码:200:表示成功。'."\n" - .'其它:表示错误码。错误码详情,请参见错误码。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '错误信息。错误码对应的错误信息。', - 'type' => 'string', - 'example' => 'parameterError', - ], - 'RequestId' => [ - 'description' => '请求id', - 'type' => 'string', - 'example' => '46E6B40D-2B6C-571B-AC41-86207DE288A5', - ], - 'WordId' => [ - 'description' => '新增成功的词id', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '1', - ], + 'Code' => ['description' => '接口返回码:200:表示成功。'."\n" + .'其它:表示错误码。错误码详情,请参见错误码。', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '错误信息。错误码对应的错误信息。', 'type' => 'string', 'example' => 'parameterError'], + 'RequestId' => ['description' => '请求id', 'type' => 'string', 'example' => '46E6B40D-2B6C-571B-AC41-86207DE288A5'], + 'WordId' => ['description' => '新增成功的词id', 'type' => 'integer', 'format' => 'int64', 'example' => '1'], ], + 'description' => '', ], ], ], @@ -128,17 +64,19 @@ 'title' => '增加干预数据', 'summary' => '把待干预的原文和译文添加到ProjectId和PackageId对应的dataSet上。', 'description' => '请确保在使用该接口前,已充分了解NLP自学习平台产品的收费方式和[价格](https://common-buy.aliyun.com/?commodityCode=nlp_bag#/buy)', - ], - 'GetPredictDoc' => [ - 'methods' => [ - 'head', - 'post', - 'get', + 'changeSet' => [ + ['createdAt' => '2022-03-07T07:22:38.000Z', 'description' => '响应参数发生变更、错误码发生变更'], ], - 'schemes' => [ - 'http', - 'https', + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '30', 'countWindow' => 1, 'regionId' => '*', 'api' => 'AddMTInterveneWord'], + ], + 'product' => ['code' => 'nlp', 'title' => '自然语言处理'], ], + ], + 'GetPredictDoc' => [ + 'methods' => ['head', 'post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -155,32 +93,17 @@ ], 'operationType' => 'readAndWrite', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'get', - ], + 'systemTags' => ['operationType' => 'get'], 'parameters' => [ [ 'name' => 'DocId', 'in' => 'query', - 'schema' => [ - 'description' => '文档id', - 'type' => 'integer', - 'format' => 'int64', - 'required' => true, - 'docRequired' => true, - 'example' => '1000', - ], + 'schema' => ['description' => '文档id', 'type' => 'integer', 'format' => 'int64', 'required' => true, 'docRequired' => true, 'example' => '1000'], ], [ 'name' => 'Product', 'in' => 'query', - 'schema' => [ - 'description' => '产品code', - 'type' => 'string', - 'required' => false, - 'example' => '空', - 'default' => 'mt_automl', - ], + 'schema' => ['description' => '产品code', 'type' => 'string', 'required' => false, 'example' => '空', 'default' => 'mt_automl'], ], ], 'responses' => [ @@ -188,28 +111,12 @@ 'schema' => [ 'type' => 'object', 'properties' => [ - 'Status' => [ - 'description' => '0:初始化 1:处理中 2:处理成功 3:处理失败', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '2', - ], - 'RequestId' => [ - 'description' => '请求id', - 'type' => 'string', - 'example' => '86D18195-D89C-4C8C-9DC4-5FCE789CE6D5', - ], - 'ResultContent' => [ - 'description' => '预测结果,文件流形式', - 'type' => 'string', - 'example' => 'xxx', - ], - 'XLIFFInfo' => [ - 'description' => 'xliff信息,文件流形式', - 'type' => 'string', - 'example' => 'xxx', - ], + 'Status' => ['description' => '0:初始化 1:处理中 2:处理成功 3:处理失败', 'type' => 'integer', 'format' => 'int32', 'example' => '2'], + 'RequestId' => ['description' => '请求id', 'type' => 'string', 'example' => '86D18195-D89C-4C8C-9DC4-5FCE789CE6D5'], + 'ResultContent' => ['description' => '预测结果,文件流形式', 'type' => 'string', 'example' => 'xxx'], + 'XLIFFInfo' => ['description' => 'xliff信息,文件流形式', 'type' => 'string', 'example' => 'xxx'], ], + 'description' => '', ], ], ], @@ -217,17 +124,11 @@ 'title' => '获取文档预测结果', 'summary' => '根据调用PredictMTModelByDoc返回的docId,调用该接口,返回预测后的结果。', 'description' => '请确保在使用该接口前,已充分了解NLP自学习平台产品的收费方式和[价格](https://common-buy.aliyun.com/?commodityCode=nlp_bag#/buy)', + 'changeSet' => [], ], 'PredictMTModelByDoc' => [ - 'methods' => [ - 'head', - 'post', - 'get', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'methods' => ['head', 'post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -244,64 +145,32 @@ ], 'operationType' => 'readAndWrite', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'get', - ], + 'systemTags' => ['operationType' => 'get'], 'parameters' => [ [ 'name' => 'FileContent', 'in' => 'formData', - 'schema' => [ - 'description' => '文件数据内容,文件内容需进过base64编码', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => '[base64 encode content]', - ], + 'schema' => ['description' => '文件数据内容,文件内容需进过base64编码', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => '[base64 encode content]'], ], [ 'name' => 'FileType', 'in' => 'query', - 'schema' => [ - 'description' => '文件类型', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'docx', - ], + 'schema' => ['description' => '文件类型', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'docx'], ], [ 'name' => 'ModelId', 'in' => 'query', - 'schema' => [ - 'description' => '模型id', - 'type' => 'integer', - 'format' => 'int32', - 'required' => true, - 'docRequired' => true, - 'example' => '1', - ], + 'schema' => ['description' => '模型id', 'type' => 'integer', 'format' => 'int32', 'required' => true, 'docRequired' => true, 'example' => '1'], ], [ 'name' => 'NeedXLIFF', 'in' => 'query', - 'schema' => [ - 'description' => '是否需要xliff信息', - 'type' => 'boolean', - 'required' => false, - 'example' => 'true', - ], + 'schema' => ['description' => '是否需要xliff信息', 'type' => 'boolean', 'required' => false, 'example' => 'true'], ], [ 'name' => 'ModelVersion', 'in' => 'query', - 'schema' => [ - 'description' => '模型版本', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'v1', - ], + 'schema' => ['description' => '模型版本', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'v1'], ], ], 'responses' => [ @@ -309,17 +178,10 @@ 'schema' => [ 'type' => 'object', 'properties' => [ - 'DocId' => [ - 'description' => '文档id', - 'type' => 'string', - 'example' => '1', - ], - 'RequestId' => [ - 'description' => '请求id', - 'type' => 'string', - 'example' => '86D18195-D89C-4C8C-9DC4-5FCE789CE6D5', - ], + 'DocId' => ['description' => '文档id', 'type' => 'string', 'example' => '1'], + 'RequestId' => ['description' => '请求id', 'type' => 'string', 'example' => '86D18195-D89C-4C8C-9DC4-5FCE789CE6D5'], ], + 'description' => '', ], ], ], @@ -327,12 +189,94 @@ 'title' => '提交文档预测任务', 'summary' => '上传文档内容,指定模型进行预测。', 'description' => '请确保在使用该接口前,已充分了解NLP自学习平台产品的收费方式和[价格](https://common-buy.aliyun.com/?commodityCode=nlp_bag#/buy)', + 'changeSet' => [ + ['createdAt' => '2024-07-04T02:12:17.000Z', 'description' => '错误码发生变更'], + ], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '5', 'countWindow' => 1, 'regionId' => '*', 'api' => 'PredictMTModelByDoc'], + ], + 'product' => ['code' => 'nlp', 'title' => '自然语言处理'], + ], ], ], 'endpoints' => [ + ['regionId' => 'cn-hangzhou', 'regionName' => '华东1(杭州)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'nlp-automl.cn-hangzhou.aliyuncs.com', 'endpoint' => 'nlp-automl.cn-hangzhou.aliyuncs.com', 'vpc' => 'nlp-automl-vpc.cn-hangzhou.aliyuncs.com'], + ], + 'errorCodes' => [ + ['code' => '40001', 'message' => 'The quota for calling the model is exceeded.', 'http_code' => 403, 'description' => '调用额度已超出限制'], + ['code' => '40002', 'message' => 'The specified interface is throttled.', 'http_code' => 403, 'description' => '调用接口被限流'], + ['code' => '40003', 'message' => 'An error occurred while authenticating the model.', 'http_code' => 403, 'description' => '模型鉴权失败'], + ['code' => '40004', 'message' => 'A server error occurred while processing your request. Please try again later or contact customer support.', 'http_code' => 200, 'description' => '服务器内部出现错误,请稍后重试或者联系客服人员帮忙解决。'], + ['code' => '40013', 'message' => 'An error occurred while authenticating the model.', 'http_code' => 403, 'description' => '模型鉴权失败'], + ['code' => 'Account arrearage', 'message' => 'The account is arrearage.', 'http_code' => 400, 'description' => '账户已欠费'], + ['code' => 'BaseModelNotFound', 'message' => 'The base model is not found.', 'http_code' => 400, 'description' => '未找到基础模型'], + ['code' => 'createModelConcurrency', 'message' => 'Creating multiple models at the same time is not allowed.', 'http_code' => 400, 'description' => '不允许同时创建多个模型。'], + ['code' => 'DataCenter.IllegalDatasetId', 'message' => 'The format of the dataset ID is invalid.', 'http_code' => 403, 'description' => '数据集ID不是有效的数据集ID'], + ['code' => 'DataCenter.IllegalDatasetRecord', 'message' => 'The format of the dataset record is invalid.', 'http_code' => 403, 'description' => '数据集标注数据格式无效'], + ['code' => 'dataFormatError', 'message' => 'The number of data bars added exceeds 500.', 'http_code' => 400, 'description' => '添加的数据条数过大,超过了500条'], + ['code' => 'DocParseError', 'message' => 'The version of the uploaded DOC file is too early to support parsing. You are advised to replace the DOCX file with the latest version.', 'http_code' => 400, 'description' => '上传的DOC文件类型的版本过低,不支持解析,建议替换为最新版本的DOCX。'], + ['code' => 'FileParseError', 'message' => 'The uploaded file failed to be parsed.', 'http_code' => 500, 'description' => '上传的文件解析失败。'], + ['code' => 'Forbbiden', 'message' => 'You are not authorized to operate on the specified resource.', 'http_code' => 403, 'description' => '用户未被授权操作指定的资源。'], + ['code' => 'InternalError', 'message' => 'An error occurred while processing your request.', 'http_code' => 500, 'description' => '未知错误。'], + ['code' => 'InvalidAccountStatus.ServiceLimit', 'message' => 'The maximum number of free API daily visits is exceeded.', 'http_code' => 400, 'description' => 'API访问次数超过了免费额度限制。'], + ['code' => 'InvalidAccountStatus.ServiceUnavailable', 'message' => 'The NLP Auto Machine Learning service has not been activated.', 'http_code' => 400, 'description' => '用户未开通NLP自学习服务。'], + ['code' => 'InvalidContentLength', 'message' => 'The length of content exceeds the limit.', 'http_code' => 400, 'description' => '内容长度过长。'], + ['code' => 'InvalidParameter', 'message' => 'The parameter is invalid.', 'http_code' => 400, 'description' => '参数错误'], + ['code' => 'InvalidParameter.ModelId', 'message' => 'The specified modelId is invalid.', 'http_code' => 400, 'description' => '参数modelId不合法。'], + ['code' => 'InvalidParameter.ModelVersion', 'message' => 'The specified modelVersion is invalid.', 'http_code' => 400, 'description' => '参数modelVersion不合法。'], + ['code' => 'InvalidServiceName', 'message' => 'The service does not exist.', 'http_code' => 400, 'description' => '服务不存在。'], + ['code' => 'ModelCenter.CreateModelLimit', 'message' => 'The maximum number of models you created is exceeded.', 'http_code' => 403, 'description' => '创建模型数量已达上限'], + ['code' => 'ModelCenter.DeployModelLimit', 'message' => 'The maximum number of online models is exceeded. You cannot deploy the model.', 'http_code' => 403, 'description' => '模型在线数量已达上限,不能发布'], + ['code' => 'ModelCenter.IllegalModelName', 'message' => 'The format of the model name is invalid.', 'http_code' => 400, 'description' => '模型名称格式错误'], + ['code' => 'ModelCenter.MinTrainingcount', 'message' => 'The number of model training records is less than 4.', 'http_code' => 400, 'description' => '模型训练数据少于4条'], + ['code' => 'ModelCenter.ModelNotFound', 'message' => 'The model information is not found.', 'http_code' => 400, 'description' => '未找到模型信息'], + ['code' => 'ModelCenter.ModelNotInProject', 'message' => 'The model is not in the specified project.', 'http_code' => 400, 'description' => '项目ID不匹配'], + ['code' => 'ModelCenter.ModelStatusError', 'message' => 'The model status is abnormal.', 'http_code' => 400, 'description' => '模型状态异常'], + ['code' => 'ModelCenter.NoDatasetOnline', 'message' => 'The status of the training dataset is not online.', 'http_code' => 400, 'description' => '数据集状态未在线'], + ['code' => 'ModelCenter.NoPermission', 'message' => 'You are not authorized to perform the operation.', 'http_code' => 403, 'description' => '无权限操作'], + ['code' => 'ModelCenter.NotFoundConfig', 'message' => 'The configuration information of the model type is not found.', 'http_code' => 400, 'description' => '未找到模型类型配置信息'], + ['code' => 'ModelCenter.OnlineModelLimit', 'message' => 'The maximum number of online models is exceeded.', 'http_code' => 403, 'description' => '模型在线数量已达上限,不能操作上线'], + ['code' => 'ModelGroupNotFound', 'message' => 'The model group is not found.', 'http_code' => 400, 'description' => '未找到模型组信息'], + ['code' => 'ModelInferenceError', 'message' => 'Failed to obtain the model prediction result.', 'http_code' => 500, 'description' => '获取模型预测结果失败。'], + ['code' => 'ModelInferenceFailed', 'message' => 'The model inference result is null.', 'http_code' => 500, 'description' => '模型推测结果为空'], + ['code' => 'NotFoundUploadDataError', 'message' => 'No data set is created.', 'http_code' => 400, 'description' => '未创建数据集。'], + ['code' => 'parameterError', 'message' => 'The parameter is invalid.', 'http_code' => 400, 'description' => '参数错误'], + ['code' => 'PermissionDeny', 'message' => 'No RAM permission.', 'http_code' => 400, 'description' => '改账号没有权限'], + ['code' => 'postPaidArrearage', 'message' => 'The service is not opened or the account is overdue.', 'http_code' => 400, 'description' => '服务未开通或账户已欠费。'], + ['code' => 'postpaidArrearageError', 'message' => 'You have an overdue payment.', 'http_code' => 400, 'description' => '您已欠费'], + ['code' => 'predictContentLength', 'message' => 'The length of content exceeds the limit.', 'http_code' => 400, 'description' => '输入预测内容的长度超出限制。'], + ['code' => 'predictLimit', 'message' => 'The maximum number of submitted tasks is exceeded.', 'http_code' => 400, 'description' => '提交任务到达上限'], + ['code' => 'predictQpsLimit', 'message' => 'The maximum number of queries-per-second is exceeded.', 'http_code' => 403, 'description' => '单模型QPS达到上限'], + ['code' => 'predictTimeout', 'message' => 'model predict cost greater than 9000ms.', 'http_code' => 500, 'description' => '模型响应时间超过9秒。'], + ['code' => 'queryExceedMaxDuration', 'message' => 'The query data exceeds the upper limit.', 'http_code' => 400, 'description' => '查询数据超过允许的最大区间。'], + ['code' => 'ResourceNotFound', 'message' => 'The specified Model does not exist.', 'http_code' => 404, 'description' => '指定的模型不存在。'], + ['code' => 'ServiceUnavailable', 'message' => 'An error occurred while processing your request.', 'http_code' => 503, 'description' => '服务内部错误。'], + ['code' => 'UnknownError', 'message' => 'A server error occurred while processing your request. Please try again later or contact customer support.', 'http_code' => 500, 'description' => '未知错误。'], + ], + 'changeSet' => [ [ - 'regionId' => 'cn-hangzhou', - 'endpoint' => 'nlp-automl.cn-hangzhou.aliyuncs.com', + 'apis' => [ + ['description' => '错误码发生变更', 'api' => 'GetPredictDoc'], + ['description' => '错误码发生变更', 'api' => 'PredictMTModelByDoc'], + ], + 'createdAt' => '2024-07-04T02:12:21.000Z', + 'description' => '', + ], + [ + 'apis' => [ + ['description' => '响应参数发生变更、错误码发生变更', 'api' => 'AddMTInterveneWord'], + ], + 'createdAt' => '2022-03-07T07:23:44.000Z', + 'description' => '修改AddMTInterveneWord这个接口的返回的message和wordId的数据类型,其他接口从public修改为private', + ], + ], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '5', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GetPredictDoc'], + ['threshold' => '5', 'countWindow' => 1, 'regionId' => '*', 'api' => 'PredictMTModelByDoc'], + ['threshold' => '30', 'countWindow' => 1, 'regionId' => '*', 'api' => 'AddMTInterveneWord'], ], + 'product' => ['code' => 'nlp', 'title' => '自然语言处理'], ], ]; |
