ELAINE WEB SERVICE GUIDE FOR DEVELOPERS

Guide to ELAINE WEB SERVICE for Developers

 

ELAINE offers an API interface for user to integrate ELAINE Analysis into customer's application.

The following is an example of the JSON interface submitted by customer's application:

The URL for this API is:

    "https://www.sitefocus.com/think/cifcommunityws"

 

Developer's Toolkit

API comes with two HTML resources as part of the developer's kit.


Echo test of user input:

Step 1:

  • Sign into your ELAINE Community account at https://www.sitefocus.com/cif/communitysignin
  • Upon successful sign-in, the system returns with a generated API secret .
    Note: Your ELAINE Community account should be "web service enabled". If your account is not setup for ELAINE WEB SERVICE,

      Sample Output of API secret:

    Step 2:

  • Go to URL: https://www.sitefocus.com/elaineecho.html
  • At the Echo screen, enter your API secret and text for testing
    1. Echo Screen:

  • Copy the API secret obtained in Step 1 and paste it into the field "apisecret"
  • Enter your text into the "narrative" textbox, and "submit".
  • Sample screen:

  • After submitting the form, the following will be returned with JSON data for programmatic submission.
  •   

    ELAINE used zero trust paradigm with API secret. A new API secret is assigned after each use. The new API secret is obtained by signing into your ELAINE WEB SERVICE accountT.

    The ELAINE echo is meant for developer to manually run through the protocol. The input API secret is echoed together with the result. In this example, the API secret is embedded as part of the JSON DATA:

      "apisecret":
      "55b1b02c_e857_478f_b93b_28a28ff50cc5"

    The "elaineecho.html" is only for use to examine the input JSON required for the ELAINE WEB SERVICE API


    Developer test submission for ELAINE to analyze a narrative

    This test submission is solely used to test the handshake with the API. The API is independent of the computer language used by developer.

  • Go to: https://www.sitefocus.com/elainem2m.html
  • The HTML form looks identical to the previous request.
  • Submitting this form will result in processing and analyzing the narrative
  • This resource enables ELAINE developer to get familiar with the output to be expected.
  • Complete the form with a valid API secret and get back the following result as shown in the example below.
  •  

    Noted that this is a truncated screen print, both in width and depth, the actual JSON returned should be a complete set of JSON DATA.

      

    Description of response from the submission:

    1. Top level JSON Object is a JSONMAP of 3 objects, namely, "apisecret", "Copyrighted" and "analysis".

    "apisecret" is the secret for next submission. Each ELAINE M2M account allows a single thread for ELAINE Web Service. Each successful submission will result in a refresh of the "apisecret" and is returned as part of the response. User's application program should safe keep this key for the next transaction.

    Should the "apisecret" is misplaced or not available, authorized user can sign into ELAINE COMMUNITY to generate a new "apisecret".

    2. Web service account is created and assigned by ELAINE's support team.

    3. "Copyrighted" object is self explanatory. Licensed user is authorized to programmatically reuse the content from the "analysis" objection without limitation or restriction.

    4."analysis" object is a map object containing the analytic results. It consists of multiple objects as depicted in the following diagram:

    Povflag -
    "+" = momentum
    "-" = challenge
    " " = WIP

    Objective -
    It is a normalized tuple of given numbers. 100 as relative max. These numbers reflect sentiment assessment: (most negative, negative, neutral, positive, most positive)

    Subjective -
    It is a proprietary metric that measures doubt on sentiment assessment. The difference between objective and subjective quantifies the doubt or accuracy of the assessment.

    Abstraction -
    It contains one or more symbols express horizontally to represent the hierarchical relationship between symbols, if more than one, the hierarchy begins from the left.

    CD Order -
    A zero based number to represent the order of Symbolic Abstraction. 0th order means one symbol in the Symbolic Abstraction. 1st order means two, and so forth.

    Excerpt - URI encoded text content of this object

    Priority - the logical order of significance determined during logic analysis

      

    Error Codes:

    500 Invalid json input
    501 Invalid narrative encoding
    502 Authentication failed
    503 Narrative is empty
    504 Insufficient context or semantic for narrative analysis
    505 Missing context or semantic for narrative analysis
    507 Unexpected error from response
    508 Response not available
    509 Data exception during processing
    512 Data exception
    513 Developer account exceeded daily quota
    514 Account expired