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

Table of Contents

Section

List workflows

Lists all the workflows configured in the Aspire

Panel
borderColorblack
bgColor#fafafb
GET /aspire_api/workflow

Query String Parameters

NameTypeRequiredDescription
descriptionstringOptionalFilter workflows to only those whose description matches the given expression
sparsebooleanOptionalOnly return minimal data such as identifier, description, name etc

Response

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

Status

Response codeDescription
200Success




Section

Get a single workflow

Get information about a single workflow in Aspire

Panel
borderColorblack
bgColor#fafafb

GET /aspire_api/workflow/:id

Path Parameters

NameTypeRequiredDescription
idstringRequiredThe id of the workflow to return

Response

Code Block
languagejs
{
  "workflow": {
    "id": "AAABcID5GBc=",
    "description": "Publish to Elasticsearch",
    ...
  },
  "message": "optional response message"
}

Status

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




Section

Add a workflow

Adds a workflow to Aspire

Panel
borderColorblack
bgColor#fafafb
POST /aspire_api/workflow

Request Body Parameters

NameTypeRequiredDescription
descriptionstringRequiredA description of the workflow

Query String Parameters

NameTypeRequiredDescription
emptybooleanOptional

If true, the workflow created will be empty (with no plans).

By default, the following plans will be created:

  • onScan
  • onAddUpdate
  • onDelete
  • onPublish
  • onError


Examples

Add a single workflow

Code Block
languagejs
{
  "description": "Publish to Elastic"
  ...
}

Response

Code Block
languagejs
{
  "service": {
    "id": "AAABcID5GBc=",
    "description": "Publish to Elastic"
    ...
  },
  "message": "optional response message"
}

Status

Response codeDescription
201Created
406Not acceptable - there was an issue validating the input





Section

Delete workflow(s)

Delete one or more workflow from Aspire.

Panel
borderColorblack
bgColor#fafafb

DELETE /aspire_api/service/:id

DELETE /aspire_api/service

Path and Request Body Parameters

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

Examples

Delete a single workflow

Code Block
languagejs
{
  "id": "AAABcID5GBc="
}

Delete multiple workflows

Code Block
languagejs
[{
  "id": "AAABcID5GBc="
},
{
  "id": "AAABcIueWUc="
}]

Delete multiple workflows(alternative form)

Code Block
languagejs
{
  "id": ["AAABcID5GBc=", "AAABcIueWUc="]
}

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

Get a workflow plan

Get a plan from a workflow in Aspire.

Panel
borderColorblack
bgColor#fafafb

GET /aspire_api/workflow/:id/:planId

Path Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the workflow(s) to return
planIdstringRequiredThe identifier of the plan to get

Response

Code Block
languagejs
{
  "workflow": {
    "id": "AAABcIueWUc=",
    "description": "Publish to Elasticsearch"
    "plan": {
      "id": "onAddUpdate"
    }
  }
  "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

Create workflow plan(s)

Create one or more workflow plans in Aspire.

Panel
borderColorblack
bgColor#fafafb

PUT /aspire_api/workflow/:id

PUT /aspire_api/workflow/:id/:planId

Path Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the workflow(s) to add a plan to
planIdstringRequiredThe identifier of the plan to add

Examples

Create a single plan

Code Block
languagejs
{
  "id": "onScan"
}

Create multiple plans

Code Block
languagejs
[{
  "id": "onScan"
},
{
  "id": "onAddUpdate"
}]

Create multiple plans (alternative version)

Code Block
languagejs
{
  "id": ["onScan", "onAddUpdate"]
}

Response

Code Block
languagejs
{
  "workflow": {
    "id": "AAABcIueWUc=",
    "description": "Publish to Elasticsearch"
    "plan": {
      "id": ["onScan", "onAddUpdate"]
    }
  }
  "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

Delete a workflow plan

Delete a workflow plan from Aspire.

Panel
borderColorblack
bgColor#fafafb

DELETE /aspire_api/workflow/:id/:planId

Path and Request Body Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the workflow(s) to use
planIdstringRequiredThe identifier of the plan to delete

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

Create a workflow plan item

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

Panel
borderColorblack
bgColor#fafafb

POST /aspire_api/workflow/:id/:planId/:type

Path Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the workflow(s) to return
planIdstringRequiredThe identifier of the plan to get
typestringRequiredThe 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 TypeParameter NameParameter TypeRequiredDescription
Rule<TODO>


Application Rule



Condition



Exit



Response

Code Block
languagejs
{
  "workflow": {
    "id": "AAABcIueWUc=",
    "description": "Publish to Elasticsearch"
    "plan": {
      "id": "onAddUpdate",
      "rule": {
        "id": "AAABcQwxWUc=",
        ...
      }
    }
  }
  "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

Update a workflow plan item

Delete one or more services from Aspire.

Panel
borderColorblack
bgColor#fafafb

PUT /aspire_api/workflow/:id/:planId/:itemId

Path Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the workflow(s) to use
planIdstringRequired

The identifier of the plan to use

itemIdstringRequiredThe 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 plan item above

Response

Code Block
languagejs
{
  "workflow": {
    "id": "AAABcIueWUc=",
    "description": "Publish to Elasticsearch"
    "plan": {
      "id": "onAddUpdate",
      "rule": {
        "id": "AAABcQwxWUc=",
        ...
      }
    }
  }
  "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

Delete a workflow plan item

Delete one or more services from Aspire.

Panel
borderColorblack
bgColor#fafafb

DELETE /aspire_api/workflow/:id/:planId/:itemId

Path Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the workflow to use
planIdstringRequiredThe identifier of the plan to use
itemIdstringRequiredThe identifier of the node item to delete

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

Move a workflow plan item

Delete one or more services from Aspire.

Panel
borderColorblack
bgColor#fafafb

PUT/aspire_api/workflow/:id/:planId/:src/:dest

Path Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the workflow to use
planIdstringRequiredThe identifier of the plan to use
srcstringRequiredThe identifier of the plan item to move
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

>>>>>>>>>>>>>>>>>>>>>>>>>> here <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<




Get a workflow plan

Delete one or more services from Aspire.

Section

Get

a

workflow

plan

templates

Retrieve all workflow templates Delete one or more services from Aspire.

Panel
borderColorblack
bgColor#fafafb

GET /aspire_api/workflow/:id/:planIdtemplate

Query String Path and Request Body Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the workflow (s) to returnto get the templates for
descriptionplanIdstringRequiredOptionalFilter workflows to only those whose description matches the given expressionThe identifier of the plan to get

Response

Code Block
languagejs
{
  "workflowtemplate": [{
      "id": "AAABcIueWUc=AAABcQwrWUc",
    "description": "Publish to Elasticsearch"
    "plan": {
      "id": "onAddUpdate"
    }
  }
  "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
Panel
borderColorblack
bgColor#fafafb

GET /aspire_api/workflow/:id/:planId

Path and Request Body Parameters

NameTypeRequiredDescriptionidstringRequiredThe identifier of the workflow(s) to returnplanIdstringRequiredThe identifier of the plan to get

Response

Code Block
languagejs
{
  "workflow": {
    "id": "AAABcIueWUc=",
    "description": "Publish to Elasticsearch"
    "plan": {
      "id": "onAddUpdate"
    }
  }
  "message": "optional response message"
}

Status

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

Get a workflow plan

Delete one or more services from Aspire.

Panel
borderColorblack
bgColor#fafafb

GET /aspire_api/workflow/:id/:planId

Path and Request Body Parameters

NameTypeRequiredDescriptionidstringRequiredThe identifier of the workflow(s) to returnplanIdstringRequiredThe identifier of the plan to get

Response

Code Block
languagejs
{
  "workflow": {
    "id": "AAABcIueWUc=",
    "description": "Publish to Elasticsearch"
    "plan": {
      "id": "onAddUpdate"
    }
  }
  "message": "optional response message"
}

Status

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

Get a workflow plan

Delete one or more services from Aspire.

Panel
borderColorblack
bgColor#fafafb

GET /aspire_api/workflow/:id/:planId

Path and Request Body Parameters

NameTypeRequiredDescriptionidstringRequiredThe identifier of the workflow(s) to returnplanIdstringRequiredThe identifier of the plan to get

Response

Code Block
languagejs
{
  "workflow": {
    "id": "AAABcIueWUc=",
    "description": "Publish to Elasticsearch"
    "plan": {
      "id": "onAddUpdate"
    }
  }    ...
    }]
  "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

Get a workflow

plan

template

Retrieve a workflow templates Delete one or more services from Aspire.

Panel
borderColorblack
bgColor#fafafb

GET /aspire_api/workflow/:id/template/:planIdtemplateId

Path and Request Body Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the workflow (s) to returnto get the templates for
templateIdplanIdstringRequiredThe identifier of the plan template to get

Response

Code Block
languagejsjs
{{
  "workflow": {
    "id": "AAABcIueWUc=",
    "description": "Publish to Elasticsearch"
    "plantemplate": [{
      "id": "onAddUpdateAAABcQwrWUc",
    }  ...
    }]
  "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

Get

a

workflow plan rules <<<<

Delete one or more services from Aspire.

Panel
borderColorblack
bgColor#fafafb

GET /aspire_api/workflow/:id/:planId

Path and Request Body Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the workflow(s) to return
planIdstringRequiredThe identifier of the plan to get

Response

Code Block
languagejs
{
  "workflow": {
    "id": "AAABcIueWUc=",
    "description": "Publish to Elasticsearch"
    "plan": {
      "id": "onAddUpdate"
    }
  }
  "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

Get a workflow

plan

rule <<<<

Delete one or more services from Aspire.

Panel
borderColorblack
bgColor#fafafb

GET /aspire_api/workflow/:id/:planId

Path and Request Body Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the workflow(s) to return
planIdstringRequiredThe identifier of the plan to get

Response

Code Block
languagejs
{
  "workflow": {
    "id": "AAABcIueWUc=",
    "description": "Publish to Elasticsearch"
    "plan": {
      "id": "onAddUpdate"
    }
  }
  "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
Get

Create a workflow

plan

rule <<<<

Delete one or more services from Aspire.

Panel
borderColorblack
bgColor#fafafb

GET /aspire_api/workflow/:id/:planId

Path and Request Body Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the workflow(s) to return
planIdstringRequiredThe identifier of the plan to get

Response

Code Block
languagejs
{
  "workflow": {
    "id": "AAABcIueWUc=",
    "description": "Publish to Elasticsearch"
    "plan": {
      "id": "onAddUpdate"
    }
  }
  "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
Get

Update a workflow

plan

rule <<<<

Delete one or more services from Aspire.

Panel
borderColorblack
bgColor#fafafb

GET /aspire_api/workflow/:id/:planId

Path and Request Body Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the workflow(s) to return
planIdstringRequiredThe identifier of the plan to get

Response

Code Block
languagejs
{
  "workflow": {
    "id": "AAABcIueWUc=",
    "description": "Publish to Elasticsearch"
    "plan": {
      "id": "onAddUpdate"
    }
  }
  "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
Get a

Delete workflow

plan

rules <<<<

Delete one or more services from Aspire.

Panel
borderColorblack
bgColor#fafafb

GET /aspire_api/workflow/:id/:planId

Path and Request Body Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the workflow(s) to return
planIdstringRequiredThe identifier of the plan to get

Response

Code Block
languagejs
{
  "workflow": {
    "id": "AAABcIueWUc=",
    "description": "Publish to Elasticsearch"
    "plan": {
      "id": "onAddUpdate"
    }
  }
  "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
Get a workflow plan

Copy or Share workflow rules <<<<

Delete one or more services from Aspire.

Panel
borderColorblack
bgColor#fafafb

GET /aspire_api/workflow/:id/:planId

Path and Request Body Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the workflow(s) to return
planIdstringRequiredThe identifier of the plan to get

Response

Code Block
languagejs
{
  "workflow": {
    "id": "AAABcIueWUc=",
    "description": "Publish to Elasticsearch"
    "plan": {
      "id": "onAddUpdate"
    }
  }
  "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

Get

a

workflow

plan

libraries <<<<

Delete one or more services from Aspire.

Panel
borderColorblack
bgColor#fafafb

GET /aspire_api/workflow/:id/:planId

Path and Request Body Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the workflow(s) to return
planIdstringRequiredThe identifier of the plan to get

Response

Code Block
languagejs
{
  "workflow": {
    "id": "AAABcIueWUc=",
    "description": "Publish to Elasticsearch"
    "plan": {
      "id": "onAddUpdate"
    }
  }
  "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

Get a workflow

plan

library

Delete one or more services from Aspire.

Panel
borderColorblack
bgColor#fafafb

GET /aspire_api/workflow/:id/:planId

Path and Request Body Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the workflow(s) to return
planIdstringRequiredThe identifier of the plan to get

Response

Code Block
languagejs
{
  "workflow": {
    "id": "AAABcIueWUc=",
    "description": "Publish to Elasticsearch"
    "plan": {
      "id": "onAddUpdate"
    }
  }
  "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

Reload workflow libraries

?? Needed?????

Get a workflow plan

Delete one or more services from Aspire.

Panel
borderColorblack
bgColor#fafafb

GET /aspire_api/workflow/:id/:planId

Path and Request Body Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the workflow(s) to return
planIdstringRequiredThe identifier of the plan to get

Response

Code Block
languagejs
{
  "workflow": {
    "id": "AAABcIueWUc=",
    "description": "Publish to Elasticsearch"
    "plan": {
      "id": "onAddUpdate"
    }
  }
  "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