Skip to main content

Shared Data Server - Clear

This Eggplant Performance Test Controller REST method clears all values 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/clear

HTTP Method

POST: Clears all values associated with the specified key in the Shared Data Server

POST Data Parameters

ParameterTypeDescription
keyStringThe key of a shared variable or list in Shared Data Server.
info

Unlike the other methods (Get, Set, Increment, Decrement), the specified key can relate to a shared variable or a shared list in Shared Data Server.

Response Parameters

ParameterTypeDescription
InfoStringA message to confirm that the key has been cleared (removed).

Example Request

http://localhost:5001/test_controller/api/1.0/shared_data_server/clear
POST Data
{
"key": "my_key",
}

Example Response

{
"Info": "Key 'my_key' has been cleared (removed)"
}