You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Page 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

List workflows

Lists all the workflows configured in the Aspire

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

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

Status

Response codeDescription
200Success




Get a single workflow

Get information about a single workflow in Aspire

GET /aspire_api/workflow/:id

Path Parameters

NameTypeRequiredDescription
idstringRequiredThe id of the workflow to return

Response

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

Status

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




Add a workflow

Adds a workflow to Aspire

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

{
  "description": "Publish to Elastic"
  ...
}

Response

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

Status

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





Delete workflow(s)

Delete one or more workflow from Aspire.

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

{
  "id": "AAABcID5GBc="
}

Delete multiple workflows

[{
  "id": "AAABcID5GBc="
},
{
  "id": "AAABcIueWUc="
}]

Delete multiple workflows(alternative form)

{
  "id": ["AAABcID5GBc=", "AAABcIueWUc="]
}

Response

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




Get a workflow plan

Get a plan from a workflow in Aspire.

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

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




Create workflow plan(s)

Create one or more workflow plans in Aspire.

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

{
  "id": "onScan"
}

Create multiple plans

[{
  "id": "onScan"
},
{
  "id": "onAddUpdate"
}]

Create multiple plans (alternative version)

{
  "id": ["onScan", "onAddUpdate"]
}

Response

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




Delete a workflow plan

Delete a workflow plan from Aspire.

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

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




Create a workflow plan item

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

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

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




Update a workflow plan item

Delete one or more services from Aspire.

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

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




Delete a workflow plan item

Delete one or more services from Aspire.

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

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




Move a workflow plan item

Delete one or more services from Aspire.

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

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




Get workflow templates

Retrieve all workflow templates from Aspire.

GET /aspire_api/workflow/:id/template

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

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




Get a workflow template

Retrieve a workflow templates from Aspire.

GET /aspire_api/workflow/:id/template/:templateId

Path and Request Body Parameters

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

Response

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




Get workflow plan rules <<<<

Delete one or more services from Aspire.

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

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




Get a workflow rule <<<<

Delete one or more services from Aspire.

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

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




Create a workflow rule <<<<

Delete one or more services from Aspire.

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

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




Update a workflow rule <<<<

Delete one or more services from Aspire.

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

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




Delete workflow rules <<<<

Delete one or more services from Aspire.

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

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




Copy or Share workflow rules <<<<

Delete one or more services from Aspire.

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

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




Get workflow libraries <<<<

Delete one or more services from Aspire.

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

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




Get a workflow library

Delete one or more services from Aspire.

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

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




Reload workflow libraries

?? Needed?????

Delete one or more services from Aspire.

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

{
  "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
  • No labels