Additional information about a user (personal and professional). Both resources have the same attributes.
The user ID (a long value).
{
"id":"user ID",
"fax_number":"fax number",
"building":"building",
"phone_number":"phone number",
"website":"website",
"zipcode":"zipcode",
"state":"state",
"city":"city",
"country":"country",
"mobile_number":"mobile phone number",
"address":"address",
"room":"room",
"email":"email"
}
The methods used for this resource are:
该API提供了一种设置联系信息的机制,但是相比于user,role,group等,感觉是一种比较老的机制了。
有点像是通信录。。。。。。。。。。
The group a user belongs to. Groups have a hierarchy (subgroups can be created inside a group).
The ID of the group (a long value).
{
"id":"group ID",
"name":"display name",
"displayName":"name",
"parent_path":"the path of the parent group of this group (empty if the group has no parent)",
"path":"the full path of the group (including its parent path)",
"description":"description",
"creation_date":"creation date (format: "2014-12-31 15:17:24.736")",
"created_by_user_id":"id of the user who created the group (-1 if the group was created by the tenant admin or by an organisation import)",
"last_update_date":"last update date (format: "2014-12-31 15:17:24.736")",
"icon":"icon path"
}
The methods used for this resource are:
Manage membership of users. There is a membership when a user belongs to a group and a role. Use this resource to add, search, and delete memberships.
成员关系,即某个用户是否是组或者角色的成员。
A compound identifier constructed from user_id/group_id/role_id where each id is a long value.
{
"assigned_date":"creation date (format: "2014-12-31 15:17:24.736")",
"role_id":"id of the role of this membership",
"assigned_by_user_id":"id of the user who created the membership (-1 if the role was created by the tenant admin or by an organisation import)",
"group_id":"id of the group of this membership",
"user_id":"id of the user in this membership"
}
The methods used for this resource are:
The role of a user in a group
组中用户充当的角色;
The ID of the role (a long value).
{
"id":"role ID",
"name":"display name",
"displayName":"name",
"description":"description",
"creation_date":"creation date (format: "2014-12-31 15:17:24.736")",
"created_by_user_id":"Id of the user who created the role (-1 if the role was created by the tenant admin or by an organisation import)",
"last_update_date":"last update date (format: "2014-12-31 15:17:24.736")",
"icon":"icon path"
}
The methods used for this resource are:
Used to manage information about users.
个人账户的数据结构。
Returns a JSON representation of user details. The "manager_id" and "professional_data" are omitted unless they are requested in the payload.
{
"last_connection":"date",
"created_by_user_id":"number",
"creation_date":"date",
"id":"number",
"icon":"string",
"enabled":"true | false",
"title":"string",
"professional_data": {
"fax_number":"string",
"building":"string",
"phone_number":"string",
"website":"string",
"zipcode":"string",
"state":"string",
"city":"string",
"country":"string",
"id":"number",
"mobile_number":"string",
"address":"string",
"email":"string",
"room":"string"
},
"manager_id":{
"last_connection":"date",
"created_by_user_id":"number",
"creation_date":"date",
"id":"number",
"icon":"string",
"enabled":"true | false",
"title":"string",
"manager_id":"number",
"job_title":"string",
"userName":"string",
"lastname":"string",
"firstname":"string",
"password":"",
"last_update_date":"date"
},
"job_title":"string",
"userName":"string",
"lastname":"string",
"firstname":"string",
"password":"",
"last_update_date":"date"
}
The methods used for this resource are:
/API/identity/user/:userId
/API/identity/user/21?d=professional\_data&d=manager\_id
GET
d=professional_data
- include professionnal data in responsed=manager_id
- include details of user's manager in response发送命令:
GET http://localhost:15177/bonita/API/identity/user/6?d=professional_data&d=manager_id HTTP/1.1
Host: localhost:15177
Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Maxthon/4.9.3.1000 Chrome/39.0.2146.0 Safari/537.36
Content-Type: application/json
Accept: */*
DNT: 1
Referer: http://localhost:15177/bonita/portal/homepage?
Accept-Encoding: gzip,deflate
Accept-Language: zh-CN
Cookie: JSESSIONID=5C44B0ED7EF62C29A2DCBBD48EAED125; bonita.tenant=1; X-Bonita-API-Token=ee772ca3-7445-462d-904d-5ac1b0c6369a; BOS_Locale=en
响应命令:
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Pragma: No-cache
Cache-Control: no-cache,no-store,no-transform,max-age=0
Expires: 20 2016 24:50:16 GMT
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked
Date: Fri, 21 Oct 2016 00:50:16 GMT
3e5
{"last_connection":"","created_by_user_id":"-1","creation_date":"2016-10-21 08:33:03.483","id":"6","icon":"icons/default/icon_user.png","enabled":"true","title":"Mr","professional_data":{"fax_number":"484-302-0706","building":"70","phone_number":"484-302-5706","website":"","zipcode":"19108","state":"PA","city":"Philadelphia","country":"United States","id":"6","mobile_number":"","address":"Renwick Drive","email":"patrick.gardenier@acme.com","room":""},"manager_id":{"last_connection":"","created_by_user_id":"-1","creation_date":"2016-10-21 08:33:03.467","id":"5","icon":"icons/default/icon_user.png","enabled":"true","title":"Mr","manager_id":"1","job_title":"Chief Financial Officer","userName":"zachary.williamson","lastname":"Williamson","firstname":"Zachary","password":"","last_update_date":"2016-10-21 08:33:03.467"},"job_title":"Financial controller","userName":"patrick.gardenier","lastname":"Gardenier","firstname":"Patrick","password":"","last_update_date":"2016-10-21 08:33:03.483"}
0
通过REST API可以对bonita的organization中的数据进行增加,删除,修改,查询的基本操作。。。。。。。