Service API Queue

General queue providing functionality of the REST Service API.

Queue ID

Format

Active MQ Name

serviceapi

XML

P360_SERVICE_API

Fully supported are following endpoints:

Message Header

Please see the Message Queue API for details on generic headers. This table will only list additional ones specific for this queue.

Header name

Stored in

Values

Default

Purpose

P360Url

JMS Property

<String>

The url path addressing a REST endpoint of the Service API.
Example: rest/V1.0/list/Article/byCatalog?catalog=MASTER

Method

JMS Property

POST/PUT/GET/DELETE

POST

The REST method for a given endpoint.

CallbackTargetService

JMS Property

<String>

same as SuccessTargetService

The target consumer service within the target workflow for scheduled callback responses

EnforceIntermediateOkResponse

JMS Property

true/false

false

Enforces an intermediate ok response message for scheduled endpoints like merge, export, import jobs

Error Response

The error responses will be enveloped in an errorObject tag with an errorMessage text child tag. The response can be plain text or html encoded into xml depending on the error and endpoint.

The response will include a Status header property which will represent a status code.

Header name

Value

Description

Status

200/400/401/500

Response status code

200 = OK

400 = BAD REQUEST

401 = UNAUTHORIZED

500 = INTERNAL SERVER ERROR

Example
<errorObject>
<errorMessage>&lt;html&gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/&gt;
&lt;title&gt;Error 415 Unsupported Media Type&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h2&gt;HTTP ERROR: 415&lt;/h2&gt;
&lt;p&gt;Problem accessing /rest/V1.0/list/Article/byCatalog. Reason:
&lt;pre&gt; Unsupported Media Type&lt;/pre&gt;&lt;/p&gt;
&lt;hr /&gt;&lt;i&gt;&lt;small&gt;Powered by Jetty://&lt;/small&gt;&lt;/i&gt;
&lt;/body&gt;
&lt;/html&gt;
</errorMessage>
</errorObject>

Fully Supported APIs

Start Workflow Request

Message Header

Header name

Stored in

Value

P360Url

JMS Property

rest/V2.0/manage/workflow

Method

JMS Property

POST

Message Body

Example 1
<workflow>
<identifier>Workflow1</identifier>
<label>Workflow1</label>
<version>1.0</version>
<status>
<status>workflowStatus01</status>
<workflowTask>
<container>
<id>1</id>
<entityId>MASTER</entityId>
</container>
<entity>Article</entity>
<workflowCommunicationMode>QUEUE</workflowCommunicationMode>
<workflowServiceEndpoint>Workflow01FinishStatus01Service</workflowServiceEndpoint>
<workflowQueueId>P360_BPM</workflowQueueId>
<userGroup>Allmighty</userGroup>
</workflowTask>
</status>
<status>
<status>workflowStatus02</status>
<workflowTask>
<container>
<id>1</id>
<entityId>MASTER</entityId>
</container>
<entity>Article</entity>
<workflowCommunicationMode>QUEUE</workflowCommunicationMode>
<workflowServiceEndpoint>Workflow01FinishStatus02Service</workflowServiceEndpoint>
<workflowQueueId>P360_BPM</workflowQueueId>
<userGroup>Allmighty</userGroup>
</workflowTask>
</status>
</workflow>
Example 2
<workflow>
<identifier>{ $workflowName }</identifier>
<label>Items with wrong manufacturer</label>
<version>1.0</version>
<status>
<status>DQ_FAILED</status>
<workflowTask>
<container>
<id>'{ $catalogName }'</id>
</container>
<entity>{ $entityType }</entity>
<workflowCommunicationMode>QUEUE</workflowCommunicationMode>
<workflowServiceEndpoint>Scenario1-FinishManufacturerItem</workflowServiceEndpoint>
<workflowQueueId>bpm</workflowQueueId>
<userGroup>InfaUser</userGroup>
</workflowTask>
</status>
</workflow>

Response Body

Example
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<resultSummary>
<createdCounter>0</createdCounter>
<updatedCounter>1</updatedCounter>
<failedCounter>0</failedCounter>
</resultSummary>

End Workflow Request

Message Header

Header name

Stored in

Value

P360Url

JMS Property

rest/V2.0/manage/workflow/process?processId={processId}"

Method

JMS Property

DELETE

Message Body

  • No message body

Response Body

  • No response

Process Status Enter

Message Header

Header name

Stored in

Value

P360Url

JMS Property

rest/V2.0/manage/workflow/status/enter

Method

JMS Property

POST

Message Body

Example
<enterWorkflowStatus>
<processId>1234</processId>
<workflowId>Workflow1</workflowId>
<status>workflowStatus01</status>
<entity>Article</entity>
<itemId>1@1</itemId>
</enterWorkflowStatus>

Response Body

Example
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<statusModificationInfoEnter>
<successful>true</successful>
<canNotFindItem>false</canNotFindItem>
<canNotFindWorkflowId>false</canNotFindWorkflowId>
<workflowTaskNotFound>false</workflowTaskNotFound>
</statusModificationInfoEnter>

Process Status Leave

Message Header

Header name

Stored in

Value

P360Url

JMS Property

rest/V2.0/manage/workflow/status/leave

Method

JMS Property

POST

Message Body

Example
<enterWorkflowStatus>
<processId>1234</processId>
<workflowId>Workflow1</workflowId>
<status>workflowStatus01</status>
<entity>Article</entity>
<itemId>1@1</itemId>
</enterWorkflowStatus>

Response Body

Example
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<statusModificationInfoLeave>
<successful>true</successful>
<canNotFindItem>false</canNotFindItem>
<canNotFindWorkflowId>false</canNotFindWorkflowId>
<isMissingEnterState>false</isMissingEnterState>
</statusModificationInfoLeave>

List Read API

For details on URL parameters and response schema, please see REST List API Read.

Message Header

Header name

Stored in

Value

P360Url

JMS Property

rest/V2.0/list/Article/byCatalog?catalog=MASTER

Method

JMS Property

GET

Message Body

  • No message body

Response Body

Example
<entityItemTable>
<cacheId>no-cache</cacheId>
<entityIdentifier>Article</entityIdentifier>
<totalSize>2</totalSize>
<startIndex>0</startIndex>
<pageSize>100</pageSize>
<rowCount>2</rowCount>
<columnCount>0</columnCount>
<columns/>
<rows>
<row>
<object>
<id>1@1</id>
<entityId>1000</entityId>
</object>
<values/>
</row>
<row>
<object>
<id>2@1</id>
<entityId>1000</entityId>
</object>
<values/>
</row>
</rows>
</entityItemTable>

List Write API

For details about URL parameters and message body schema please see REST List API Write

Message Header

Header name

Stored in

Value

P360Url

JMS Property

rest/V2.0/list/Article

Method

JMS Property

POST

Message Body

Example
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<entityItemTable>
<entityIdentifier>Article</entityIdentifier>
<columns>
<column>
<identifier>Article.CurrentStatus</identifier>
</column>
</columns>
<rows>
<row>
<object>
<id>1@1</id>
<label>Article_1572531185727002</label>
<entityId>1000</entityId>
</object>
<values>
<value>01 New</value>
</values>
</row>
</rows>
</entityItemTable>

Response Body

Example
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<writeProtocol>
<counters>
<errors>0</errors>
<warnings>0</warnings>
<createdObjects>0</createdObjects>
<updatedObjects>1</updatedObjects>
<objectsWithErrors>0</objectsWithErrors>
<objectsWithWarnings>0</objectsWithWarnings>
</counters>
<entries/>
<objects>
<entry>
<row>0</row>
<object>
<id>1@1</id>
<label>Article_1572531185727002</label>
<entityId>1000</entityId>
</object>
<status>
<entry>UPDATED</entry>
</status>
</entry>
</objects>
</writeProtocol>

Create Task

Message Header

Header name

Stored in

Value

P360Url

JMS Property

rest/V2.0/manage/task

Method

JMS Property

POST

Message Body

Example
<taskCreationProfile>
<task>
<name>Verify all tools</name>
<taskType>SingleTask</taskType>
<entity>Product2G</entity>
<user>Administrator</user>
<workflowCommunicationMode>QUEUE</workflowCommunicationMode>
<workflowQueueId>P360_BPM</workflowQueueId>
<workflowCorrelationId>123</workflowCorrelationId>
</task>
<content>
<identifier>byItems</identifier>
<parameters>
<entry>
<key>items</key>
<value>1@1</value>
</entry>
</parameters>
</content>
</taskCreationProfile>

Response Body

Example
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<entityItemReference>
<id>10024</id>
</entityItemReference>

Scheduling APIs like Merge, Export, Import, DataQuality, Revision

Several Service API endpoints do support asynchronous workflow callbacks.

Endpoints:

For those endpoints there is a special response behavior in place. Those endpoints do not respond immediately with a "job planned" response by default, instead the response message is fired when the job is finished and the callback is applied.

If an immediate response message is needed, its possible to specify two headers:

Header name

Stored in

Value

Default

EnforceIntermediateOkResponse

JMS Property

true

false

CallbackTargetService

JMS Property

[workflow endpoint]

same as SuccessTargetService

If those headers are specified, it is possible to control the response endpoints for success, failure and callback responses independently.

Also the query parameters like workflowServiceEndpoint, workflowCorrelationId, workflowQueueId are resolved automatically by the respective JMS message properties and must not be provided in the url.