Skip to content

Manage Lists


Data Type

You can manage lists by specifying list as <dataType> in the SEAL OP-CLI call:

opcli list <command> <option>

Display the Options and Parameters

By specifying the --help option, you get the available options and parameters for the list data type:

opcli list --help

Create a List

With the create command, you create a list:

opcli list create --listfile <file>|--listname <name> [--format <format>] [--metadata <metadata>] [--owner <owner>]
  • --listfile <file>: Path and name of the file to be imported as list

  • --listname <name>: Name of the list; evaluated and mandatory unless a list file is to be imported

  • --format <format>: Format of the list file; available values: rli, csv, json; default: json

  • --metadata <metadata>: Metadata in JSON syntax, for example, '{"status":"new", "origin":"system"}'

  • --owner <owner>: Account name of the user who is to be the owner of the task

Example - create an empty list named list1 with the status and origin metadata

opcli list create --listname list1 --metadata '{"status":"new", "origin":"system"}'

Example - create a list from the repro list reprolist.rli

opcli list create --listfile reprolist.rli -format rli

Get the Metadata and Items of a List

With the get command, you get the metadata and the items of a list. The metadata are output as JSON object on STDOUT.

opcli list get <listId> [--embed input|output]
  • <listId>: ID of the list; mandatory

    Hint - uuid

    The list ID is the value of the uuid setting and output when the list is created, for example, "uuid":"cf5bfb0d-7861-499e-ad29-704f3ba1943c".

  • --embed <listType>: Additionally, output the items of the input or output list as well; available values: input, output; default: none

Example - get the metadata of the list with the ID cf5bfb0d-7861-499e-ad29-704f3ba1943c

opcli list get cf5bfb0d-7861-499e-ad29-704f3ba1943c

Example - get the metadata and the items of the list with the ID cf5bfb0d-7861-499e-ad29-704f3ba1943c

opcli list get cf5bfb0d-7861-499e-ad29-704f3ba1943c --embed input

Replace or Delete the Metadata of a List

With the replace-meta command, you replace the metadata of a list. The existent metadata are deleted and the specified metadata are set. For deleting the existent metadata, specify an empty JSON object as metadata.

opcli list replace-meta <listId> --file <file>|--metadata <metadata>
  • <listId>: ID of the list; mandatory

  • --file <file>: Path and name of a file containing the new metadata as JSON object

  • --metadata <metadata>: New metadata in JSON syntax, for example, '{"status":"obsolete"}'

Example - replace the metadata of the list by the metadata specified as option

opcli list replace-meta cf5bfb0d-7861-499e-ad29-704f3ba1943c --metadata '{"status":"obsolete"}'

Example - replace the metadata of the list by the metadata specified in the metadata.json file

opcli list replace-meta cf5bfb0d-7861-499e-ad29-704f3ba1943c --file metadata.json

Example - delete the metadata of the list

opcli list replace-meta cf5bfb0d-7861-499e-ad29-704f3ba1943c --metadata '{}'

Back to top