Skip to content

Selection commands

The selection subcommands allow you to manage your Arkindex selection.

Adding elements to the selection in batches

The import subcommand can be used to add elements, from a file containing element UUIDs (one per line), to your Arkindex selection. The elements are sent to the selection in batches, 50 elements at a time by default. If some API calls fail, then the UUIDs of the elements that failed to be added to the selection are saved to a file.

Basic usage

arkindex selection import path/to/file.txt

This will add all the elements of which the UUIDs are contained in the file to your Arkindex selection, in batches of 50.

Arguments

Required arguments

The only required argument when running the import command is the path to the file containing element UUIDs (one per line).

Optional arguments

  • --batch-size: specify the size of the batches of elements to add to the selection. This parameter defaults to 50. Setting the batch size too high may cause API calls to fail.

    arkindex selection import path/to/file.txt --batch-size 42
    

  • --clear: empty your Arkindex selection before adding new elements to it.

    arkindex selection import path/to/file.txt --clear
    

  • --failures-file: specify the file to which the UUIDs of any elements that have failed to be added to the selection will be written. This defaults to failed_elements_$CURRENT_DATETIME.txt, where $CURRENT_DATETIME is the current date in ISO 8601 format.

    arkindex selection import path/to/file.txt --failures-file path/to/some/file.txt