Set Configuration for Location Based Emulation

This API updates the common emulation configuration on the emulation engine, as it has been generated by the global Location configuration UI in the NV Location Editor.

This API internally will call two different configuration API calls:

  • Set configuration
  • Add list of Exclude IP/Port

Note: The Excluded IP ranges will be valid throughout any running tests until they are specifically removed.

Request

JSON

URL http://ip:port/shunra/api/configuration/bylocations
HTTP Method POST
HTTP Headers

Content-Type: application/json

Accept: application/json

Authorization: See Web Services Authentication.

Body
{
    "settings": {
        "packetListMaxSizeMB": 300,
        "isPacketListCaptureCyclic": true
    },
    "excludeIps": [{
        "from": "8.8.8.8",
        "to": "8.8.8.12",
        "protocol": 6,
        "port": 8183
    }]
}

XML

URL http://ip:port/shunra/api/configuration/bylocations
HTTP Method POST
HTTP Headers

Content-Type: application/xml

Accept: application/xml

Authorization: See Web Services Authentication.

Body
<configuration>
    <settings>
        <packetListMaxSizeMB>300</packetListMaxSizeMB>
        <isPacketListCaptureCyclic>true</isPacketListCaptureCyclic>
    </settings>
    <excludeIps>
        <From>8.8.8.8</From>
        <To>8.8.8.12</To>
        <Protocol>6</Protocol>
        <Port>8183</Port>
    </excludeIps>
</configuration>

Response

HTTP Response Code 204 - No content
HTTP Headers  
HTTP Body