cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
805
Views
0
Helpful
5
Replies

getUser - how to know if the service profile is "default value" ?

fabien.bonic
Level 5
Level 5

Hi,

When I do a getUser, the "serviceProfile" returns the same valueas either the "default value" or the service profile specified as default. But if the default service profile is changed, the value on the user will change if it's "default value" but not if it was the specified service profile.

So how to know if the "serviceProfile" of a "getUser" is the "default value" or not?

Thanks,

Fabien

1 Accepted Solution

Accepted Solutions

Looks like this is somewhat of a limitation of AXL, in that the schema does not define a good way to indicate both the fact that the service profile should be whatever the current 'default' is as well as the actual current value of the default service profile.

I can see two potential enhancements:

- Add an attribute to the <serviceProfile) like 'isDefault'/boolean which indicates if the service profile shown is there because it is the system default, or because it was specifically set

- Change the behaviour so that when the service profile is none/default, <getUser> returns an empty value in <serviceProfile>.  Apps would then need to know to go query <listServiceProfile> to determine the current system default, if they needed it.

Your hinted workaround is probably the best one, i.e. check the value of the table via SQL to determine if a specific value has been set or not.

View solution in original post

5 Replies 5

dstaudt
Cisco Employee
Cisco Employee

You can use <listServiceProfile> to get a listing of all service profiles on the system.  Zero or one of the service profiles will have <isDefault>=true if it is the system default:

https://developer.cisco.com/media/axl-schema-11-5/Files/AXLSoap_ListServiceProfileRes.html#Link46F3

Sorry, the question was not really clear.

When I'm editing a user on the CUCM, it's possible to set the "UC Service Profile" to "Use System Default"

default.jpg

In this case, the result of getUser is :

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

   <soapenv:Body>

      <ns:getUserResponse xmlns:ns="http://www.cisco.com/AXL/API/11.0">

         <return>

            <user uuid="{0E8775DB-AE6D-610A-F9A6-D6882017B10F}">

               <serviceProfile uuid="{614B592D-D5AD-FAB4-2206-08F3545A0540}">SP_R11</serviceProfile>

            </user>

         </return>

      </ns:getUserResponse>

   </soapenv:Body>

</soapenv:Envelope>

But it's also possible to set the "UC Service Profile" to the corresponding system default

specified.jpg

In this case, the result of getUser is :

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

   <soapenv:Body>

      <ns:getUserResponse xmlns:ns="http://www.cisco.com/AXL/API/11.0">

         <return>

            <user uuid="{0E8775DB-AE6D-610A-F9A6-D6882017B10F}">

               <serviceProfile uuid="{614B592D-D5AD-FAB4-2206-08F3545A0540}">SP_R11</serviceProfile>

            </user>

         </return>

      </ns:getUserResponse>

   </soapenv:Body>

</soapenv:Envelope>

So the result of getUser is exactly the same despite that the "UC Service Profile" is not the same (if someone change the system default, it will change in the first case but not in the second case).

If I do a SQL request, the fkucserviceprofile of the enduser is in the first case empty and in the second case the pkid.

Why is there no difference in the result of AXL getUser?

Regards,

Fabien

Looks like this is somewhat of a limitation of AXL, in that the schema does not define a good way to indicate both the fact that the service profile should be whatever the current 'default' is as well as the actual current value of the default service profile.

I can see two potential enhancements:

- Add an attribute to the <serviceProfile) like 'isDefault'/boolean which indicates if the service profile shown is there because it is the system default, or because it was specifically set

- Change the behaviour so that when the service profile is none/default, <getUser> returns an empty value in <serviceProfile>.  Apps would then need to know to go query <listServiceProfile> to determine the current system default, if they needed it.

Your hinted workaround is probably the best one, i.e. check the value of the table via SQL to determine if a specific value has been set or not.

Thank you for this answer. Is it possible to open an enhancement ticket for a future release?

I've created an enhancement request...engineering will prioritize accordingly.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: