跳到主要内容

Get User Profile API

MethodAPIExist描述
GET/{context}/profilesYes返回当前用户的详细信息
GET/{context}/profiles?userid=${ID}Yes获得ID指定的用户的详细信息
GET/{context}/profiles?users=id1,id2,…,idnNew API获得多个用户的详细信息

例子:

GET http://172.16.52.223/v2/context/profiles?userid=301

返回:

{
"id": "301", //必须有
"display_name": "docstest02", //必须有
"email": "docstest02@lenovo.com", //必须有
"photo_url": "/testOrg/people/301.png",
"name": "docstest02",
"job_title": "",
"org_name": "",
"org_id": ""
}

批量查询例子:

GET http://172.16.52.223/v2/context/profiles?users=300,301 

返回:

{  
"items": [ //必须有
{
"id": "300", //必须有
"display_name": "Docs Test 01", //必须有
"email": "docstest01@lenovo.com", //必须有
"org_name": "",
"org_id": "",
"photo_url": "/testOrg/people/300.png",
"name": "docstest01",
"job_title": ""
},
{
"id": "301", //必须有
"display_name": "Docs Test 02", //必须有
"email": "docstest02@lenovo.com", //必须有
"org_name": "",
"org_id": "",
"photo_url": "/testOrg/people/301.png",
"name": "docstest02",
"job_title": ""
}
],
"total": 2 //必须有
}