Skip to main content

CLI Usage

The ionflow CLI provides a range of subcommands that can be used to manage and interact with the different components of the service, such as bay, kutlass, and row.

To use the ionflow CLI, run the ionflow command followed by a subcommand and any necessary flags or arguments. For example, to manage files and folders in Ionbay, run the ionflow bay command. To get help for a specific subcommand, run the ionflow [command] --help command.

Ionflow Subcommands

The ionflow CLI includes the following subcommands:

ionflow bay

The bay subcommand is used to manage files and folders in the Ionbay directory manager. It allows users to create, delete, and list directories, as well as upload and download files.

add

The ionflow bay add command is used to add a new, monitored directory to the ionflow instance.

The ionflow bay add command also requires the user to specify a parent bay for the new bay using the --parent flag.

Example:

ionflow bay add --parent my-parent-bay

!!! tip To integrate directly with Ionrow the parent should be the rowId the directory should be associated to.

ionflow bay file

The file subcommand is used to manage files within a bay.

list

The ionflow bay file list command is used to list files associated with a specific bay. The command requires the --bayId flag to be specified, which identifies the bay for which the associated files should be listed.

The ionflow bay file list command also requires the --parent flag to be specified, which identifies the parent of the bay being queried. This is necessary because the --bayId flag only identifies a bay within the context of its parent.

Example:

ionflow bay file list --bayId my-bay --parent my-parent-bay

To list the files associated with the bay with an ID of my-bay that is a child of the bay with an ID of my-parent-bay, the following command can be used:

ionflow bay folder

The folder subcommand is used to directly add named folders into a bay (for organizational purposes).

add

The ionflow bay folder add command is used to add a new folder to a specific bay. The command requires the --bayId flag to be specified, which identifies the bay to which the new folder should be added.

The ionflow bay folder add command also requires the --parent flag to be specified, which identifies the parent of the bay being queried. This is necessary because the --bayId flag only identifies a bay within the context of its parent.

In addition to the --bayId and --parent flags, the ionflow bay folder add command requires the name of the new folder to be specified as the first argument.

Example: To add a new folder with the name my-folder to the bay with an ID of my-bay that is a child of the bay with an ID of my-parent-bay, the following command can be used:

ionflow bay folder add my-folder --bayId my-bay --parent my-parent-bay

!!! warning Note that both the --bayId and --parent flags are required to properly identify the bay to which the new folder should be added. The name of the new folder must be specified as the first argument.

daemon

The ionflow bay daemon command is used to start a ionbay daemon. The ionbay daemon can be run independently from the ionflow server as a file monitoring agent. This can be useful in deployments where there is not a single shared file system.

To start a ionbay daemon with the default configuration, the ionflow bay daemon command can be run without any flags:

ionflow bay daemon

To start a ionbay daemon using a custom configuration file located at /path/to/my-config.conf, the --config flag can be used:

ionflow bay daemon --config /path/to/my-config.conf

completion

The completion subcommand is used to generate autocompletion scripts for the ionflow CLI. It supports bash, zsh, powershell, and fish shells.

To use the completion subcommand, run the ionflow completion [shell] command, where [shell] is the name of the shell for which you want to generate the autocompletion script. For example, to generate an autocompletion script for the bash shell, run the ionflow completion bash command.

ionflow kutlass

Manage kutlass workflows

ionflow kutlass event

Send cloud events to kutlass

send

The ionflow kutlass event send command is used to send a cloud event to the Kutlass server.

To send a cloud event, use the following command:

ionflow kutlass event send [flags]

To send a cloud event with the source my-event-source and type my-event-type, and data {"key": "value"}, use the following command:

ionflow kutlass event send --source=my-event-source --type=my-event-type --data='{"key": "value"}'

ionflow kutlass wi

Manage kutlass workflow instances

watch

The ionflow kutlass wi watch command is used to stream workflow instances from the Kutlass server.

To use the ionflow kutlass wi watch command, run it without any arguments or flags:

ionflow kutlass wi watch

By default, the ionflow kutlass wi watch command streams all available workflow instances from the Kutlass server.

To specify a particular resource version to stream from, use the --resource-version flag:

ionflow kutlass wi watch --resource-version 123

For more information about streaming, read here.

ionflow kutlass workflows

Manage kutlass workflows

create

The ionflow kutlass workflows create command is used to create a new workflow in the Ionflow service. This command requires the user to provide the path to a JSON or YAML file containing the workflow definition using the --file flag.

To create a new workflow using a file located at /path/to/my-workflow.json, the following command can be used:

ionflow kutlass workflows create --file /path/to/my-workflow.json
delete

The ionflow kutlass workflows delete command is used to delete a workflow from the Ionflow service.

To delete a workflow, the user must provide the ID of the workflow as an argument to the command. For example, to delete the workflow with an ID of my-workflow-id, the following command can be used:

ionflow kutlass workflows delete --workflow-id my-workflow-id

The --force flag can also be used to delete a workflow even if it is currently in use.

ionflow kutlass workflows delete --workflow-id my-workflow-id --force
list

The ionflow kutlass workflows list command is used to list all available workflows in the Ionflow service.

To list the workflows in the service, the user can run the ionflow kutlass workflows list command without any flags:

ionflow kutlass workflows list

This command will return a list of all workflows in the service. The list will be displayed in the terminal or command prompt, and it can be used to view and analyze the available workflows.

run

The ionflow kutlass workflows run command is used to run a workflow in the Ionflow service.

To run a workflow, the user must specify the ID of the workflow using the --id flag. They can also specify input data for the workflow using the --data flag, which should be provided in JSON format.

For example, to run the workflow with an ID of my-workflow-id and input data of {"input": "value"}, the following command can be used:

ionflow kutlass workflows run --id my-workflow-id --data '{"input": "value"}'

The --blocking flag can be used to enable blocking mode, which will wait until the workflow completes before returning the result. If this flag is not used, the command will return immediately after starting the workflow.

ionflow row

The row subcommand is used to manage ionrow schema and data. It allows users to manipulate Ionrow data like files, filters, and rows programatically.

add

The ionflow row add command is used to add new rows to a space. The command optionally takes the --data flag, which specifies the list of row data to add in JSON format. This data should include the keys and values for the columns in the space, and the values should be of the correct type as specified in the column definitions.

The ionflow row add command also has the --column-identifier flag, which specifies the column identifier to use for the row. This can either be id or name. If this flag is not provided, the default value of name will be used.

In addition, the ionflow row add command has the --space-id flag, which specifies the ID of the space to which the new rows should be added. If this flag is not provided, the default space will be used.

Example: To add new rows to the default space using the name column identifier, with data specified in the --data flag, the following command can be used:

ionflow row add --data='[{"title": "123", "count":0}, {"title": "456", "count":1}]'

To add new rows to the space with an ID of my-space using the id column identifier, with data specified in the --data flag, the --column-identifier and --space-id flags can be used:

ionflow row add --data='[{"bb458ba5-791b-4c40-8947-db26d3f0741d": "123", "471c4568-6245-4f79-a41e-b44afcbf9b96":0}, {"bb458ba5-791b-4c40-8947-db26d3f0741d": "456", "471c4568-6245-4f79-a41e-b44afcbf9b96":1}]'

The ionflow row add command has a special functionality where it can take data from stdin by passing the special @ value to the --data flag. This allows the user to pass the row data to the command through stdin instead of directly specifying it in the command.

ionflow row add --data=@ < ./testdata/ionrow/standard-row-data.json

Where standard-row-data.json looks like:

standard-row-data.json
[
{
"Collection ID": "1",
"Run ID": 1,
"Username": "user1",
"Test Case": "test1",
"Date": "2000-01-01",
"Temperature": 99.9,
"Angle": 45.0,
"Frequency": 1555,
"Completed": "true"
},
{
"Collection ID": "2",
"Run ID": 2,
"Username": "user2",
"Test Case": "test2",
"Date": "2000-01-01",
"Temperature": 99.9,
"Angle": 45.0,
"Frequency": 1555,
"Completed": "true"
}
]

update

The ionflow row update command is used to update an existing row on the Ionflow service.

To update an existing row, the user must provide the ID of the row as an argument to the command. For example, to update the row with an ID of my-row-id, the following command can be used:

ionflow row update my-row-id

The ionflow row update command also allows the user to specify additional flags to modify the data in the row. For example, to set the title column to the value 123 and the count column to 0, the user can use the --data flag as follows:

ionflow row update my-row-id --data='{"title": "123", "count":0}'

The ionflow row update command also allows the user to specify the --data flag value as @ to read the request contents from stdin. This can be useful if you want to generate the data programmatically or if you want to pass it to the command from a file.

For example, to pass data from a file named data.json to the ionflow row update command, you can use the following command:

cat data.json | ionflow row update my-row-id --data='@'

This command reads the contents of the data.json file using the cat command and passes it to the ionflow row update command using a pipe (|). The --data='@' flag tells the ionflow row update command to read the request contents from stdin, which allows the data from the data.json file to be passed to the command as input.

watch

The ionflow row watch command is used to stream rows from a specific view in the Ionflow service.

To stream rows from a view, the user must provide the ID of the view as an argument to the command. For example, to stream rows from a view with an ID of my-view-id, the following command can be used:

ionflow row watch my-view-id

The ionflow row watch command can also accept the --resource-version flag, which allows the user to specify a resource version to watch from. The server will respond with changes that itemize the outcome of operations (such as create, delete, and update) that occurred after the specified resource version.

For example, to stream rows from a view with an ID of my-view-id starting from a resource version of 123, the following command can be used:

ionflow row watch my-view-id --resource-version=123

This command will stream rows from the view with an ID of my-view-id, starting from the resource version of 123 and displaying any changes that occur after that resource version.

For more information about streaming, read here.

ionflow row column

Manage the columns associated with a particular space

delete

The ionflow row column delete command is used to delete a column and all of its data from a space in the Ionflow service.

To delete a column, the user must provide the ID of the column as an argument to the command. For example, to delete the column with an ID of my-column-id, the following command can be used:

ionflow row column delete my-column-id

!!! warning This command will delete the specified column and all of its data from the space. Please note that this action can be undone, but requires technical support.

list

The ionflow row column list command is used to list all columns in a space within the Ionflow service.

To list the columns in a space, the user can use the --space-id flag to specify the ID of the space that they want to list the columns for. For example, to list the columns in a space with an ID of my-space-id, the following command can be used:

ionflow row column list --space-id my-space-id

This command will return a list of all columns in the specified space, along with their names and data types. The list will be displayed in the terminal or command prompt, and it can be used to view and analyze the structure of the space.

ionflow row file

Manage the files associated with rows, using the automatic tracking with Ionbay.

list

The ionflow row file list command is used to list all available files for a given row in the Ionflow service.

To list the files for a row, the user must provide the ID of the row as an argument to the command. For example, to list the files for a row with an ID of my-row-id, the following command can be used:

ionflow row file list my-row-id

This command will return a list of all available files for the specified row, along with their names and sizes. The list will be displayed in the terminal or command prompt, and it can be used to view and analyze the files associated with the row.

watch

The ionflow row file watch command is used to stream file updates for a given row in the Ionflow service.

To stream file updates for a row, the user must provide the ID of the row and the ID of the bay that the row is associated with using the --row and --bayId flags, respectively. For example, to stream file updates for a row with an ID of my-row-id and a bay ID of my-bay-id, the following command can be used:

ionflow row file watch --row my-row-id --bayId my-bay-id

For more information about streaming, read here.

ionflow row filterset

Manage filtersets in Ionrow

create

The ionflow row filterset create command is used to create a filterset for a particular view in the Ionflow service. A filterset is a set of filters that can be applied to a view to limit the rows that are displayed.

To create a filterset, the user must provide the ID of the view as an argument to the command. For example, to create a filterset for a view with an ID of 123456, the following command can be used:

ionflow row filterset create 123456

ionflow row space

Manage spaces within the ionrow instance.

add

The ionflow row space add command is used to add a new space to the Ionflow instance.

To add a new space, use the following command:

ionflow row space add [flags]

To add a new space with the name my-space and column data '[{"name":"title","fieldType":"text"},{"name":"count","fieldType":"int"}]', use the following command:

ionflow row space add --name=my-space --column-set='[{"name":"title","fieldType":"text"},{"name":"count","fieldType":"int"}]'

Column data can be provided using the '@' value for the --column-set flag, and passing data via stdin, for example:

echo '[{"name":"title","fieldType":"text"},{"name":"count","fieldType":"int"}]' | ionflow row space add --column-set='@'

In this example, the column data is provided as a string in the terminal using the echo command, and it is passed to the ionflow row space add command using a pipe (|). The --column-set='@' flag tells the ionflow row space add command to read the request contents from stdin, which allows the column data string to be passed to the command as input.

This can be useful if you want to generate the column data programmatically or if you want to pass it to the command from a file.

update

The ionflow row space update command is used to update an existing space in the Ionflow instance.

To update a space, use the following command:

ionflow row space update [flags]

To update a space with the ID my-space-id and set its name to new-name and its column data to '[{"name":"title","fieldType":"text"},{"name":"count","fieldType":"int"}]', use the following command:

ionflow row space update --space-id=my-space-id --name=new-name --column-set='[{"name":"title","fieldType":"text"},{"name":"count","fieldType":"int"}]'

To update a space with the ID my-space-id and set its column data to '[{"name":"title","fieldType":"text"},{"name":"count","fieldType":"int"}]', using data provided via stdin, use the following command:

echo '[{"name":"title","fieldType":"text"},{"name":"count","fieldType":"int"}]' | ionflow row space update --space-id=my-space-id --column-set='@'
list

The ionflow row space list command is used to list all available spaces on the Ionflow instance.

ionflow row space list

This command will return a list of all available spaces, along with their names and IDs. The list will be displayed in the terminal or command prompt, and it can be used to view and analyze the spaces available on the Ionflow instance.

ionflow row view

Manage ionflow views.

add

The ionflow row view add command is used to add a new view to a Ionflow instance.

To add a new view to a space with an ID of my-space-id, use the following command:

ionflow row view add my-space-id

To specify the name, category, and viewability of the view, the --name, --category, and --viewability flags can be used. For example, to add a view with the name my-view, category my-category, and viewability private, use the following command:

ionflow row view add my-space-id --name=my-view --category=my-category --viewability=private

The --description flag can be used to provide a description for the view. For example, to add a view with a description of This is my view, use the following command:

ionflow row view add my-space-id --description='This is my view'
list

The ionflow row view list command is used to list all available views for a given space in the Ionflow service.

To list the views for a space, the user must provide the ID of the space as an argument to the command. For example, to list the views for a space with an ID of my-space-id, the following command can be used:

ionflow row view list my-space-id

This command will return a list of all available views for the specified space, along with their names and descriptions. The list will be displayed in the terminal or command prompt, and it can be used to view and analyze the views associated with the space.

server

The ionflow server command is used to start a ionflow server. Starting the server automatically starts the Kutlass, Ionrow, and Ionbay services.

To start a ionrow server with the default configuration, the ionflow server command can be run without any flags:

ionflow server

To start a ionrow server using a custom configuration file located at /path/to/my-config.conf, the --config flag can be used:

ionflow server --config /path/to/my-config.conf