Skip to content

onyx

API for pathogen metadata.

Usage:

$ onyx [OPTIONS] COMMAND [ARGS]...

Options:

  • -d, --domain TEXT: Domain name for connecting to Onyx. [env var: ONYX_DOMAIN]
  • -t, --token TEXT: Token for authenticating with Onyx. [env var: ONYX_TOKEN]
  • -u, --username TEXT: Username for authenticating with Onyx. [env var: ONYX_USERNAME]
  • -p, --password TEXT: Password for authenticating with Onyx. [env var: ONYX_PASSWORD]
  • -v, --version: Show the client version number and exit.
  • --help: Show this message and exit.

Commands:

  • projects: View available projects.
  • types: View available field types.
  • lookups: View available lookups.
  • fields: View the field specification for a project.
  • choices: View options for a choice field in a project.
  • get: Get a record from a project.
  • filter: Filter multiple records from a project.
  • history: View the history of a record in a project.
  • identify: Get the anonymised identifier for a value...
  • create: Create a record in a project.
  • update: Update a record in a project.
  • delete: Delete a record in a project.
  • profile: View profile information.
  • activity: View latest profile activity.
  • siteusers: View users from the same site.
  • auth: Authentication commands.
  • admin: Admin commands.

onyx projects

View available projects.

Usage:

$ onyx projects [OPTIONS]

Options:

  • -F, --format [table|json]: Set the file format of the returned data. [default: table]
  • --help: Show this message and exit.

onyx types

View available field types.

Usage:

$ onyx types [OPTIONS]

Options:

  • -F, --format [table|json]: Set the file format of the returned data. [default: table]
  • --help: Show this message and exit.

onyx lookups

View available lookups.

Usage:

$ onyx lookups [OPTIONS]

Options:

  • -F, --format [table|json]: Set the file format of the returned data. [default: table]
  • --help: Show this message and exit.

onyx fields

View the field specification for a project.

Usage:

$ onyx fields [OPTIONS] PROJECT

Arguments:

  • PROJECT: [required]

Options:

  • -F, --format [table|json|csv|tsv]: Set the file format of the returned data. [default: table]
  • --help: Show this message and exit.

onyx choices

View options for a choice field in a project.

Usage:

$ onyx choices [OPTIONS] PROJECT FIELD

Arguments:

  • PROJECT: [required]
  • FIELD: [required]

Options:

  • -F, --format [table|json]: Set the file format of the returned data. [default: table]
  • --help: Show this message and exit.

onyx get

Get a record from a project.

Usage:

$ onyx get [OPTIONS] PROJECT [CLIMB_ID]

Arguments:

  • PROJECT: [required]
  • [CLIMB_ID]

Options:

  • -f, --field TEXT: Filter the data by providing conditions that the fields must match. Uses a name=value syntax.
  • -i, --include TEXT: Specify which fields to include in the output.
  • -e, --exclude TEXT: Specify which fields to exclude from the output.
  • --help: Show this message and exit.

onyx filter

Filter multiple records from a project.

Usage:

$ onyx filter [OPTIONS] PROJECT

Arguments:

  • PROJECT: [required]

Options:

  • -f, --field TEXT: Filter the data by providing conditions that the fields must match. Uses a name=value syntax.
  • -i, --include TEXT: Specify which fields to include in the output.
  • -e, --exclude TEXT: Specify which fields to exclude from the output.
  • -s, --summarise TEXT: For a given field (or group of fields), return the frequency of each unique value (or unique group of values).
  • -F, --format [json|csv|tsv]: Set the file format of the returned data. [default: json]
  • --help: Show this message and exit.

onyx history

View the history of a record in a project.

Usage:

$ onyx history [OPTIONS] PROJECT CLIMB_ID

Arguments:

  • PROJECT: [required]
  • CLIMB_ID: [required]

Options:

  • -F, --format [table|json]: Set the file format of the returned data. [default: table]
  • --help: Show this message and exit.

onyx identify

Get the anonymised identifier for a value on a field.

Usage:

$ onyx identify [OPTIONS] PROJECT FIELD VALUE

Arguments:

  • PROJECT: [required]
  • FIELD: [required]
  • VALUE: [required]

Options:

  • -s, --site TEXT: Site code for the value. If not provided, defaults to the user's site.
  • -F, --format [table|json]: Set the file format of the returned data. [default: table]
  • --help: Show this message and exit.

onyx create

Create a record in a project.

Usage:

$ onyx create [OPTIONS] PROJECT

Arguments:

  • PROJECT: [required]

Options:

  • -f, --field TEXT: Field and value to be created. Uses a name=value syntax.
  • -t, --test: Run the command as a test. [default: (False)]
  • --help: Show this message and exit.

onyx update

Update a record in a project.

Usage:

$ onyx update [OPTIONS] PROJECT CLIMB_ID

Arguments:

  • PROJECT: [required]
  • CLIMB_ID: [required]

Options:

  • -f, --field TEXT: Field and value to be updated. Uses a name=value syntax.
  • -t, --test: Run the command as a test. [default: (False)]
  • --help: Show this message and exit.

onyx delete

Delete a record in a project.

Usage:

$ onyx delete [OPTIONS] PROJECT CLIMB_ID

Arguments:

  • PROJECT: [required]
  • CLIMB_ID: [required]

Options:

  • --force: Run the command without confirmation. [default: (False)]
  • --help: Show this message and exit.

onyx profile

View profile information.

Usage:

$ onyx profile [OPTIONS]

Options:

  • -F, --format [table|json]: Set the file format of the returned data. [default: table]
  • --help: Show this message and exit.

onyx activity

View latest profile activity.

Usage:

$ onyx activity [OPTIONS]

Options:

  • -F, --format [table|json]: Set the file format of the returned data. [default: table]
  • --help: Show this message and exit.

onyx siteusers

View users from the same site.

Usage:

$ onyx siteusers [OPTIONS]

Options:

  • -F, --format [table|json]: Set the file format of the returned data. [default: table]
  • --help: Show this message and exit.

onyx auth

Authentication commands.

Usage:

$ onyx auth [OPTIONS] COMMAND [ARGS]...

Options:

  • --help: Show this message and exit.

Commands:

  • register: Create a new user.
  • login: Log in.
  • logout: Log out.
  • logoutall: Log out across all clients.

onyx auth register

Create a new user.

Usage:

$ onyx auth register [OPTIONS]

Options:

  • --help: Show this message and exit.

onyx auth login

Log in.

Usage:

$ onyx auth login [OPTIONS]

Options:

  • --help: Show this message and exit.

onyx auth logout

Log out.

Usage:

$ onyx auth logout [OPTIONS]

Options:

  • --help: Show this message and exit.

onyx auth logoutall

Log out across all clients.

Usage:

$ onyx auth logoutall [OPTIONS]

Options:

  • --help: Show this message and exit.

onyx admin

Admin commands.

Usage:

$ onyx admin [OPTIONS] COMMAND [ARGS]...

Options:

  • --help: Show this message and exit.

Commands:

  • waiting: View users waiting for approval.
  • approve: Approve a user.
  • allusers: View users across all sites.

onyx admin waiting

View users waiting for approval.

Usage:

$ onyx admin waiting [OPTIONS]

Options:

  • -F, --format [table|json]: Set the file format of the returned data. [default: table]
  • --help: Show this message and exit.

onyx admin approve

Approve a user.

Usage:

$ onyx admin approve [OPTIONS] USERNAME

Arguments:

  • USERNAME: Name of the user being approved. [required]

Options:

  • --help: Show this message and exit.

onyx admin allusers

View users across all sites.

Usage:

$ onyx admin allusers [OPTIONS]

Options:

  • -F, --format [table|json]: Set the file format of the returned data. [default: table]
  • --help: Show this message and exit.