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




Section

Get workflow templates

Retrieve all workflow templates from Aspire.

Panel
borderColorblack
bgColor#fafafb

GET /aspire_api/workflow/:id/template

Path and Query String Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the workflow to get the templates for
descriptionstringOptionalFilter workflows to only those whose description matches the given expression

Response

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

Get a workflow template

Retrieve a workflow templates from Aspire.

Panel
borderColorblack
bgColor#fafafb

GET /aspire_api/workflow/: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
{
  "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

Get workflow

plan

rules

Get all the rules for a given workflow.

Panel
borderColorblack
bgColor#fafafb

GET /aspire_api/workflow/:id/rule

Path Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the workflow to return rules for

Response

Code Block
languagejs
{
  "workflow": {
    "id": "AAABcIueWUc=",
    "description": "Publish to Elasticsearch"
    "plan": {
      "id": "onAddUpdate",
      "rule": [{
        "id": "ddSWeq123",
        "description": "Some rule",
        "type": "application",
        ...
      },
      {
        "id": "ddSWeq124",
        "description": "Some rule",
        "type": "groovy",
        ...
      }]
    }
  }
  "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/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"
    "plan": {
      "id": "onAddUpdate",
      "rule": {
        "id": "ddSWeq123",
        "description": "Some rule",
        "type": "application",
        ...
      }
    }
  }
  "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 rule

Delete one or more services from Aspire.

Panel
borderColorblack
bgColor#fafafb

POST /aspire_api/workflow/:id/rule

Path Parameters

NameTypeRequiredDescription
idstringRequiredThe 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 TypeParameter NameParameter TypeRequiredDescription
groovy<TODO>


application



Response

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

Delete one or more services from Aspire.

Panel
borderColorblack
bgColor#fafafb

POST PUT /aspire_api/workflow/:id/rule/:ruleId

Path Parameters

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

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

rules <<<<

rule(s)

Delete one or more services from Aspire.

Panel
borderColorblack
bgColor#fafafb

DELETE /aspire_api/workflow/:id/rule

DELETE GET /aspire_api/workflow/:id/rule/:planIdruleId

Path and Request Body Parameters

NameTypeRequiredDescription
idstringRequired

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

to return

or the identifier of the rule to delete when used in the body

ruleIdplanIdstringRequiredThe identifier of the plan rule to getdelete

Examples

Delete a single ruleResponse

Code Block
languagejs
{
  "workflow": {
    "id": "AAABcIueWUc=",
  
}

Delete multiple rules

Code Block
languagejs
[{
  "descriptionid": "Publish to ElasticsearchAAABcIueWUc"
},
{
    "planid": {
    "AAABcIueWac"
}]

Delete multiple rules (alternative version)

Code Block
languagejs
{
  "id": ["onAddUpdateAAABcIueWUc", "AAABcIueWac"]
}

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

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 workflow 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 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?????

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