Skip to content

Commit

Permalink
Merge pull request #168 from bonitasoft/release/0.0.7
Browse files Browse the repository at this point in the history
other(release): 0.0.7
  • Loading branch information
rbioteau committed May 17, 2022
2 parents 09d2305 + 2fe183f commit 1e0dd99
Show file tree
Hide file tree
Showing 148 changed files with 278 additions and 753 deletions.
1 change: 1 addition & 0 deletions .openapi-generator/bonita-openapi-0.0.8-default.sha256
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18da6c7c9ed981cb7fc236db7ddf0169bc1d84f12ac385b58bd2fc2012a6882f
2 changes: 1 addition & 1 deletion CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

:project-group-id: org.bonitasoft.web
:project-artifact-id: bonita-java-client
:project-version: 0.0.6
:project-version: 0.0.7
:bonita-short-version: 7.11
:orga: bonitasoft
:uri-org: https://github.com/{orga}
Expand Down
2 changes: 1 addition & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ endif::[]
// Vars
:project-group-id: org.bonitasoft.web
:project-artifact-id: bonita-java-client
:project-version: 0.0.6
:project-version: 0.0.7
:bonita-short-version: 7.11
:orga: bonitasoft
:uri-org: https://github.com/{orga}
Expand Down
16 changes: 2 additions & 14 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ info:
name: GPL-v2.0
url: http://www.gnu.org/licenses/gpl-2.0.txt
title: Bonita HTTP API
version: 0.0.7
version: 0.0.8
x-logo:
url: images/logo_bonitasoft_white.png
backgroundColor: '#003355'
Expand Down Expand Up @@ -16821,19 +16821,7 @@ components:
description: the human readable task description
type: string
state:
description: the current state of the task
enum:
- initializing
- ready
- executing
- completing
- waiting
- completed
- failed
- skipped
- cancelled
- aborted
type: string
$ref: '#/components/schemas/ActivityState'
reached_state_date:
description: the date ('yyyy-MM-dd HH:mm:ss.SSS') when this task reached
the current state for example '2014-10-17 16:05:42.626'
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>org.bonitasoft.web</groupId>
<artifactId>bonita-java-client</artifactId>
<version>0.0.6</version>
<version>0.0.7</version>
<name>bonita-java-client</name>
<packaging>jar</packaging>

Expand Down Expand Up @@ -38,7 +38,7 @@

<!-- Bonita -->
<bonita.version>7.11.1</bonita.version>
<bonita-openapi.version>0.0.7</bonita-openapi.version>
<bonita-openapi.version>0.0.8</bonita-openapi.version>

<swagger-annotations.version>1.6.6</swagger-annotations.version>
<javax-annotation.version>1.3.2</javax-annotation.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Bonita HTTP API
* The REST API lets you access the data with HTTP requests; it is useful when implementing rich web forms / pages for a good user experience. If your application is using a technology other than Java, you can integrate it with the Bonita solution using the Web REST API. This API provides access to all Bonita objects (like processes, tasks, users, connectors etc.), to execute operations on them (create, retrieve, update, delete). You can use these operations to create a workflow with Bonita and integrate it into your application. The Bonita Engine remains responsible for executing the workflow logic (connectors, gateways with conditions, messages, timers etc.) while your application gives access to the workflow. Users can manage processes and tasks, and perform administrative activities. ![diagram of architecture of a REST client integrated with Bonita](images/rest_overview_v2.png) ### API Extensions You can create [Rest API Extensions](rest-api-extensions.md) to extend the Rest API by adding missing ressources (not provided by the Rest API). It is possible for an extension to interact with the engine (via the API) or with any other external service (for example a database, a directory, or a web service). ### Create a resource | Request URL | `http://.../API/{API_name}/{resource_name}/ `| |:-|:-| | Request Method | POST| | Request Payload | an item in JSON| | Response | the same item in JSON, containing the values provided in the posted item, completed with default values and identifiers provided by Bonita Engine.| ### Read a resource | Request URL | `http://.../API/{API_name}/{resource_name}/{id} `| |:-|:-| | Request Method | GET| | Response | an item in JSON| Example `http://.../API/identity/user/5 ` #### Extend resource response On some resources, in GET methods the `d` (deploy) URL query parameter can be used to extend the response objects. The value of this parameter consists of an attribute for which you want to make an extended request (called a deploy) and retrieve attributes of a linked resource. This means that instead of retrieving the ID or a parent or referenced resource, you can retrieve the full object. For example, when you retrieve a task, you can also retrieve the process definition attributes in addition to the process definition ID that is already part of the task resource. The supported deploy values for a task include its process (d=processId). Specifiy multiple `d` parameter to extend several resources. For instance, to retrieve the flow node of id 143 and the associated process, process instance and assigned user, call `/API/bpm/flowNode/143?d=processId&d=caseId&d=assigned_id` #### With compound identifier The order of the identifier parts for each resource type is given in the table above. | Request URL | `http://.../API/{API_name}/{resource_name}/{id_part1}/{id_part2} `| |:-|:-| | Request Method | GET| | Response | an item in JSON| Example `http://.../API/identity/membership/5/12/24 ` ### Update a resource | Request URL | `http://.../API/{API_name}/{resource_name}/{id} `| |:-|:-| | Request Method | PUT| | Request Payload | a map in JSON containing the new values for the attributes you want to change.| | Response | the corresponding item in JSON with new values where you requested a modification| Example `http://.../API/identity/user/5` #### With compound identifier: Response: the corresponding item in JSON with new values where you requested a modification. | Request URL | `http://.../API/{API_name}/{resource_name}/{id_part1}/{id_part2} `| |:-|:-| | Request Method | PUT| | Request Payload | ` a map in JSON containing the new values for the attributes you want to change `| | Response | ` the corresponding item in JSON with new values where you requested a modification`| Example `http://.../API/identity/membership/5/12/24 ` ### Delete resources Use the DELETE request to remove multiple resources. | Request URL | `http://.../API/{API_name}/{resource_name}/ `| |:-|:-| | Request Method | DELETE| | Request Payload | A list of identifiers in JSON, for example `[\"id1\",\"id2\",\"id3\"]`. Compound identifiers are separated by '/' characters.| | Response | `empty `| Example `http://.../API/identity/membership/ ` ### Search for a resource The required object is specified with a set of filters in the request URL. The URL parameters must be URL-encoded. Results are returned in a paged list, so you have to specify the page (counting from zero), and the number of results per page (count), additionally you can define a sort key (order). You can see the total number of matching results in the HTTP response header Content-Range. If you are searching for business data using a custom query, there must be a [count query in the BDM](define-and-deploy-the-bdm.md). If there is no count query, results from a custom query on business data cannot be paged properly (the header Content-Range will be absent). For business data default queries, the count query is defined automatically. The available filters are the attributes of the item plus some specific filters defined by each item. | Request URL | `http://.../API/{API_name}/{resource_name}?p={page}&c={count}&o={order}&s={query}&f={filter_name}={filter_value}&f=... `| |:-|:-| | Request Method | GET| | Response | an array of items in JSON| Example `/API/identity/user?p=0&c=10&o=firstname&s=test&f=manager_id=3` For a GET method that retrieves more than one instance of a resource, you can specify the following request parameters: * p (Mandatory): index of the page to display * c (Mandatory): maximum number of elements to retrieve * o: order of presentation of values in response: must be either `attributeName ASC` or `attributeName DESC`. The final order parameter value must be URL encoded. * f: list of filters, specified as `attributeName=attributeValue`. To filter on more than one attribute, specify an f parameters for each attribute. The final filter parameter value must be URL encoded. The attributes you can filter on are specific to the resource. * s: search on name or search indexes. The matching policy depends on the configuration of [word-based search](using-list-and-search-methods.md). For example, if word-based search is enabled, `s=Valid` returns matches containing the string \"valid\" at the start of any word in the attribute value word, such as \"Valid address\", \"Not a valid address\", and \"Validated request\" but not \"Invalid request\". If word-based search is disabled, `s=Valid` returns matches containing the string \"valid\" at the start of the attribute value, such as \"Valid address\" or \"Validated request\" but not \"Not a valid address\" or \"Invalid request\". ### Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. If you get a `401` response code : - make sure that the cookies have been transfered with the call - make sure that the cookies transfered are the ones generated during the last sucessfull login call - if one of the PUT, DELETE or POST method is used, make sure that the `X-Bonita-API-Token` header is included - if the X-Bonita-API-Token header is included, make sure that the value is the same as the one of the cookie generated during the last login - Maybe a logout was issued or the session has expired; try to log in again, and re run the request with the new cookies and the new value for the `X-Bonita-API-Token` header.
*
* The version of the OpenAPI document: 0.0.7
* The version of the OpenAPI document: 0.0.8
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down Expand Up @@ -52,4 +52,4 @@ public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fie
public Object clone() {
return super.clone();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Bonita HTTP API
* The REST API lets you access the data with HTTP requests; it is useful when implementing rich web forms / pages for a good user experience. If your application is using a technology other than Java, you can integrate it with the Bonita solution using the Web REST API. This API provides access to all Bonita objects (like processes, tasks, users, connectors etc.), to execute operations on them (create, retrieve, update, delete). You can use these operations to create a workflow with Bonita and integrate it into your application. The Bonita Engine remains responsible for executing the workflow logic (connectors, gateways with conditions, messages, timers etc.) while your application gives access to the workflow. Users can manage processes and tasks, and perform administrative activities. ![diagram of architecture of a REST client integrated with Bonita](images/rest_overview_v2.png) ### API Extensions You can create [Rest API Extensions](rest-api-extensions.md) to extend the Rest API by adding missing ressources (not provided by the Rest API). It is possible for an extension to interact with the engine (via the API) or with any other external service (for example a database, a directory, or a web service). ### Create a resource | Request URL | `http://.../API/{API_name}/{resource_name}/ `| |:-|:-| | Request Method | POST| | Request Payload | an item in JSON| | Response | the same item in JSON, containing the values provided in the posted item, completed with default values and identifiers provided by Bonita Engine.| ### Read a resource | Request URL | `http://.../API/{API_name}/{resource_name}/{id} `| |:-|:-| | Request Method | GET| | Response | an item in JSON| Example `http://.../API/identity/user/5 ` #### Extend resource response On some resources, in GET methods the `d` (deploy) URL query parameter can be used to extend the response objects. The value of this parameter consists of an attribute for which you want to make an extended request (called a deploy) and retrieve attributes of a linked resource. This means that instead of retrieving the ID or a parent or referenced resource, you can retrieve the full object. For example, when you retrieve a task, you can also retrieve the process definition attributes in addition to the process definition ID that is already part of the task resource. The supported deploy values for a task include its process (d=processId). Specifiy multiple `d` parameter to extend several resources. For instance, to retrieve the flow node of id 143 and the associated process, process instance and assigned user, call `/API/bpm/flowNode/143?d=processId&d=caseId&d=assigned_id` #### With compound identifier The order of the identifier parts for each resource type is given in the table above. | Request URL | `http://.../API/{API_name}/{resource_name}/{id_part1}/{id_part2} `| |:-|:-| | Request Method | GET| | Response | an item in JSON| Example `http://.../API/identity/membership/5/12/24 ` ### Update a resource | Request URL | `http://.../API/{API_name}/{resource_name}/{id} `| |:-|:-| | Request Method | PUT| | Request Payload | a map in JSON containing the new values for the attributes you want to change.| | Response | the corresponding item in JSON with new values where you requested a modification| Example `http://.../API/identity/user/5` #### With compound identifier: Response: the corresponding item in JSON with new values where you requested a modification. | Request URL | `http://.../API/{API_name}/{resource_name}/{id_part1}/{id_part2} `| |:-|:-| | Request Method | PUT| | Request Payload | ` a map in JSON containing the new values for the attributes you want to change `| | Response | ` the corresponding item in JSON with new values where you requested a modification`| Example `http://.../API/identity/membership/5/12/24 ` ### Delete resources Use the DELETE request to remove multiple resources. | Request URL | `http://.../API/{API_name}/{resource_name}/ `| |:-|:-| | Request Method | DELETE| | Request Payload | A list of identifiers in JSON, for example `[\"id1\",\"id2\",\"id3\"]`. Compound identifiers are separated by '/' characters.| | Response | `empty `| Example `http://.../API/identity/membership/ ` ### Search for a resource The required object is specified with a set of filters in the request URL. The URL parameters must be URL-encoded. Results are returned in a paged list, so you have to specify the page (counting from zero), and the number of results per page (count), additionally you can define a sort key (order). You can see the total number of matching results in the HTTP response header Content-Range. If you are searching for business data using a custom query, there must be a [count query in the BDM](define-and-deploy-the-bdm.md). If there is no count query, results from a custom query on business data cannot be paged properly (the header Content-Range will be absent). For business data default queries, the count query is defined automatically. The available filters are the attributes of the item plus some specific filters defined by each item. | Request URL | `http://.../API/{API_name}/{resource_name}?p={page}&c={count}&o={order}&s={query}&f={filter_name}={filter_value}&f=... `| |:-|:-| | Request Method | GET| | Response | an array of items in JSON| Example `/API/identity/user?p=0&c=10&o=firstname&s=test&f=manager_id=3` For a GET method that retrieves more than one instance of a resource, you can specify the following request parameters: * p (Mandatory): index of the page to display * c (Mandatory): maximum number of elements to retrieve * o: order of presentation of values in response: must be either `attributeName ASC` or `attributeName DESC`. The final order parameter value must be URL encoded. * f: list of filters, specified as `attributeName=attributeValue`. To filter on more than one attribute, specify an f parameters for each attribute. The final filter parameter value must be URL encoded. The attributes you can filter on are specific to the resource. * s: search on name or search indexes. The matching policy depends on the configuration of [word-based search](using-list-and-search-methods.md). For example, if word-based search is enabled, `s=Valid` returns matches containing the string \"valid\" at the start of any word in the attribute value word, such as \"Valid address\", \"Not a valid address\", and \"Validated request\" but not \"Invalid request\". If word-based search is disabled, `s=Valid` returns matches containing the string \"valid\" at the start of the attribute value, such as \"Valid address\" or \"Validated request\" but not \"Not a valid address\" or \"Invalid request\". ### Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. If you get a `401` response code : - make sure that the cookies have been transfered with the call - make sure that the cookies transfered are the ones generated during the last sucessfull login call - if one of the PUT, DELETE or POST method is used, make sure that the `X-Bonita-API-Token` header is included - if the X-Bonita-API-Token header is included, make sure that the value is the same as the one of the cookie generated during the last login - Maybe a logout was issued or the session has expired; try to log in again, and re run the request with the new cookies and the new value for the `X-Bonita-API-Token` header.
*
* The version of the OpenAPI document: 0.0.7
* The version of the OpenAPI document: 0.0.8
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Loading

0 comments on commit 1e0dd99

Please sign in to comment.