CA Service Management

  • 1.  cnt id for group using soap

    Posted Apr 22, 2019 08:57 PM
      |   view attached

    Hello ,

     

    I am in need of cnt id to be able to create tickets for a respective group. So far this is what i have managed and looks like it isnt working. Please help.

     

     

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://www.ca.com/UnicenterServicePlus/ServiceDesk">
    <soapenv:Header/>
    <soapenv:Body>
    <ser:doSelect>
    <sid>285455323</sid>
    <objectType>cnt</objectType>
    <whereClause>group='Engineering Support'</whereClause>
    <maxRows>1</maxRows>
    <attributeNames>
    <!--1 or more repetitions:-->


    <string>last_name</string>
    </attributeNames>
    </ser:doSelect>
    </soapenv:Body>
    </soapenv:Envelope>



  • 2.  Re: cnt id for group using soap
    Best Answer

    Posted Apr 23, 2019 01:26 PM

    Here you go :

     

    Changed the whereClause, group name is in "last_name" attribute.

    Changed attributeNames to get the persistent_id, you will need it to create a ticket 


     

     

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://www.ca.com/UnicenterServicePlus/ServiceDesk">
    <soapenv:Header/>
    <soapenv:Body>
    <ser:doSelect>
    <sid>285455323</sid>
    <objectType>cnt</objectType>
    <whereClause>last_name='Engineering Support'</whereClause>
    <maxRows>1</maxRows>
    <attributeNames>
    <string>persistent_id</string>
    </attributeNames>
    </ser:doSelect>
    </soapenv:Body>
    </soapenv:Envelope>



  • 3.  Re: cnt id for group using soap

    Posted Apr 24, 2019 10:44 AM

    But here is the problem, the values returned are in XML string format . In order for me to extract the cnt id or the persistent_id . i will need to convert the xml string to xml node and then to a document to extract that one ID. Is there a better way to do this ?

     

    thanks for the quick reply pier-olivier.tremblay



  • 4.  Re: cnt id for group using soap

    Posted Apr 24, 2019 10:46 AM

    No, this is a soap API wich rely entirely on XML.

     

    Depending on the language used, it should be easy to extract.