Note
This documentation is for OMERO 5.2. This version is now in maintenance mode and will only be updated in the event of critical bugs or security concerns. OMERO 5.3 is expected in the first quarter of 2017.
The omero obj command allows to create and update OMERO objects. More information can be displayed using bin/omero obj -h.
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"
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"
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