Issue with finesse "User - Sign in to Finesse" API

Version 1
    This document was generated from CDN thread

    Created by: Absaar Javed on 11-07-2013 05:18:08 AM
    I am logging in using this API into finesse. I am getting "202 Accepted" response if:
    • I log in using a valid IP phone extension
    • I log in using an invalid IP phone extension
    Is it some bug or something else is wrong?
    Plus I have tested this scenario many times after restarting browser and after clearing cache and cookies too but still getting Accepted for wrong extension.

    Subject: RE: Issue with finesse "User - Sign in to Finesse" API
    Replied by: Gary Olmsted on 12-07-2013 04:30:40 AM
    Absaar,

    Finesse uses an asynchronous REST API that utilizes XMPP to recieve the results of most requests.  When you get back a "202 Accepted" it means that you have syntactically provided the right request.  The "real" response will come in the form of an event from the server via XMPP.  That response might be success (in the form of an updated User object) or an error:

     1<Update>
     2    <data>
     3        <apiErrors>
     4            <apiError>
     5                <errorData>260</errorData>
     6                <errorMessage>CF_INVALID_LOGON_DEVICE_SPECIFIED</errorMessage>
     7                <errorType>Invalid Device</errorType>
     8            </apiError>
     9        </apiErrors>
    10    </data>
    11    <event>put</event>
    12    <requestId>a609872c-d89e-4a5c-99a2-57505a8ffd5a</requestId>
    13    <source>/finesse/api/User/1021001</source>
    14</Update>


    Subject: RE: Issue with finesse "User - Sign in to Finesse" API
    Replied by: Absaar Javed on 12-07-2013 04:40:00 AM
    Yes I know that'  but isn't there any mechanisim which returns some error if the invalid extension is entered' as in my case I am still getting a 202 Accepted response if the extension provided in XML payload is Invalid'

    Subject: RE: Issue with finesse "User - Sign in to Finesse" API
    Replied by: Absaar Javed on 12-07-2013 04:54:56 AM
    URL: http://192.168.x.x/finesse/api/User/xyz

    XML Payload : <User><state>LOGIN</state><extension>111</extension></User>

    Request Type : PUT

    Now I know that Extension: 111 is Invalid but when I send this request I get 202 Accepted response.

    Subject: RE: Issue with finesse "User - Sign in to Finesse" API
    Replied by: Gary Olmsted on 12-07-2013 04:56:44 AM
    Not sure I unerstand.  I gave you *exactly* what you will get if you provide an invalid extension.  As I explained, you won't get this in the response to the request, but rather in the subsequent XMPP event that is raised after this.

    Subject: RE: Issue with finesse "User - Sign in to Finesse" API
    Replied by: Gary Olmsted on 12-07-2013 05:04:57 AM
    I think you need to read the Cisco Finesse Web Services Guide very closely to understand.  The Chapters you need to familiarize yourself with is "Real-Time Events - page 5".  As I tried to explain.  The only time you will get an error in the HTTP response directly is if you have made a syntax error, wrong User, inproper parameters, etc...  Once the server determines you have provided a request that is in proper syntax, it responds with 202-Accepted and proceeds to make a request to the CTI Server to log in.  The CTI Server is what determines that you have provided an invalid device and you get the error in the next XMPP event.

    Subject: RE: Issue with finesse "User - Sign in to Finesse" API
    Replied by: Absaar Javed on 12-07-2013 05:15:14 AM
    Thanks Gary.

    Subject: RE: Issue with finesse "User - Sign in to Finesse" API
    Replied by: Absaar Javed on 10-09-2013 01:20:08 AM
    Are there any API's provided by finesse which can be used to hold, retrieve and drop a received call?

    Subject: RE: New Message from Absaar Javed in Finesse - General Questions: RE: Issue
    Replied by: David Lender on 10-09-2013 10:12:25 AM
    Yes, use the requested action of HOLD, RETRIEVE or DROP of the Dialog - Take Action on a Participant Within a Dialog

    See the Finesse Developer Guide page 55-56 here http://developer.cisco.com/documents/2382082/2401619/Cisco+Finesse+Web+Services+Guide+for+Release+9.1(1)

    Subject: RE: New Message from David Lender in Finesse - General Questions: RE: New M
    Replied by: David Lender on 10-09-2013 10:35:07 AM
    If you are writing a gadget using the Finesse javascript library rather than using the Finesse Webservices REST API, you can use the requestAction method of the Dialog object:

    requestAction(mediaAddress, action, handlers)
    Invoke a request to server based on the action given.
                                                                                                    Parameters:
    {String} mediaAddress
    The media address of the user performing the action.
    {String} action
    The action string indicating the action to invoke on dialog. Possible actions are defined in finesse.restservices.Dialog.Actions<../symbols/finesse.restservices.Dialog.Actions.html>.
    {Object} handlers
    An object containing the following (optional) handlers for the request:
    ·         success(rsp): A callback function for a successful request to be invoked with the following response object as its only parameter:
    o    status: {Number} The HTTP status code returned
    o    content: {String} Raw string of response
    o    object: {Object} Parsed object of response
    ·         A error callback function for an unsuccessful request to be invoked with the error response object as its only parameter:
    o    status: {Number} The HTTP status code returned
    o    content: {String} Raw string of response
    o    object: {Object} Parsed object of response (HTTP errors)
    o    error: {Object} Wrapped exception that was caught:
    §  errorType: {String} Type of error that was caught
    §  errorMessage: {String} Message associated with error


    This function was inadvertently left out of the doc for the Finesse javascript library for 9.1.1