Task User API

Task User API allows users to manually control Aidbox tasks by RPC methods.

awf.task/create-and-execute

Creates an instance of a defined task and makes it ready to be executed immediately or at a specified time.

Params:

ParameterTypeRequiredDescription

id

string

Identifier of task (If not provided, will be auto-generated).

label

string

Human- or machine-readable description of task instance. Example: Import Patient resources

definition

string

Definition of predefined task or custom-defined task. Example: aidbox.archive/create-archive

params

object

The input parameters described in the task definition.

executeAt

string

Time at which the task will become ready. If not provided - task will become ready immediately. Example: 2023-05-03T13:30:43

Result:

ParameterTypeDescription

resource

object

Created AidboxTask resource.

POST /rpc
content-type: text/yaml
accept: text/yaml

method: awf.task/create-and-execute
params:
  definition: aidbox.bulk/import-resource-task
  params:
    type: aidbox
    input:
      url: https://storage.googleapis.com/aidbox-public/synthea/100/Organization.ndjson.gz
      resourceType: Organization

awf.task/status

Returns the status of a task instance with the specified id.

Params:

ParameterTypeRequiredDescription

id

string

Id of the task whose status will be returned.

include-settings?

boolean

If true , includes setting parameters predefined in definition. Default: false

include-log?

boolean

If true, includes log of task status transitions according to #task-instance-lifecycle. Default: false

Result:

ParameterTypeDescription

resource

object

Created AidboxTask resource.

settings

object

TODO

log

object[]

AidboxTaskLog resources for task with specified id

POST /rpc
content-type: text/yaml
accept: text/yaml

method: awf.task/status
params:
  id: c9555892-6221-42b4-9b34-1428a18e893c

awf.task/cancel

Cancels execution of a created task instance.

Params:

ParameterTypeRequiredDescription

id

string

Id of the task that will be canceled.

Result:

ParameterTypeDescription

resource

object

Created AidboxTask resource.

POST /rpc
content-type: text/yaml
accept: text/yaml

method: awf.task/cancel
params:
  id: 485b9cbd-0a78-4909-9908-0ae2e66a2b12

awf.task/list

Returns the list of all tasks.

Params:

ParameterTypeRequiredDescription

filter

object

filter.includeDefinitions

string[]

Array of task definitions to include.

filter.excludeDefinitions

string[]

Array of task definitions to exclude.

filter.status

string

Include task with specified status. Possible values: created, waiting, ready, requested, in-progress, done

filter.outcome

string

Include task with status done and specified outcome. Possible values: succeeded, failed, canceled

filter.ilike

string

ilike search by resource content

sort

object

May contain either createdAt or lastUpdated.

sort.createdAt

string

Sorts result by createdAt DateTime. Possible values: asc, desc

sort.lastUpdated

string

Sorts result by lastUpdated DateTime. Possible values: asc, desc

Result:

ParameterTypeDescription

resources

object[]

Created AidboxTask resources.

POST /rpc
content-type: text/yaml
accept: text/yaml

method: awf.task/list
params:
  filter:
    ilike: import-resource-task

Last updated