faxe REST API (1.0.0)

Download OpenAPI specification:Download

API description in Markdown.

Get a list of all users.

Returns a json list of all users currently known to the system.

Authorizations:
basicAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Add or update a User.

Add or update a user record if it alread exists.

Authorizations:
basicAuth
Request Body schema: application/x-www-form-urlencoded
name
required
string

The name of the user to be added/updated

pass
required
string

The user's password

Responses

Delete a user

Delete a user by it's name.

Authorizations:
basicAuth
path Parameters
username
required
string

Responses

List of Loglevels

Returns a list of log-levels for all configured logging backends.

Authorizations:
basicAuth

Responses

Response samples

Content type
application/json
{
  • "emit": "warning",
  • "console": "info"
}

Set loglevel

Given a log-backend, set a new level for logs

Authorizations:
basicAuth
path Parameters
backend
required
string
Enum: "console" "emit" "logstash"

Defines the log backend, possible values depend on the current configuration

Request Body schema: application/x-www-form-urlencoded
level
required
string
Enum: "debug" "info" "notice" "warning" "error" "critical" "alert"

The log level.

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string",
  • "error": "string"
}

FAXE Configuration

Returns hand-picked config settings currently active.

Authorizations:
basicAuth

Responses

Response samples

Content type
application/json
{
  • "metrics": {
    },
  • "debug_time_ms": 25000,
  • "debug": {
    },
  • "conn_status": {
    }
}

get complete FAXE Configuration

Returns an erlang list of tuples, containing current config just like regular sys.config

Authorizations:
basicAuth

Responses

get node language features

Returns an json list, containing information about each built-in node, usable for code editors.

Authorizations:
basicAuth

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

get lambda function features

Returns an json list, containing information about all built-in lambda functions. Probably for use in online editors.

Authorizations:
basicAuth

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    }
]

Erlang VM stats

Returns statistics about the erlang VM faxe is running on.

Authorizations:
basicAuth

Responses

Response samples

Content type
application/json
{
  • "vmstats-vm_uptime": 3743605,
  • "vmstats-run_queue": 1,
  • "vmstats-reductions": 39523,
  • "vmstats-proc_limit": 262144,
  • "vmstats-proc_count": 182,
  • "vmstats-port_limit": 65536,
  • "vmstats-port_count": 9,
  • "vmstats-modules": 1338,
  • "vmstats-messages_in_queues": 0,
  • "vmstats-memory.total": 86.81,
  • "vmstats-memory.procs_used": 31.51,
  • "vmstats-memory.ets": 2.52,
  • "vmstats-memory.binary": 0.49,
  • "vmstats-memory.atom_used": 1.43,
  • "vmstats-io.bytes_out": 0,
  • "vmstats-io.bytes_in": 0,
  • "vmstats-gc.words_reclaimed": 261675,
  • "vmstats-gc.count": 4,
  • "vmstats-error_logger_queue_len": 0,
  • "vmstats-atom_count": 44524
}

FAXE node stats

Returns top flow node processes sorted by reduction count.

Authorizations:
basicAuth

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    },
  • {
    },
  • {
    }
]

FAXE stats

Returns statistics about the FAXE application.

Authorizations:
basicAuth

Responses

Response samples

Content type
application/json
{
  • "running_temp_tasks": 0,
  • "running_tasks": 0,
  • "registered_templates": 4,
  • "registered_tasks": 18,
  • "permanent_tasks": 0,
  • "faxe_version": "0.8.1",
  • "data_throughput_sec": 11,
  • "data_paths_known": 0
}

Erlang VM process stats (reductions)

Returns top erlang processes sorted by reduction count.

Authorizations:
basicAuth

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    }
]

Erlang VM process stats (msg-queue length)

Returns top erlang processes sorted by message-queue-length.

Authorizations:
basicAuth

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    }
]

List of tasks

Returns a (possibly filtered) list of all tasks.

Authorizations:
basicAuth
query Parameters
orderby
string

order the list of tasks by 'id', 'name', 'last_start', 'last_stop' or (default) 'changed'

dir
string

direction for ordering, 'asc' or (default) 'desc'

full
string
Default: false

whether to return every task with the additional fields: "dfs", "group", "group_leader"

Responses

Response samples

Content type
application/json
[
  • {
    }
]

List of running tasks.

none

Authorizations:
basicAuth
query Parameters
orderby
string

order the list of tasks by 'id', 'name', 'last_start', 'last_stop' or (default) 'changed'

dir
string

direction for ordering, 'asc' or (default) 'desc'

full
string
Default: false

whether to return every task with the additional fields: "dfs", "group", "group_leader"

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Tasks by Template

Get a list of all tasks, that were created using the template with the given id

Authorizations:
basicAuth
path Parameters
template_id
required
string

Id of the template

query Parameters
orderby
string
Default: "changed"

order the list of tasks by 'id', 'name', 'last_start', 'last_stop' or (default) 'changed'

dir
string
Default: "desc"

direction for ordering, 'asc' or (default) 'desc'

full
string
Default: false

whether to return every task with the additional fields: "dfs", "group", "group_leader"

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Tasks by tags

Get a list of all tasks, that have at least one of the given tags associated with them. Give a comma-separated list of tag-strings

Authorizations:
basicAuth
path Parameters
tags
required
string

comma separated list of tags

query Parameters
orderby
string
Default: "changed"

order the list of tasks by 'id', 'name', 'last_start', 'last_stop' or (default) 'changed'

dir
string
Default: "desc"

direction for ordering, 'asc' or (default) 'desc'

full
string
Default: false

whether to return every task with the additional fields: "dfs", "group", "group_leader"

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Start all permanent tasks

Start all tasks marked permanent

Authorizations:
basicAuth

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "started 4 flows"
}

Stop all tasks

Stop all tasks currently running

Authorizations:
basicAuth

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "stopped 4 flows"
}

Start tasks by their ids

Start a list of tasks by their ids. Give a comma-separated list of task-ids

Authorizations:
basicAuth
path Parameters
ids
required
string

comma separated list of task-ids

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "started 4 flows"
}

Start tasks by their tags

Start a list of tasks by tags. Give a comma-separated list of tags.

Authorizations:
basicAuth
path Parameters
tags
required
string

comma separated list of tags

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "started 4 flows"
}

Stop tasks by their ids

Stop a list of running tasks by their ids. Give a comma-separated list of task-ids.

Authorizations:
basicAuth
path Parameters
ids
required
string

comma separated list of task-ids

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "stopped 1 flow"
}

Stop tasks by tags.

Stop a list of running tasks by their tags. Give a comma-separated list of tags.

Authorizations:
basicAuth
path Parameters
tags
required
string

comma separated list of tags

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "stopped 1 flow"
}

Update/reload all tasks

Update all tasks, running or not, so that updates on templates and/or macros get applied to all tasks at once.

Authorizations:
basicAuth

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "updated 13 flows"
}

Update/reload all tasks by a list of tags.

Update all tasks by a list of tags, running or not, so that updates on templates and/or macros get applied to these tasks at once.

Authorizations:
basicAuth
path Parameters
tags
required
string

comma separated list of tags

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "updated 11 flows"
}

Update/reload all tasks created with the specified template.

Update all tasks by a specified template, running or not, so that updates on templates and/or macros get applied to these tasks at once.

Authorizations:
basicAuth
path Parameters
template_id
required
string

The template_id

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "updated 7 flows"
}

Import a list of tasks.

Import a list of json encoded task definitions. Such a list can be retrieved with the '/tasks' method for example.

Authorizations:
basicAuth
Request Body schema: application/x-www-form-urlencoded
tasks
required
string

A json encoded list of tasks.

Responses

Response samples

Content type
application/json
{
  • "total": 0,
  • "successful": 0,
  • "errors": 0,
  • "messages": [
    ]
}

Upsert Task

Register a new or update an existing task. POST or PUT methods possible.

Authorizations:
basicAuth
Request Body schema: application/x-www-form-urlencoded
name
required
string

Name for the new or existing task.

dfs
required
string

A valid dfs script.

tags
string

A list of tags for the new task, provide json list(["tag1", "tag_2", "another_tag"]).

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "name": "testflow",
  • "id": 17
}

Get a task

Get a task by its id

Authorizations:
basicAuth
path Parameters
task_id
required
string

Id of the task to read

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "dfs": "string",
  • "tags": [
    ],
  • "vars": {
    },
  • "template": "string",
  • "running": true,
  • "permanent": true,
  • "changed": "string",
  • "last_start": "string",
  • "last_stop": "string",
  • "group_leader": true,
  • "group": "string"
}

Start a task.

Authorizations:
basicAuth
path Parameters
task_id
required
string

Id of the task, that should be started

query Parameters
quiet
boolean

If set to true, will not complain about already started task.

persistence
boolean

Whether to start the flow with active state persistence. This defaults to the state persistence config setting

Responses

Response samples

Content type
application/json
{
  • "success": true
}

Start a task permanently.

A permanently started task will automatically be started on faxe startup.

Authorizations:
basicAuth
path Parameters
task_id
required
string

Id of the task, that should be started permanently

query Parameters
quiet
boolean

If set to true, will not complain about already started task.

persistence
boolean

Whether to start the flow with active state persistence. This defaults to the state persistence config setting

Responses

Response samples

Content type
application/json
{
  • "success": true
}

Stop a task.

Authorizations:
basicAuth
path Parameters
task_id
required
string

Id of the task, that should be stopped

query Parameters
keepstate
boolean

Whether to keep flow state when stopping the flow. By default, the flow state will be deleted on stop.

Responses

Response samples

Content type
application/json
{
  • "success": true
}

Stop a task permanently.

A permanently stopped task will NOT automatically be started on faxe startup anymore.

Authorizations:
basicAuth
path Parameters
task_id
required
string

Id of the task, that should be stopped permanently

query Parameters
keepstate
boolean

Whether to keep flow state when stopping the flow. By default, the flow state will be deleted on stop.

Responses

Response samples

Content type
application/json
{
  • "success": true
}

Start a task-group concurrently.

Starts 'concurrency' copies of the task with id 'task_id'.

Authorizations:
basicAuth
path Parameters
task_id
required
string

Id of the task, that should be started concurrently

concurrency
required
integer

Number of instances, that should be started concurrently

Responses

Response samples

Content type
application/json
{
  • "success": true
}

Stop a task-group.

Stop a running task-group given the groups-name (Name of the group_leader task).

Authorizations:
basicAuth
path Parameters
groupname
required
string

Name of the task-group that should be stopped.

Responses

Delete a task-group.

Delete a task-group given the group-name (Name of the group_leader task).

Authorizations:
basicAuth
path Parameters
groupname
required
string

Name of the task-group that should be deleted.

Responses

Change the size of a task-group

Change the number of copies a task-group should run. This method is to be called on a running task or task-group.

Authorizations:
basicAuth
path Parameters
groupname
required
string

Name of the task-group.

group_size
required
integer

New number of copies to run for this task-group

Responses

Validate a DFS script.

Provide a dfs script to validate it's syntax and contents. Since v0.20.0 the response contains a list of custom nodes and their dependencies written in python, that are used in the provided dfs.

Authorizations:
basicAuth
Request Body schema: application/x-www-form-urlencoded
dfs
required
string

A valid dfs script.

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "script for flow is valid",
  • "python_nodes": [
    ]
}

Register a task.

Provide a dfs script and a name for the new task

Authorizations:
basicAuth
Request Body schema: application/x-www-form-urlencoded
name
required
string

Name for the newly registered task.

dfs
required
string

A valid dfs script.

tags
string

A list of tags for the new task, provide json list(["tag1", "tag_2", "another_tag"]).

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "name": "testflow",
  • "id": 17
}

Update a task.

Provide a dfs script and a name, update can be done while a task is running.

Authorizations:
basicAuth
path Parameters
task_id
required
string

Id of the task, that should be updated.

Request Body schema: application/x-www-form-urlencoded
name
string

Task name

dfs
required
string

A valid dfs script.

tags
string

A list of tags for the task, provide json list(["tag1", "tag_2", "another_tag"]).

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "name": "testflow",
  • "id": 17
}

Create task from template.

Registers a new task with name 'name' from the template with id 'template_id'.

Authorizations:
basicAuth
path Parameters
template_id
required
string
task_name
required
string
Request Body schema: application/x-www-form-urlencoded
tags
string

A list of tags for the new task, provide json list(["tag1", "tag_2", "another_tag"]).

vars
string

A json object with vars for the new task, example: {"var1": 33}. Every definition (keyword 'def') in the template dfs can be overwritten.

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "name": "testflow",
  • "id": 17
}

Delete a task

Delete a task by it's id, if it is not running.

Authorizations:
basicAuth
path Parameters
task_id
required
string

Responses

Force delete a task

Delete a task by it's id, whether it is currently running or not.

Authorizations:
basicAuth
path Parameters
task_id
required
string

Responses

Add tags to a task

Add a list of tags to the specified task, note that a task will have a tag only once, it does not matter, if a task is added multiple times.

Authorizations:
basicAuth
path Parameters
task_id
required
string
Request Body schema: application/x-www-form-urlencoded
tags
required
string

A list of tags for the task, provide json list(["tag1", "tag_2", "another_tag"])

Responses

Remove tags from a task

Remove a list of tags from the specified task

Authorizations:
basicAuth
path Parameters
task_id
required
string
Request Body schema: application/x-www-form-urlencoded
tags
required
string

A list of tags, provide json list(["tag1", "tag_2", "another_tag"])

Responses

Get the graph representation for a task

The graph representation contains all nodes and edges, as well as some information about external connections a node may establish

Authorizations:
basicAuth
path Parameters
task_id
required
string

Responses

Response samples

Content type
application/json
{
  • "nodes": [
    ],
  • "edges": [
    ]
}

List of tags

Get a list of all tags currently in use

Authorizations:
basicAuth

Responses

List of templates

Returns a list of all templates currently registered with this faxe instance.

Authorizations:
basicAuth
query Parameters
orderby
string
Default: "changed"

order the list of templates by 'id', 'name' or (default) 'changed'

dir
string
Default: "desc"

direction for ordering, 'asc' or (default) 'desc'

Responses

Import a list of templates.

Import a list of json encoded template definitions. Such a list can be retrieved with the '/templates' method for example.

Authorizations:
basicAuth
Request Body schema: application/x-www-form-urlencoded
templates
required
string

A json encoded list of templates.

Responses

Response samples

Content type
application/json
{
  • "total": 0,
  • "successful": 0,
  • "errors": 0,
  • "messages": [
    ]
}

Get a template

Get a template by it's ID

Authorizations:
basicAuth
path Parameters
template_id
required
string

Id of the template to read

Responses

Register a template

Provide a dfs script and a name for the new template

Authorizations:
basicAuth
Request Body schema: application/x-www-form-urlencoded
name
string

Name for the newly registered template

dfs
string

A valid dfs script

Responses

Upload python source code files

Upload one or more python source code files, that will be placed in the python script folder defined in faxe's config.

Authorizations:
basicAuth

Responses

Response samples

Content type
application/json
{
  • "files": [
    ]
}

Info about faxe's python integration

Get info about python runtime and a list of known python modules.

Authorizations:
basicAuth

Responses

Response samples

Content type
application/json
{
  • "vsn": "Python 3.9.1",
  • "path": "/data/python",
  • "modules": [
    ],
  • "executable": "/usr/local/bin/python"
}

Delete a template

Authorizations:
basicAuth
path Parameters
template_id
required
string

Responses

Start a temporary task

Start the given dfs script with a TTL, runtime can be extended with a call to /task/ping/:task_id when the timeout is over the task will stop and delete itself. Temporary tasks can not be restarted or updated!

Authorizations:
basicAuth
Request Body schema: application/x-www-form-urlencoded
dfs
required
string

DFS Script to run

ttl
required
integer

Timeout in milliseconds

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "ttl": 0,
  • "success": true
}

Start debugging task with task_id

Authorizations:
basicAuth
path Parameters
task_id
required
string

Responses

Start debugging task with task_id for a defined amount of time

Authorizations:
basicAuth
path Parameters
task_id
required
string
duration_minutes
required
integer

duration in minutes the debug/log events should be published

Responses

Stop debugging task with task_id

Authorizations:
basicAuth
path Parameters
task_id
required
string

Responses

Start publishing node metrics for task with task_id

Authorizations:
basicAuth
path Parameters
task_id
required
string

Responses

Start publishing node metrics for task with task_id for a defined amount of time

Authorizations:
basicAuth
path Parameters
task_id
required
string
duration_minutes
required
integer

duration in minutes node metrics events will be published

Responses

Stop publishing node metrics for task with id task_id

Authorizations:
basicAuth
path Parameters
task_id
required
string

Responses

Extend the lifetime of a temporary task

Authorizations:
basicAuth
path Parameters
task_id
required
string

Id of the task

Responses