简要描述:
- 接口文档或者通过nodejs二次集成数据
接口版本:
版本号 | 制定人 | 制定日期 | 修订日期 |
---|---|---|---|
v3 | 陈碧贵 | 2022-09-08 | xxxx-xx-xx |
请求URL:
-http://{url参数}/bo/api/v3/db/dataapi/dir?ownerId=bt&ignore=true&nodejs=common-data&nodebiz=true
1、自定义开发目录
\RG3.Web.Host.PaaS\Config\AppNodeJs\dataapi\business
2、接口已集成文档目录
\RG3.Web.Host.PaaS\App_Data\ApiDocument\
请求方式:
- POST
请求地址参数:
参数名 | 是否必须 | 类型 | 说明 |
---|---|---|---|
ignore | 否 | string | 开发环境忽略验证 |
备注:
1、apiDir、apiFile 以\RG3.Web.Host.PaaS\App_Data\ApiDocument为准
2、目录尽量消息 - 连接
请求头:
参数名 | 是否必须 | 类型 | 说明 |
---|---|---|---|
XownerId | 是 | string | 项目唯一ID,对应bo_project {ownerId} |
XsysId | 否 | string | 所属系统 对应 bo_system 表 |
XuserFromFirstShareId | string | 否 | 一级分享用户ID, bo_user user_id |
XuserFromSecondShareId | string | 否 | 二级分享用户ID, bo_user user_id |
XverifyApi | 是 | string | 加密规则encryptByDES(`${newGuid()} |
XfilterAreaCode | 否 | string | 行政区编码, 对应 bo_sys_area area_code |
Content-Type: | 是 | string | application/json; charset=utf-8 请求类型 |
Authorization | 是 | string | 当前用户认证信息,通过登录接口获取 Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6 |
请求参数:
{
}
参数名 | 是否必须 | 类型 | 说明 |
---|---|---|---|
depId | 是 | string | 主键唯一标识值 (名称根据实际进行调整) |
_nodejs | 是 | string | common-data 对应/Config/AppNodeJs/Plugins/fn- common-data.js, 通过nodejs插件,对响应结果进行二次处理 common-data 普通数据(小写驼峰)common-data-under 普通数据下划线 |
_queues | 否 | string | 主键唯一标识值 (名称根据实际进行调整) {ownerId} |
返回示例:
正确时返回:
{
"data": [
{
"id": "bt",
"parentId": "0",
"name": "bt",
"children": [
{
"id": "bt-connbasis",
"parentId": "bt",
"name": "connbasis"
},
{
"id": "bt-connbt-api",
"parentId": "bt",
"name": "connbt-api"
},
{
"id": "bt-connbt-dev",
"parentId": "bt",
"name": "connbt-dev"
}
]
},
{
"id": "dataapi",
"parentId": "0",
"name": "dataapi",
"children": [
{
"id": "dataapi-connact",
"parentId": "dataapi",
"name": "connact"
},
{
"id": "dataapi-connbasis",
"parentId": "dataapi",
"name": "connbasis"
},
{
"id": "dataapi-connbbs",
"parentId": "dataapi",
"name": "connbbs"
},
{
"id": "dataapi-connbo",
"parentId": "dataapi",
"name": "connbo"
},
{
"id": "dataapi-connbs",
"parentId": "dataapi",
"name": "connbs"
},
{
"id": "dataapi-conncpc",
"parentId": "dataapi",
"name": "conncpc"
},
{
"id": "dataapi-conncrm",
"parentId": "dataapi",
"name": "conncrm"
},
{
"id": "dataapi-connmall",
"parentId": "dataapi",
"name": "connmall"
},
{
"id": "dataapi-connmallorder",
"parentId": "dataapi",
"name": "connmallorder"
},
{
"id": "dataapi-connpm",
"parentId": "dataapi",
"name": "connpm"
}
]
},
{
"id": "devbuild",
"parentId": "0",
"name": "devbuild",
"children": [
{
"id": "devbuild-connact",
"parentId": "devbuild",
"name": "connact"
},
{
"id": "devbuild-connbasis",
"parentId": "devbuild",
"name": "connbasis"
},
{
"id": "devbuild-connbbs",
"parentId": "devbuild",
"name": "connbbs"
},
{
"id": "devbuild-connbo",
"parentId": "devbuild",
"name": "connbo"
},
{
"id": "devbuild-connbs",
"parentId": "devbuild",
"name": "connbs"
},
{
"id": "devbuild-conncpc",
"parentId": "devbuild",
"name": "conncpc"
},
{
"id": "devbuild-conncrm",
"parentId": "devbuild",
"name": "conncrm"
},
{
"id": "devbuild-connmall",
"parentId": "devbuild",
"name": "connmall"
},
{
"id": "devbuild-connmallorder",
"parentId": "devbuild",
"name": "connmallorder"
},
{
"id": "devbuild-connpm",
"parentId": "devbuild",
"name": "connpm"
},
{
"id": "devbuild-connuserbehavior",
"parentId": "devbuild",
"name": "connuserbehavior"
}
]
}
],
"currentDay": "2022-09-08",
"cacheDateTimestamp": 0,
"success": false
}
错误时返回:
{
"code": 0,
"message": ""
"error":{
errorCode:null,
errorText:null
}
"success": false,
}
返回参数说明:
参数名 | 类型 | 说明 |
---|---|---|
success | bool | true 表示数据请求成功(跟code=0一致),调用者优先使用 |
code | int | true 表示数据请求成功(跟code=0一致),调用者优先使用 |
data | object | 根据node逻辑自定义 |
cacheType | string | redis/sqlite/local 数据来源缓存 的类型(便于开发调试和性能优化) |
cacheDate | date | 最后数据获取时间 |
文档更新时间: 2022-09-08 13:04 作者:admin