Interaction Initialization Flow

This flow is a schematic sequence for getting to the first Interaction. The sequence includes the following requests:

Client validation

Getting list of Interactions

Starting an Interaction

Authentication (relevant only to secured Interactions/Sub-Interactions)

Navigation

The following diagrams illustrate the flow for accessing open and secured Interactions. The sections below the diagrams provide request and response examples for each phase of the sequence.

Open Interaction Initialization Flow                Secured Interaction Initialization Flow

tog_minusClient Validation Request and Response

The following is an example of a request and response for client validation:

HTTP GET: http://10.90.17.220:8090/interact/version/1/account/12345678

{

    … Request Header...

}

 

HTTP Response: 200

{

    "Content-Length" = 0;

    "Content-Type" = "application/json;charset=UTF-8";

    Date = "Thu, 15 Nov 2012 07:36:04 GMT";

    Server = "Apache-Coyote/1.1";

    "Server-Version" = "Ver 7.0, Build 20121114-1837";

}

tog_minusList of Interactions Request and Response

The following figure shows how a sample Interaction list is displayed on a mobile page. The related server response is provided below the figure.

Sample Interaction List

HTTP GET: http://10.90.17.220:8090/interact/version/1/account/12345678/interaction

{

    … Request Header...

    "Security-Token" = "6e85ebac-e136-4ee6-8253-fb8f028d6d9b";

}

 

HTTP Response: 200

{

    "Content-Length" = 1066;

    "Content-Type" = "application/json;charset=UTF-8";

    Date = "Thu, 15 Nov 2012 07:36:04 GMT";

    Server = "Apache-Coyote/1.1";

    "Server-Version" = "Ver 7.0, Build 20121114-1837";

}

 

{

  "resources" : {

    "spaces" : [ {

      "spaceMessage" : "There are no Interactions published by 'default_space'"

    }, {

      "spaceInteractions" : [ {

        "id" : "1352904573123-22206e0dd5c3f8f20dbb3cfecaad13aff46221d-7338",

        "interactionName" : "build4",

        "description" : "This interaction is for A case"

      }, {

        "id" : "1352911746202-16e0dd5c3f8f20dbb5f8fa0cb13affd2f3a0-8000",

        "interactionName" : "build4New",

        "description" : "This interaction is for B case"

      }, {

        "id" : "1342085971642-68578aa0db48fd98753728b3386a1387a8e3dfc-30c3",

        "interactionName" : "DevQuestionTest_SmartPhone",

        "description" : "This interaction is for C case"

      }, {

        "id" : "1352385348284-1c9e5f372711361c61496bd3513ae072c2b5-8000",

        "interactionName" : "mandatory",

        "description" : "This interaction is for D case"

      }, {

        "id" : "1352635455861-39271d54db1bd76faac3321b294d13aef0388c0-708a",

        "interactionName" : "VariablesInteraction",

        "description" : "This interaction is for E case"

      }, {

        "id" : "1341387025372-9271fd13a1812ac0861b7bad3b9b13850e58607-5bc7",

        "interactionName" : "Welcome",

        "description" : "This interaction is for F case"

      } ],

      "spaceTitle" : "<b>My Interactions</b>"

    } ],

    "pageTitle" : "Interactions"

  }

}

 

 

tog_minusStart Interaction Request

This request is triggered when the user selects an Interaction. The objectID is passed in the URL, and in the body of the request.

HTTP POST: http://10.90.17.220:8090/interact/version/1/account/12345678/interaction/
1341387025372-9271fd13a1812ac0861b7bad3b9b13850e58607-5bc7

{

     ….. request header.....

}

BODY: {"objectID":"1341387025372-9271fd13a1812ac0861b7bad3b9b13850e58607-5bc7"}

 

In the response body, we get the Object-Instance-Id and Object-step-Id

 

HTTP Response: 201

{

    "Content-Length" = 0;

    "Content-Type" = "application/json;charset=UTF-8";

    Date = "Thu, 15 Nov 2012 09:48:46 GMT";

    "Object-Id" = "1341387025372-9271fd13a1812ac0861b7bad3b9b13850e58607-5bc7";

    "Object-Instance-Id" = "1352972926684-9326e0dd5c3f8f20dbbda1af9a13affd29b9d-7bb6081ab2b6-3aee-4c7a-a76b-0eab9bfb3629";

    "Object-Step-Id" = "1341387025372-9250fd13a1812ac0861b7bad3b9b13850e58607-5bdc";

    "Object-Version" = "6e0dd5c3f8f20dbb:-7a5c4bfb:1392aa6bf2c:-4989";

    Server = "Apache-Coyote/1.1";

    "Server-Version" = "Ver 7.0, Build 20121114-1837";

    "User-Id" = 111500038;

}

tog_minusAuthentication Request and Response

An authentication request is sent only when accessing a secured Interaction or Sub-Interaction. The following is an example of a request and response for authentication.

HTTP POST: http://10.90.17.220:8090/interact/version/1/account/12345678/auth

{

 … Request Header...

}

BODY: {"username":"MUAxLmNvbQ==","accountID":"12345678","password":"cGFzc3dvcmQ="}

 

HTTP Response: 200

{

    "Content-Length" = 65;

    "Content-Type" = "application/json;charset=UTF-8";

    Date = "Thu, 15 Nov 2012 07:36:04 GMT";

    Server = "Apache-Coyote/1.1";

    "Server-Version" = "Ver 7.0, Build 20121114-1837";

}

BODY:

{

  "Security-Token" : "6e85ebac-e136-4ee6-8253-fb8f028d6d9b"

}

tog_minusNavigation Request (NavigationType=CURRENT)

The following is an example of a navigation request. The response body contains the Interaction page. For more details, refer to Navigation Response Body.

HTTP POST: http://10.90.17.220:8090/interact/version/1/account/12345678/interaction/
1341387025372-9271fd13a1812ac0861b7bad3b9b13850e58607-5bc7/1352972926684-9326e0dd5c3f8f20dbbda1af9a13affd29b9d
-7bb6081ab2b6-3aee-4c7a-a76b-0eab9bfb3629/navigation

{

    … request header....

    "Object-Step-Id" = "1341387025372-9250fd13a1812ac0861b7bad3b9b13850e58607-5bdc";

    "Object-Version" = "6e0dd5c3f8f20dbb:-7a5c4bfb:1392aa6bf2c:-4989";

    "Security-Token" = "849fb185-e6a9-4056-81a3-17c197562bca";

}

BODY: {"objectID":"1341387025372-9271fd13a1812ac0861b7bad3b9b13850e58607-5bc7","reason":"","navigationType":"CURRENT","param":[]}

 

 

HTTP Response: 200

{

    "Content-Length" = 4313;

    "Content-Type" = "application/json;charset=UTF-8";

    Date = "Thu, 15 Nov 2012 09:48:46 GMT";

    "Object-Id" = "1341387025372-9271fd13a1812ac0861b7bad3b9b13850e58607-5bc7";

    "Object-Instance-Id" = "1352972926684-9326e0dd5c3f8f20dbbda1af9a13affd29b9d-7bb6081ab2b6-3aee-4c7a-a76b-0eab9bfb3629";

    "Object-Step-Id" = "1341387025372-9250fd13a1812ac0861b7bad3b9b13850e58607-5bdc";

    "Object-Version" = "6e0dd5c3f8f20dbb:-7a5c4bfb:1392aa6bf2c:-4989";

    Server = "Apache-Coyote/1.1";

    "Server-Version" = "Ver 7.0, Build 20121114-1837";

    "User-Id" = 111500038;

}