OnDemand User Group

Tips and Tricks => Tips and Tricks => Topic started by: Ed_Arnold on April 05, 2022, 10:32:15 AM

Title: ARSXML - Some tips and info
Post by: Ed_Arnold on April 05, 2022, 10:32:15 AM
Had a question recently,

Quote
We need to change the userIDs of many users.  Can this be done in bulk?

Yes and ARSXML to the rescue.

In default location C:\Program Files\IBM\OnDemand\V10.5\xml\samples are dozens of xml samples.

For this case there is this xml file, updateusers.xml:

Quote
<!--   Change the user name -->

  <user

    name="SampleUser3"

    newName="SampleUser3New">

  </user>


If I want to see all of the possible attributes that can be changed via ARSXML I can take a look at C:\Program Files\IBM\OnDemand\V10.5\xml\ondemand.xsd.

In there I see:

Quote
<xs:element name="user">
   <xs:complexType>
      <xs:choice maxOccurs="unbounded">
         <xs:element name="permission" minOccurs="0" maxOccurs="unbounded">
             <xs:complexType>
                 <xs:attribute name="task"           type="taskString"      use="optional"/>
                 <xs:attribute name="user"           type="stringLen1-128"  use="optional"/>
                 <xs:attribute name="group"          type="stringLen1-128"  use="optional"/>
                 <xs:attribute name="adminAuthority" type="yesnoString"     use="optional"/>
             </xs:complexType>
          </xs:element>
      </xs:choice>

      <xs:attribute name="name"                type="stringLen1-128"  use="required"/>
      <xs:attribute name="newName"             type="stringLen1-128"  use="optional"/>
      <xs:attribute name="uid"                 type="uidValue"        use="optional"/>
      <xs:attribute name="updateDate"          type="xs:string"       use="optional"/>


etc etc


Also, one can do an export and then look at the resultant xml. 

That will give a basic example of how one might structure xml when wanting to do adds or updates.

Ed
Title: Re: ARSXML - Some tips and info
Post by: jsquizz on August 31, 2022, 02:17:39 PM
I ALWAYS refer to this-

https://www.ibm.com/docs/en/cmofm/10.1.0?topic=file-application-group-object