IBM BPM, V8.0.1, All platforms > Programming IBM BPM > Developing client applications that use IBM BPM REST APIs

HTTP methods supported by the IBM BPM REST APIs

The HTTP methods provide the operations, such as create, read, update, and delete that you can perform on IBM BPM artifacts.

The following HTTP methods are supported:

HTTP methods
HTTP method Description
POST Creates a new resource.
GET Retrieves a resource.
PUT Updates an existing resource.
DELETE Deletes a resource.

The GET method is a safe method because the state of the resource remains unchanged by this operation.


Security considerations

When using HTTP methods, consider the following security aspects


URI length considerations for REST API requests

In some situations, the length of a REST API request URI might exceed the supported URI length, for example, because of browser restrictions, or the number and length of query parameters in the request URI.

As a workaround, you can tunnel your request through a POST request that uses the application/x-www-form-urlencoded content type. To exploit the workaround, construct the REST API request in the following way:

  1. Use the POST method in the HTTP request.
  2. Set the X-HTTP-Method-Override HTTP header to the intended method from your original request.

    For example, if you intended your original request to be a PUT request, then set the value of this header to PUT.

  3. Set the value of the Content-Type HTTP header to application/x-www-form-urlencoded.

  4. Add all of the request parameters from your original request URI query string to the HTTP request body.

For example, you need to call the following REST API to set some output variables to finish a task instance but the request URI is too long:

PUT http://host1.company.com:9080/rest/bpm/wle/v1/task/3?action=finish&params={"orderNumber":"5","customerName":{"firstName":"John","lastName":"Doe"}} Headers:
  Accept application/json
The following HTTP request shows how to call the same API using the application/x-www-form-urlencoded content type:
POST http://host1.company.com:9080/rest/bpm/wle/v1/task/3
Headers
  Accept application/json
  Content-Type: application/x-www-form-urlencoded
  X-Method-Override:  PUT
Request Body:
  action=finish&params={"orderNumber":"5","customerName":{"firstName":"John","lastName":"Doe"}}

Developing client applications that use IBM BPM REST APIs


Related reference:
REST Interface for BPD-related Resources
REST Interface for BPEL-related Process Resources
REST Interface for BPEL-related Task Resources
REST Interface for Federated BPM Resources