User—Get User Id from loginName

The User—Get User Id from loginName API accepts the loginName in the URI and authentication for both SSO and non-SSO deployments. This API is only supported for Unified CCE deployments.

In Unified CCE, an agent is assigned with an AgentID (peripheral number) and a Login name, but they are different from one another.

Use the User—Get User Id from loginName API to retrieve the agent's peripheral ID from the LoginName.

Clients in Unified CCE SSO deployments can use the User—Get API request to retrieve the peripheralID using the username obtained from the Cisco Identity Service (IdS) token. The userName has to be URL encoded with UTF-8.

URI:

For Unified CCE: https://<FQDN>/finesse/api/User/<loginName>

For more information on supported characters, see the section "Sign In to Cisco Finesse Desktop" in the Cisco Finesse Agent and Supervisor Desktop User Guide.

Example URI:

https://finesse1.xyz.com/finesse/api/User/csmith

Security Constraints:

Agents can only get their own User object. Administrators can get any User object.

To get the User object, a user must be signed in, or provide valid authorization credentials when challenged.

HTTP Method:

GET

Content Type:

Input/Output Format:

XML

HTTP Request:

Request Parameters:

HTTP Response:

200: Success

401: Authorization Failure

401: Invalid Authorization User Specified

404: User Not Found

500: Internal Server Error

503: Service Unavailable

Example Response:

<User>
    <uri>/finesse/api/User/1234</uri>
    <roles>
        <role>Agent</role>
        <role>Supervisor</role>
    </roles>
    <loginId>1234</loginId>
    <loginName>csmith</loginName>
    <state>NOT_READY</state>
    <stateChangeTime>2012-03-01T17:58:21.234Z</stateChangeTime>
    <pendingState></pendingState>
    <reasonCodeId>16</reasonCodeId>
    <ReasonCode>
        <category>NOT_READY</category>
        <uri>/finesse/api/ReasonCode/16</uri>
        <code>10</code>
        <label>Team Meeting</label>
        <forAll>true</forAll>
        <id16</id>
    </ReasonCode>
    <settings>
        <wrapUpOnIncoming>OPTIONAL</wrapUpOnIncoming>
        <wrapUpOnOutgoing>REQUIRED</wrapUpOnOutgoing>
    </settings>
    <extension>1001001</extension>
    <mobileAgent>
        <mode>CALL_BY_CALL</mode>
        <dialNumber>4085551234</dialNumber>
    </mobileAgent>
    <firstName>Chris</firstName>
    <lastName>Smith</lastName>
    <teamId>500</teamId>
    <teamName>Sales</teamName>
    <dialogs>/finesse/api/User/1234/Dialogs</dialogs>
    <teams>
        <Team>
            <uri>/finesse/api/Team/2001</uri>
            <id>2001</id>
            <name>First Line Support</name>
        </Team>
        <Team>
            <uri>/finesse/api/Team/2002</uri>
            <id>2002</id>
            <name>Second Line Support</name>
        </Team>
        <Team>
            <uri>/finesse/api/Team/2003</uri>
            <id>2003</id>
            <name>Third Line Support</name>
        </Team>
... other teams ...
    </teams>
</User>

Example Failure Response:

<ApiErrors>
     <ApiError>
          <ErrorType>User Not Found</ErrorType>
          <ErrorMessage>UNKNOWN_USER</ErrorMessage>
          <ErrorData>4023</ErrorData>
   </ApiError>
</ApiErrors>