DX Infrastructure Management

Expand all | Collapse all

Update custom user tags via API?

Jump to Best Answer
  • 1.  Update custom user tags via API?

    Posted 08-12-2019 10:26 AM

    Hi all,

    I am trying to work out the cleanest way to update all servers with  location info, storing it under one of the user tags.

    is there a way to do this using the API?

    from what I can see now, I would need the CS_ID of each server on hand too, is there any way to get this from the API? or does it have to come form the  DB via SQL query ?

    Thanks!



  • 2.  RE: Update custom user tags via API?

    Posted 08-12-2019 02:08 PM
    So you can use the rest API calls to get the computer information from the database
    https://docops.ca.com/ca-unified-infrastructure-management-probes/ga/en/probe-development-tools/restful-web-services/webservices_rest-apis/webservices_rest-call-reference/computer-system-calls

    You could then use the probe update config value to update the controller user tag on each robot as needed.
    https://docops.ca.com/ca-unified-infrastructure-management-probes/ga/en/probe-development-tools/restful-web-services/webservices_rest-apis/webservices_rest-call-reference/probe-calls#ProbeCalls-UpdateaProbeConfigurationValue(Single)

    ------------------------------
    Gene Howard
    Principal Support Engineer
    Broadcom
    ------------------------------



  • 3.  RE: Update custom user tags via API?
    Best Answer

    Posted 08-13-2019 06:16 AM
    Example update "user tag 2" via webservices_rest:
    curl -v -u administrator:xxx-X PUT -H "Content-Type: application/xml" -d "<probeConfigKeys><configkey><key>/os_user2</key><value>xml_update_example</value></configkey></probeConfigKeys>" http://(ump)/rest/probe/(domain)/(hub)/(robot)/controller/config


  • 4.  RE: Update custom user tags via API?

    Posted 08-14-2019 09:25 AM

    The robot api call shows the following two fields, are the accessible via the API??

    "
    user_tag_1": "string",

    "user_tag_2": "string",




  • 5.  RE: Update custom user tags via API?

    Posted 08-14-2019 10:24 AM
    Stiofan,
    Are you using webservices_rest or uimapi?

    ------------------------------
    Support Engineer
    Broadcom
    ------------------------------



  • 6.  RE: Update custom user tags via API?

    Posted 08-14-2019 10:35 AM

    Hi David, which ever I can get to work :) at the moment I am have little success. 

    Can you tell me how user tag 1/2 are accessible ? 

    my over all plan is to tag each device with location info from a CMDB, and use that info to create groups within UIM. 

    Thanks for your time!




  • 7.  RE: Update custom user tags via API?

    Posted 08-14-2019 10:46 AM
    OK then see Luc's response above using webservices_rest. 

    Your question on robot call is for uimapi and it only has robot Get calls, 
    For the documentation
    1. http://<primaryhub ip or host name>:<port>/uimapi/docs/index.html



    ------------------------------
    Support Engineer
    Broadcom
    ------------------------------



  • 8.  RE: Update custom user tags via API?

    Posted 08-14-2019 10:50 AM

    Yes, I was hoping there was a way to update the user tag fields associated with the robot call. 

    with regards to Luc's suggestion, I can update the controller with a tag, but is it then possible to access these tags when creating groups ? 

    Thanks again for your time!




  • 9.  RE: Update custom user tags via API?

    Posted 08-14-2019 11:40 AM
    Okay I've just figured out what I wasn't understanding , Luc's answer works great , sorry for all of the confusion and thanks for your time guys!