updateConfig()

Pixelsilk API function with which to update a configuration setting--it is possible to update both the key and the value
Parameters:
oldkey: the key before the change (C# type string)
newkey: the key after the change (C# type string)
value: the value associated with the key (C# type string)

Output:
The updateConfig function returns void.

C# Example:
string oldkey = "oldkeyname";
string newkey = "newkeyname";
string value = "valuestring";
UpdateConfig(oldkey, newkey, value);
Note the capital first letter of the C# method.

HTTP Example:
Request Headers:
POST /api2/updateConfig HTTP/1.1
HOST: www.example.com
Content-Length: 160
Content-Type: application/x-www-form-urlencoded
Cookie: auth=29F9EB63E839...0D25040B1289

Request Data:
Unencoded Data:
json={
   "oldKey":"foo2",
   "newKey":"foo3",
   "value":"foo"
}&token=7AdbNHZQBtwc...RPTEK8UvSUQ=

Url-encoded Data:
json={ +++..." }&token=7AdbNHZQBtwc...TEK8UvSUQ=

Response Headers:
HTTP/1.1 200 OK
Set-Cookie: auth=D2BF69DE3180...FD57DDEB93B; path=/
Content-Type: text/javascript; charset=UTF-8
Content-Length: 2

Response Data:
{}


JavaScript Example:
Method Call:
pixelsilk2.updateConfig(input, callback)

Input Object:
{
    "oldkey":"foo2",
    "newkey":"foo3",
    "value":"foo"
}

Returned Data:
{}

Back to Configuration »