mytardis instrument

usage: mytardis instrument [-h] {list,get,create,update} ...

Positional Arguments

command

Possible choices: list, get, create, update

available commands

Sub-commands:

list

Display a list of instrument records.

mytardis instrument list
    [--facility FACILITY] [--limit LIMIT] [--offset OFFSET] [--order_by ORDER_BY] [--json]

  EXAMPLE

  $ mytardis instrument list --facility 1

  Model: Instrument
  Query: http://mytardisdemo.erc.monash.edu.au/api/v1/instrument/?format=json&facility__id=1
  Total Count: 3
  Limit: 20
  Offset: 0

  +----+-------------------------+---------------+
  | ID |          Name           |   Facility    |
  +====+=========================+===============+
  |  3 | Test Instrument         | Demo Facility |
  +----+-------------------------+---------------+
  |  4 | Beamline                | Demo Facility |
  +----+-------------------------+---------------+
  |  8 | James Test Instrument   | Demo Facility |
  +----+-------------------------+---------------+

Named Arguments

--facility

The facility ID.

--limit

Maximum number of results to return.

--offset

Skip this many records from the start of the result set.

--order_by

Order by this field.

--json

Display results in JSON format.

Default: False

get

Display a single instrument record.

mytardis instrument get [-h] [--json] instrument_id

  EXAMPLE

  $ mytardis instrument get 3

  +------------------+-----------------+
  | Instrument field |      Value      |
  +==================+=================+
  | ID               | 3               |
  +------------------+-----------------+
  | Name             | Test Instrument |
  +------------------+-----------------+
  | Facility         | Demo Facility   |
  +------------------+-----------------+

Positional Arguments

instrument_id

The instrument ID.

Named Arguments

--json

Display results in JSON format.

Default: False

create

Create an instrument record.

mytardis instrument create [-h] facility_id name

  EXAMPLE

  $ mytardis instrument create 1 "New Instrument"
  +------------------+----------------+
  | Instrument field |     Value      |
  +==================+================+
  | ID               | 9              |
  +------------------+----------------+
  | Name             | New Instrument |
  +------------------+----------------+
  | Facility         | Demo Facility  |
  +------------------+----------------+

  Instrument created successfully.

Positional Arguments

facility_id

The ID of the new instrument’s facility.

name

The name of the instrument to create.

update

Update/rename an existing instrument record.

mytardis instrument update [-h] [--name NAME] instrument_id

  EXAMPLE

  $ mytardis instrument update --name "Renamed New Instrument" 9

  +------------------+------------------------+
  | Instrument field |         Value          |
  +==================+========================+
  | ID               | 9                      |
  +------------------+------------------------+
  | Name             | Renamed New Instrument |
  +------------------+------------------------+
  | Facility         | Demo Facility          |
  +------------------+------------------------+

  Instrument updated successfully.

Positional Arguments

instrument_id

The ID of the instrument to update.

Named Arguments

--name

The new name of the instrument.