<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>IBM BAW Tips Q&amp;A - Recent questions and answers in REST API</title>
<link>https://bpm.tips/qa/rest-api</link>
<description>Powered by Question2Answer</description>
<item>
<title>Answered: Are REST API connections thread safe and how can concurrency be handled in IBM BPM?</title>
<link>https://bpm.tips/53/are-rest-api-connections-thread-safe-and-how-can-concurrency-be-handled-in-ibm-bpm?show=3365#a3365</link>
<description>&lt;p&gt;Two different questions hide in there:&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Are REST calls from BPM thread safe?&lt;/strong&gt; Yes - every service execution runs on its own thread with its own BPMRESTRequest / HttpURLConnection objects; nothing is shared between concurrent executions unless you put it into a static Java field or a shared business object. Java integrations must be written thread safe (no mutable statics; connection pools instead of a shared connection), because the same class serves parallel executions.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;How is concurrency handled?&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Inbound (clients calling BPM&#039;s REST API)&lt;/strong&gt;: concurrent calls are served by the WebContainer thread pool; the engine serialises conflicting work on the same instance with row locks - two clients finishing the same task at the same time: one succeeds, the other gets an error (task already completed / CWTBG0019E optimistic lock) - handle it by re-reading. Idempotency is your job: use a business key (the request id) to detect duplicate starts.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Outbound (BPM calling REST services)&lt;/strong&gt;: the number of parallel calls equals the number of parallel service executions (thread pools: WebContainer for coach-triggered services, event manager for system tasks / UCAs); cap it with the event manager thread pool and with the external system&#039;s rate limits (a retry with back-off in a wrapper service, or an API gateway in front). Connection reuse: HttpURLConnection keeps alive per JVM; long-running or slow endpoints need explicit timeouts, otherwise threads pile up.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Transactions&lt;/strong&gt;: an outbound REST call is not transactional; if the BPD step fails after the call, the call is not rolled back - make the target idempotent (PUT with a key, or check-before-create) so that &lt;em&gt;retry&lt;/em&gt; of the failed step is safe.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Same instance, parallel branches&lt;/strong&gt;: two branches calling REST and writing the same variable - by-value mapping means the last one to complete wins; write to different variables and merge.&lt;/li&gt;&lt;/ul&gt;&lt;pre&gt;// wrapper with timeout and retry with back-off (server-side script)
function callWithRetry(fn, attempts) {
  for (var i = 1; ; i++) {
    try { return fn(); }
    catch (e) { if (i &amp;gt;= attempts || !/timed out|503|429/i.test(String(e))) throw e; java.lang.Thread.sleep(500 * Math.pow(2, i)); }
  }
}
tw.local.result = callWithRetry(function () { var c = new java.net.URL(tw.local.url).openConnection(); c.setConnectTimeout(5000); c.setReadTimeout(20000); /* ... */ return read(c); }, 4);&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;References&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a target=&quot;_blank&quot; rel=&quot;nofollow&quot; href=&quot;https://www.ibm.com/docs/SS8JB4/com.ibm.wbpm.main.doc/topics/stdrest_programming.html&quot;&gt;BPM REST API programming&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a target=&quot;_blank&quot; rel=&quot;nofollow&quot; href=&quot;https://www.ibm.com/docs/en/baw/24.0.x&quot;&gt;BAW documentation - Java integration considerations (thread safety)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;</description>
<category>REST API</category>
<guid isPermaLink="true">https://bpm.tips/53/are-rest-api-connections-thread-safe-and-how-can-concurrency-be-handled-in-ibm-bpm?show=3365#a3365</guid>
<pubDate>Sun, 06 Sep 2026 13:24:33 +0000</pubDate>
</item>
<item>
<title>Answered: How can Business Data be Updated using REST API?</title>
<link>https://bpm.tips/71/how-can-business-data-be-updated-using-rest-api?show=3356#a3356</link>
<description>&lt;p&gt;&quot;Business data&quot; here means the process instance&#039;s variables (and the exposed business data that the search index shows). Update them with the process variables resource of the classic REST API, or the task data actions while a task is open:&lt;/p&gt;&lt;pre&gt;# 1. instance variables (any running instance; full replacement of each variable you name)
PUT /rest/bpm/wle/v1/process/2072.123/variables
Content-Type: application/json
BPMCSRFToken: &amp;lt;token&amp;gt;
{ &quot;order&quot;: { &quot;number&quot;: &quot;ORD-42&quot;, &quot;status&quot;: &quot;APPROVED&quot;, &quot;customer&quot;: { &quot;id&quot;: &quot;c1&quot;, &quot;name&quot;: &quot;Ana Perez&quot; } }, &quot;approver&quot;: &quot;jdoe&quot; }

# read first (to modify in place)
GET /rest/bpm/wle/v1/process/2072.123?parts=data
# 2. task data (a task&#039;s input/output variables; updates the instance when the task completes)
PUT /rest/bpm/wle/v1/task/2078.456?action=setData&amp;amp;params={&quot;order&quot;:{...}}&amp;amp;parts=data
# 3. complete a task with output data in one call
PUT /rest/bpm/wle/v1/task/2078.456?action=finish&amp;amp;params={&quot;decision&quot;:&quot;APPROVED&quot;,&quot;comment&quot;:&quot;ok&quot;}
# 4. BAW 21+ Process REST v2: the instance&#039;s &quot;actions&quot; list shows set_data when the caller may change data (see /bpm/docs of your level for the call)&lt;/pre&gt;&lt;p&gt;The exposed business data used by searches (the &quot;business data&quot; columns in Process Portal) is updated automatically by the engine when the underlying variable changes through any of these calls - there is no separate API for it. Rules: send whole variables (the engine does not merge partial objects), keep types consistent with the business object, and obtain the CSRF token first on BAW 20+ / CP4BA. Server-side from a script the same is BPMRESTRequest (question 3127); inside the flow use data mapping (question 3160).&lt;/p&gt;&lt;p&gt;&lt;strong&gt;References&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a target=&quot;_blank&quot; rel=&quot;nofollow&quot; href=&quot;https://www.ibm.com/docs/SS8JB4/com.ibm.wbpm.ref.doc/topics/stdrest_reference.html&quot;&gt;Process REST API - process variables, task setData / finish&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a target=&quot;_blank&quot; rel=&quot;nofollow&quot; href=&quot;https://www.ibm.com/docs/en/baw/24.0.x?topic=apis-process-rest&quot;&gt;Process REST v2 (BAW 21+)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a target=&quot;_blank&quot; rel=&quot;nofollow&quot; href=&quot;https://www.ibm.com/docs/en/baw/23.0.x?topic=apis-preventing-cross-site-request-forgery&quot;&gt;BPMCSRFToken&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;</description>
<category>REST API</category>
<guid isPermaLink="true">https://bpm.tips/71/how-can-business-data-be-updated-using-rest-api?show=3356#a3356</guid>
<pubDate>Sun, 06 Sep 2026 13:22:36 +0000</pubDate>
</item>
<item>
<title>Answered: How can we upload a document to document store using REST API?</title>
<link>https://bpm.tips/75/how-can-we-upload-a-document-to-document-store-using-rest-api?show=3353#a3353</link>
<description>&lt;p&gt;The BPM document store accepts uploads through the classic REST API as a multipart request; the document is attached to a process instance (or stays unattached) and can carry properties:&lt;/p&gt;&lt;pre&gt;# upload (multipart/form-data): file part + metadata as query parameters
curl -k -u user:pw -H &quot;BPMCSRFToken: $TOKEN&quot; \
  -F &quot;file=@invoice.pdf;type=application/pdf&quot; \
  &quot;https://host:9443/rest/bpm/wle/v1/document?name=invoice.pdf&amp;amp;processInstanceId=2072.123&amp;amp;documentType=INVOICE&amp;amp;properties=%7B%22vendor%22%3A%22Acme%22%7D&quot;
# response: { &quot;data&quot;: { &quot;id&quot;: &quot;2074.987&quot;, &quot;name&quot;: &quot;invoice.pdf&quot;, &quot;mimeType&quot;: &quot;application/pdf&quot;, &quot;size&quot;: 12345, &quot;url&quot;: &quot;/rest/bpm/wle/v1/document/2074.987/content&quot; } }

# download
GET /rest/bpm/wle/v1/document/2074.987/content
# list the documents of an instance
GET /rest/bpm/wle/v1/process/2072.123?parts=documents
# update content (new version) / delete
POST /rest/bpm/wle/v1/document/2074.987?action=update  (multipart file)      DELETE /rest/bpm/wle/v1/document/2074.987&lt;/pre&gt;&lt;pre&gt;// browser (coach view): upload a File object from an &amp;lt;input type=file&amp;gt; to the current instance
var fd = new FormData(); fd.append(&quot;file&quot;, input.files[0]);
var xhr = new XMLHttpRequest();
xhr.open(&quot;POST&quot;, base + &quot;/rest/bpm/wle/v1/document?name=&quot; + encodeURIComponent(input.files[0].name) + &quot;&amp;amp;processInstanceId=&quot; + piid, true);
xhr.setRequestHeader(&quot;BPMCSRFToken&quot;, token);
xhr.onload = function () { if (xhr.status === 200) ${DocList}.refresh(); };
xhr.send(fd);&lt;/pre&gt;&lt;p&gt;Notes: parameter names vary slightly by release (processInstanceId vs parentId on 8.5.0; check the REST API tester /bpmrest-ui of your level), the document store must be enabled (it is by default), size limits come from the web container&#039;s maximum post size (raise it for large files), and for ECM (FileNet) the equivalent is the CMIS AtomPub / browser binding of the content server, not the BPM document resource. In service flows use tw.system.createDocument instead of REST (question 104).&lt;/p&gt;&lt;p&gt;&lt;strong&gt;References&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a target=&quot;_blank&quot; rel=&quot;nofollow&quot; href=&quot;https://www.ibm.com/docs/SS8JB4/com.ibm.wbpm.ref.doc/topics/stdrest_reference.html&quot;&gt;Process REST API - document resource&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a target=&quot;_blank&quot; rel=&quot;nofollow&quot; href=&quot;https://www.ibm.com/docs/en/baw/23.0.x?topic=apis-preventing-cross-site-request-forgery&quot;&gt;BPMCSRFToken&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;</description>
<category>REST API</category>
<guid isPermaLink="true">https://bpm.tips/75/how-can-we-upload-a-document-to-document-store-using-rest-api?show=3353#a3353</guid>
<pubDate>Sun, 06 Sep 2026 13:21:58 +0000</pubDate>
</item>
<item>
<title>Answered: How to update complex variables in REST API set data?</title>
<link>https://bpm.tips/98/how-to-update-complex-variables-in-rest-api-set-data?show=3339#a3339</link>
<description>&lt;p&gt;The classic setData actions take the variables as a JSON object in the params query parameter; complex variables are nested JSON - the whole object is replaced with what you send, so include every field you want to keep:&lt;/p&gt;&lt;pre&gt;# task data (the task&#039;s variables)
PUT /rest/bpm/wle/v1/task/2078.456?action=setData&amp;amp;params={&quot;order&quot;:{&quot;number&quot;:&quot;ORD-42&quot;,&quot;customer&quot;:{&quot;id&quot;:&quot;c1&quot;,&quot;name&quot;:&quot;Ana&quot;},&quot;lines&quot;:[{&quot;item&quot;:&quot;A&quot;,&quot;qty&quot;:2},{&quot;item&quot;:&quot;B&quot;,&quot;qty&quot;:1}]},&quot;comment&quot;:&quot;updated&quot;}&amp;amp;parts=data
BPMCSRFToken: &amp;lt;token&amp;gt;

# process instance variables (same JSON shape, one entry per variable name)
PUT /rest/bpm/wle/v1/process/2072.123/variables
Content-Type: application/json
{ &quot;order&quot;: { &quot;number&quot;: &quot;ORD-42&quot;, &quot;customer&quot;: { &quot;id&quot;: &quot;c1&quot;, &quot;name&quot;: &quot;Ana&quot; }, &quot;lines&quot;: [ { &quot;item&quot;: &quot;A&quot;, &quot;qty&quot;: 2 } ] } }&lt;/pre&gt;&lt;p&gt;Rules that avoid the usual errors:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;URL-encode the params value (encodeURIComponent(JSON.stringify(obj))); very large objects exceed URL limits - use the process variables resource with a body, or a service flow.&lt;/li&gt;&lt;li&gt;Field names must match the business object definition exactly (case-sensitive); unknown fields are ignored, missing fields become null / default - read the current data first (GET .../task/{id}?parts=data), modify in place, send back.&lt;/li&gt;&lt;li&gt;Dates as ISO strings (&quot;2025-06-01T10:00:00Z&quot;), decimals as numbers, lists as arrays, business objects as objects; null clears a field.&lt;/li&gt;&lt;li&gt;The task must be in a state that allows data changes (received / claimed, not closed); process variables can be set on running instances.&lt;/li&gt;&lt;/ul&gt;&lt;pre&gt;// JavaScript client example (browser or Node)
var vars = JSON.parse(await (await fetch(base + &quot;/rest/bpm/wle/v1/task/&quot; + id + &quot;?parts=data&quot;)).text()).data.data.variables;
vars.order.customer.name = &quot;Ana Perez&quot;;
await fetch(base + &quot;/rest/bpm/wle/v1/task/&quot; + id + &quot;?action=setData&amp;amp;params=&quot; + encodeURIComponent(JSON.stringify(vars)) + &quot;&amp;amp;parts=none&quot;, { method: &quot;PUT&quot;, headers: { BPMCSRFToken: token } });&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;References&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a target=&quot;_blank&quot; rel=&quot;nofollow&quot; href=&quot;https://www.ibm.com/docs/SS8JB4/com.ibm.wbpm.ref.doc/topics/stdrest_reference.html&quot;&gt;Process REST API - task setData, process variables&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a target=&quot;_blank&quot; rel=&quot;nofollow&quot; href=&quot;https://www.ibm.com/docs/en/baw/23.0.x?topic=apis-preventing-cross-site-request-forgery&quot;&gt;BPMCSRFToken&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;</description>
<category>REST API</category>
<guid isPermaLink="true">https://bpm.tips/98/how-to-update-complex-variables-in-rest-api-set-data?show=3339#a3339</guid>
<pubDate>Sun, 06 Sep 2026 13:18:54 +0000</pubDate>
</item>
<item>
<title>Answered: How can we move tokens using REST APIs as part of production troubleshooting?</title>
<link>https://bpm.tips/114/how-can-we-move-tokens-using-rest-apis-as-part-of-production-troubleshooting?show=3331#a3331</link>
<description>&lt;p&gt;Token moves are the surgical way to unstick or reroute a running instance in production; the REST API does it with two calls (find the token, move it):&lt;/p&gt;&lt;pre&gt;# 1. where is the instance? tokens + steps
GET /rest/bpm/wle/v1/process/2072.1234?parts=executionTree,diagram
# executionTree.root.children -&amp;gt; [{ &quot;tokenId&quot;: &quot;6&quot;, &quot;name&quot;: &quot;Wait for approval&quot;, &quot;flowObjectId&quot;: &quot;8d1f...&quot;, &quot;createdTaskIDs&quot;: [&quot;2078.99&quot;] }]
# diagram.step -&amp;gt; [{ &quot;ID&quot;: &quot;8d1f...&quot;, &quot;name&quot;: &quot;Wait for approval&quot;, &quot;type&quot;: &quot;intermediateEvent&quot; }, { &quot;ID&quot;: &quot;c2a0...&quot;, &quot;name&quot;: &quot;Ship order&quot;, &quot;type&quot;: &quot;activity&quot; }, ...]

# 2. move token 6 to &quot;Ship order&quot; and resume the instance
POST /rest/bpm/wle/v1/process/2072.1234?action=moveToken&amp;amp;tokenId=6&amp;amp;target=c2a0...&amp;amp;resume=true&amp;amp;parts=none
BPMCSRFToken: &amp;lt;token&amp;gt;          (BAW 20+ / CP4BA; obtain with POST /rest/bpm/wle/v1/system/login)

# variants
POST ...?action=deleteToken&amp;amp;tokenId=6&amp;amp;resume=true          # remove a token (e.g. a duplicate parallel branch)
PUT  /rest/bpm/wle/v1/process/2072.1234?action=suspend        # suspend first when several changes are needed, resume after
PUT  /rest/bpm/wle/v1/process/2072.1234?action=retry          # for Failed instances: retry the failed step instead of moving&lt;/pre&gt;&lt;p&gt;Rules for production: (1) suspend the instance, move, set variables if the target step needs data (PUT /process/{piid}/variables), resume; (2) the open task of the old position is closed by the engine when its token leaves (the user sees it disappear) - tell them; (3) moving into a sub-process or a parallel branch needs the target node &lt;em&gt;inside&lt;/em&gt; the right scope - the diagram&#039;s step list includes nested steps; moving into a multi-instance activity is not supported; (4) record every move (instance, from, to, reason, who) - the instance&#039;s comments API is a good place (the instance &lt;em&gt;comment&lt;/em&gt; action of the Process REST API); (5) the same operations exist in Process Admin &amp;gt; Process Inspector (Move / Delete token) and in the JavaScript API (TWProcessInstance.moveToken), and on CP4BA through the same classic REST resource. Operations tooling built on this (a &quot;Tokens&quot; dashboard) pays for itself quickly.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;References&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a target=&quot;_blank&quot; rel=&quot;nofollow&quot; href=&quot;https://www.ibm.com/docs/SS8JB4/com.ibm.wbpm.ref.doc/topics/stdrest_reference.html&quot;&gt;Process REST API - process resource (executionTree, diagram, moveToken, deleteToken, retry)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a target=&quot;_blank&quot; rel=&quot;nofollow&quot; href=&quot;https://www.ibm.com/docs/en/baw/23.0.x?topic=apis-preventing-cross-site-request-forgery&quot;&gt;BPMCSRFToken&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;</description>
<category>REST API</category>
<guid isPermaLink="true">https://bpm.tips/114/how-can-we-move-tokens-using-rest-apis-as-part-of-production-troubleshooting?show=3331#a3331</guid>
<pubDate>Sun, 06 Sep 2026 13:17:10 +0000</pubDate>
</item>
<item>
<title>Answered: There is REST Services support in 8.5.7 can someone provide more light on this ability?</title>
<link>https://bpm.tips/1057/there-is-rest-services-support-in-8-5-7-can-someone-provide-more-light-on-this-ability?show=3280#a3280</link>
<description>&lt;p&gt;IBM BPM 8.5.7 brought REST in two directions:&lt;/p&gt;&lt;p&gt;&lt;strong&gt;1. Consuming REST services&lt;/strong&gt; - the new &lt;em&gt;External Service&lt;/em&gt; of type REST: import a Swagger 2.0 (JSON / YAML) definition (file or URL), pick the operations, and BPM generates business objects for the schemas and a service you call from a service flow with typed input / output; the host comes from a &lt;em&gt;Server&lt;/em&gt; definition (Process App Settings &amp;gt; Servers, type REST server) so that every environment points to its own endpoint, with basic authentication or none; TLS through the cell truststore. Before 8.5.7 the only options were a Java integration or a script with Java&#039;s HTTP client (still valid for APIs without Swagger).&lt;/p&gt;&lt;pre&gt;// after importing the Swagger &quot;Customer API&quot; with operation getCustomer
// service flow: External Service step &quot;getCustomer&quot; -&amp;gt; input tw.local.id, output tw.local.customer (generated BO &quot;Customer&quot;)
tw.local.id = tw.local.order.customerId;
// (step)  -&amp;gt;  tw.local.customer.name, tw.local.customer.creditLimit
if (tw.local.customer.creditLimit &amp;lt; tw.local.order.total) tw.local.needsApproval = true;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;2. Exposing BPM as REST&lt;/strong&gt; - the BPM REST API (/rest/bpm/wle/v1) already existed; 8.5.7 extended it (task actions, search query API PUT /search/query, exposed items) and shipped the &lt;em&gt;REST API tester&lt;/em&gt; (/bpmrest-ui) to try calls. Any service flow can be run through POST /rest/bpm/wle/v1/service/{id}?action=start, which is how external applications call BPM logic; there is no &quot;publish my service as a REST resource with my own path&quot; feature - that came much later (Workflow REST v2 in BAW 21 for standard resources; custom paths still need an API gateway in front).&lt;/p&gt;&lt;p&gt;Limitations of the 8.5.7 REST integration worth knowing: Swagger 2.0 only, JSON bodies only, no OAuth (basic or none - use a gateway or a Java integration for tokens), one &lt;em&gt;Server&lt;/em&gt; per external service, and generated business object names taken from the Swagger definitions (rename clashes before importing - question 2992).&lt;/p&gt;&lt;p&gt;&lt;strong&gt;References&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a target=&quot;_blank&quot; rel=&quot;nofollow&quot; href=&quot;https://www.ibm.com/docs/en/baw/24.0.x&quot;&gt;BAW documentation - REST external services&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a target=&quot;_blank&quot; rel=&quot;nofollow&quot; href=&quot;https://www.ibm.com/docs/SS8JB4/com.ibm.wbpm.ref.doc/topics/stdrest_reference.html&quot;&gt;BPM REST API resources&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a target=&quot;_blank&quot; rel=&quot;nofollow&quot; href=&quot;https://www.ibm.com/docs/SS8JB4/com.ibm.wbpm.main.doc/topics/stdrest_programming.html&quot;&gt;BPM REST API programming&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;</description>
<category>REST API</category>
<guid isPermaLink="true">https://bpm.tips/1057/there-is-rest-services-support-in-8-5-7-can-someone-provide-more-light-on-this-ability?show=3280#a3280</guid>
<pubDate>Sun, 06 Sep 2026 13:06:09 +0000</pubDate>
</item>
<item>
<title>Answered: Why user preference data is not coming in REST call of User details</title>
<link>https://bpm.tips/2964/why-user-preference-data-is-not-coming-in-rest-call-of-user-details?show=3208#a3208</link>
<description>&lt;p&gt;GET /rest/bpm/wle/v1/user/{name} returns the user attributes (id, full name, e-mail, memberships); &lt;strong&gt;preferences&lt;/strong&gt; are a different data set and come back only when you ask for them:&lt;/p&gt;&lt;pre&gt;GET /rest/bpm/wle/v1/user/{userName}?parts=all                 -&amp;gt; &quot;userPreferences&quot; object included
GET /rest/bpm/wle/v1/user/{userName}?parts=userPreferences,memberships
GET /rest/bpm/wle/v1/user/{userName}?includeInternalMemberships=true&amp;amp;refreshUser=true&amp;amp;parts=all   // refresh from the registry first&lt;/pre&gt;&lt;p&gt;Typical answer (BPM 8.5.7 / BAW):&lt;/p&gt;&lt;pre&gt;{ &quot;status&quot;: &quot;200&quot;, &quot;data&quot;: { &quot;userName&quot;: &quot;jdoe&quot;, &quot;fullName&quot;: &quot;John Doe&quot;, &quot;emailAddress&quot;: &quot;jdoe@example.com&quot;,
   &quot;userPreferences&quot;: { &quot;Task Email Notification&quot;: &quot;true&quot;, &quot;Email Address&quot;: &quot;jdoe@example.com&quot;, &quot;Locale&quot;: &quot;en_US&quot;, &quot;Send Task Email Notifications&quot;: &quot;false&quot; }, ... } }&lt;/pre&gt;&lt;p&gt;If the object is empty although parts=all is used: the user has never saved preferences (Process Portal &amp;gt; Preferences stores them on first change; the REST API does not synthesise defaults), or the call was made for a different user than the one logged in without administrator rights - preferences of &lt;em&gt;other&lt;/em&gt; users need the tw_admins role. Set them with PUT /rest/bpm/wle/v1/user/{name}?action=setPreference&amp;amp;key=Email%20Address&amp;amp;value=....&lt;/p&gt;&lt;p&gt;&lt;strong&gt;References&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a target=&quot;_blank&quot; rel=&quot;nofollow&quot; href=&quot;https://www.ibm.com/docs/SS8JB4/com.ibm.wbpm.ref.doc/topics/stdrest_reference.html&quot;&gt;Process REST API - user resource (parts, setPreference)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;</description>
<category>REST API</category>
<guid isPermaLink="true">https://bpm.tips/2964/why-user-preference-data-is-not-coming-in-rest-call-of-user-details?show=3208#a3208</guid>
<pubDate>Sun, 06 Sep 2026 11:53:52 +0000</pubDate>
</item>
<item>
<title>Answered: How to use BPM REST API in script with BPMREStRequest()?</title>
<link>https://bpm.tips/3127/how-to-use-bpm-rest-api-in-script-with-bpmrestrequest?show=3185#a3185</link>
<description>&lt;p&gt;BPMRESTRequest is the server-side JavaScript helper (System Data toolkit) that calls the BPM REST API from a script with the identity of the running service. Minimal working example for your task lookup:&lt;/p&gt;&lt;pre&gt;// script task in a service flow (server side)
var req = new BPMRESTRequest();
req.restServiceName = &quot;&quot;;            // leave empty for the local server (or the name of a &quot;Server&quot; of type REST defined in the process app)
req.method = &quot;GET&quot;;
req.resource = &quot;/task/&quot; + tw.local.taskId;   // relative to /rest/bpm/wle/v1
req.parameters = { &quot;parts&quot;: &quot;data&quot; };
var response = tw.system.invokeREST(req);
if (response.httpStatusCode == 200) {
  var json = JSON.parse(response.content);
  tw.local.taskData = json.data.data.variables;    // the task variables
  tw.local.subject  = json.data.subject;
} else {
  throw new Error(&quot;REST &quot; + response.httpStatusCode + &quot;: &quot; + response.content);
}&lt;/pre&gt;&lt;p&gt;For calls that change something (assign, finish, setData) use req.method = &quot;PUT&quot; and pass the query parameters in req.parameters; a JSON body goes into req.body with req.contentType = &quot;application/json&quot;. The CSRF token is added by the server for local calls, so nothing extra is needed there; for a remote BPM server define a &lt;em&gt;Server&lt;/em&gt; of type &quot;REST&quot; in the process app settings (host, port, user) and put its name in restServiceName.&lt;/p&gt;&lt;p&gt;Two alternatives when BPMRESTRequest is not what you need: the JavaScript API is direct and faster inside the same server (tw.system.findTaskByID(tw.local.taskId) then .subject, .processInstance, .status), and on BAW 20+ the OOB &lt;em&gt;REST external service&lt;/em&gt; (import the BAW Swagger) gives you typed business objects.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;References&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a target=&quot;_blank&quot; rel=&quot;nofollow&quot; href=&quot;https://www.ibm.com/support/knowledgecenter/SS8JB4/com.ibm.wbpm.ref.doc/ae/doc/JSAPI.html&quot;&gt;JavaScript API - BPMRESTRequest, tw.system.invokeREST&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a target=&quot;_blank&quot; rel=&quot;nofollow&quot; href=&quot;https://www.ibm.com/docs/SS8JB4/com.ibm.wbpm.ref.doc/topics/stdrest_reference.html&quot;&gt;Process REST API - task resource&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;</description>
<category>REST API</category>
<guid isPermaLink="true">https://bpm.tips/3127/how-to-use-bpm-rest-api-in-script-with-bpmrestrequest?show=3185#a3185</guid>
<pubDate>Sun, 06 Sep 2026 11:40:39 +0000</pubDate>
</item>
<item>
<title>Answered: Inside CSHS exposed as Dashboard, while click on close button, redirect to the Work Portal.</title>
<link>https://bpm.tips/849/inside-cshs-exposed-as-dashboard-while-click-on-close-button-redirect-to-the-work-portal?show=2547#a2547</link>
<description>If you are using any CSHS as a dashboard then why u create a button in that. and if button is required then u can change the end state mapping of a coach.</description>
<category>REST API</category>
<guid isPermaLink="true">https://bpm.tips/849/inside-cshs-exposed-as-dashboard-while-click-on-close-button-redirect-to-the-work-portal?show=2547#a2547</guid>
<pubDate>Mon, 20 May 2019 02:37:18 +0000</pubDate>
</item>
<item>
<title>Answered: how extract user details along with the groups using rest api in ibm bpm 8.5.6</title>
<link>https://bpm.tips/2454/how-extract-user-details-along-with-the-groups-using-rest-api-in-ibm-bpm-8-5-6?show=2455#a2455</link>
<description>&lt;p&gt;&lt;span style=&quot;color:#000000; font-family:Arial; font-size:12px&quot;&gt;/rest/bpm/wle/v1/users?includeTaskExperts=true&amp;amp;sort=true&amp;amp;includeInternalMemberships=true&amp;amp;refreshUser=false&amp;amp;parts=all&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color:#000000; font-family:Arial; font-size:12px&quot;&gt;should provide you that information&lt;/span&gt;&lt;/p&gt;</description>
<category>REST API</category>
<guid isPermaLink="true">https://bpm.tips/2454/how-extract-user-details-along-with-the-groups-using-rest-api-in-ibm-bpm-8-5-6?show=2455#a2455</guid>
<pubDate>Mon, 05 Nov 2018 19:42:08 +0000</pubDate>
</item>
<item>
<title>Answered: How can we find the bpdid for Intermendiate Message Events(IME) and Decision Gateways for moving tokens?</title>
<link>https://bpm.tips/914/how-can-we-find-the-bpdid-for-intermendiate-message-events-ime-and-decision-gateways-for-moving-tokens?show=996#a996</link>
<description>simple way is to open bpd in pd then you can see the id</description>
<category>REST API</category>
<guid isPermaLink="true">https://bpm.tips/914/how-can-we-find-the-bpdid-for-intermendiate-message-events-ime-and-decision-gateways-for-moving-tokens?show=996#a996</guid>
<pubDate>Sun, 17 Sep 2017 19:06:26 +0000</pubDate>
</item>
<item>
<title>Answered: How can we update Complex Variables for Tasks using REST API ?</title>
<link>https://bpm.tips/916/how-can-we-update-complex-variables-for-tasks-using-rest-api?show=989#a989</link>
<description>You can use the &amp;quot;Set Data&amp;quot; under Tasks REST API call</description>
<category>REST API</category>
<guid isPermaLink="true">https://bpm.tips/916/how-can-we-update-complex-variables-for-tasks-using-rest-api?show=989#a989</guid>
<pubDate>Sun, 17 Sep 2017 04:26:20 +0000</pubDate>
</item>
<item>
<title>Answered: How can we update Complex Variables for BPD Instances using REST API ?</title>
<link>https://bpm.tips/915/how-can-we-update-complex-variables-for-bpd-instances-using-rest-api?show=988#a988</link>
<description>You can use &amp;quot;current state&amp;quot; REST call with only data option checked to get the json format of the variables and then name the necessary changes to json and then update using &amp;quot;Update Instance Variables&amp;quot; REST API Call</description>
<category>REST API</category>
<guid isPermaLink="true">https://bpm.tips/915/how-can-we-update-complex-variables-for-bpd-instances-using-rest-api?show=988#a988</guid>
<pubDate>Sun, 17 Sep 2017 04:25:05 +0000</pubDate>
</item>
<item>
<title>Answered: Is it possible to use REST APIs in Coaches/Coach Views without need to login?</title>
<link>https://bpm.tips/917/is-it-possible-to-use-rest-apis-in-coaches-coach-views-without-need-to-login?show=987#a987</link>
<description>Yes you can do an ajax call if the rest apis are also on the same server (which most commonly they are) and the calls will be performed in the security context of the logged in user and there will not be a need to authenticate again.</description>
<category>REST API</category>
<guid isPermaLink="true">https://bpm.tips/917/is-it-possible-to-use-rest-apis-in-coaches-coach-views-without-need-to-login?show=987#a987</guid>
<pubDate>Sun, 17 Sep 2017 04:21:46 +0000</pubDate>
</item>
<item>
<title>Answered: Can we make REST API calls from server scripts or service ?</title>
<link>https://bpm.tips/259/can-we-make-rest-api-calls-from-server-scripts-or-service?show=277#a277</link>
<description>Technically possible from server scripts using live connect ,however it is tedious.From the services use HTTP connector to make server side REST API calls(available from SYSDATA toolkit).&lt;br /&gt;
&lt;br /&gt;
--Mahesh</description>
<category>REST API</category>
<guid isPermaLink="true">https://bpm.tips/259/can-we-make-rest-api-calls-from-server-scripts-or-service?show=277#a277</guid>
<pubDate>Sat, 21 May 2016 15:42:29 +0000</pubDate>
</item>
<item>
<title>Answered: How to create users using REST API?</title>
<link>https://bpm.tips/116/how-to-create-users-using-rest-api?show=256#a256</link>
<description>&lt;p&gt;You can use the method described at the following link, which uses WebSphere CLI to import the users&lt;/p&gt;&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;http://awesomedeveloper.blogspot.in/2013/03/creating-lot-of-users-on-websphere.html?cm_mc_uid=15200844713514633392557&amp;amp;cm_mc_sid_50200000=1463811754&quot;&gt;http://awesomedeveloper.blogspot.in/2013/03/creating-lot-of-users-on-websphere.html?cm_mc_uid=15200844713514633392557&amp;amp;cm_mc_sid_50200000=1463811754&lt;/a&gt;&lt;/p&gt;&lt;p&gt;We have built a WebSphere Virtual Member Manager based Java Toolkit which can be used to create users even in federated repositories, we will be releasing it soon for reference and community use.&lt;/p&gt;</description>
<category>REST API</category>
<guid isPermaLink="true">https://bpm.tips/116/how-to-create-users-using-rest-api?show=256#a256</guid>
<pubDate>Sat, 21 May 2016 03:04:17 +0000</pubDate>
</item>
</channel>
</rss>