Shared Data Server - Set
This Eggplant Performance Test Controller REST method creates or modifies the value associated with the specified key in the Shared Data Server.
note
For this method to work, Shared Data Server must be running on the same machine as the Test Controller REST server. This is usually accomplished by enabling the Start the Shared Data Server at the beginning of the test option on the Test View > Shared Data Server tab in Studio.
URL
/test_controller/api/1.0/shared_data_server/set
HTTP Method
POST: Sets the value associated with the specified key in the Shared Data Server
POST Data Parameters
Parameter | Type | Description |
---|---|---|
key | String | The key of a shared variable in Shared Data Server. This can be a new key or an existing key. |
value | String or integer | The value to store in the Shared Data Server. If the value is not an integer, make sure to enclose it in quotes in the JSON body. |
warning
The specified key
must relate to a shared variable in Shared Data Server. Shared lists are currently not accessible via this API.
Response Parameters
Parameter | Type | Description |
---|---|---|
<key> | String or integer | The updated value of the shared variable associated with the specified key in Shared Data Server. |
Example Request
http:/test_controller/api/1.0/shared_data_server/set
POST Data
{
"key": "my_key",
"value": "my_value"
}
Example Response
{
"my_key": "my_value"
}