当前位置: 首页 > 工具软件 > Bonita > 使用案例 >

bonita BPM-----identity API

吴飞语
2023-12-01


identity API


professionalcontactdata and personalcontactdata

Description

Additional information about a user (personal and professional). Both resources have the same attributes.

Identifier

The user ID (a long value).

Representation

{
  "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"
}

Methods

The methods used for this resource are:

  • POST - Create a user's contact information
  • GET - Read a user's contact information
  • PUT - Update a user's contact information

该API提供了一种设置联系信息的机制,但是相比于user,role,group等,感觉是一种比较老的机制了。

有点像是通信录。。。。。。。。。。


Group

Description

The group a user belongs to. Groups have a hierarchy (subgroups can be created inside a group).

Identifier

The ID of the group (a long value).

Representation

{
  "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"
}

Methods

The methods used for this resource are:

  • POST - Create a group
  • GET - Read a group or search for a group
  • PUT - Update a group
  • DELETE - Remove a group
该API用来对用户所在的组进行管理。


Membership

Description

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.

成员关系,即某个用户是否是组或者角色的成员。

Identifier

A compound identifier constructed from user_id/group_id/role_id where each id is a long value.

Representation

{
  "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"
}

Methods

The methods used for this resource are:

  • POST - Create a membership
  • GET - Search for memberships of a user
  • DELETE - Remove a membership
  • DELETE - Remove a membership

Role

Description

The role of a user in a group

组中用户充当的角色;

Identifier

The ID of the role (a long value).

Representation

{
  "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"
}

Methods

The methods used for this resource are:

  • POST - Create a role
  • GET - Read a role or search for a role
  • PUT - Update a role
  • DELETE - Remove a role

User

Description

Used to manage information about users.

个人账户的数据结构。

Representation

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"
}

Methods

The methods used for this resource are:

  • POST - Create a user
  • GET - Read a user details or search for a group of users
  • PUT - Update a user
  • DELETE - Remove a user

Read a user details

  • URL
    /API/identity/user/:userId
    Example: Get details of a specified user including professional and manager information : /API/identity/user/21?d=professional\_data&d=manager\_id
  • Method
    GET
  • Data Params
    Standard search parameters are available.
    • d=professional_data - include professionnal data in response
    • d=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中的数据进行增加,删除,修改,查询的基本操作。。。。。。。








 类似资料:

相关阅读

相关文章

相关问答