Redis To Go

Simple Redis Hosting

The Redis To Go API is currently undergoing maintenance for further information please email support@redistogo.com

Redis To Go API

Redis To Go offers an REST API for customers who would like to provision instances programmatically. Both JSON andXML are supported.

Access is provided through Basic Auth.

Example:

# require 'rest-client'
  RestClient.get('https://username:password@redistogo.com/instances.json')

Note that if you are using Ruby ActiveResource offers a trivial way to wrap this interface.

GET /instances(.:format)

Returns an array of provisioned instances.

Example Requests:

Example Responses:

# /instances.xml
<?xml version="1.0" encoding="UTF-8"?>
<instances type="array"> 
  <instance>
    <label>mongrel</label>
    <last-bgrewriteaof-at type="datetime" nil="true"></last-bgrewriteaof-at> 
    <persistence>aof</persistence> 
    <plan>small</plan> 
    <created-at type="datetime">2010-08-02T05:29:38Z</created-at> 
    <master-password></master-password> 
    <memory type="integer">104857600</memory> 
    <port type="integer">9040</port> 
    <slave type="boolean">false</slave> 
    <timeout type="integer">150</timeout> 
    <updated-at type="datetime">2010-08-02T06:22:23Z</updated-at> 
    <databases type="integer">1</databases> 
    <memory-limit-notification type="boolean">false</memory-limit-notification> 
    <hash-max-zipmap-value type="integer">512</hash-max-zipmap-value> 
    <id type="integer">236</id> 
    <hash-max-zipmap-entries type="integer">64</hash-max-zipmap-entries> 
    <snapshots type="array"/> 
    <version>v2.0.0-rc3</version> 
    <activerehashing type="boolean">true</activerehashing> 
    <appendfsync>everysec</appendfsync> 
    <master-host></master-host> 
    <last-backup-at type="datetime" nil="true"></last-backup-at> 
    <password>2b8427aff93c37ebf9244a4303v13x2b</password> 
    <status>running</status> 
    <connections type="integer">40</connections> 
    <master-port nil="true"></master-port> 
  </instance> 
</instances>

  # /instances.json [{ "instance": { "plan": "small", "persistence": "aof", "last_bgrewriteaof_at": null, "label": "mongrel", "created_at": "2010-08-02T05:29:38Z", "master_password": "", "updated_at": "2010-08-02T06:22:23Z", "timeout": 150, "slave": false, "port": 9040, "memory": 104857600, "memory_limit_notification": false, "databases": 1, "id": 236, "hash_max_zipmap_value": 512, "version": "v2.0.0-rc3", "snapshots": [], "hash_max_zipmap_entries": 64, "master_host": "", "appendfsync": "everysec", "activerehashing": true, "status": "running", "password": "2b8427aff93c37ebf9244a4303v13x2b", "last_backup_at": null, "master_port": null, "connections": 40 } }]

GET /instances/:id(.:format)

Returns an instance specified by the give id.

Example Requests:

Example Responses:

# /instances/1.xml
<?xml version="1.0" encoding="UTF-8"?>
<instance>
  <label>-9001</label>
  <last-bgrewriteaof-at type="datetime" nil="true"/>
  <persistence>aof</persistence>
  <plan>small</plan>
  <vm-size type="integer">0</vm-size>
  <created-at type="datetime">2010-12-20T00:35:22Z</created-at>
  <master-password nil="true"/>
  <vm-page-size type="integer">32</vm-page-size>
  <memory type="integer">104857600</memory>
  <port type="integer">9001</port>
  <server-id type="integer">1</server-id>
  <slave type="boolean">false</slave>
  <timeout type="integer">150</timeout>
  <updated-at type="datetime">2010-12-20T00:35:22Z</updated-at>
  <databases type="integer">1</databases>
  <memory-limit-notification type="boolean">false</memory-limit-notification>
  <hash-max-zipmap-value type="integer">512</hash-max-zipmap-value>
  <id type="integer">2</id>
  <hash-max-zipmap-entries type="integer">64</hash-max-zipmap-entries>
  <snapshots type="array">
    <snapshot>900 1</snapshot>
    <snapshot>300 10</snapshot>
    <snapshot>60 10000</snapshot>
  </snapshots>
  <user-id type="integer">2</user-id>
  <version>v2.0.4-stable</version>
  <vm-max-memory type="integer">94371840</vm-max-memory>
  <activerehashing type="boolean">true</activerehashing>
  <appendfsync>everysec</appendfsync>
  <master-host nil="true"/>
  <vm-enabled type="boolean">false</vm-enabled>
  <connections type="integer">256</connections>
  <last-backup-at type="datetime" nil="true"/>
  <password>cc3da5b7aaaad5b4895d243239beed97</password>
  <status>new</status>
  <master-port nil="true"/>
  <vm-max-threads type="integer">4</vm-max-threads>
  <url>redis://waratuman:cc3da5b7aaaad5b4895d243239beed97@.wingedram.com:9001/</url>
  <hostname>.wingedram.com</hostname>
</instance>

  # /instances/1.json { "vm_size": 0, "plan": "small", "persistence": "aof", "last_bgrewriteaof_at": null, "label": "server-9001", "created_at": "2010-12-20T00:35:22Z", "vm_page_size": 32, "master_password": null, "updated_at": "2010-12-20T00:35:22Z", "timeout": 150, "slave": false, "server_id": 1, "port": 9001, "memory": 104857600, "memory_limit_notification": false, "databases": 1, "id": 1, "hash_max_zipmap_value": 512, "vm_max_memory": 94371840, "version": "v2.0.4-stable", "user_id": 2, "snapshots": ["900 1", "300 10", "60 10000"], "hash_max_zipmap_entries": 64, "vm_enabled": false, "master_host": null, "appendfsync": "everysec", "activerehashing": true, "connections": 256, "status": "new", "password": "cc3da5b7aaaad5b4895d243239beed97", "last_backup_at": null, "vm_max_threads": 4, "master_port": null }

POST /instances

Create an instance. The only parameter that needs to be supplied is the plan.

PUT /instances/:id

Upgrade an instance specified by the give id. The only required parameter is the plan to upgrade to. This may fail if there is not enough space to upgrade the instance on the server.

The following properties can also be updated. Note that you should not use update both the plan and the given fields below.

DELETE /instances/:id

Destroy an instance specified by the give id.