Request Types Reference

Developers create login applications to communicate with the Cisco Extension Mobility service by sending and receiving XML messages. The XML messages sent must follow the schema defined by the Message DTDs that are described in the Message Document Type Definitions.

Login

The Login operation logs in a single user using the specified device profile.

The following example logs in userID john to device SEP003094C25B15 using the user-associated device profile UserDevProf.

Request

<request>  
    <appInfo>  
        <appID>appid</appID>  
        <appCertificate>apppasswd</appCertificate>  
    </appInfo>  
    <login>  
        <deviceName>SEP003094C25B15</deviceName>  
        <userID>john</userID>  
        <deviceProfile>UserDevProf</deviceProfile>  
        <exclusiveDuration>  
            <time>60</time>  
        </exclusiveDuration>  
    </login>  
</request>

Success Response

<response>  
    <success/>  
</response>

Failure Response

<response>  
    <failure>  
        <error code="3">Could not authenticate 'appid'</error>  
    </failure>  
</response>

Logout

The following example logs out a user who is logged into device SEP003094C25B15.

Request

<request>  
    <appInfo>  
        <appID>appid</appID>  
        <appCertificate>apppasswd</appCertificate>  
    </appInfo>  
    <logout>  
        <deviceName>SEP003094C25B15</deviceName>  
    </logout>  
</request>

Success Response

<response>  
    <success/>  
</response>

Failure Response

<response>  
    <failure>  
        <error code="3">Could not authenticate 'appid'</error>  
    </failure>  
</response>

LogoutAll

The following example logs out a user from all devices. This is useful for system updates. Use of logoutAll API may lead to the generation of large number of database change notifications. This could have a momentary impact on system performance. The number of change notifications will be directly proportionate to the number of users logged in. It is recommended to use this API outside of peak business hours.

Request

<request>  
    <appInfo>  
        <appID>appid</appID>  
        <appCertificate>apppasswd</appCertificate>  
    </appInfo>  
    <logoutAll>  
    </logoutAll>  
</request>

Success Response

<response>  
    <success/>  
</response>

Failure Response

<response>  
    <failure>  
        <error code="3">Could not authenticate 'appid'</error>  
    </failure>  
</response>

UserQuery

Request

<query>  
    <appInfo>  
        <appID>appid</appID>  
        <appCertificate>apppasswd</appCertificate>  
    </appInfo>  
    <deviceUserQuery>  
        <deviceName>SEP003094C25B15</deviceName>  
    </deviceUserQuery>  
</query>

Success Response

If you log in to the phone for the first time, the response is as follows:

<response>  
    <deviceUserResults>  
        <device name="SEP003094C25B15">  
            <userID>one</userID>  
            <none/>  
        </device>  
    </deviceUserResults>  
</response>

If you have previously logged in to the phone, the response is as follows:

<response>  
    <userDevicesResults>  
        <user id="em%40cisco.com">  
        <deviceName>SEP402CF4915265</deviceName>  
        </user>  
    </userDevicesResults>  
</response>

Note: <userId> field data is encoded in UTF-8 format, see Response Encoding.

Failure Response

<response>  
    <failure>  
        <error code="3">Could not authenticate 'appid'</error>  
    </failure>  
</response>

DeviceQuery

The DeviceQuery operation returns all device IDs (MAC addresses) for the specified user ID.

The following example finds the devices that user ID john is logged in to:

Request

<query>  
    <appInfo>  
        <appID>appid</appID>  
        <appCertificate>apppasswd</appCertificate>  
    </appInfo>  
    <userDevicesQuery>  
        <userID>john</userID>  
    </userDevicesQuery>  
</query>

Success Response

<response>  
    <deviceUserResults>  
        <device name="SEP402CF4915265">  
            <userID>em%40cisco.com</userID>  
            <lastlogin>em</lastlogin>  
            <emccDevice>no</emccDevice>  
        </device>  
    </deviceUserResults>  
</response>

Note: <userId> field data is encoded in UTF-8 format, see Response Encoding.

Failure Response

<response>  
    <failure>  
        <error code="3">Could not authenticate 'appid'</error>  
    </failure>  
</response>

DeviceProfileQuery

The DeviceProfileQuery API gets information of all the device profiles associated to an user.

Request

<query>
    <appInfo>
        <appID>appid</appID>
        <appCertificate>apppassword</appCertificate>
    </appInfo>
    <deviceProfileQuery>
        <userID>john</userID>
    </deviceProfileQuery>
</query>

Success Response

<response>
    <deviceProfileResults>
        <user id="john">
            <deviceProfile>
                <deviceProfileName>DPJOHNIPC</deviceProfileName>
                <isDefaultDeviceProfile>t</isDefaultDeviceProfile>
            </deviceProfile>
        </user>
    </deviceProfileResults>
</response>

Note: <userId> field data is encoded in UTF-8 format, see Response Encoding.

Failure Response

<response>  
    <failure>  
        <error code="3">Could not authenticate 'appid'</error>  
    </failure>  
</response>