Skip to content

Get settings

Jon Watte edited this page Sep 24, 2012 · 1 revision

Home - HTTP Interface - Get settings

Usage

GET /?s=NAME
GET /?s=NAME&sk=PATTERN

Parameters

  • s - The name of the settings document, which is comprised of alphanumeric, underscore, dot and dash characters.

  • sk - An optional pattern to match against the setting keys, possibly containing url-encoded wildcard characters:

    • %3F: ? = matches any subfield (fields are separated by dots .).
    • %2A: * = matches any substring.

Overview

Get a list of settings from a document named by s. This is just a big blob of key/value data.

If sk is given, this is used to pattern-match against keys in the settings. Otherwise, all settings are returned.

Response

If the settings document exists (and, if provided, sk matches at least one key),

  • Status code: 200

Response body:

{
    key: "value",
    key: "value",
    key: "value",
    // ... and so forth
}

If the settings document does not exist,
  • Status code: 404

Response body:

{
    "error": "no such settings"
}

If the settings document exists, but `sk` does not match any keys in the document,
  • Status code: 404

Response body:

null

If the settings document name contains invalid characters:
  • Status code: 400

Response body:

{
    "error": "invalid settings name"
}
Clone this wiki locally