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

Compare with Current View Page History

« Previous Version 9 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
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

{
  "description": "Publish to Elastic"
}

Response

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





Delete workflow(s)

Delete one or more workflow from Aspire.

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

DELETE /aspire_api/workflows/AAABcID5GBc=

Delete multiple workflows

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

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 event

Get a event from a workflow in Aspire.

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

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




Create workflow event(s)

Create one or more workflow events in Aspire.

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

{
  "id": "onScan"
}

Create multiple events

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

Create multiple events (alternative version)

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

Response

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

Delete a workflow event from Aspire.

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

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

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

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

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




Update a workflow event item

Delete one or more services from Aspire.

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

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




Delete a workflow event item

Delete one or more services from Aspire.

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

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

Delete one or more services from Aspire.

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

Path Parameters

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

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

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

Get all the rules for a given workflow.

GET /aspire_api/workflow/:id/rule

Path Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the workflow to return rules for

Response

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




Get a workflow rule

Delete one or more services from Aspire.

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

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




Create a workflow rule

Delete one or more services from Aspire.

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

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




Update a workflow rule

Delete one or more services from Aspire.

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

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




Delete workflow rule(s)

Delete one or more services from Aspire.

DELETE /aspire_api/workflow/:id/rule

DELETE /aspire_api/workflow/: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

{
  "id": "AAABcIueWUc"
}

Delete multiple rules

[{
  "id": "AAABcIueWUc"
},
{
  "id": "AAABcIueWac"
}]

Delete multiple rules (alternative version)

{
  "id": ["AAABcIueWUc", "AAABcIueWac"]
}

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




Copy (duplicate) a workflow rule

?? Needed ??

Duplicates a workflow rule.

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

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




Share a workflow rule

?? Needed ??

Move a workflow rule to a shared library.

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

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




Get workflow libraries

?? Needed ??

Get all of the workflow libraries

GET /aspire_api/workflow/library

Query String Parameters

NameTypeRequiredDescription
descriptionstringOptionalFilter the libraries returned to those matching the given description

Response

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




Get a workflow library

?? Needed ??

Get a single workflow library.

GET /aspire_api/workflow/library/:id

Path and Request Body Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the library to return

Response

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




Reload workflow libraries

?? Needed ??

Reload all workflow libraries.

GET /aspire_api/workflow/library/reload

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