Connect

This command is used to to a specific endpoint or packet list.

Parameters:

  • plId: The ID of the packet list from which to connect.
  • clientId: The IP address from which to connect; should be a valid IPv4 address.
  • overwriteExistingConnection: A boolean flag that indicates whether or not to overwrite an existing connection.
  • flowID: The ID of a specific flow as you defined it in the Start Test request.

In order to connect to all Packet Lists in the running tests, leave all parameters above empty.

Note:  

  • When using IP ranges, connect using the plId (Packet List ID) and not by the clientId. The Packet List ID can be retrieved using Get Packet List Information.
  • When connecting to a default flow, use plId (Packet List ID); Client ID is not supported.

Return value:

transactionManagerSessionIdentifiers: the identifiers of the transaction during the session; used for future Start/Stop requests.

Request

JSON

URL http://ip:port/shunra/api/transactionmanager/{testToken}
HTTP Method POST
HTTP Headers

Content-Type: application/json

Accept: application/json

Authorization: See Web Services Authentication.

Body

{
    "plId":"ID_PACKET_LIST_CLIENT_FLOWS_1",
    "overwriteExistingConnection":"true"
}

or

{
    "flowId":"ID_CLIENT_FLOWS_1",
    "overwriteExistingConnection":"true"
}

or

{
    "overwriteExistingConnection":"true"
}

XML

URL http://ip:port/shunra/api/transactionmanager/{testToken}
HTTP Method POST
HTTP Headers

Content-Type: application/xml

Accept: application/xml

Authorization: See Web Services Authentication.

Body

<connectRequest>
    <plId>ID_PACKET_LIST_CLIENT_FLOWS_1</plId>
    <overwriteExistingConnection>true</overwriteExistingConnection>
</connectRequest>

or

<connectRequest>
    <flowId>ID_CLIENT_FLOWS_1</flowId>
    <overwriteExistingConnection>true</overwriteExistingConnection>
</connectRequest>

or

<connectRequest>
    <overwriteExistingConnection>true</overwriteExistingConnection>
</connectRequest>

 

Response

JSON

HTTP Response Code 200 - OK
HTTP Headers

Date: Thu, 15 Mar 2014 15:36:11 GMT

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

Accept-Ranges: bytes

HTTP Body
{
    "transactionManagerSessionIdentifier":"Aead518af - 3fa3 - 460c - 9be5 - fc3b6a7101cfB"
}

XML

HTTP Response Code 200 - OK
HTTP Headers

Date: Thu, 15 Mar 2014 15:36:11 GMT

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

Accept-Ranges: bytes

HTTP Body
<connectResponse>
    <transactionManagerSessionIdentifier>
        ID_PACKET_LIST_CLIENT_FLOWS_1_TmSession_e366660d-3cc7-45e8-b4c0-e4524fcff6929b6a5a3f-15e5-44a8-a803-25dd860c0e57
    </transactionManagerSessionIdentifier>
</connectResponse>