Overview
The Seven Bridges RHEO gives you the ability feature to run complex analysis workflows on the Seven Bridges Platform with minimal manual intervention.
The Command Line Interface allows you to manage the automations using commands which are described below.
Manage automations
- List automations
- Create a new automation
- Get details of an automation
- Edit an automation
- Archive an automation
- Restore an automation
Manage code packages
- Create a code package
- Output I/O schema to the command line
- List code packages
- Archive a code package
- Restore a code package
- Set a custom URL for a code package
Manage automation members
Manage automation runs
- List automation runs
- Get details of an automation run
- Start a new automation run
- Stop an automation
- Rerun an automation
- Edit an automation run
- Access automation run log file
- View the automation state file
Manage automations
List automations
List all automations you have access to. The list will return an ID for every automation which is required for issuing other commands for the automations (e.g. for listing automation members).
You can also list a single automation by using a name argument and specifying the exact name of the automation.
Usage:
sb automations list [--name <name>] [flags]
Arguments:
name The name of the specific automation you wish to list. The name must be an exact match.
Flags:
-h, --help
Create a new automation
Create a new automation.
Usage:
sb automations create --name <name>
Arguments:
name The automation name.
description The automation description.
billing-group <id>] The ID of the billing group. This field is not required for Enterprise users.
secret-settings <json_string>] User-defined secret settings for the automation (for example a password to authenticate against an external service).
memory_limit The memory limit specified in MB. The default value is 500Mb while the maximum allowed is 4000Mb. If no limit is set for a code package or automation run, this value will be used.
project-based Use this argument to allow running automations directly from within your projects.
Flags:
-h, --help
Get details of an automation
Get the details of a specified automation.
Usage:
sb automations get <automation-id>
Arguments:
automation-id The ID of the specific automation you are querying. Use the list automations command to obtain the ID.
Flags:
-h, --help
Edit an automation
Get the details of a specified automation by changing its name, billing group or secret settings.
Usage:
sb automations update --automation-id <automation-id_value> [--name <name_value>] [--description <description_value>] [--secret-settings <secret-settings_value>] [--billing-group <billing-group_value>] [--project-based project-based_value>]
Arguments:
automation-id The ID of the specific automation you are querying. Use the list automations command to obtain the ID.
name The name of the automation.
description The automation description.
secret-settings The automation secret settings as json string. (default “{}“)
billing-group The automation billing group uuid as a string.
project-based. Use this argument to allow running automations directly from within your projects.
Flags:
-h, --help
Archive an automation
Use this command to archive an automation. Archived automations can no longer be run, but can be restored. Previous automation runs of archived automations remain visible.
If you archive an automation, all accompanying code packages are archived as well.
Usage:
sb automations archive <automation-id>
Arguments:
automation-id The ID of the automation you are archiving. Use the list automations command to obtain the ID.
Flags:
-h, --help
Restore an automation
Restoring (or unarchiving) an automation makes the automation available for execution. If you restore an automation, all accompanying code packages are restored as well.
Usage:
sb automations restore <automation-id>
Arguments:
automation-id The ID of the automation you are restoring. Use the list automations command to obtain the ID.
Flags:
-h, --help
Manage code packages
Create a code package
The command for creating a code package. Use the file
argument to specify the path to the code package file.
Usage:
sb automations packages create
Arguments:
automation-id The ID of the automation the code package is created for.
version The version identifier for this code package. Has to be unique within an automation.
file <local_path_to_file> Path to local code package file created with 'freyja build' command.
memory_limit Set the memory limit for the code package, specified in MB. The default value is 500Mb while the maximum allowed is 4000Mb. If omitted, the limit will be inherited from the automation entity when creating an automation run.
Flags:
-h, --help
List code packages
Automations can have multiple code packages. This command retrieves the list of deployed code packages for a specific automation or for all automations you have access to.
Usage:
sb automations packages list [--automation-id <automation-id>]
Arguments:
automation-id The ID of the specific automation you are listing the code packages for. Use the list automations command to obtain the ID. If omitted, code packages from all automations the user has access to are listed.
Flags:
-h, --help
Archive a code package
This command archives a code package .
Usage:
sb automations packages archive <package-id>
Arguments:
package-id The ID of the code package you are archiving.
Flags:
-h, --help
Restore a code package
This command restores an archived code.
Usage:
sb automations packages restore <package-id>
Arguments:
package-id The ID of the code package you are restoring.
Flags:
-h, --help
Output code package schema
Output the input-output schema for given a code package to the STDOUT.
Usage:
sb automations packages schema [--package_id <package_id>]
Arguments:
package-id The ID of the specific code package you want the output the schema for.
Flags:
-h, --help
Download code package file
To download a code package file associated with a code package entity, first get the file ID of the code package file using 'sb automations packages get' and then download the file using the 'sb download' command.
For this operation to be successful, you will need at least COPY permission on the automation.
Usage:
sb automations packages get <package-id> --output table
Arguments:
package-id The ID of the specific code package you want to download.
Flags:
-h, --help
Set a custom URL for a code package
This command sets a custom URL for a code package. Users get redirected to this URL when starting a new automation run on the automation GUI. This allows automation developers to provide their users with a customized automation setup page instead of using the default one.
Usage:
sb automations packages update --package-id <package-id_value> --custom-url <custom-url_value>
Arguments:
package-id The ID of the specific code package you want to set the custom URL for. Use the list code packages command to obtain the ID.
custom_url The URL you want to set for the code package.
Flags:
-h, --help
Manage automation members
The following commands are available for managing automation members.
List members
List all members of an automation. For each member, the response lists their username and permissions for the specified automation.
Usage:
sb automations members list --automation-id <automation-id>
Arguments:
automation-id The ID of the specific automation you are querying. Use the list automations command to obtain the ID.
Flags:
-h, --help
Add an automation member
Add an existing Platform user to the automation and specify their permissions. Only automation admins can add new members to an automation.
Usage:
sb automations members create --automation-id <automation-id> --user <username> [--read] [--write] [--copy] [--execute] [--admin]
Arguments:
automation-id The ID of the specific automation you are adding the member to. Use the list automations command to obtain the ID.
user <username> The username of the person you are adding to the automation.
Flags:
-h, --help
--read Assign the read permission to a member. The member can view the automation, its code packages, and its automation runs. All members always have the read permission.
--write Assign the write permission to a member.
--copy Assign the copy permission to a member.
--execute Assign the execute permission to a member. The member can run the automation. If this flag is omitted, the default value will be false.
--admin Assign administrative permissions. The member can modify permissions for other members of an automation, as well as add or remove users from the automation. It also includes all of the above permissions. If left out, it defaults to false.
Delete a member
Delete a member from the automation. Only automation admins can delete other automation members.
Usage:
sb automations members delete --automation-id <automation-id> --user <username>
Arguments:
automation-id The ID of the automation you are removing the member from. Use the list automations command to obtain the ID.
user The username of the member you are removing from an automation.
Flags:
-h, --help
Get member's permissions
Get information on member's permission in an automation.
Usage:
sb automations members get --automation-id <automation-id> --user <username>
Arguments:
automation-id The ID of the specific automation you are querying. Use the list automations command to obtain the ID.
user The username of the member you are querying.
Flags:
-h, --help
Change member's permissions
Change member's permissions in an automation. Only automation admins can change permissions for automation members.
Usage:
sb automations members update --automation-id <automation-id> --user <username> [--read] [--write] [--copy] [--execute] [--admin]
Arguments:
automation-id The ID of the specific automation you are querying. Use the list automations command to obtain the ID.
user The username of the member you are changing the permissions for.
Flags:
-h, --help
--read Assign the read permission to a member. The member can view the automation, its code packages, and its automation runs. All members always have the read permission.
--write Assign the write permission to a member.
--copy Assign the copy permission to a member.
--execute Assign the execute permission to a member. The member can run the automation. If this flag is omitted, the default value will be false.
--admin Assign administrative permissions. The member can modify permissions for other members of an automation, as well as add or remove users from the automation. It also includes all of the above permissions. If left out, it defaults to false.
Manage automation runs
List automation runs
List all automation runs, including all runs the user has access to, only those from a specific automation, only those from a specific code package, and/or filtered by specified criteria.
You can also use this command to obtain run IDs that are required for querying automation runs using the other available commands.
Usage:
sb automations runs list [--automation-id <automation-id>][--name <run-name>][--package-id <package-id>][--status <status> <status> ...][--created-by <username>][--created-from <created-from>[--created-to <created-to> ][--order-by <attribute>][--order [asc|desc]]
Arguments:
automation-id The ID of the specific automation you are listing the runs for. Use the list automations command to obtain the ID.
name The name of the automation run you want to list. The search is partial and case-insensitive.
package-id The ID of the code package you are listing the automation runs for.
status Filter the automation runs by their status.
created-by <username> List runs for the specified user.
created-from Enter the starting date for querying automation runs started on the specified date and onwards (see below for more information).
created-to Enter the ending date for querying automation runs before the specified date. You can use it in combination with the created_from to specify a time interval.
order-by <attribute> Return results sorted by this attribute name, e.g. ‘created_by’, ‘created_from’, etc. By default results are sorted by ‘created_on’ in descending order (most recent first).
[--order [asc|desc] ]
Flags:
-h, --help
Get details of an automation run
Get details of a specific automation run. The response will also include output values which are mapped to the schema.
Usage:
sb automations runs get <run-id>
Arguments:
run-id The ID of the specific automation run you are querying. Use the list automation runs command to obtain the ID.
Flags:
-h, --help
Start a new automation run
Start a new automation run.
Usage:
sb automations start [[--package-id <package-id>]|[--automation-id <automation-id>]|[--automation-name <name>]|[--name <name>]|[--settings <json_string>]|[--secret-settings <json_string>]|[--inputs <json_string>]]
Arguments:
package-id The ID of the code package that you want to run.
automation-id The ID of the automation that want to run. If the code package is omitted, the most recent one will be used.
automation-name The name of the automation that you want to run.
name The name for the automation run. If omitted, the name will be automatically generated.
settings Specify the run settings in the JSON format.
secret-settings Same as above with the only difference that these values will not be logged or visible anywhere. You can use this field to specify credentials or any other confidential information.
inputs Specify the run inputs in the JSON format.
memory_limit The memory limit specified in MB. The default value is 500Mb while the maximum allowed is 4000Mb. If no limit is set for a code package or automation run, this value will be used.
Flags:
-h, --help
The 'inputs' will be mapped to input ports of the main step of the automation, while settings are added to the automation configs and accessed via the config_ attribute present in all steps.
Stop an automation
Stop a running automation.
Usage:
sb automations stop <run-id>
Arguments:
run-id The ID of the specific automation run you are stopping. Use the list automation runs command to obtain the ID.
Flags:
-h, --help
Rerun an automation
Reruns an automation. To rerun an automation, specify the ID of the automation run you wish to rerun. The inputs and settings are automatically taken from the originating run unless new inputs and settings are provided.
In addition, you can specify a different code package allowing you to run a different version of the automation while preserving all other settings.
Usage:
sb automations rerun [--name <name_value>] [--inputs <inputs_value>] [--package-id <package-id_value>] [--settings <settings_value>] [--resume-from <resume-from_value>] --automation-run-id
<automation-run-id_value> [--secret-settings <secret-settings_value>] [--merge] [flags]
Arguments:
run-id The ID of the automation run you are rerunning. Use the list automation runs command to obtain the ID.
merge If specified, the new inputs and settings are added to previous ones instead of replacing them.
memory_limit Set the memory limit for the rerunning an automation, specified in MB. The default value is 500Mb while the maximum allowed is 4000Mb.
Flags:
-h, --help
Edit an automation run
Update automation run details. Only the run name can be changed, all other attributes are currently read-only.
Usage:
sb automations runs update --run-id <run-id_value> [--name <name_value>]
Arguments:
--name New name of automation run.
Flags:
-h, --help
Access automation run log file
This command outputs the content of the log file to the terminal. The exact number of the most recent lines the log should return is determined using the last
argument. Still active automation runs may have their log entries delayed for up to 2 minutes.
Usage:
sb automations log <automation_run_id> [--last <last_value>]
Arguments:
automation_run_id The ID of the automation run you are querying.
last The number of most recent lines the log should return.
Flags:
-h, --help
View the automation state file
View the current content of the automation state file.
Usage:
sb automations state <run-id>
Arguments:
run-id The ID of the specific automation run you are viewing the state file for. Use the list automation runs command to obtain the ID.
Flags:
-h, --help
The output of this command can be piped into standard linux tools like 'grep' and 'less' or redirected to a file to save permanently.
Run state information supports streaming, i.e. current state information can be retrieved while the automation is still running.
Updated 4 months ago