-
Notifications
You must be signed in to change notification settings - Fork 164
Draft Configuration API
The following API is subject to change as suggestions and neccessity dictates.
-
GET
: returns JSON array of all Configuration objects-
payload: none
-
success: 200
[ { "name": "redis", "format": "string", "body": "redis://127.0.0.1:6379/0", "application": "noah", "id": "1", "update_at": "2011-01-22 07:55:48 UTC" }, { "name": "host", "format": "string", "body": "localhost", "application": "noah", "id": "2", "update_at": "2011-01-22 07:55:48 UTC" }, { "name": "port", "format": "string", "body": "9292", "application": "noah", "id": "3", "update_at": "2011-01-22 07:55:48 UTC" }, { "name": "database.yml", "format": "yaml", "body": "development:\n database: development_database\n adapter: mysql\n username: dev_user\n password: dev_password\n", "application": "myrailsapp1", "id": "4", "update_at": "2011-01-22 07:55:48 UTC" }, { "name": "config.json", "format": "json", "body": "{\n \"id\":\"hostname\",\n \"data\":\"localhost\"\n}\n", "application": "myrestapp1", "id": "5", "update_at": "2011-01-22 07:55:48 UTC" } ]
-
failure: 404
-
error: 500
-
-
PUT
: not supported. Possible future support for bulk operations -
POST
: not supported. Possible future support for bulk operations -
DELETE
: not supported.
-
GET
: returns JSON array of all Configuration objects for Application appname-
payload: none
-
success: 200
[ { "name": "redis", "format": "string", "body": "redis://127.0.0.1:6379/0", "application": "noah", "id": "1", "update_at": "2011-01-22 07:55:48 UTC" }, { "name": "host", "format": "string", "body": "localhost", "application": "noah", "id": "2", "update_at": "2011-01-22 07:55:48 UTC" }, { "name": "port", "format": "string", "body": "9292", "application": "noah", "id": "3", "update_at": "2011-01-22 07:55:48 UTC" } ]
-
failure: 404
-
error: 500
-
-
PUT
: Not supported. See Draft Application API -
POST
: Not supported. See Draft Application API -
DELETE
: No supported. See Draft Application API
-
GET
: returns body of Configuration item configname for Application appname, optionally setting proper mime-type-
payload: none
-
success: 200 (ex. GET /myrailsapp1/database.yml)
development: database: development_database adapter: mysql username: dev_user password: dev_password
-
failure: 404
-
error: 500
-
-
PUT
: Updates or creates the configuration item configname for application appname. Also creates Application appname if non-existant.-
required options:
body
,format
-
payload:
{ "format":"yaml", "body":"development:\n database: development_database\n adapter: mysql\n username: dev_user\n password: dev_password\n" }
-
success: 200 (note
action
anddependencies
will change based on config/application being created vs. updated){"result":"success","id":"6","action":"update","dependencies":"updated","application":"anappp","item":"anconfig"}
-
failure: 500
-
error: 500
-
-
POST
: Not supported. -
DELETE
: Deletes the given Configuration item configname for Application appname. Does NOT delete appname.-
payload: none
-
success: 200
{ "result":"success", "action":"delete", "id":"5", "application":"myrestapp1", "item":"config.json" }
-
failure: 404
-
error: 500
-