获取组织机构树节点类型
接口描述:
根据组织机构Id获取组织机构节点类型
接口地址:
请求方式:
- GET
请求头:
参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
---|---|---|---|---|---|
X-App-Id | 客户端 clientId | header | true | string |
请求参数:
参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
---|---|---|---|---|---|
accessToken | 接口访问凭证 | query | true | string | |
orgId | 组织机构ID | query | true | integer(int64) |
响应状态
状态码 | 说明 | schema |
---|---|---|
200 | OK | ApiRestResponse«List«TreeNodeTypeVO»» |
其他状态码参见:全局状态码
响应示例:
正确时返回:
{
"code": 200,
"status": "success",
"message": "请求成功",
"data": [
{
"sourceType": "01",
"type": "node_sjyj",
"desc": "市教育局"
},
{
"sourceType": "01",
"type": "node_jyj",
"desc": "县市区教育局"
},
{
"sourceType": "02",
"type": "node_dept",
"desc": "部门"
},
{
"sourceType": "03",
"type": "node_category",
"desc": "分类"
},
{
"sourceType": "04",
"type": "node_sydw",
"desc": "单位"
},
{
"sourceType": "05",
"type": "node_school",
"desc": "学校"
},
{
"sourceType": "06",
"type": "node_campus",
"desc": "校区"
},
{
"sourceType": "07",
"type": "node_grade",
"desc": "年级"
},
{
"sourceType": "08",
"type": "node_major",
"desc": "专业"
},
{
"sourceType": "09",
"type": "node_class",
"desc": "班级"
}
]
}
错误时返回:
{
"code": 500,
"data": {},
"message": "成功或异常消息",
"status": "fail"
}
响应参数:
参数名称 | 参数说明 | 类型 | schema |
---|---|---|---|
code | 成功或异常编码 | integer(int32) | integer(int32) |
data | 成功或异常数据 | array | AppVO |
message | 成功或异常消息 | string | |
status | 旧接口成功、失败或异常辅助判断标记:success、fail、error,可用值:success,fail,error | string |
Schema 属性:
TreeNodeTypeVO
参数名称 | 参数说明 | 类型 | schema |
---|---|---|---|
sourceType | 节点源数据类型编码 | string | |
type | 节点类型编码 | string | |
desc | 节点类型名称 | string |
调用示例:
NodeJs - Axios:
var axios = require('axios');
var config = {
method: 'get',
url: 'https://api_server_url/org/types?accessToken=AT-3-ewOumlQeTN7TmVufJxq-Ph1fNVnqUTeW',
headers: {
'X-App-Id': '1'
}
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
Java - OkHttp 示例:
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("https://api_server_url/org/types?accessToken=AT-3-ewOumlQeTN7TmVufJxq-Ph1fNVnqUTeW")
.method("GET", null)
.addHeader("X-App-Id", "1")
.build();
Response response = client.newCall(request).execute();
作者:杭州天音 创建时间:2022-10-08 17:59
最后编辑:杭州天音 更新时间:2025-08-22 15:44
最后编辑:杭州天音 更新时间:2025-08-22 15:44