uimapi APIs

This article details the process for implementing uimapi web services
uimpga-ga
HID_uimapi
This article details the process for implementing uimapi web services.
Contents
uimapi
Uimapi includes improvements over webservices_rest. You now have Swagger documentation and endpoints to work with the uimapi RESTful web services. The uimapi REST API endpoints are provided within a self-documenting framework that lets you try the methods and see the generated responses. All methods are grouped by resource type and can be displayed in a single window. Use the
Show/Hide
,
List Operations
, and
Expand Operations
options to expand and collapse the resources and methods.
The methods are color-coded to make it easier to distinguish between the different methods. To the right of each method is a brief description of the action that is performed by the method. Documentation is provided for request parameters. Sample model schema is available for methods requiring payload in the request. Use the provided model schema to populate the body field, and then replace the default values with desired settings. Use the
Try it out!
Button to send the request and see the generated response in real time.
The
Response Messages
section for each method provides a documented list of response codes. Use this information to help you determine a corrective action if an error condition was encountered. The response that is returned for each request appears in the method drop-down window.
Download the uimapi Package
If you want to deploy the uimapi package that is in the web archive, but not in the local archive, you must first download the package. Downloading the package moves it to the local archive.
The uimapi 20.31 package is released as part of the UIM 20.3.1 patch. The UIM 20.3.1 patch includes various standalone artifacts. Therefore, ensure that you deploy the related 20.3.1 artifacts (mon_config_service 20.31, mon_config_service_ws 20.31, mon_config_service_recon 20.31, mon_config_service_cli 20.31, robot_update 9.32, OC 20.3.1 Upgrade Installer, uimapi 20.31) to access the complete functionality that the patch provides.
Follow these steps
:
  1. Select a hub, and select the
    Archive
    tab.
  2. Select the inline menu button next to the uimapi package, and select
    Download
    .
  3. Confirm that you want to download the package.
The
Local Version
column is updated to display the web version you downloaded.
Deploy the uimapi Package
The uimapi package is available as a local package in the Archive after you install or upgrade to CA UIM 9.0.2 or later versions.
For UIM 20.3 or later, deploy the uimapi package to the OC robot in your UIM environment to access the uimapi REST APIs.
For previous releases (for example, 20.1 or 9.0.2), deploy the uimapi package to the primary hub robot in your UIM environment to access the uimapi REST APIs.
Follow these steps:
  1. Log in to Admin Console.
  2. Select a hub, and then select the
    Archive
    tab.
  3. Select the inline menu button next to a package, and then select
    Deploy
    .
  4. In the
    Hubs
    pane, select the check box next to a hub to select all the robots under the hub. Or, drill-down into the hub and select individual robots. To return to the list of hubs, select the back arrow in the middle pane.
    The
    Target Robots
    pane updates to show the selected robots.
  5. Select
    Deploy
    .
    The page redirects to the
    Deployment Activity
    tab where you can monitor the deployment.
  6. After the package has been deployed to a robot, it is displayed in the
    Installed Packages
    tab.
Test the Deployment
When you have uimapi installed, you can access the uimapi REST APIs to view the documentation for each call.
Follow these steps:
  1. Verify that uimapi 9.0.2 or later version is available in your local archive.
  2. Enter the following URI in a browser window:
    http://<hostname>:<port>/uimapi/swagger-ui.html
  3. Enter login credentials. Users must have administrative privileges.
  4. Select a resource name (for example,
    accounts
    ) to view the list of available methods.
  5. Select a method (for example,
    GET
    ) or the endpoint (such as,
    /accounts/{accountid}
    ).
    The method drop-down can include the following sections:
    Response Class:
    Displays the success response code for a call
    Model Schema:
    Shows the format of the required payload or generated response
    Response Content Type:
    Allows you to select the desired format for the response data
    Parameters:
    Values that are required for a call (for example, an identifier). For POST or PUT methods, you enter payload in the body field. You can also select the format of the payload in the Parameters section
    Response Messages:
    The applicable response codes for a call
The following example screenshot displays the Swagger interface. This interface displays some of the RESTful web services that uimapi provides:
Snap245.jpg
Encoding Request Parameters
For GET and DELETE request parameters you need to encode the 'Key' using an encoding tool before you select
Try it out!
For example, if the 'Key' value is
/disk/alarm/fixed/C:\/warning/active
, then the encoded value is
%2Fdisk%2Falarm%2Ffixed%2FC%3A%5C%2Fwarning%2Factive
which should be used as the 'Key 'request.
Encryption Support for Configuration Parameters
From UIM 20.3.3 release, you can encrypt any supported field such as passwords using the UIMAPI endpoint.
Encrypt is an optional parameter and can be used for passwords key when writing to configuration files. You can provide "yes" or "no" values to use this parameter for the encryption.
Currently this encryption option is supported by AWS, XenDesktop, and sdgtw probes only.
Sample endpoint:
/probes/{domain}/{hub}/{robot}/{probe}/config
- Updates the configuration information (key/value) of the specified UIM probe
See the following screenshot with the UIMAPI endpoint details: