mytardis apiΒΆ

usage: mytardis api [-h] {list,get} ...
Sub-commands:
list

List models accessible via MyTardis’s REST API.

usage: mytardis api list [-h] [--json]

  EXAMPLE

  $ mytardis api list

  API Endpoints
  +------------+---------------------+----------------------------+
  | Model      | List Endpoint       | Schema                     |
  +============+=====================+============================+
  | facility   | /api/v1/facility/   | /api/v1/facility/schema/   |
  +------------+---------------------+----------------------------+
  | instrument | /api/v1/instrument/ | /api/v1/instrument/schema/ |
  +------------+---------------------+----------------------------+
  | experiment | /api/v1/experiment/ | /api/v1/experiment/schema/ |
  +------------+---------------------+----------------------------+
  | dataset    | /api/v1/dataset/    | /api/v1/dataset/schema/    |
  +------------+---------------------+----------------------------+
   ...          ...                   ...
  +------------+---------------------+----------------------------+
Options:
--json=False Display results in JSON format.
get

Display the schema for a particular MyTardis API model, showing which fields are accesible via the API, which fields support filtering, and which fields support ordering.

usage: mytardis api get [-h] [--json] api_model

  EXAMPLE

  $ mytardis api get facility
  +------------------+------------------------------------------+
  | API Schema field |                   Value                  |
  +==================+==========================================+
  | Model            | facility                                 |
  +------------------+------------------------------------------+
  | Fields           | id                                       |
  |                  | manager_group                            |
  |                  | name                                     |
  |                  | resource_uri                             |
  +------------------+------------------------------------------+
  | Filtering        | {                                        |
  |                  |   "id": [                                |
  |                  |     "exact"                              |
  |                  |   ],                                     |
  |                  |   "manager_group": "ALL_WITH_RELATIONS", |
  |                  |   "name": [                              |
  |                  |     "exact"                              |
  |                  |   ]                                      |
  |                  | }                                        |
  +------------------+------------------------------------------+
  | Ordering         | {}                                       |
  +------------------+------------------------------------------+
Positional arguments:
api_model The model name.
Options:
--json=False Display results in JSON format.