The workflow API provides functionality that allows a administrator to perform actions such as adding and configuring workflow
Lists all the workflows configured in the Aspire
GET /aspire/_api/workflows
Pagination query string parameters
Query String Parameters
Name | Type | Required | Description |
---|---|---|---|
sparse | boolean | Optional | Only return minimal data such as identifier, description, name etc |
Lists workflows configured in the Aspire, filtered by a specified criteria
Response
{ "workflow": [{ "id": "AAABcID5GBc=", "description": "Publish to Elasticsearch", ... }, { "id": "AAABcIueWUc=", "description": "Normalise data", ... }] }
Status: 200
Get information about a single workflow in Aspire
GET /aspire/_api/workflows/:id
Path Parameters
Name | Type | Required | Description |
---|---|---|---|
id | string | Required | The id of the workflow to return |
Response
{ "workflow": { "id": "AAABcID5GBc=", "description": "Publish to Elasticsearch", ... } }
Status: 200, 404
Adds a single workflow to Aspire
POST /aspire/_api/workflows
Body Parameters
Name | Type | Required | Description |
---|---|---|---|
description | string | Required | A description of the workflow |
Query String Parameters
Name | Type | Required | Description |
---|---|---|---|
type | string | Required | Accepted values are: "connector" and "service" If connector is set the workflow created with the following events will be created:
If service is set the workflow will be created without events. |
Example
POST /aspire/_api/workflows?type=connector { "description": "Publish to Elastic" }
Response
{ "workflow": { "id": "AAABcID5GBc=", "description": "Publish to Elastic", "type": "connector" .... } }
Status: 200, 406
Update connectors configured in the Aspire, filtered by a specified criteria
POST /aspire/_api/workflows/updateAll
Response
{ "message": "update result response message" }
Status: 200, 406
Delete multiple workflows from Aspire, filtered by a specified criteria
POST /aspire/_api/workflows/deleteAll
Response
{ "message": "delete result response message" }
Status: 200, 404, 406
Delete one or more workflows from Aspire.
DELETE /aspire/_api/workflows/:id
DELETE /aspire/_api/workflows
POST /aspire/_api/workflows/delete
Path Parameters and Query parameters
Name | Type | Required | Description |
---|---|---|---|
id | string | Required | The identifier(s) of the workflow(s) to delete |
Body Parameter
Name | Type | Required | Description |
---|---|---|---|
ids | string | Required | The identifier(s) of the workflow(s) to delete |
Examples
DELETE /aspire/_api/workflows/AAABcID5GBc DELETE /aspire/_api/workflows?id=AAABcID5GBc&id=AAABcID5GBd POST /aspire/_api/workflows/delete { "ids":["AAABcID5GBc","AAABcID5GBd"] }
Response
{ "message": "delete result response message" }
Status: 200, 404, 406
Get a event from a workflow in Aspire.
GET /aspire/_api/workflows/:id/:eventId
Path Parameters
Name | Type | Required | Description |
---|---|---|---|
id | string | Required | The identifier of the workflow(s) to return |
eventId | string | Required | The identifier of the event to get |
Response
{ "workflow": { "id": "AAABcIueWUc=", "description": "Publish to Elasticsearch" "event": { "id": "onUpdate" .... } } }
Status: 200, 404, 406
Create one or more workflow events in Aspire.
PUT /aspire/_api/workflows/:id
PUT /aspire/_api/workflows/:id/:eventId
Path Parameters
Name | Type | Required | Description |
---|---|---|---|
id | string | Required | The identifier of the workflow(s) to add a event to |
eventId | string | Required | The identifier of the event to add |
Examples
Create multiple events (body parameter)
[{ "id": "scan" }, { "id": "addUpdate" }]
Response
{ "workflow": { "id": "AAABcIueWUc=", "description": "Publish to Elasticsearch" "event": { "id": ["scan", "addUpdate"] } } }
Status: 200, 404, 406
Delete a workflow event from Aspire.
DELETE /aspire/_api/workflows/:id/:eventId
Path Parameters
Name | Type | Required | Description |
---|---|---|---|
id | string | Required | The identifier of the workflow(s) to use |
eventId | string | Required | The identifier of the event to delete |
Response
{ "message": "delete result response message" }
Status: 200, 404, 406
Create a workflow event item - a rule, condition and the like.
POST /aspire/_api/workflows/:id/:eventId/:type
Path Parameters
Name | Type | Required | Description |
---|---|---|---|
id | string | Required | The identifier of the workflow(s) to return |
eventId | string | Required | The identifier of the event to get |
type | string | Required | The type of the item to create |
Body Parameters
The request body parameters will differ depending on the type of item created. Some examples are shown below
Item Type | Parameter Name | Parameter Type | Required | Description |
---|---|---|---|---|
Reference | parentId | string | Optional | The identifier of the node in to which the item should be inserted. Defaults to the root node |
orderId | integer | Required | The position (which in the children of the parent node) where this reference should be inserted | |
ruleId | String | Required | The rule to be referenced | |
enabled | boolean | Optional | Whether or not the item is enabled (default true) | |
Condition | parentId | string | Optional | The identifier of the node in to which the item should be inserted. Defaults to the root node |
value | object | Required | The value to be compared against | |
enabled | boolean | Optional | Whether or not the item is enabled (default true) | |
Exit | parentId | string | Optional | The identifier of the node in to which the item should be inserted. Defaults to the root node |
orderId | integer | Required | The position (which in the children of the parent node) where this reference should be inserted | |
enabled | boolean | Optional | Whether or not the item is enabled (default true) |
Response
{ "workflow": { "id": "AAABcIueWUc=", "description": "Publish to Elasticsearch" "event": { "id": "onAddUpdate", "rule": { "id": "AAABcQwxWUc=", ... } } } }
Status: 200, 404, 406
Delete one or more services from Aspire.
PUT /aspire/_api/workflows/:id/:eventId/:orderId
Path Parameters
Name | Type | Required | Description |
---|---|---|---|
id | string | Required | The identifier of the workflow(s) to use |
eventId | string | Required | The identifier of the event to use |
orderId | integer | Required | The order identifier of the item to update |
Body Parameters
The request body parameters will differ depending on the type of item created. See Create a workflow event item above
Response
{ "workflow": { "id": "AAABcIueWUc=", "description": "Publish to Elasticsearch" "event": { "id": "onAddUpdate", "rule": { "id": "AAABcQwxWUc=", ... } } } }
Status: 200, 404, 406
DELETE /aspire/_api/workflows/:id/:eventId/:parentId/:orderId
Path Parameters
Name | Type | Required | Description |
---|---|---|---|
id | string | Required | The identifier of the workflow to use |
eventId | string | Required | The identifier of the event to use |
parentId | string | Required | The identifier of the node with the item to be deleted |
orderId | integer | Required | The order identifier of the item to delete |
Response
{ "message": "delete result response message" }
Status: 200, 404, 406
Delete one or more services from Aspire.
PUT/aspire/_api/workflows/:id/move/:eventId
Path Parameters
Name | Type | Required | Description |
---|---|---|---|
id | string | Required | The identifier of the workflow to use |
eventId | string | Required | The identifier of the event to use |
Body Parameters
Name | Type | Required | Description |
---|---|---|---|
src | string | Required | The identifier of the event item to move |
dest | string | Required | The identifier of the new parent for the moved item |
orderId | integer | Optional | The position (which in the children of the parent node) where this item should be inserted |
Response
{ "message": "move result response message" }
Status: 200, 404, 406
Retrieve all workflow templates from Aspire.
GET /aspire/_api/workflows/:id/templates
Path Parameters
Name | Type | Required | Description |
---|---|---|---|
id | string | Required | The identifier of the workflow to get the templates for |
Response
{ "template": [{ "id": "AAABcQwrWUc", ... }, "id": "AAABcQwrWUd", ... }] }
Status: 200, 404, 406
Retrieve a single workflow templates from Aspire.
GET /aspire/_api/workflows/:id/template/:templateId
Path Parameters
Name | Type | Required | Description |
---|---|---|---|
id | string | Required | The identifier of the workflow to get the templates for |
templateId | string | Required | The identifier of the template to get |
Response
{ "template": [{ "id": "AAABcQwrWUc", ... }] }
Status: 200, 404, 406
Get a single workflow rule from Aspire.
GET /aspire/_api/workflows/:id/rule/:ruleId
Path Parameters
Name | Type | Required | Description |
---|---|---|---|
id | string | Required | The identifier of the workflow to return rules for |
ruleId | string | Required | The identifier of the rule to get |
Response
{ "workflow": { "id": "AAABcIueWUc=", "description": "Publish to Elasticsearch" "rule": { "id": "ddSWeq123", "description": "Some rule", "type": "application", ... } } }
Status: 200, 404, 406
Create a single workflow rule in Aspire.
POST /aspire/_api/workflows/:id/rules
Path Parameters
Name | Type | Required | Description |
---|---|---|---|
id | string | Required | The identifier of the workflow to create a rule for |
Body Parameters
The request body parameters will differ depending on the type of rule created.
Rule Type |
---|
groovy |
application |
Optionally you may opt to add the created rule to a workflow event by adding the following query parameters
Parameter Name | Parameter Type | Required | Description |
---|---|---|---|
parentId | string | Optional | The identifier of the node in to which the item should be inserted. Defaults to the root node |
orderId | integer | Optional | The position (which in the children of the parent node) where this reference should be inserted |
Response when parentId used
{ "workflow": { "id": "AAABcIueWUc=", "description": "Publish to Elasticsearch" "event": { "id": "onAddUpdate", "rule": { "id": "ddSWeq123", "description": "Some rule", "type": "application", ... } } } }
Response without parentId
{ "workflow": { "id": "AAABcIueWUc=", "description": "Publish to Elasticsearch" "rule": { "id": "ddSWeq123", "description": "Some rule", "type": "application", ... } } }
Status: 200, 404, 406
Updatee a single workflow rule in Aspire.
PUT /aspire/_api/workflows/:id/rule/:ruleId
Path Parameters
Name | Type | Required | Description |
---|---|---|---|
id | string | Required | The identifier of the workflow to update a rule for |
ruleId | string | Required | The identifier of the rule to update |
Body Parameters
The request body parameters will differ depending on the type of rule created. See Create a workflow rule above
Response
{ "workflow": { "id": "AAABcIueWUc=", "description": "Publish to Elasticsearch" "rule": { "id": "ddSWeq123", "description": "Some rule", "type": "application", ... } } }
Status: 200, 404, 406
Deletes a single workflow rule from Aspire.
DELETE /aspire/_api/workflows/:id/rule/:ruleId
Path Parameters
Name | Type | Required | Description |
---|---|---|---|
id | string | Required | The identifier of the workflow from which to delete rule(s) or the identifier of the rule to delete when used in the body |
ruleId | string | Required | The identifier of the rule to delete |
Response
{ "message": "delete result response message" }
Status: 200, 404, 406
Lists all available workflow item types
GET /aspire/_api/workflows/itemType
Response
{ type: [ "application", "publisher", "function"] }
Status: 200
Returns a workflow item by its type
GET /aspire/_api/workflows/itemType/:id
Path Parameters
Name | Type | Required | Description |
---|---|---|---|
id | string | Required | The identifier of the workflow item type |
Example
/aspire/_aspire/workflows/types/applications
Response
{ items: [{ "id": "AAABcID5GBc=" "type": "application", "description": "Application_1", "coordinates": "com.accenture.aspire:aspire-example-app" }, { "id": "AAABcID5GBd=" "type": "application", "display": "Application_2", "coordinates": "com.accenture.aspire:aspire-example-app" }] }
Status: 200
Returns the dxf for a specific workflow item type
GET /aspire/_api/workflows/itemType/:itemTypeId/dxf
Response
{ "dxf": {...} "message": "optional response message" }
Status: 200, 404