-
Notifications
You must be signed in to change notification settings - Fork 33
Write settings
Jon Watte edited this page Sep 24, 2012
·
1 revision
Home - HTTP Interface - Write settings
POST /?s=NAME
-
s- The name of settings document to save as, which is comprised of alphanumeric, underscore, dot and dash characters.
Additionally, the POST data contains a JSON-encoded object, containing a bunch of key/value pairs.
{
key: "value",
key: "value",
key: "value",
// ... and so forth
}
Saves a settings document with name specified by the string s. If a settings document named s does not exist yet, it will attempt to create it. The contents of the POST data sent to this URL will be dumped into the file directly.
If the settings were saved successfully,
- Status code:
200
Response body:
{
"success": true
}
If the POST data being submitted is invalid or malformed, or the settings name is invalid:
- Status code:
400
If the settings file could not be opened for writing,
- Status code:
404