Skip to main content
Outside service Partner
Hitachi Vantara Knowledge

Using the UCP Advisor REST API

You can use the UCP Advisor REST API to perform management functions. The RESTful APIs are described and documented in the Swagger UI that is displayed from UCP Advisor.

  1. In the Navigator window, click Administration.

  2. Click the Rest API tab.

  3. Click API Documentation.

  4. Click the options you want for detailed information.

    Initiating a UCP Advisor API session

    To initiate a UCP Advisor API session, you must first get information on the available appliances and generate the required session tokens by invoking the following commands:

    GET https://<IP address of Controller VM> 23015/v1/services/system/actions/GetAppliances/Invoke

    Response Body

    [
      {
        "Id": "a4fc0c0e-b573-411a-a25a-d343f5d1cbc8",
        "Model": "UCP CI",
        "Name": "SCpodB_test",
        "UcpAgentHost": "172.17.66.245",
        "UcpAgentPort": 8444,
        "SerialNumber": "UCP-CI-000002"
      },
      {
        "Id": "3490c15a-4002-4d1d-8b4a-88a2c116de99",
        "Model": "UCP CI",
        "Name": "SCpodB",
        "UcpAgentHost": "172.17.57.138",
        "UcpAgentPort": 8444,
        "SerialNumber": "UCP-CI-000001"
      }
    ]
    

    POST /services/system/actions/Authenticate/invoke

    Run the authenticate API with appropriate appliance information to get a session token.

    payload
    {
      "applianceId": "a4fc0c0e-b573-411a-a25a-d343f5d1cbc8", (Copy this appliance ID from above get appliances output)
      "password": "Passw0rd!",
      "username": "administrator@scpodb.local",
      "vcenterIp": "172.17.66.246"
    }
    

    Response Body

    190ace68-d7bb-457a-a859-303378e65b34
    NoteTo run any APIs in Swagger, use the above session token and provide the required input parameter.

    GET /compute/services/compute-devices/actions/GetAllComputeDevices/invoke