Change theme:   

Site

Site resource is located at /admin/api/site.

Summary of site endpoints

Get data for the site

GET - /admin/api/site

Example response:

Status: 200 OK
{
  "meta_keywords": "my key words",
  "created_at": "2014-01-03T09:19:04.000Z",
  "updated_at": "2014-01-22T14:58:01.000Z",
  "search_enabled": false,
  "data": {
    "my_key_1": "Value 1",
    "my_key_2": 2
  },
  "public_url": "http://helloworld.edicy.co/"
}

Update attributes of the site

PUT - /admin/api/site

Example request:

PUT - http://helloworld.edicy.co/admin/api/sites

Example data:

{
  "site": {
    "data": {
      "my_new_key": ["foo", "bar"],
      "value": "My value"
    }
  }
}

Example response:

Status: 200 OK
{
  "meta_keywords": "key1 key2",
  "created_at": "2014-01-03T09:19:04.000Z",
  "updated_at": "2014-01-22T15:11:02.000Z",
  "search_enabled": true,
  "data": {
    "my_new_key": ["foo", "bar"],
    "value": "My value"
  },
  "public_url": "http://helloworld.edicy.co/"
}

Parameters

Optional parameters:

  • data - key/value based custom hash store. (NB! Keys with suffix edicy_ is protected and read only.)

Update custom data field of the site

PUT - /admin/api/site/data/key_1

Updates or adds a new key to site data keyset.

Example request:

PUT - http://helloworld.edicy.co/admin/api/sites/data/key_1

Example data:

{
  "value": "new value"
}

Example response:

Status: 200 OK
{
  "meta_keywords": "key1 key2",
  "created_at": "2014-01-03T09:19:04.000Z",
  "updated_at": "2014-01-22T15:11:02.000Z",
  "search_enabled": true,
  "data": {
    "my_new_key": ["foo", "bar"],
    "value": "new value"
  },
  "public_url": "http://helloworld.edicy.co/"
}

Remove a custom field from a site

DELETE - /admin/api/site/data/key_1

Example request:

DELETE - http://helloworld.edicy.co/admin/api/sites/data/key_1

Example response:

Status: 204 No Content