Getting name of object instead of UUID

Version 1
    This document was generated from CDN thread

    Created by: MIKE WILCOX on 14-10-2009 10:38:21 PM
    When using getPhone on CM 6.1(2) to retrieve data about a phone the sharedCallingSearchSpace, a UUID, is returned instead of sharedCallingSearchSpaceName, which is what I really need. How do I get the Name instead or in addition to the UUID?
     
    Thanks,
     
    Mike

    Subject: RE: Getting name of object instead of UUID
    Replied by: Anitha V on 15-10-2009 04:09:38 AM
    Hi Mike,
     
    It is not possible to get the sharedCallingSearchSpaceName in UCM version 6.1.2, only UUID will be returned. From UCM version 8.0 onwards you could get the sharedCallingSearchSpaceNam.
     
    Thanks and Regards,
    Anitha
    Cisco Developer Services.

    Subject: RE: Getting name of object instead of UUID
    Replied by: David Staudt on 15-10-2009 06:01:29 AM
    If you need to get the name for display purposes, etc., you can do a separate <executeSQLQuery> request to match the CSS UUID against the appropriate tables in UCM.  But...
     
    Can you confirm the UCM version and name of the AXL element?  I can't find a 'sharedCallingSearchSpaceName' related to getPhone..?
     
     

    Subject: RE: Getting name of object instead of UUID
    Replied by: MIKE WILCOX on 15-10-2009 04:55:14 PM
    Yeah Dave, my bad. It's actually getLine, not getPhone and I'm using 6.1.2.1125-1
     
    How would I do the SQL query if I have the uuid?
     
    Thanks,
     
    Mike

    Subject: RE: Getting name of object instead of UUID
    Replied by: David Staudt on 15-10-2009 06:41:20 PM
    You should be able to use something like:
     

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/6.1">
       <soapenv:Header/>
       <soapenv:Body>
          <ns:executeSQLQuery sequence="1">
             <sql>select name from callingsearchspace where pkid="d6256337-e031-5a0e-097b-053a581eb831"</sql> 
          </ns:executeSQLQuery>
       </soapenv:Body>
    </soapenv:Envelope>

     
    However, I noticed on my 6.1(3) system that getLine was returning the CSS UUID with capital letters:
     
    <shareLineAppearanceCSS uuid="{D6256337-E031-5A0E-097B-053A581EB831}"/>
     
    I had to convert the letters to lowercase in the SQL query to get it to work.  I'm going to check into that and see if it's a known defect.

    Subject: RE: Getting name of object instead of UUID
    Replied by: MIKE WILCOX on 17-10-2009 06:02:37 PM
    Trying that I get a connect error:
     
    axl Line Request:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmln
    s:ns="http://www.cisco.com/AXL/API/6.1">
              <soapenv:Header/>
              <soapenv:Body>
              <ns:executeSQLQuery sequence="1">
              <sql>select name from callingsearchspace where pkid="4395e4ea-09e2-f93
    2-068d-67937be030af"</sql>
    </ns:executeSQLQuery>
    </soapenv:Body>
    </soapenv:Envelope>
     
    End of Request
    500 Connect failed: connect: Unknown error; Unknown error
    Content-Type: text/plain
    Client-Date: Fri, 16 Oct 2009 21:58:32 GMT
    Client-Warning: Internal response
     
    500 Connect failed: connect: Unknown error; Unknown error
     

    Subject: RE: Getting name of object instead of UUID
    Replied by: Sascha Monteiro on 17-10-2009 06:26:59 PM
    try single quotes around the uuid
     
    for testing, ssh to the cucm (if you have access) and perform the query on cli;
    >run sql select name from callingsearchspace where  pkid='blah'

    Subject: RE: Getting name of object instead of UUID
    Replied by: David Staudt on 17-10-2009 10:31:13 PM
    The type of quotes probably won't matter.
     
    You have some extra ']' characters in this line:
     
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/]" xmln
    s:ns="http://www.cisco.com/AXL/API/6.1]">
     
    but that likely won't matter either.
     
    Can you successfully perform any type of <executeSQLQuery?
     
     

    Subject: RE: Getting name of object instead of UUID
    Replied by: MIKE WILCOX on 19-10-2009 06:21:29 PM
    Turned out to be an error in the perl script that myself and another developer overlooked. executeSQLQuery is working just fine and I now get the CSS name.
     
    Is there a pointer to docs for the data dictionary available online? Could I use executeSQLQuery to inert a user into a User Group instead of reading the whole group and writing it back?
     
    Thanks for the pointers.
     
    Mike

    Subject: RE: Getting name of object instead of UUID
    Replied by: David Staudt on 19-10-2009 08:34:05 PM
    The data dictionary docs such as they are are with the other AXL docs here: http://developer.cisco.com/web/axl/docs
     
    It is certainly possible to insert single users into groups via executeSQLUpdate - a much better solution for anything other than tiny deployments, at least until UCM8 which will have improvements in this area.