how to use format uimapi
search cancel

how to use format uimapi

book

Article ID: 265902

calendar_today

Updated On:

Products

DX Unified Infrastructure Management (Nimsoft / UIM)

Issue/Introduction

Using swagger, how to we format the key
 
 
 

Environment

Release : 20.4

Resolution

using this url to access swagger on UIM 20.4 cu4 or later

http://<OC ip or hostname>/uimapi/swagger-ui/index.html

In this example it is deleting a key from a probe

 

the nimbus path. open IM, select the probe but do not open the config. press cntl-c
 
paste to notepad
 
you will find the full path like this
 
 
/uim_domain/uim_hub/uim/cdm
 
/domain/hub/robot/probe
 
that is the format, as far as the key.
 
you will have to run the get config to find out the key you want.
 

/uimapi​/probes​/{domain}​/{hub}​/{robot}​/{probe}​/config.

Using the above output, you can find the key, but you may have to reencode it.

https://techdocs.broadcom.com/us/en/ca-enterprise-software/it-operations-management/ca-unified-infrastructure-management-probes/GA/probe-development-tools/restful-web-services/uimapi-apis.html 


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.

Here is a table to encode the special characters in UTF-8:
   / = %2F
   : = %3A
   \ = %5C

 

example
http://<OC ip>/uimapi/probes/uim_domain/uim_hub/uim/cdm/config
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<probe-configuration>
<probeConfigKeys>
<key>/disk/alarm/fixed/C:\/warning/active</key>
<value>no</value>
</probeConfigKeys>
<probeConfigKeys>
<key>/disk/alarm/fixed/C:\/warning/threshold</key>
<value>0</value>
</probeConfigKeys>
<probeConfigKeys>
<key>/disk/alarm/fixed/C:\/warning/message</key>
<value>DiskWarning</value>
</probeConfigKeys>
<probeConfigKeys>
<key>/messages/DefaultDiskMissingInformation/i18n_token</key>
<value>as#system.cdm.local_filesys_not_avl</value>
</probeConfigKeys>
<probeConfigKeys>
<key>/messages/DefaultDiskMissingInformation/level</key>
<value>information</value>
</probeConfigKeys>
<probeConfigKeys>
<key>/messages/DefaultDiskMissingInformation/text</key>
<value>Local file system $filesys is not available</value>
</probeConfigKeys>
<probeConfigKeys>
<key>/messages/DefaultDiskMissingInformation/token</key>
<value>disk_missing</value>
</probeConfigKeys>
<probeConfigKeys>
<key>/messages/PagingWarning/i18n_token</key>
<value>as#system.cdm.avrg_paging_above_warn_threshold</value>
</probeConfigKeys>
 
 
 
looking at the first key,
<probeConfigKeys>
<key>/disk/alarm/fixed/C:\/warning/active</key>
<value>no</value>
</probeConfigKeys>
 
you would use this as the key in your swagger api

%2fdisk%2falarm%2ffixed%2fc%3a%5c%2fwarning%2factive

running it in the test would be this:

 

{
  "domain": "uim_domain",
  "hub": "uim_hub",
  "key": "%2fdisk%2falarm%2ffixed%2fc%3a%5c%2fwarning%2factive",
  "probe": "cdm",
  "robot": "uim"
}