.. _arbitrator-API-resources-v2-upgrades:

``/v2/upgrades`` 
--------------------

.. _25.1.1|EKB-23826:
	
.. tabularcolumns:: |p{1.5cm}|p{5cm}|p{8.5cm}|

+--------+---------------------------+-----------------------------------------+
| Method | URL                       | Description                             |
+========+===========================+=========================================+
| GET    | ``/v2/upgrades``          | Retrieves current list of all updates.  |
+--------+---------------------------+-----------------------------------------+
| GET    | ``/v2/upgrades/{update}`` | Retrieves a specific update.            |
+--------+---------------------------+-----------------------------------------+
| POST   | ``/v2/upgrades``          | Add a new update request.               |
+--------+---------------------------+-----------------------------------------+



Header (required)
...................
 
``x-lxt-api-token``: token from login.


GET 
.....

``/v2/upgrades``
  
  
* To get the default/latest update

  Command: 
 
  ::
  
     curl -s 
          -H x-lxt-api-token:"$token"
          --insecure 
          -X GET https://<IP or FQDN>/api/v2/upgrades
          
  Output (formatted, with placeholder ellipsis added): 

  ::

     { 
      "data":"Moving \/root\/insights-arbitrator-sp25.1-sp25.2.lxsp to drop account[...]  
      Current system info [...]
      Initiated [...]
      Validation [...]
      Starting installation process [...], 
      [...]
     }


* To get an update with a specified version 

  Example version: ``insights-arbitrator-sp25.1-sp25.2.lxsp``

  Command: 

  ::

     curl -s 
     -H x-lxt-api-token:"$token"
     --insecure 
     -X GET https://<IP or FQDN>/api/v2/upgrades/insights-arbitrator-sp25.1-sp25.2.lxsp

  

  Output (formatted, with placeholder ellipsis added): 

  ::

     { 
      "data":"Moving \/root\/insights-arbitrator-sp25.1-sp25.2.lxsp to drop account[...]  
      Current system info [...]
      Initiated [...]
      Validation [...]
      Starting installation process [...], 
      [...]
     }



POST 
......


Use POST to add a new update request. 

``/v2/upgrades``


* Add new update request 

  Command: 

  ::

     curl -s 
          -H x-lxt-api-token:"$token"
          --insecure 
          -X POST https://<IP or FQDN>/api/v2/upgrades

  Output (formatted): 

  ::

     { 
      "data":["Change successfully requested."] 
     }

