获取SAR文件详情
根据提交接口返回的task_id查询任务状态和SAR结果
请求参数
此 API 接口支持的参数列表
| 名称 | 类型 | 示例 | 描述 |
|---|---|---|---|
必填 | string | abc123xyz | 任务ID,即 /file/extract 成功响应中的 data.task_id |
响应结构
API 响应数据的结构说明
| 字段名 | 类型 | 示例 | 描述 |
|---|---|---|---|
data | object | {
"files": [
{
"items": [],
"total": 0,
"status": "PROCESSING",
"file_id": "abc123xyz",
"file_name": "patent.pdf"
}
],
"status": "PROCESSING"
} | 任务状态和结果 |
files | array | [
{
"items": [
{
"unit": "nM",
"value": "10",
"indicator": "IC50",
"structure": {
"components": [
{
"mol": "MOL V2000 structure block",
"smiles": "CC(=O)Oc1ccccc1C(=O)O",
"source": {
"page": 11,
"index": 8,
"display_label": "P12"
},
"substance_code": "Compound 12"
}
]
},
"activity_source": "Table 2",
"substance_code_raw": "Compound 12",
"experimental_method": "Cell proliferation assay",
"experimental_target": "EGFR",
"experimental_subject": "EGFR-expressing cells",
"activity_quality_level": "high",
"structure_quality_level": "high"
}
],
"total": 1,
"status": "SUCCESS",
"file_id": "abc123xyz",
"file_name": "patent.pdf"
}
] | 文件详情列表。当前一次提交只包含一个文件;任务不存在时返回空数组 |
items | array | [
{
"unit": "nM",
"value": "10",
"indicator": "IC50",
"structure": {
"components": [
{
"mol": "MOL V2000 structure block",
"smiles": "CC(=O)Oc1ccccc1C(=O)O",
"source": {
"page": 11,
"index": 8,
"display_label": "P12"
},
"substance_code": "Compound 12"
}
]
},
"activity_source": "Table 2",
"substance_code_raw": "Compound 12",
"experimental_method": "Cell proliferation assay",
"experimental_target": "EGFR",
"experimental_subject": "EGFR-expressing cells",
"activity_quality_level": "high",
"structure_quality_level": "high"
}
] | SAR解析结果列表。处理中或失败时返回空数组;成功时按原始活性抽取序号升序排列,缺少序号的记录排在最后 |
unit | string | nM | 活性单位 |
value | string | 10 | 活性数值 |
indicator | string | IC50 | 活性指标 |
structure | object | {
"components": [
{
"mol": "MOL V2000 structure block",
"smiles": "CCO",
"source": {
"page": 11,
"index": 8,
"display_label": "P12"
},
"substance_code": "Compound 12"
}
]
} | 化学结构及其PDF来源;每个结构组件的来源定位位于components[].source中 |
components | array | [
{
"mol": "MOL V2000 structure block",
"smiles": "CCO",
"source": {
"page": 11,
"index": 8,
"display_label": "P12"
},
"substance_code": "Compound 12"
}
] | 结构组件列表;单一物质也返回一个组件,组合物质返回多个组件 |
mol | string | MOL V2000 structure block | 组件MOL格式结构 |
smiles | string | CCO | 组件SMILES表达式 |
source | object | {
"page": 11,
"index": 8,
"display_label": "P12"
} | 组件在PDF中的来源和定位;没有可用定位信息时为空 |
page | integer<int32> | 11 | PDF原始页码,从0开始,用于定位 |
index | integer<int32> | 8 | Layout元素索引,用于PDF精确定位 |
display_label | string | P12 | 页面直接展示的页码标签 |
substance_code | string | Compound 12 | 组件物质代号;服务端兼容原始代号字段 |
activity_source | string | Table 2 | 活性来源展示文本。服务端依次读取activity_location中的label、valueSource/value_source、dcValueSource/dc_value_source,最后回退到value_source |
substance_code_raw | string | Compound 12 | 物质代号原文;缺失时服务端回退到substance_code.code |
experimental_method | string | Cell proliferation assay | 实验方法 |
experimental_target | string | EGFR | 实验靶点 |
experimental_subject | string | EGFR-expressing cells | 实验对象 |
activity_quality_level | string | high | 标准化活性置信度:high / medium / low。服务端依次使用record、activity_quality、activity_confidence计算 |
structure_quality_level | string | high | 标准化结构置信度:high / medium / low |
total | integer<int32> | 5 | 结果总数;处理中、失败或无结果时为0 |
status | string | SUCCESS | 文件状态:PROCESSING / SUCCESS / FAILED |
file_id | string | abc123xyz | 文件ID |
file_name | string | patent.pdf | 文件名 |
status | string | PROCESSING | 任务整体状态:PROCESSING(处理中)/ SUCCESS(成功)/ FAILED(失败)/ NOT_FOUND(任务不存在) |
status | boolean | true | 请求是否成功 |
error_msg | string | task_id cannot be blank | 错误信息;成功时不返回 |
error_code | integer<int32> | - | 业务错误码;成功时为0 |
error_params | object | {} | 错误参数;成功时不返回 |
成功响应示例
成功调用 API 的响应示例
JSON
{
"data": {
"files": [
{
"items": [
{
"unit": "nM",
"value": 10,
"indicator": "IC50",
"structure": {
"components": [
{
"mol": "MOL V2000 structure block",
"smiles": "CCO",
"source": {
"page": 11,
"index": 8,
"display_label": "P12"
},
"substance_code": "Compound 12"
}
]
},
"activity_source": "Table 2",
"substance_code_raw": "Compound 12",
"experimental_method": "Cell proliferation assay",
"experimental_target": "EGFR",
"experimental_subject": "EGFR-expressing cells",
"activity_quality_level": "high",
"structure_quality_level": "high"
}
],
"total": 5,
"status": "SUCCESS",
"file_id": "abc123xyz",
"file_name": "patent.pdf"
}
],
"status": "PROCESSING"
},
"status": true,
"error_msg": "task_id cannot be blank",
"error_code": 0,
"error_params": {}
}错误码
此接口可能返回的错误码列表
业务错误码
| 错误码 | 描述 |
|---|---|
68300004 | 请求参数异常! |
68300005 | 查询Api失败! |
68300006 | 解析基本存取错误! |
68300007 | 存在错误的请求! |
68300008 | 服务中断异常,请稍后再试! |
68300010 | 文件不符合上传规范! |
平台错误码
| 错误码 | 描述 |
|---|---|
67200000 | API整体限流错误! |
67200001 | API整体限流错误! |
67200002 | 当前调用速率过快,超过当前配置限制QPS! |
67200003 | 申请token的key和secret传参不正确或者客户端已被禁用! |
67200004 | 请求的接口无权限请联系我们的支持人员! |
67200005 | 账户余额/调用次数不足! |
67200006 | 客户端超过开通有效期! |
67200007 | 当前调用超过当天配置使用额度! |
67200008 | 请检查query参数中必填的apikey是否传输! |
67200009 | apikey与所传的bearerToken不匹配,请检查是否使用在有效期内的token! |
67200012 | 请求不合法! |
67200100 | 当前服务器状态正忙,请求响应超时! |
67200101 | 当前请求的Api不存在请检查请求Path! |
HTTP 状态码
| 状态码 | 描述 |
|---|---|
0 | 请求成功 |
201 | Created |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
性能指标
此接口的预期性能特征
正常响应时间
5000 ms
最大响应时间
10000 ms