==========
Connection
==========

`Thrift network stack <https://thrift.apache.org/docs/concepts>`_

.. _connection:

In order to interact with the Turret API we communicate using fixed transport and protocol type. Namely `TFramedTransport <https://github.com/apache/thrift/blob/master/lib/cpp/src/thrift/transport/TBufferTransports.h#L306>`_ and `TBinaryProtocol <https://github.com/apache/thrift/blob/master/lib/cpp/src/thrift/protocol/TBinaryProtocol.h>`_.

:doc:`/osxpert-thrift` for C++ takes care of this detail. It is important to note that with different languages these types should be used when communicating with the turret.

.. _api-smconfig:

Enabling API in OpenScape Xpert Management Portal
=================================================

For the turret to start a thrift server so that it can accept connections, the API must be enabled in SM first.
To do this for a single turret:

#. On the OpenScape Management Portal go to ``Topology/OSX Clients``
#. Find the turret you wish to enable the API for
#. Clicking on the ``Node Address`` will open a dialog
#. Go to the ``Interfaces`` tab
#. In the ``Thrift-based API`` part check the ``Enable API`` checkbox. If you want to use encryption check the ``Use TLS`` checkbox as well (:doc:`encryption`)

For multiple turrets you can use the ``Bulk Edit...`` feature.

.. Transport
.. =========


.. Protocol
.. ========