标识解析(info)

## 接口名称 标识解析接口 ## 接口描述 查询解析标识内容,返回标识内容的JSON数据。 ## 接口地址 https://idr.gdsinsing.com/v2/info?id={标识码}&index={索引号(可选)}&label={label项(可选)}&key={key(可选)}&mode={mode(可选)} ## 调用方式 |方法|数据类型| |-|-| |[X] GET|[ ] form-data| |[ ] POST|[X] x-www-form-urlencoded| |[ ] PUT|[ ] raw| |[ ] DELETE|| ## 参数说明 |参数名|位置|数据类型|必填|说明| |-|-|-|-|-| |id|Params|String|是|标识码| |key|Params|String|否|key项| |index|Params|String|否|索引号| |label|Params|String|否|label项| |mode|Params|String|否|返回的数据格式(json,handle),默认为json格式| ## 返回结果 #### 成功返回(mode为handle时) ```json { "handle": "88.168.88/test-idr-handle", "values": [{ "index": 21, "type": "TEXT", "data": { "format": "string", "value": "{\"pindex\":0,\"key\":\"eb17c131cbf74783a62d950eda570636\",\"cipher\":0,\"label\":\"test1\",\"value\":\"test1-value\",\"display\":\"test1-value\"}" }, "ttl": "86400", "ttlType": "", "references": [], "adminRead": 1, "adminWrite": 1, "publicRead": 1, "publicWrite": 1 }, { "index": 22, "type": "TEXT", "data": { "format": "string", "value": "{\"pindex\":0,\"key\":\"f4a102efbdbd4f02a7daf66395420e7b\",\"cipher\":0,\"label\":\"test2\",\"value\":\"test2-value\",\"display\":\"test2-value\"}" }, "ttl": "86400", "ttlType": "", "references": [], "adminRead": 1, "adminWrite": 1, "publicRead": 1, "publicWrite": 1 }, { "index": 23, "type": "TEXT", "data": { "format": "string", "value": "{\"pindex\":0,\"key\":\"0f0a32cc37ab4d79abeb95af2e692707\",\"cipher\":0,\"label\":\"test3\",\"value\":\"test3-value\",\"display\":\"test3-value\"}" }, "ttl": "86400", "ttlType": "", "references": [], "adminRead": 1, "adminWrite": 1, "publicRead": 1, "publicWrite": 1 } ] } ``` #### 成功返回(mode为json时) ```json { "handle": "88.168.88/test-idr-handle", "values": [{ "index": 21, "type": "TEXT", "key": "eb17c131cbf74783a62d950eda570636", "pindex": 0, "label": "test1", "value": "test1-value" }, { "index": 22, "type": "TEXT", "key": "f4a102efbdbd4f02a7daf66395420e7b", "pindex": 0, "label": "test2", "value": "test2-value" }, { "index": 23, "type": "TEXT", "key": "0f0a32cc37ab4d79abeb95af2e692707", "pindex": 0, "label": "test3", "value": "test3-value" } ] } ``` #### 失败返回 ```json { "result": 0, "msg": "标识码不存在" } ``` ## 调用例子 ``` JavaScript var settings = { "url": "https://idr.gdsinsing.com/info?id=88.168.89/test/demo-001&label=联系地址", "method": "GET", "timeout": 0, }; $.ajax(settings).done(function (response) { console.log(response); }); ```