Page Contents

OMERO

Downloads
Feature List
Licensing

Previous topic

Command Line Interface as an OMERO development tool

Next topic

Extensions

This Page

Working with objects

The omero obj command allows to create and update OMERO objects. More information can be displayed using bin/omero obj -h.

Object creation

The omero obj new subcommand allows to create new objects:

$ bin/omero obj new Object field=value

where Object is the type of object to create, e.g. Dataset or ProjectDatasetLink and field/value is a valid key/value pair for the type of object. For example, the following command creates a new screen with a name and a description:

$ bin/omero obj new Screen name=Screen001 description="screen description"

Object update

The omero obj update subcommand allows to update existing objects:

$ bin/omero obj update Object:ID field=value

where Object:ID is the type and the ID of object to update, e.g. Image:1 or PlateDatasetLink:10 and field/value is a valid key/value pair to update for the specified object.

For example, the following command updates the existing screen of ID 2 with a name and a description:

$ bin/omero obj update Screen:2 name=Screen001 description="screen description"

Piping output

The output of each omero obj command is formatted as Object:ID so that the CLI commands can be redirected and piped together. For example, the following set of commands creates a dataset and a project and links them together:

$ dataset=$(bin/omero obj new Dataset name=dataset-1)
$ project=$(bin/omero obj new Project name=plate-1)
$ bin/omero obj new ProjectDatasetLink parent=$project child=$dataset