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

Compare with Current View Page History

Version 1 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 service

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

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