Stop Test

The Stop Test API functions allow you to end tests that are currently running. This API supports the following functions:

Once a test stops, the following occur:

  • Packet Lists of the flows in the test are downloaded
  • A .shunra results file is generated

Stop All Tests

This API stops all the running tests.

Request

JSON

URL http://ip:port/shunra/api/emulation
HTTP Method DELETE
HTTP Headers

Content-Type: application/json

Accept: application/json

Authorization: See Web Services Authentication.

Body None

XML

URL http://ip:port/shunra/api/emulation
HTTP Method DELETE
HTTP Headers

Content-Type: application/xml

Accept: application/xml

Authorization: See Web Services Authentication.

Body None

Response

A list of Shunra files (one .shunra file per test).

JSON

HTTP Response Code 200 - OK
HTTP Headers Content-Type: application/json; charset=UTF-8
HTTP Body
{
    "analysisResourcesLocation": {
        "073bac1a-48a9-4f70-9c22-df23ff21473db3673d23-f4d4-47c1-817a-b619f7d7b032": "C:\\tmp\\TrafficResources\\073bac1a-48a9-4f70-9c22-df23ff21473d\\b3673d23-f4d4-47c1-817ab619f7d7b032\\AnalysisResources.shunra"
    }
}

XML

HTTP Response Code 200 - OK
HTTP Headers Content-Type: application/xml; charset=UTF-8
HTTP Body

<emulationStopResponse>
    <analysisResourcesLocation>
        <entry>
            <key>a446ca8a-c0e0-48c9-9ca2-a552b07c6431c8bb0dc9-3e26-4c4c-adf9-2d3ed82c9a66</key>
            <value>
                C:\tmp\TrafficResources\a446ca8a-c0e0-48c9-9ca2-a552b07c6431\c8bb0dc9-3e26-4c4c-adf9-2d3ed82c9a66\AnalysisResources.shunra
            </value>
        </entry>
    </analysisResourcesLocation>
</emulationStopResponse>

Stop Test by Tokens

Stops test(s) according to the test identifiers.

Request

JSON

URL http://ip:port/shunra/api/emulation/stop
HTTP Method PUT
HTTP Headers

Content-Type: application/json

Accept: application/json

Authorization: See Web Services Authentication.

Body
{
    testTokens: ["666232a3-b534-4965-ac5f-b47c407f3fa02ec9efc8-2dac-4a12-bfe7-5fd53d1b7312", "666232a3-b534-4965-ac5fb47c407f3fa077b25cb1-7062-466d-8dca-c7238b4cba4d"]
}

XML

URL http://ip:port/shunra/api/emulation/stop
HTTP Method PUT
HTTP Headers

Content-Type: application/xml

Accept: application/xml

Authorization: See Web Services Authentication.

Body

<stopRequest>
    <testTokens>
        666232a3-b534-4965-ac5f-b47c407f3fa02ec9efc8-2dac-4a12-bfe7-5fd53d1b7312
    </testTokens>
    <testTokens>
        666232a3-b534-4965-ac5f-b47c407f3fa077b25cb1-7062-466d-8dca-c7238b4cba4d
    </testTokens>
</stopRequest>

 

Response

A list of Shunra files (Shunra file per test).

JSON

HTTP Response Code 200 - OK
HTTP Headers Content-Type: application/json; charset=UTF-8
HTTP Body
{
    "analysisResourcesLocation": {
        "073bac1a-48a9-4f70-9c22-df23ff21473db3673d23-f4d4-47c1-817a-b619f7d7b032": "C:\\tmp\\TrafficResources\\073bac1a-48a9-4f70-9c22-df23ff21473d\\b3673d23-f4d4-47c1-817ab619f7d7b032\\AnalysisResources.shunra"
    }
}

XML

HTTP Response Code 200 - OK
HTTP Headers Content-Type: application/xml; charset=UTF-8
HTTP Body

<emulationStopResponse>
    <analysisResourcesLocation>
        <entry>
            <key>
                bb9e32c4-8b22-477e-801f-c8b1991256a4daf2a64e-ffec-493a-8b19-f497e3946f7b
            </key>
            <value>
                C:\tmp\TrafficResources\bb9e32c4-8b22-477e-801fc8b1991256a4\daf2a64e-ffec-493a-8b19-f497e3946f7b\AnalysisResources.shunra
            </value>
        </entry>
    </analysisResourcesLocation>
</emulationStopResponse>

 

Force Stop (Reset All)

This API restarts the driver, which stops all the running tests. Unlike the other "stop test" API functions, this API function does not generate packet lists and test results for the stopped tests. If you are working with an NV Server-based configuration, this API function is available to NV administrator users only.

Request

JSON

URL http://ip:port/shunra/api/emulation/resetall
HTTP Method PUT
HTTP Headers

Content-Type: application/json

Accept: application/json

Authorization: See Web Services Authentication.

Body None

XML

URL http://ip:port/shunra/api/emulation/resetall
HTTP Method PUT
HTTP Headers

Content-Type: application/xml

Accept: application/xml

Authorization: See Web Services Authentication.

Body None

 

Response

HTTP Response Code 204 - No content
HTTP Body None