REST API usage as workflow components

Last post 10-02-2018, 2:09 PM by Josiah. 0 replies.
Sort Posts: Previous Next
  • REST API usage as workflow components
    Posted: 10-02-2018, 2:09 PM

    Hello, all! I was wondering if I could get some help with REST APIs and their usage as workflow components. I built out a component to rename a workstation, and it works fine on the commcell the workflow is running on, but need it to be able to log into a remote commserve to make a change. I tried to use a rest API for getting a remote token but I am consistently getting 401 errors returned. Although I think my outputs are wrong, I still thing there is something more I need to do before it even gets that far. Below is a snippit of the code I put together. I also have the "Password" input on the activity set to an encrypted string, and well as "Password" as an overall workflow input, which is also an ecrypted string. I wasn't sure if doubling up like that would break it.

     

    <DM2ContentIndexing_CheckCredentialReq username="java:{activity.getInput("UserName")}:java" password="java:{utils.encode(activity.getInput("Password"))}:java" commserver="java:{activity.getInput("TargetCommCell")}:java.xxxxxxxxxxxxx.xxx*java:{activity.getInput("TargetCommCell")}:java" />

     

    As for my issues with outputs, here's what I have set for the exmaple above:

    xpath:{/DM2ContentIndexing_CheckCredentialRes/response}

     

    and here's what I have in the client rename compnent output, then raw xml (The outputs always return null values)

    xpath:{/App_SetClientPropertiesResponse/response/@errorCode}

    xpath:{/App_SetClientPropertiesResponse/response/@errorCode}

     

    <App_SetClientPropertiesRequest>
    <association>
    <entity>
    <clientName>java:{activity.getInput("ClientName")}:java</clientName>
    <newName>java:{activity.getInput("ClientName")}:java_xxxxxx</newName>
    </entity>
    </association>
    <clientProperties>
    <client>
    <clientDescription>'This client name has been attempted to be changed via an automated workflow.'</clientDescription>
    <clientEntity>
    <clientName>java:{activity.getInput("ClientName")}:java_xxxxxx</clientName>
    <commCellName>java:{activity.getInput("TargetCommCell")}:java.xxxxxxxxx.com</commCellName>
    <hostName>java:{activity.getInput("ClientName")}:java_xxxxxx.xxxxxxxxx.com</hostName>
          </clientEntity>
    </client>
    </clientProperties>
    </App_SetClientPropertiesRequest>
The content of the forums, threads and posts reflects the thoughts and opinions of each author, and does not represent the thoughts, opinions, plans or strategies of Commvault Systems, Inc. ("Commvault") and Commvault undertakes no obligation to update, correct or modify any statements made in this forum. Any and all third party links, statements, comments, or feedback posted to, or otherwise provided by this forum, thread or post are not affiliated with, nor endorsed by, Commvault.
Commvault, Commvault and logo, the “CV” logo, Commvault Systems, Solving Forward, SIM, Singular Information Management, Simpana, Commvault Galaxy, Unified Data Management, QiNetix, Quick Recovery, QR, CommNet, GridStor, Vault Tracker, InnerVault, QuickSnap, QSnap, Recovery Director, CommServe, CommCell, SnapProtect, ROMS, and CommValue, are trademarks or registered trademarks of Commvault Systems, Inc. All other third party brands, products, service names, trademarks, or registered service marks are the property of and used to identify the products or services of their respective owners. All specifications are subject to change without notice.
Close
Copyright © 2018 Commvault | All Rights Reserved. | Legal | Privacy Policy