Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Warning
titlePage 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

toc
Easy Heading Free
titleExpandClickabletrue
navigationTitleOn this Page
navigationExpandOptionexpand-all-by-default

Success

: 200

Section

Get all workflows

Lists all the workflows configured in the Aspire, this endpoint need the at least the OPERATOR role to be executed.

Panel
borderColorblack
bgColor#fafafb
GET /aspire/_api/workflowworkflows

Pagination query string parameters

Sorting query string parameters

Query String Parameters

frominteger
NameTypeOptionalIndicates the initial page to be retrieved
sizeintegerOptionalSpecifies the size of results page
sortBystringOptionalField by which results are sorted
sortModestringOptional

Sort mode

  • "asc" for ascending sort,
  • "desc" for descending sort
expandstringOptionalList of fields to expand, * will expand everything
RequiredDescription
sparsebooleanOptionalOnly return minimal data such as identifier, description, name etc

Response

Section

Get all workflows, filtered

Lists workflows configured in the Aspire, filtered by a specified criteria, this endpoint need the at least the OPERATOR role to be executed.

Panel
borderColorblack
bgColor#fafafb

POST /aspire/_api/workflows/getAll

Pagination query string parameters

Sorting query string parameters

Common filter


Response

Code Block
Code Block
languagejs
{
  "workflow": [{
    "id": "AAABcID5GBc=",
    "description": "Publish to Elasticsearch",
    ...
  },
  {
    "id": "AAABcIueWUc=",
    "description": "Normalise data",
    ...
  }]
}

Status

Response codeDescription
200




Section

Get

all workflows, filtered

a single workflow

Get information about a single workflow in Aspire, this endpoint need the at least the OPERATOR role to be executed.Lists workflows configured in the Aspire, filtered by a specified criteria

Panel
borderColorblack
bgColor#fafafb

POST GET /aspire/_api/workflows/getAll:id


Query String Path Parameters

frominteger
NameTypeRequiredDescription
idstringOptionalRequiredIndicates the initial page to be retrieved
sizeintegerOptionalSpecifies the size of results page
sortBystringOptionalField by which results are sorted
sortModestringOptional

Sort mode

  • "asc" for ascending sort,
  • "desc" for descending sort
expandstringOptionalList of fields to expand, * will expand everything
sparsebooleanOptionalOnly return minimal data such as identifier, description, name etc

Body Parameters

NameTypeRequiredDescription
filterJSONRequiredFilters retrieved connectors. Check the filter definition here
The id of the workflow to return


Query String Parameters

NameTypeRequiredDescription
transformbooleanOptionalWhether to transform the output.  Default "false"
sectionstringOptionalThe section required for the output. The value can be "templates", "rules", "events"


Response

Code Block
languagejs
{

Response

Code Block
languagejs
{
  "workflow": [{
    "id": "AAABcID5GBc=",
    "description": "Publish to Elasticsearch",
    ...
  },
  {
    "id": "AAABcIueWUc=",
    "description": "Normalise data",
    ...
  }]
}

Status

Response codeDescription200Success

: 200, 404




Section

Add

Section
Get a

single workflow

Get information about Adds a single workflow in Aspireto Aspire, this endpoint need the at least the ADMINISTRATOR role to be executed.

Panel
borderColorblack
bgColor#fafafb
GET POST /aspire/_api/workflow/:idworkflows


Body Path Parameters

idThe id to return
NameTypeRequiredDescription
descriptionstringRequiredA description of the workflow

Response


Query String Parameters

NameTypeRequiredDescription
typestringRequired

Accepted values are: "connector" and "service"

If connector is set the workflow created with the following events will be created:

  • onScan
  • onAddUpdate
  • onDelete
  • onPublish
  • onError

If service is set the workflow will be created without events.


Example

Code Block
languagejs
POST /aspire/_api/workflows?type=connector
{
Code Block
languagejs
{
  "workflow": {
    "id": "AAABcID5GBc=",
    "description": "Publish to ElasticsearchElastic",
  
}


Response

Code Block
languagejs
{
  "workflow": {
    "id": "AAABcID5GBc=",
    "description": "Publish to Elastic",
    "type": "connector"
    .  ...
  }
}

Status

Response codeDescription
200Success
404The given workflow id was not found
Section

: 200, 406




Query String Parameters

Example

Section

Update workflows, filtered

Update connectors configured in the Aspire, filtered by a specified criteria, this endpoint need the at least the ADMINISTRATOR role to be executed.

Add single workflow

Adds a single workflow to Aspire

Panel
borderColorblack
bgColor#fafafb
POST

PUT /aspire/_api/

workflow

Body Parameters

NameTypeRequiredDescription
descriptionstringRequiredA description of the workflow
NameTypeRequiredDescription
typestringRequired

Accepted values are: "connector" and "service"

If connector is set the workflow created with the following events will be created:

  • onScan
  • onAddUpdate
  • onDelete
  • onPublish
  • onError

If service is set the workflow will be created without events.

Code Block
languagejs
/aspire/_api/workflow?type=connector
{
  "description": "Publish to Elastic"
}

Response

Code Block
languagejs
{
  "workflow": {
    "id": "AAABcID5GBc=",
    "description": "Publish to Elastic",
    "type": "connector"
    ....
  }
}

Status

Response codeDescription201Created406Not acceptable - there was an issue validating the input

workflows/updateAll

Common filter

Update body parameter


Response

Code Block
languagejs
{
  "message": "update result response message"
}

Status: 200, 406

Section

Delete multiple workflows, filtered

Delete multiple workflows from Aspire, filtered by a specified criteria, this endpoint need the at least the ADMINISTRATOR role to be executed.

Panel
borderColorblack
bgColor#fafafb

POST /aspire/_api/workflows/deleteAll

Common filter

Response

Code Block
languagejs
{
  "message": "delete result response message"
}

Status: 200, 404, 406




Section

Delete workflow(s)

Delete one or more workflows from Aspire, this endpoint need the at least the ADMINISTRATOR role to be executed.

Panel
borderColorblack
bgColor#fafafb

DELETE /aspire/_api/workflows/:id

DELETE /aspire/_api/workflows

POST /aspire/_api/workflows/delete


Path Parameters and Query parameters

NameTypeRequiredDescription
idstringRequiredThe identifier(s) of the workflow(s) to delete


Body Parameter

Section

Delete multiple workflows, filtered

Delete multiple workflows from Aspire, filtered by a specified criteria

Panel
borderColorblack
bgColor#fafafb

POST /aspire/_api/workflows/deleteAll

Body Parameters

NameTypeRequiredDescription
filteridsJSONstringRequiredFilters workflows to be deleted. Check the filter definition hereThe identifier(s) of the workflow(s) to delete


ExamplesResponse

Code Block
languagejs
DELETE /aspire/_api/workflows/AAABcID5GBc

DELETE /aspire/_api/workflows?id=AAABcID5GBc&id=AAABcID5GBd

POST /aspire/_api/workflows/delete
{
  "ids":["AAABcID5GBc","AAABcID5GBd"]
}


Response

Code Block
languagejs
{
  "message": "delete result{
  "message": "optional response message"
}

See Response Body for details regrading the response body returned where multiple items are affected with some (or all) returning errors

Status

Response codeDescription
200Success
404Not found - a given credential identifier was not found
406Not acceptable - there was an issue validating the input
Section

Status: 200, 404, 406




Section

Get a workflow event

Get a event from a workflow in Aspire, this endpoint need the at least the OPERATOR role to be executed.

Panel
borderColor

Delete single workflow

Delete a single workflow from Aspire.

Panel
borderColorblack
bgColor#fafafb

DELETE GET /aspire/_api/workflowworkflows/:id/:eventId


Path Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier (s) of the workflow(s) to deletereturn
Example
eventId
code
string
languagejs
DELETE /aspire/_api/workflows/AAABcID5GBc=
RequiredThe identifier of the event to get


Response

Code Block
languagejs
{
	"message  "workflow": {
    "id": "optional response message"
}

Status

Response codeDescription200Success404Not found - a given workflow identifier was not found406Not acceptable - there was an issue validating the input Section
AAABcIueWUc=",
    "description": "Publish to Elasticsearch"
    "event": {
      "id": "onUpdate"
       ....
    }
  }
}

Status: 200, 404, 406




Examples

Create a single event

Create multiple events (body parameter)

Section

Get workflow events

Get a event from a workflow in Aspire, this endpoint need the at least the OPERATOR role to be executed

Get a workflow event

Get a event from a workflow in Aspire.

Panel
borderColorblack
bgColor#fafafb

GET /aspire/_api/workflowworkflows/:id/:eventId


Path Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the workflow(s) to return
eventIdstringRequiredThe identifier of the event to get


Response

Code Block
languagejs
{
    "workflow": {
        "id": "AAABcIueWUc=72022651-c2f4-45a9-9e18-2b0ace529cda",
    "    "type": "connector",
        "description": "Test "Publish to Elasticsearch"
Workflow",
        "checksum": "2b8dc08a2da838304528b4695109e2379da9a670c5a195dcd27355e8daa20a8b",
        "eventevents": {
      "id      "event": "onUpdate"[
       ....         {
    }
  }
}

Status

Response codeDescription
200Success
404Not found - a given workflow identifier was not found
406Not acceptable - there was an issue validating the input
Section

Create workflow event(s)

Create one or more workflow events in Aspire.

Panel
borderColorblack
bgColor#fafafb

PUT /aspire/_api/workflow/:id

PUT /aspire/_api/workflow/:id/:eventId

Path Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the workflow(s) to add a event to
eventIdstringRequiredThe identifier of the event to add
Code Block
languagejs
[{
  "id": "scan"
},
{
  "id": "addUpdate"
}]

Create multiple events (alternative version)

Response

Code Block
languagejs
{
  "workflow": {
    "id": "AAABcIueWUc=",
    "description": "Publish to Elasticsearch"
    "event":                "id": "onScan"
                },
                {
                    "id": "onAddUpdate"
                },
                {
      "id": ["scan", "addUpdate"]
             "id": "onDelete"
                },
       }
}

Status

Response codeDescription200Success404Not found - a given workflow identifier was not found406Not acceptable - there was an issue validating the input Section

Delete a workflow event

Delete a workflow event from Aspire.

Panel
borderColorblack
bgColor#fafafb

DELETE /aspire/_api/workflow/:id/:eventId

Path  Parameters

NameTypeRequiredDescriptionidstringRequiredThe identifier of the workflow(s) to useeventIdstringRequiredThe identifier of the event to delete

Response

Code Block
languagejs
{
  "message": "optional response message"
}

Status

Response codeDescription200Success404Not found - a given workflow identifier was not found406Not acceptable - there was an issue validating the input Section

Create a workflow event item

Create a workflow event item - a rule, condition and the like.

Panel
borderColorblack
bgColor#fafafb

POST /aspire/_api/workflow/:id/:eventId/:type

Path Parameters

NameTypeRequiredDescriptionidstringRequiredThe identifier of the workflow(s) to returneventIdstringRequiredThe identifier of the event to gettypestringRequiredThe type of the item to create
         {
                    "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




Body Parameters

The request body parameters will differ depending on the type of item created. Some examples are shown below

Response

Section

Create workflow event(s)

Create one or more workflow events in Aspire, this endpoint need the at least the ADMINISTRATOR role to be executed

Item TypeParameter NameParameter TypeRequiredDescription
ReferenceparentIdstringOptionalThe identifier of the node in to which the item should be inserted. Defaults to the root node
orderIdintegerRequiredThe position (which in the children of the parent node) where this reference should be insertedruleIdStringRequiredThe rule to be referencedenabledbooleanOptionalWhether or not the item is enabled (default true)
ConditionparentIdstringOptionalThe identifier of the node in to which the item should be inserted. Defaults to the root node
valueobjectRequiredThe value to be compared againstenabledbooleanOptionalWhether or not the item is enabled (default true)
ExitparentIdstringOptionalThe identifier of the node in to which the item should be inserted. Defaults to the root node
orderIdintegerRequiredThe position (which in the children of the parent node) where this reference should be insertedenabledbooleanOptionalWhether or not the item is enabled (default true)
Code Block
languagejs
{
  "workflow": {
    "id": "AAABcIueWUc=",
    "description": "Publish to Elasticsearch"
    "event": {
      "id": "onAddUpdate",
      "rule": {
        "id": "AAABcQwxWUc=",
        ...
      }
    }
  }
}

Status

Response codeDescription200Success404Not found - a given workflow identifier was not found406Not acceptable - there was an issue validating the input Section

Update a workflow event item

Delete one or more services from Aspire.

Panel
borderColorblack
bgColor#fafafb

PUT /aspire/_api/workflowworkflows/:id

PUT /aspire/_api/workflows/:eventIdid/:orderIdeventId


Path Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the workflow(s) to add a event to use
eventIdstringRequiredThe identifier of the event to useadd
orderIdintegerRequiredThe 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


Examples

Create multiple events (body parameter)

Code Block
languagejs
[{
  "id": "scan"
},
{
  "id": "addUpdate"
}]


Response

Code Block
languagejs
{
  "workflow": {
    "id": "AAABcIueWUc=",
    "description": "Publish to Elasticsearch"
    "event": {
      "id": ["onAddUpdatescan",
      "rule": {
        "id": "AAABcQwxWUc=", "addUpdate"]
        ...
      }
    }
  }
}

Status

Response codeDescription200Success404Not found - a given workflow identifier was not found406Not acceptable - there was an issue validating the input

: 200, 404, 406




Section

Delete a workflow event

Delete a workflow event from Aspire, this endpoint need the at least the ADMINISTRATOR role to be executed.

Section

Delete single workflow event item

Panel
borderColorblack
bgColor#fafafb

DELETE /aspire/_api/workflowworkflows/:id/:eventId/:parentId/:orderId


Path  Path Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the workflow(s) to use
eventIdstringRequiredThe identifier of the event to use
parentIdstringRequiredThe identifier of the node with the item to be deleted
orderIdintegerRequiredThe order identifier of the item to delete


Response

Code Block
languagejs
{
  "message": "optionaldelete result response message"
}

Status

Response codeDescription
200Success
404Not found - a given workflow identifier was not found
406Not acceptable - there was an issue validating the input
Section

: 200, 404, 406




Section

Create a workflow event item

Create a workflow event item - a rule, condition and the like, this endpoint need the at least the ADMINISTRATOR role to be executed

Move a workflow event item

Delete one or more services from Aspire.

Panel
borderColorblack
bgColor#fafafb

PUTPOST /aspire/_api/workflowworkflows/:id/move:eventId/:eventIdtype


Path Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the workflow(s) to usereturn
eventIdstringRequiredThe identifier of the event to useget
typestringRequiredThe 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

srcRequired event item to move
Item TypeParameter NameParameter TypeRequiredDescription
reference


parentIdstringOptionalThe identifier of the
deststringRequiredThe identifier of the new parent for the moved item

Response

Code Block
languagejs
{
  "message": "optional response message"
}

Status

Response codeDescription
200Success
404Not found - a given workflow identifier was not found
406Not acceptable - there was an issue validating the input
Section
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"
orderIdintegerRequiredThe 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
ruleIdStringRequiredThe rule to be referenced, it must exist
enabledbooleanOptionalWhether or not the item is enabled (default true)
condition



parentId

Get workflow templates

Retrieve all workflow templates from Aspire.

Panel
borderColorblack
bgColor#fafafb

GET /aspire/_api/workflows/:id/templates

Path Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the workflow node in to get the templates for

Query String Parameters

NameTypeRequiredDescription
fromintegerOptionalIndicates the initial page to be retrieved
sizeintegerOptionalSpecifies the size of results page
sortBystringOptionalField by which results are sorted
sortModestringOptional

Sort mode

  • "asc" for ascending sort,
  • "desc" for descending sort

Response

which the item should be inserted. The valid parents for condition items are references which ruleId is for a rule of type "choice".
valueobjectRequiredThe value to be compared against
conditionTypeStringRequiredThe value type, possible types are "string", "boolean", "integer", "long", "double", "float"
enabledbooleanOptionalWhether or not the item is enabled (default true)
templateStringRequiredThe condition template id.
exit

parentIdstringOptionalThe 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"
orderIdintegerRequiredThe position (which in the children of the parent node) where this reference should be inserted
enabledbooleanOptionalWhether or not the item is enabled (default true)


Response

Code Block
languagejs
{
  "workflow": 
Code Block
languagejs
{
  "template": [{
      "id": "AAABcQwrWUcAAABcIueWUc=",
    "description": "Publish to ...Elasticsearch"
    },
	"event": {
      "id": "AAABcQwrWUdonAddUpdate",
      ...
"rule": {
      }]
  "messageid": "optional response message"AAABcQwxWUc=",
        ...
      }
    }
  }
}

Status

Response codeDescription
200Success
404Not found - a given workflow identifier was not found
406Not acceptable - there was an issue validating the input
Section

: 200, 404, 406




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

Response when parentId used

Section

Update a workflow event item

Update a workflow event item from Aspire, this endpoint need the at least the ADMINISTRATOR role to be executed.

Get single workflow template

Retrieve a single workflow templates from Aspire.

Panel
borderColorblack
bgColor#fafafb

GET PUT /aspire/_api/workflowworkflows/:id/template:eventId/:templateIditemId


Path Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the workflow to get the templates for(s) to return
eventIdtemplateIdstringRequiredThe identifier of the template event to get
type
Response
string
Code Block
languagejs
{
  "template": [{
      "id": "AAABcQwrWUc",
      ...
    }]
  "message": "optional response message"
}

Status

Response codeDescription
200Success
404Not found - a given workflow identifier was not found
406Not acceptable - there was an issue validating the input
Section
RequiredThe 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 TypeParameter NameParameter TypeRequiredDescription
referenceparentIdstringRequiredThe 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.

ruleIdStringOptionalThe rule to be referenced, it must exist

enabledbooleanOptionalWhether or not the item is enabled (default true)
conditionparentId

Get single workflow rule

Get a single workflow rule from Aspire.

Panel
borderColorblack
bgColor#fafafb

GET /aspire/_api/workflow/:id/rule/:ruleId

Path Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the workflow to return rules for
ruleIdstringRequiredThe identifier of the rule to get

Response

Code Block
languagejs
{
  "workflow": {
    "id": "AAABcIueWUc=",
    "description": "Publish to Elasticsearch"
    "rule": {
      "id": "ddSWeq123",
      "description": "Some rule",
      "type": "application",
      ...
    }
  }
}

Status

Response codeDescription
200Success
404Not found - a given workflow identifier was not found
406Not acceptable - there was an issue validating the input
Section
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.

valueobjectOptionalThe value to be compared against

typeStringOptionalThe value type, possible types are "string", "boolean", "integer", "long", "double", "float"

enabledbooleanOptionalWhether or not the item is enabled (default true)

templateStringOptionalThe condition template id.
exitparentIdstringRequiredThe 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.

enabledbooleanOptionalWhether or not the item is enabled (default true)


Response

Code Block
languagejs
{
  "workflow": {
    

Create a workflow rule

Create a single workflow rule in Aspire.

Panel
borderColorblack
bgColor#fafafb

POST /aspire/_api/workflow/:id/rules

Path Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the workflow to create a rule for
Rule TypeParameter NameParameter TypeRequiredDescription
groovy<TODO>application
Parameter NameParameter TypeRequiredDescription
parentIdstringRequiredThe identifier of the node in to which the item should be inserted. Defaults to the root node
orderIdintegerRequiredThe position (which in the children of the parent node) where this reference should be inserted
Code Block
languagejs
{
  "workflow": {
    "id": "AAABcIueWUc=",
    "description": "Publish to Elasticsearch"
    "event": {
      "id": "onAddUpdate",
      "rule": {
        "id": "ddSWeq123",
        "description": "Some rule"AAABcQwxWUc=",
        "type": "application",
        ...
      }
    }
  }
}

Response without parentId

Code Block
languagejs
{
  "workflow": {
    "id": "AAABcIueWUc=",
    "description": "Publish to Elasticsearch"
    "rule": {
      "id": "ddSWeq123",
      "description": "Some rule",
      "type": "application",
      ...
    }
  }
}

Status

Response codeDescription200Success404Not found - a given workflow identifier was not found406Not acceptable - there was an issue validating the input Section

Status: 200, 404, 406




Section

Delete single workflow event item

Delete a workflow event item from Aspire, this endpoint need the at least the ADMINISTRATOR role to be executed.

Panel
borderColorblack
bgColor#fafafb

DELETE /aspire/_api/workflows/:id/:eventId/:parentId/:itemId


Path Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the workflow to use
eventIdstringRequiredThe identifier of the event to use
parentIdstringRequiredThe identifier of the node with the item to be deleted
itemIdintegerRequiredThe identifier of the item to delete


Response

Code Block
languagejs
{
  "message": "delete result response message"
}

Status: 200, 404, 406




Section

Move a workflow event item

Move a workflow event item from Aspire, this endpoint need the at least the ADMINISTRATOR role to be executed.

Panel
borderColorblack
bgColor#fafafb

Update single workflow rule

Updatee a single workflow rule in Aspire.

Panel
borderColorblack
bgColor#fafafb

PUT /aspire/_api/workflowworkflows/:id/rulemove/:ruleIdeventId


Path Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the workflow to update a rule foruse
eventIdruleIdstringRequiredThe identifier of the rule event to updateuse


Body Parameters

NameTypeRequiredDescription
srcstring

The request body parameters will differ depending on the type of rule created. See Create a workflow rule above

Response

Code Block
languagejs
{
  "workflow": {
    "id": "AAABcIueWUc=",
    "description": "Publish to Elasticsearch"
    "rule": {
      "id": "ddSWeq123",
      "description": "Some rule",
      "type": "application",
      ...
    }
  }
}

Status

Response codeDescription
200Success
404Not found - a given workflow identifier was not found
406Not acceptable - there was an issue validating the input
RequiredThe identifier of the event item to move
deststringRequiredThe identifier of the new parent for the moved item
orderIdintegerOptionalThe 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

Code Block
languagejs
{
  "message": "move result response message"
}

Status: 200, 404, 406




Section

Get workflow templates

Retrieve all workflow templates from Aspire, this endpoint need the at least the OPERATOR role to be executed.

Panel
borderColorblack
bgColor#fafafb

GET /aspire/_api/workflows/:id/templates


Path Parameters

Section

Delete single workflow rule

Deletes a single workflow rule from Aspire.

Panel
borderColorblack
bgColor#fafafb

DELETE /aspire/_api/workflows/:id/rule/:ruleId

Path Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the workflow from which to delete rule(s) or the identifier of the rule to delete when used in the body
ruleIdstringRequiredThe identifier of the rule to delete
to get the templates for


Response

Code Block
languagejs
{
  "message"template": [{
      "id": "optional response message"
}

Status

Response codeDescription
200Success
404Not found - a given workflow identifier was not found
406Not acceptable - there was an issue validating the input
AAABcQwrWUc",
      ...
    },
	  "id": "AAABcQwrWUd",
      ...
    }]
}

Status: 200, 404, 406




Section

Get single workflow template

Retrieve a single workflow templates from Aspire, this endpoint need the at least the OPERATOR role to be executed.

Section

Get workflow item types (to be moved)

Lists all available workflow item types

Panel
borderColorblack
bgColor#fafafb

GET /aspire/_api/workflows/

itemType

:id/template/:templateId


Path Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the workflow to get the templates for
templateIdstringRequiredThe identifier of the template to get


Response

Code Block
languagejs
{
  type: [ "application", "publisher", "function"]
}

Status

Response codeDescription
200Success
{
  "template": [{
      "id": "AAABcQwrWUc",
      ...
    }]
}

Status: 200, 404, 406




Section

Get single workflow rule

Get a single workflow rule from Aspire, this endpoint need the at least the OPERATOR role to be executed.

Panel
borderColorblack
bgColor#fafafb

GET /aspire/_api/workflows/:id/rule/:ruleId


Path Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the workflow to return rules for
ruleIdstringRequiredThe identifier of the rule to get


Response

Code Block
languagejs
{
  "workflow": {
    "id": "AAABcIueWUc=",
    "description": "Publish to Elasticsearch"
    "rule": {
      "id": "ddSWeq123",
      "description": "Some rule",
      "type": "application",
      ...
    }
  }
}

Status: 200, 404, 406




Section

Get workflow rules

Get workflow rules from Aspire, this endpoint need the at least the OPERATOR role to be executed.

Panel
borderColorblack
bgColor#fafafb

GET /aspire/_api/workflows/:id/rules


Path Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the workflow to return rules for


Response

Code Block
languagejs
{
    "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




Section

Create a workflow rule

Create a single workflow rule in Aspire, this endpoint need the at least the ADMINISTRATOR role to be executed.

Panel
borderColorblack
bgColor#fafafb

POST /aspire/_api/workflows/:id/rules


Path Parameters

NameTypeRequiredDescription
idstringRequiredThe 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 TypeParameter NameParameter TypeRequiredDescription
applicationtypestringRequiredThe rule type, in the case of application the value must be "application"

descriptionstringRequiredThe rule description. Any spaces will be replaced with "_" after creation

configstringRequiredThe maven coordinates of the rule application

propertiesobjectOptionalA nested JSON object that contains any additional property required by the application. The properties will vary depending of the application.

enabledbooleanOptionalWhether or not the rule is enabled (default true)

*appTypestringOptionalThis 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

*_typestringOptionalThis field is only required if Aspire will be used with the UI.
templatetypestringRequiredThe 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"

templatestringRequiredThe id of the template to use for the rule

propertiesobjectOptionalA nested JSON object that contains any additional property required by the template. The properties will vary depending of the template.

enabledbooleanOptionalWhether or not the rule is enabled (default true)
customtypestringRequiredThe rule type, in the case of custom rules the value must be "custom"

descriptionstringRequiredThe rule description. Any spaces will be replaced with "_" after creation

scriptstringRequiredThe 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 NameParameter TypeRequiredDescription
parentIdstringOptionalThe identifier of the node in to which the item should be inserted. Defaults to the root node
orderIdintegerOptionalThe position (which in the children of the parent node) where this reference should be inserted


Response when parentId used

Code Block
languagejs
{
  "workflow": {
    "id": "AAABcIueWUc=",
    "description": "Publish to Elasticsearch"
    "event": {
      "id": "onAddUpdate",
      "rule": {
        "id": "ddSWeq123",
        "description": "Some rule",
        "type": "application",
        ...
      }
    }
  }
}


Response without parentId

Code Block
languagejs
{
  "workflow": {
    "id": "AAABcIueWUc=",
    "description": "Publish to Elasticsearch"
    "rule": {
      "id": "ddSWeq123",
      "description": "Some rule",
      "type": "application",
      ...
    }
  }
}

Status: 200, 404, 406




Section

Update single workflow rule

Updatee a single workflow rule in Aspire, this endpoint need the at least the ADMINISTRATOR role to be executed.

Panel
borderColorblack
bgColor#fafafb

PUT /aspire/_api/workflows/:id/rule/:ruleId


Path Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the workflow to update a rule for
ruleIdstringRequiredThe 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

Code Block
languagejs
{
  "workflow": {
    "id": "AAABcIueWUc=",
    "description": "Publish to Elasticsearch"
    "rule": {
      "id": "ddSWeq123",
      "description": "Some rule",
      "type": "application",
      ...
    }
  }
}

Status: 200, 404, 406




Section

Delete single workflow rule

Deletes a single workflow rule from Aspire, this endpoint need the at least the ADMINISTRATOR role to be executed.

Panel
borderColorblack
bgColor#fafafb

DELETE /aspire/_api/workflows/:id/rule/:ruleId


Path Parameters

NameTypeRequiredDescription
idstringRequired

The identifier of the workflow from which to delete rule(s) 

ruleIdstringRequiredThe identifier of the rule to delete


Response

Code Block
languagejs
{
  "message": "delete result response message"
}

Status: 200, 404, 406




Section

Delete workflow rules

Deletes a single workflow rule from Aspire, this endpoint need the at least the ADMINISTRATOR role to be executed.

Panel
borderColorblack
bgColor#fafafb

DELETE /aspire/_api/workflows/:id/rules


Path Parameters

NameTypeRequiredDescription
idstringRequired

The identifier of the workflow from which to delete rule(s) 


Query Parameters

NameTypeRequiredDescription
idstringRequired

One or more rule ids to be deleted


Response

Code Block
languagejs
{
  "message": "delete result response message"
}

Status: 200, 404, 406




Section

Export workflow(s)

Export one or more workflows from Aspire, this endpoint needs at least the OPERATOR role to be executed.

Panel
borderColorblack
bgColor#fafafb

GET /aspire/_api/workflows/export

GET /aspire/_api/workflows/export/:id

POST /aspire/_api/workflows/exportAll

Info

Every configuration item has the option to export from the UI, using the single menu or by the bulk actions:

Image AddedImage Added

Note

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.

Note

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

NameTypeRequiredDescription
idstringRequiredThe identifier(s) of the workflow(s) to export


Body Parameter

NameTypeRequiredDescription
idsstringRequiredThe identifier(s) of the workflow(s) to export


Examples

Code Block
languagejs
themeRDark
GET /aspire/_api/workflows/export/AAABcID5GBc

DELETE /aspire/_api/workflows/export?id=AAABcID5GBc&id=AAABcID5GBd

POST /aspire/_api/workflows/export
{
  "ids":["AAABcID5GBc","AAABcID5GBd"]
}


Response

Code Block
languagejs
themeRDark
{
  "export": {
    "workflows": {
      "workflow": [
        {
          "id": "<workflow_id>",
          "type": "connector",
          "description": "myWorkflow",          
          "templates": {
            "template": [
              ...
            ]
          },
          "events": {
            "event": [
              ...
            ]
          },
          "rules": {
            "rule": [
              ...
            ]
          }
        }
      ]
    }
  }
}

Status: 200, 404, 406


Section

Get specific workflow items by type (to be moved)

Returns a workflow item by its type

Section

Export multiple connections, filtered

Export multiple connections from Aspire, filtered by a specified criteria, this endpoint needs at least the OPERATOR role to be executed.

Panel
borderColorblack
bgColor#fafafb
GET

POST /aspire/_api/

workflows/itemType/:id

Path Parameters

NameTypeRequiredDescription
idstringRequired

The identifier of the workflow item type

connections/exportAll

Filters: The connection filter definition here

Response

Code Block
languagejs
themeRDark
{
  "export": {
    "workflows": {
      "workflow": [
        {
          "id": "<workflow_id>",
          "type": "connector",
          "description": "myWorkflow",          
          "templates": {
            "template": [
              ...
            ]
          }

Example

Code Block
languagejs
/aspire/_aspire/workflows/types/applications 

Response

Code Block
languagejs
{ items: [{ "id": "AAABcID5GBc=" "type": "application"
,
        
  "
description
events": 
"Application_1",
{
          
  "
coordinates
event": 
"com.accenture.aspire:aspire-example-app"
[
              
},
...
            
{
]
  
"id": "AAABcID5GBd="
 
  
"type":
 
"application",
    },
          "
display
rules": 
"Application_2",
{
          
"coordinates": "com.accenture.aspire:aspire-example-app"
  "rule": [
          
}] }

Status

Response codeDescription200Success
    ...
            ]
          }
        }
      ]
    }
  }
}

Status: 200




Not found - a given service identifier was not found


Section

Import

The import usage can be found here

Section

Get workflow item type dxf (to be moved)

Returns the dxf for a specific workflow item type

Panel
borderColorblack
bgColor#fafafb
GET /aspire/_api/workflows/itemType/:itemTypeId/dxf

Response

Code Block
languagejs
{
  "dxf": {...}
  "message": "optional response message"
}

Status

Response codeDescription
200Success
404




Section

Filters
Anchor
FiltersAnchor
FiltersAnchor

 Some endpoint queries require a filter. A filter is basically a JSON object with the following format:

Credentials Seed filter:

Code Block
languagejs
themeRDark
{ 
  "filter" : {
    "ids" : ["ID1", "ID2", "ID3", ...],
    "type" : "TYPE",
    "description" : "DESCRIPTION",
    "deleteIncrementalPolicy": "ids"deletePolicyId",
	"credentials" : ["ID1credentialId", 
	"ID2throttlePolicy", : "ID3", ...]throttlePolicyId",
    "type	"routingPolicies" : ["TYPERP1",
    "descriptionRP2" :, "DESCRIPTION"RP3", ...]
  }
Note
When using endpoints that use this filter, the filter cannot be empty: at least one field of the filter must be specified.
}