Warning | ||
---|---|---|
| ||
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
Table of Contents |
---|
Section | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
List Get all workflowsLists all the workflows configured in the Aspire
Query String Parameters Name
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
Response
Status
|
Section | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Geta single workflowall workflows, filteredLists workflows configured in the Aspire, filtered by a specified criteriaGet information about a single workflow in Aspire
Path Query String Parameters
Response
Status | ||||||||||||||||||||||||||||||||||||
Response code | Description | |||||||||||||||||||||||||||||||||||
200 | Success | |||||||||||||||||||||||||||||||||||
404 | The given workflow id was not found | |||||||||||||||||||||||||||||||||||
Section | ||||||||||||||||||||||||||||||||||||
Add a workflowAdds a workflow to Aspire
Request Body Parameters
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. |
Filters retrieved connectors. Check the filter definition here |
Response
Code Block | ||
---|---|---|
| ||
{
"workflow": [{
"id": "AAABcID5GBc=",
|
Examples
Add a single workflow: /aspire/_api/workflow
?type=connector
Code Block | ||
---|---|---|
| ||
{ "description": "Publish to ElasticElasticsearch" } |
Response
Code Block | ||
---|---|---|
| ||
{ "workflow":, ... }, { "id": "AAABcID5GBcAAABcIueWUc=", "description": "PublishNormalise to Elasticdata", "type": "connector" .... }] } |
Status
Response code | Description |
---|---|
201200 | Created |
406 | Not acceptable - there was an issue validating the input |
Success |
Section | |||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Get a single workflowGet information about a single workflow in Aspire | |||||||||||||||||||||||||||||||||||||||||
Section | |||||||||||||||||||||||||||||||||||||||||
Delete workflow(s)Delete one or more workflow from Aspire.
Path and Query String Parameters
ExamplesResponse Delete a single workflow
Delete multiple workflows
Response
Status
| |||||||||||||||||||||||||||||||||||||||||
Section |
Section | |||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Add single workflowAdds a single workflow to Aspire Get a workflow eventGet a event from a workflow in Aspire.
Body Path Parameters
Query String Parameters
Response
Example
Response
Status
|
Section | |||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Delete multiple workflows, filteredDelete multiple workflows from Aspire, filtered by a specified criteria Create workflow event(s)Create one or more workflow events in Aspire.
Body Path Parameters
Examples Create a single event Create multiple events (body parameter)
Response
Create multiple events (alternative version) Response
See Response Body for details regrading the response body returned where multiple items are affected with some (or all) returning errors Status
|
Section | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Delete single workflowDelete a single workflow from Aspire.
Path Parameters
Example
Response
Status
|
Section | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Delete Get a workflow eventDelete Get a workflow event from a workflow in Aspire.
Path and Request Body Parameters
Response
Status
Status
|
Section | ||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Createaworkflow eventitem(s)Create a workflow event item - a rule, condition and the likeone or more workflow events in Aspire.
Path Parameters
Request Body Parameters The request body parameters will differ depending on the type of item created. Some examples are shown below
Examples Create a single event Create multiple events (body parameter)
Create multiple events (alternative version) Response
Status
|
Section | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Delete a workflow eventDelete a workflow event from Aspire.
Path Parameters
Response | |||||||||||||||||||
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) |
Code Block | ||
---|---|---|
| ||
{ "workflowmessage": { "optional response "id": "AAABcIueWUc=", "description": "Publish to Elasticsearch" "event": { "id": "onAddUpdate", "rule": { "id": "AAABcQwxWUc=", ... } } } } |
Status
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 |
Section | |||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Create a workflow event itemCreate a workflow event item - a rule, condition and the like.
Path Parameters
Body Parameters The request body parameters will differ depending on the type of item created. Some examples are shown below
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
Section | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Update a workflow event itemDelete one or more services from Aspire.
Path Parameters
Request Body Parameters The request body parameters will differ depending on the type of item created. See Create a workflow event item above Response
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 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
Section | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Response
Delete a workflow event item
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 |
Code Block | ||
---|---|---|
| ||
{
"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 |
Section | |||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Move Update a workflow event itemDelete one or more services from Aspire.
Path Parameters
Body Parameters
Response
Body Parameters The request body parameters will differ depending on the type of item created. See Create a workflow event item above Response
Status
|
Section | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Delete single workflow event item
Path Parameters
Response
Status
|
Section | ||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Move a workflow event itemDelete one or more services from Aspire.
Path Parameters
Body Parameters
Response
Status
|
Section | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Get workflow templatesRetrieve all workflow templates from Aspire.
Path Parameters
Query String Parameters
Response
Status
|
Section | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Get all workflow templates, filteredLists workflow templates configured in the Aspire, filtered by a specified criteria
Query String Parameters
Body Parameters
Response
Status
|
Section | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Get single workflow templateRetrieve a single workflow templates from Aspire.
Path Parameters
Response
Status
|
Section | |||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Get single workflow ruleGet a single workflow rule from Aspire.
Path Parameters
Response
Status
| |||||||||||||||||||||||||||||||||||||
Section | |||||||||||||||||||||||||||||||||||||
|
Section | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Create a workflow ruleCreate a single workflow rule in Aspire.
Path Parameters
Body Parameters The request body parameters will differ depending on the type of rule created. Some examples are shown below
Optionally you may opt to add the created rule to a workflow event by adding the following query parameters
Get workflow templatesRetrieve all workflow templates from Aspire.
Path and Query String Parameters
Response
Response when parentId used
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 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Section | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Response without parentId
Get a workflow templateRetrieve a workflow templates from Aspire.
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 |
Code Block | ||
---|---|---|
| ||
{ "template": [{ "id": "AAABcQwrWUcddSWeq123", ..."description": "Some rule", }] "messagetype": "optional response message"application", ... } } } |
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 |
Section | |||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Get a Update single workflow ruleGet one or more Updatee a single workflow rule from in Aspire.
Path Parameters
Response Body Parameters The request body parameters will differ depending on the type of rule created. See Create a workflow rule above Response
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 |
"Publish to Elasticsearch"
"rule": {
"id": "ddSWeq123",
"description": "Some rule",
"type": "application",
...
}
}
}
|
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 |
Section | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Delete single workflow ruleDeletes a single workflow rule from Aspire.
Path Parameters
Response
Status
|
Section | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Get workflow item typesLists all available workflow item types
Response
| ||||||||||||
Section | ||||||||||||
Create a workflow ruleDelete one or more services from Aspire.
Path Parameters | ||||||||||||
Name | Type | Required | Description | |||||||||
id | string | Required | The identifier of the workflow to create a rule for | |||||||||
Rule Type | Parameter Name | Parameter Type | Required | Description | groovy | <TODO> | application | |||||
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 |
Code Block | ||
---|---|---|
| ||
{
"workflow": {
"id": "AAABcIueWUc=",
"description": "Publish to Elasticsearch"
"event": {
"id": "onAddUpdate",
"rule": {
"id": "ddSWeq123",
"description": "Some rule",
"type": "application",
...
}
}
}
} |
Response without parentId
Code Block | ||
---|---|---|
| ||
{
"workflow": {
"id": "AAABcIueWUc=",
"description": "Publish to Elasticsearch"
"rule": {
"id": "ddSWeq123",
"description": "Some rule",
"type": "application",
...
}
}
} |
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 |
Section | ||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Get specific workflow items by typeReturns a workflow item by its type Update a workflow ruleDelete one or more services from Aspire.
Path Parameters
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
Example
Response
Status
| ||||||||||||||||||||||||||||||||||
Section | ||||||||||||||||||||||||||||||||||||||
|
Section | |||||||
---|---|---|---|---|---|---|---|
Get connector type dxfReturns the dxf for a specific workflow item type Delete workflow rule(s)Delete one or more workflows from Aspire.
Path and Query String 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 |
Code Block | ||
---|---|---|
| ||
DELETE /aspire/_api/workflows/AAABcID5GBc%3D/rule?id=AAABcID5GBc=&id=AAABcIueWUc=
|
itemType/:itemTypeId/dxf |
Response
Code Block | ||
---|---|---|
| ||
{
"dxf": {...}
"message": "optional response message"
} |
Status
Response code | Description |
---|---|
200 | Success |
404 | Not found - a given service identifier was not found |
Section | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Filters
Some endpoint queries require a filter. A filter is basically a JSON object with the following format: Credentials filter:Response
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