###########
Console API
###########

Synopsis
========

**jetstream api** [*api-options*] command [*command-options*]


Description
===========

:program:`jetstream api` command (the ``api`` subcommand of :program:`jetstream`) can be used to interact with the JetStream API from command line.


Options
=======

:program:`jetstream api`
~~~~~~~~~~~~~~~~~~~~~~~~

Options
^^^^^^^

.. program:: jetstream api

.. option:: --host arg (=localhost)

    Address of JetStream server to control

.. option:: --api-control-port arg (=8886)

    Default API port

.. option:: --user arg

    User name for API authentication (cannot be used at the same time as token)

.. option:: --authToken arg

    Token for API authentication (cannot be used at the same time as user)

.. option:: --authTokenSession arg

    Token session for sharing transfers between instances of token authentication

.. option:: --superuser

     Run the API command as a superuser

.. option:: --no-auth

    Skip API authentication. If used, the :option:`--user`, :option:`--authToken`, :option:`--authTokenSession` and :option:`--superuser` options are ignored


For a list of supported API commands execute :program:`jetstream api help`, and for more detailed information on each command execute :program:`jetstream api help <command>`. For further reference on each API command, please refer to the specific functions in :doc:`/api/python/index`.


Environment
===========

.. envvar:: JETSTREAM_API_PASSWORD

    Used to specify user's password through the environment, instead of the command line parameter

.. envvar:: JETSTREAM_TRANSFER_PASSWORD

    Used to specify a password through the environment when creating transfers, instead of the command line parameter


Examples
========

.. toctree::
    :maxdepth: 2

    examples
