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
typestringRequired

Accepted values are: "connector" and "service"

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

  • scan
  • addUpdate
  • delete
  • publish
  • error

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


Examples

Add a single workflow

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

Response

Code Block
languagejs
{
  "workflow": [{
    "id": "AAABcID5GBc=",
    "description": "Publish to Elastic",
    "type": "service"
  }],
  "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/workflows/:id

DELETE /aspire_api/workflows

Path and Request Body Parameters

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

Examples

Delete a single workflow

Code Block
languagejs
DELETE /aspire_api/workflows/AAABcID5GBc=

Delete multiple workflows

Code Block
languagejs
DELETE /aspire_api/workflows?id=AAABcID5GBc%3D&id=AAABcIueWUc%3D

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 event

Get a event from a workflow in Aspire.

Panel
borderColorblack
bgColor#fafafb

GET /aspire_api/workflow/: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=",
    "description": "Publish to Elasticsearch"
    "event": {
      "id": "addUpdate"
    }
  }
  "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 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

Examples

Create a single event

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

Create multiple events

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

Create multiple events (alternative version)

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

Response

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

Delete a workflow event from Aspire.

Panel
borderColorblack
bgColor#fafafb

DELETE /aspire_api/workflow/:id/:eventId

Path and Request Body Parameters

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

NameTypeRequiredDescription
idstringRequiredThe identifier of the workflow(s) to return
eventIdstringRequiredThe identifier of the event 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"
    "event": {
      "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 event item

Delete one or more services from Aspire.

Panel
borderColorblack
bgColor#fafafb

PUT /aspire_api/workflow/:id/:eventId/:itemId

Path Parameters

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

The identifier of the event 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 event item above

Response

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

Delete one or more services from Aspire.

Panel
borderColorblack
bgColor#fafafb

DELETE /aspire_api/workflow/:id/:eventId/:itemId

Path Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the workflow to use
eventIdstringRequiredThe identifier of the event 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 event item

Delete one or more services from Aspire.

Panel
borderColorblack
bgColor#fafafb

PUT/aspire_api/workflow/:id/move/:eventId

Path Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the workflow to use
eventIdstringRequiredThe identifier of the event to use

Body Parameters

NameTypeRequiredDescription
srcstringRequiredThe identifier of the event 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 - Review pending

Retrieve all workflow templates from Aspire.

Panel
borderColorblack
bgColor#fafafb

GET /aspire_api/workflows/: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 - Review pending

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 rules

Get all the rules for a given workflow.

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": "AAABcIueWUc=",
    "description": "Publish to Elasticsearch"
    "event": {
      "id": "addUpdate",
      "rule": [{
        "id": "ddSWeq123",
        "description": "Some rule",
        "type": "application",
        ...
      },
      {
        "id": "ddSWeq124",
        "description": "Some rule",
        "type": "groovy",
        ...
      }]
    }
  }
  "message": "optional response message"
}

Status

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




Section

Get a workflow rule

Get one or more 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"
    "event": {
      "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"
    "event": {
      "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

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"
    "event": {
      "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




{ "id": "AAABcIueWUc" }

Delete multiple rulesworkflows

Section

Delete workflow rule(s)

Delete one or more services workflows from Aspire.

Panel
borderColorblack
bgColor#fafafb

DELETE /aspire_api/workflowworkflows/:id/rule

DELETE /aspire_api/workflowworkflows/:id/rule/:ruleId

Path and Request Body Parameters

NameTypeRequiredDescription
idstringRequired

The 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

Examples

Delete a single rule

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

Delete multiple rules (alternative version)

Code Block
languagejs
{
  "id": ["AAABcIueWUc", "AAABcIueWac"]
}DELETE /aspire_api/workflows/AAABcID5GBc%3D/rule?ruleId=AAABcID5GBc%3D&ruleId=AAABcIueWUc%3D

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 (duplicate) a workflow rule

?? Needed ??

Duplicates a workflow rule.

Panel
borderColorblack
bgColor#fafafb

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

Path Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the workflow to use
ruleIdstringRequiredThe identifier of the rule to copy

Response

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

Share a workflow rule

?? Needed ??

Move a workflow rule to a shared library.

Panel
borderColorblack
bgColor#fafafb

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

Path Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the workflow to use
eventIdstringRequired

The identifier of the event to share

destinationstringRequiredThe identifier of the library to share to

Response

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

?? Needed ??

Get all of the workflow libraries

Panel
borderColorblack
bgColor#fafafb

GET /aspire_api/workflow/library

Query String Parameters

NameTypeRequiredDescription
descriptionstringOptionalFilter the libraries returned to those matching the given description

Response

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

?? Needed ??

Get a single workflow library.

Panel
borderColorblack
bgColor#fafafb

GET /aspire_api/workflow/library/:id

Path and Request Body Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the library to return

Response

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

Reload all workflow libraries.

Panel
borderColorblack
bgColor#fafafb

GET /aspire_api/workflow/library/reload

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