Page in development
This page is in development and as such, its contents may be incorrect
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/workflow
Query String Parameters
Name | Type | Required | Description |
---|---|---|---|
description | string | Optional | Filter workflows to only those whose description matches the given expression |
sparse | boolean | Optional | Only return minimal data such as identifier, description, name etc |
Response
{ "workflow": [{ "id": "AAABcID5GBc=", "description": "Publish to Elasticsearch", ... }, { "id": "AAABcIueWUc=", "description": "Normalise data", ... }], "message": "optional response message" }
Status
Response code | Description |
---|---|
200 | Success |
Get information about a single workflow in Aspire
GET /aspire/_api/workflow/: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", ... }, "message": "optional response message" }
Status
Response code | Description |
---|---|
200 | Success |
404 | The given workflow id was not found |
Adds a workflow to Aspire
POST /aspire/_api/workflow
Request 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. |
Examples
Add a single workflow
{ "description": "Publish to Elastic" }
Response
{ "workflow": [{ "id": "AAABcID5GBc=", "description": "Publish to Elastic", "type": "service" }], "message": "optional response message" }
Status
Response code | Description |
---|---|
201 | Created |
406 | Not acceptable - there was an issue validating the input |
Delete one or more workflow from Aspire.
DELETE /aspire/_api/workflows/:id
DELETE /aspire/_api/workflows
Path and Request Body Parameters
Name | Type | Required | Description |
---|---|---|---|
id | string | Required | The identifier(s) of the workflow(s) to delete |
Examples
Delete a single workflow
DELETE /aspire/_api/workflows/AAABcID5GBc=
Delete multiple workflows
DELETE /aspire/_api/workflows?id=AAABcID5GBc%3D&id=AAABcIueWUc%3D
Response
{ "message": "optional response message" }
Status
Response code | Description |
---|---|
200 | Success |
404 | Not found - a given workflow identifier was not found |
406 | Not acceptable - there was an issue validating the input |
Get a event from a workflow in Aspire.
GET /aspire/_api/workflow/: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": "addUpdate" } } "message": "optional response message" }
Status
Response code | Description |
---|---|
200 | Success |
404 | Not found - a given workflow identifier was not found |
406 | Not acceptable - there was an issue validating the input |
Create one or more workflow events in Aspire.
PUT /aspire/_api/workflow/:id
PUT /aspire/_api/workflow/: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 a single event
{ "id": "scan" }
Create multiple events
[{ "id": "scan" }, { "id": "addUpdate" }]
Create multiple events (alternative version)
{ "id": ["scan", "addUpdate"] }
Response
{ "workflow": { "id": "AAABcIueWUc=", "description": "Publish to Elasticsearch" "event": { "id": ["scan", "addUpdate"] } } "message": "optional response message" }
Status
Response code | Description |
---|---|
200 | Success |
404 | Not found - a given workflow identifier was not found |
406 | Not acceptable - there was an issue validating the input |
Delete a workflow event from Aspire.
DELETE /aspire/_api/workflow/:id/:eventId
Path and Request Body 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": "optional response message" }
Status
Response code | Description |
---|---|
200 | Success |
404 | Not found - a given workflow identifier was not found |
406 | Not acceptable - there was an issue validating the input |
Create a workflow event item - a rule, condition and the like.
POST /aspire/_api/workflow/: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 |
Request 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=", ... } } } "message": "optional response message" }
Status
Response code | Description |
---|---|
200 | Success |
404 | Not found - a given workflow identifier was not found |
406 | Not acceptable - there was an issue validating the input |
Delete one or more services from Aspire.
PUT /aspire/_api/workflow/: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 |
Request 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=", ... } } } "message": "optional response message" }
Status
Response code | Description |
---|---|
200 | Success |
404 | Not found - a given workflow identifier was not found |
406 | Not acceptable - there was an issue validating the input |
Delete one or more services from Aspire.
DELETE /aspire/_api/workflow/:id/:eventId/: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 |
orderId | integer | Required | The order identifier of the item to delete |
Response
{ "message": "optional response message" }
Status
Response code | Description |
---|---|
200 | Success |
404 | Not found - a given workflow identifier was not found |
406 | Not acceptable - there was an issue validating the input |
Delete one or more services from Aspire.
PUT/aspire/_api/workflow/: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 |
Response
{ "message": "optional response message" }
Status
Response code | Description |
---|---|
200 | Success |
404 | Not found - a given workflow identifier was not found |
406 | Not acceptable - there was an issue validating the input |
Retrieve all workflow templates from Aspire.
GET /aspire/_api/workflows/:id/template
Path and Query String Parameters
Name | Type | Required | Description |
---|---|---|---|
id | string | Required | The identifier of the workflow to get the templates for |
description | string | Optional | Filter workflows to only those whose description matches the given expression |
Response
{ "template": [{ "id": "AAABcQwrWUc", ... }] "message": "optional response message" }
Status
Response code | Description |
---|---|
200 | Success |
404 | Not found - a given workflow identifier was not found |
406 | Not acceptable - there was an issue validating the input |
Retrieve a workflow templates from Aspire.
GET /aspire/_api/workflow/: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", ... }] "message": "optional response message" }
Status
Response code | Description |
---|---|
200 | Success |
404 | Not found - a given workflow identifier was not found |
406 | Not acceptable - there was an issue validating the input |
Get all the rules for a given workflow.
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": "AAABcIueWUc=", "description": "Publish to Elasticsearch" "event": { "id": "addUpdate", "rule": [{ "id": "ddSWeq123", "description": "Some rule", "type": "application", ... }, { "id": "ddSWeq124", "description": "Some rule", "type": "groovy", ... }] } } "message": "optional response message" }
Status
Response code | Description |
---|---|
200 | Success |
404 | Not found - a given workflow identifier was not found |
406 | Not acceptable - there was an issue validating the input |
Get one or more workflow rule from Aspire.
GET /aspire/_api/workflow/: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" "event": { "id": "onAddUpdate", "rule": { "id": "ddSWeq123", "description": "Some rule", "type": "application", ... } } } "message": "optional response message" }
Status
Response code | Description |
---|---|
200 | Success |
404 | Not found - a given workflow identifier was not found |
406 | Not acceptable - there was an issue validating the input |
Delete one or more services from Aspire.
POST /aspire/_api/workflow/:id/rule
Path Parameters
Name | Type | Required | Description |
---|---|---|---|
id | string | Required | The identifier of the workflow to create a rule for |
Request Body Parameters
The request body parameters will differ depending on the type of rule created. Some examples are shown below
Rule Type | Parameter Name | Parameter Type | Required | Description |
---|---|---|---|---|
groovy | <TODO> | |||
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 | Required | 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": "ddSWeq123", "description": "Some rule", "type": "application", ... } } } "message": "optional response message" }
Status
Response code | Description |
---|---|
200 | Success |
404 | Not found - a given workflow identifier was not found |
406 | Not acceptable - there was an issue validating the input |
Delete one or more services from Aspire.
PUT /aspire/_api/workflow/: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 |
Request 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" "event": { "id": "onAddUpdate", "rule": { "id": "ddSWeq123", "description": "Some rule", "type": "application", ... } } } "message": "optional response message" }
Status
Response code | Description |
---|---|
200 | Success |
404 | Not found - a given workflow identifier was not found |
406 | Not acceptable - there was an issue validating the input |
Delete one or more workflows from Aspire.
DELETE /aspire/_api/workflows/:id/rule
DELETE /aspire/_api/workflows/:id/rule/:ruleId
Path and Request Body 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 |
Examples
Delete multiple workflows
DELETE /aspire/_api/workflows/AAABcID5GBc%3D/rule?ruleId=AAABcID5GBc%3D&ruleId=AAABcIueWUc%3D
Response
{ "message": "optional response message" }
Status
Response code | Description |
---|---|
200 | Success |
404 | Not found - a given workflow identifier was not found |
406 | Not acceptable - there was an issue validating the input |
Duplicates a workflow rule.
POST /aspire/_api/workflow/:id/rule/:ruleId
Path Parameters
Name | Type | Required | Description |
---|---|---|---|
id | string | Required | The identifier of the workflow to use |
ruleId | string | Required | The identifier of the rule to copy |
Response
{ "workflow": { "id": "AAABcIueWUc=", "description": "Publish to Elasticsearch" "event": { "id": "onAddUpdate", "rule": { "id": "ddSWeq123", "description": "Some rule", "type": "application", ... } } } "message": "optional response message" }
Status
Response code | Description |
---|---|
200 | Success |
404 | Not found - a given workflow identifier was not found |
406 | Not acceptable - there was an issue validating the input |