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, this endpoint need the at least the OPERATOR role to be executed.
GET /aspire/_api/workflows
Pagination query string parameters
Sorting 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, this endpoint need the at least the OPERATOR role to be executed.
POST /aspire/_api/workflows/getAll
Pagination query string parameters
Response
{ "workflow": [{ "id": "AAABcID5GBc=", "description": "Publish to Elasticsearch", ... }, { "id": "AAABcIueWUc=", "description": "Normalise data", ... }] }
Status: 200
Get information about a single workflow in Aspire, this endpoint need the at least the OPERATOR role to be executed.
GET /aspire/_api/workflows/:id
Path Parameters
Name | Type | Required | Description |
---|---|---|---|
id | string | Required | The id of the workflow to return |
Query String Parameters
Name | Type | Required | Description |
---|---|---|---|
transform | boolean | Optional | Whether to transform the output. Default "false" |
section | string | Optional | The section required for the output. The value can be "templates", "rules", "events" |
Response
{ "workflow": { "id": "AAABcID5GBc=", "description": "Publish to Elasticsearch", ... } }
Status: 200, 404
Adds a single workflow to Aspire, this endpoint need the at least the ADMINISTRATOR role to be executed.
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, this endpoint need the at least the ADMINISTRATOR role to be executed.
PUT /aspire/_api/workflows/updateAll
Response
{ "message": "update result response message" }
Status: 200, 406
Delete multiple workflows from Aspire, filtered by a specified criteria, this endpoint need the at least the ADMINISTRATOR role to be executed.
POST /aspire/_api/workflows/deleteAll
Response
{ "message": "delete result response message" }
Status: 200, 404, 406
Delete one or more workflows from Aspire, this endpoint need the at least the ADMINISTRATOR role to be executed.
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, this endpoint need the at least the OPERATOR role to be executed.
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
Get a event from a workflow in Aspire, this endpoint need the at least the OPERATOR role to be executed.
GET /aspire/_api/workflows/:id
Path Parameters
Name | Type | Required | Description |
---|---|---|---|
id | string | Required | The identifier of the workflow(s) to return |
Response
{ "workflow": { "id": "72022651-c2f4-45a9-9e18-2b0ace529cda", "type": "connector", "description": "Test Workflow", "checksum": "2b8dc08a2da838304528b4695109e2379da9a670c5a195dcd27355e8daa20a8b", "events": { "event": [ { "id": "onScan" }, { "id": "onAddUpdate" }, { "id": "onDelete" }, { "id": "onPublish", "item": { "id": "404fefb7-b7f4-48cf-a7b1-81872587a85b", "type": "reference", "ruleId": "5d1273b8-9dc0-4f6d-89f3-fe6f331a6067", "enabled": true } }, { "id": "onError" }, { "id": "onIdentity" }, { "id": "onIdentityError" } ] } } }
Status: 200, 404, 406
Create one or more workflow events in Aspire, this endpoint need the at least the ADMINISTRATOR role to be executed.
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, this endpoint need the at least the ADMINISTRATOR role to be executed.
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, this endpoint need the at least the ADMINISTRATOR role to be executed.
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. The valid parents for reference items are the root node, items of the type condition or references which ruleId is for a rule of type "folder" |
orderId | integer | Required | The position (which in the children of the parent node) where this reference should be inserted. For example 0 means at the beginning, in the case of using a number greater than the current number of children within the parent node the item will be inserted at the end | |
ruleId | String | Required | The rule to be referenced, it must exist | |
enabled | boolean | Optional | Whether or not the item is enabled (default true) | |
condition | parentId | string | Required | The identifier of the node in to which the item should be inserted. The valid parents for condition items are references which ruleId is for a rule of type "choice". |
value | object | Required | The value to be compared against | |
conditionType | String | Required | The value type, possible types are "string", "boolean", "integer", "long", "double", "float" | |
enabled | boolean | Optional | Whether or not the item is enabled (default true) | |
template | String | Required | The condition template id. | |
exit | parentId | string | Optional | The identifier of the node in to which the item should be inserted. Defaults to the root node. The valid parents for exit items are the root node, items of the type condition or references which ruleId is for a rule of type "folder" |
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
Update a workflow event item from Aspire, this endpoint need the at least the ADMINISTRATOR role to be executed.
PUT /aspire/_api/workflows/:id/:eventId/:itemId
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 | Required | The identifier of the parent node of the item to update. The parent cannot be updated using this method, use the move event item method to change the parent. |
ruleId | String | Optional | The rule to be referenced, it must exist | |
enabled | boolean | Optional | Whether or not the item is enabled (default true) | |
condition | parentId | string | Required | The identifier of the parent node of the item to update. The parent cannot be updated using this method, use the move event item method to change the parent. |
value | object | Optional | The value to be compared against | |
type | String | Optional | The value type, possible types are "string", "boolean", "integer", "long", "double", "float" | |
enabled | boolean | Optional | Whether or not the item is enabled (default true) | |
template | String | Optional | The condition template id. | |
exit | parentId | string | Required | The identifier of the parent node of the item to update. The parent cannot be updated using this method, use the move event item method to change the parent. |
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 a workflow event item from Aspire, this endpoint need the at least the ADMINISTRATOR role to be executed.
DELETE /aspire/_api/workflows/:id/:eventId/:parentId/:itemId
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 |
itemId | integer | Required | The identifier of the item to delete |
Response
{ "message": "delete result response message" }
Status: 200, 404, 406
Move a workflow event item from Aspire, this endpoint need the at least the ADMINISTRATOR role to be executed.
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. For example 0 means at the beginning, in the case of using a number greater than the current number of children within the parent node the item will be inserted at the end. If no provided the item will be moved at the end of the children list of the new parent. |
Response
{ "message": "move result response message" }
Status: 200, 404, 406
Retrieve all workflow templates from Aspire, this endpoint need the at least the OPERATOR role to be executed.
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, this endpoint need the at least the OPERATOR role to be executed.
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, this endpoint need the at least the OPERATOR role to be executed.
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
Get workflow rules from Aspire, this endpoint need the at least the OPERATOR role to be executed.
GET /aspire/_api/workflows/:id/rules
Path Parameters
Name | Type | Required | Description |
---|---|---|---|
id | string | Required | The identifier of the workflow to return rules for |
Response
{ "workflow": { "id": "72022651-c2f4-45a9-9e18-2b0ace529cda", "type": "connector", "description": "Test Workflow", "checksum": "2b8dc08a2da838304528b4695109e2379da9a670c5a195dcd27355e8daa20a8b", "rules": { "5d1273b8-9dc0-4f6d-89f3-fe6f331a6067": { "appName": "Publish_To_File", "config": "com.accenture.aspire:app-publish-to-file", "type": "application", "description": "Publish to File", "properties": { "debug": "false", "logFileType": "true", "logFile": "${app.name}/publishToFile.jobs", "numJobs": 5 }, "id": "5d1273b8-9dc0-4f6d-89f3-fe6f331a6067" } } } }
Status: 200, 404, 406
Create a single workflow rule in Aspire, this endpoint need the at least the ADMINISTRATOR role to be executed.
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 | Parameter Name | Parameter Type | Required | Description |
---|---|---|---|---|
application | type | string | Required | The rule type, in the case of application the value must be "application" |
description | string | Required | The rule description. Any spaces will be replaced with "_" after creation | |
config | string | Required | The maven coordinates of the rule application | |
properties | object | Optional | A nested JSON object that contains any additional property required by the application. The properties will vary depending of the application. | |
enabled | boolean | Optional | Whether or not the rule is enabled (default true) | |
*appType | string | Optional | This field is only required if Aspire will be used with the UI. This field is used to associate the rule to the proper dxf from the resource manager | |
*_type | string | Optional | This field is only required if Aspire will be used with the UI. | |
template | type | string | Required | The rule type, in the case of rules based on templates, type must match the type of the template, for example if the template type is "choice" the rule type also must be "choice" |
template | string | Required | The id of the template to use for the rule | |
properties | object | Optional | A nested JSON object that contains any additional property required by the template. The properties will vary depending of the template. | |
enabled | boolean | Optional | Whether or not the rule is enabled (default true) | |
custom | type | string | Required | The rule type, in the case of custom rules the value must be "custom" |
description | string | Required | The rule description. Any spaces will be replaced with "_" after creation | |
script | string | Required | The custom groovy script to execute. |
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, this endpoint need the at least the ADMINISTRATOR role to be executed.
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, this endpoint need the at least the ADMINISTRATOR role to be executed.
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) |
ruleId | string | Required | The identifier of the rule to delete |
Response
{ "message": "delete result response message" }
Status: 200, 404, 406
Deletes a single workflow rule from Aspire, this endpoint need the at least the ADMINISTRATOR role to be executed.
DELETE /aspire/_api/workflows/:id/rules
Path Parameters
Name | Type | Required | Description |
---|---|---|---|
id | string | Required | The identifier of the workflow from which to delete rule(s) |
Query Parameters
Name | Type | Required | Description |
---|---|---|---|
id | string | Required | One or more rule ids to be deleted |
Response
{ "message": "delete result response message" }
Status: 200, 404, 406
Export one or more workflows from Aspire, this endpoint needs at least the OPERATOR role to be executed.
GET /aspire/_api/workflows/export
GET /aspire/_api/workflows/export/:id
POST /aspire/_api/workflows/exportAll
Every configuration item has the option to export from the UI, using the single menu or by the bulk actions:
Something important that you need to know is that when you export a config item that depends on another, the export will contain also all the dependencies.
Take into consideration that components with resources loaded into elastic, will be exported, but the resource itself will not, so you will need to reupload the resource and go and select your resource in the component again.
Path Parameters and Query parameters
Name | Type | Required | Description |
---|---|---|---|
id | string | Required | The identifier(s) of the workflow(s) to export |
Body Parameter
Name | Type | Required | Description |
---|---|---|---|
ids | string | Required | The identifier(s) of the workflow(s) to export |
Examples
GET /aspire/_api/workflows/export/AAABcID5GBc DELETE /aspire/_api/workflows/export?id=AAABcID5GBc&id=AAABcID5GBd POST /aspire/_api/workflows/export { "ids":["AAABcID5GBc","AAABcID5GBd"] }
Response
{ "export": { "workflows": { "workflow": [ { "id": "<workflow_id>", "type": "connector", "description": "myWorkflow", "templates": { "template": [ ... ] }, "events": { "event": [ ... ] }, "rules": { "rule": [ ... ] } } ] } } }
Status: 200, 404, 406
Export multiple connections from Aspire, filtered by a specified criteria, this endpoint needs at least the OPERATOR role to be executed.
POST /aspire/_api/connections/exportAll
Filters: The connection filter definition here
Response
{ "export": { "workflows": { "workflow": [ { "id": "<workflow_id>", "type": "connector", "description": "myWorkflow", "templates": { "template": [ ... ] }, "events": { "event": [ ... ] }, "rules": { "rule": [ ... ] } } ] } } }
Status: 200
Some endpoint queries require a filter. A filter is basically a JSON object with the following format:
Seed filter:
{ "filter" : { "ids" : ["ID1", "ID2", "ID3", ...], "type" : "TYPE", "description" : "DESCRIPTION", "deleteIncrementalPolicy": "deletePolicyId", "credentials" : "credentialId", "throttlePolicy" : "throttlePolicyId", "routingPolicies" : ["RP1", "RP2", "RP3", ...] } }