Cassandra.io is the only hosted and multi-tenant Apache Cassandra platform in the wild today. If you're a developer, get started with the free version. If your business needs its own dedicated environment, check out our paid plans.
Cassandra.io is supported in all of Amazon's locations.
With 512MB free space and triple redundancy you can't go wrong! Cassandra.io also includes example libraries for common programming languages.
Dedicated environments for the Enterprise with full 24/7 support.
If you're looking for a more robust datastore for your Heroku application, Cassandra.io is available right from the Heroku add-on catalog.
Direct access to Cassandra.io from your Heroku application.
There are different plans available for Heroku. Whether you're a developer getting started on Cassandra or looking to move your dedicated ring to a more stable environment, we have the plan for you.
| Plan | Description |
|---|---|
| DEV | The free plan for developers includes 500MB free space and a maximum of 50 transactions per second. |
To use Cassandra.io (add-on) on Heroku, install the add-on from the command line:
$ heroku addons:add cassandraio
You can also select your plan on installation:
$ heroku addons:add cassandraio [DEV, SMALL, STANDARD, LARGE]
Helper libraries and SDKs for major coding languages are available on github. Everything is open sourced... clone, fork, & enjoy.
To request a language binding or SDK, please visit our help site.
There are lots of libraries in progress. Here is the current status of each language.
| Language | Status |
|---|---|
| Java | The Java SDK is stable for V1.0 and provides convenience wrappers for all Cassandra.io REST calls. The Java SDK also provides object to JSON mapping so you can easily bind data calls to your applications DAOs. Java SDK on Github » |
| Ruby | The Ruby helper library is stable for V1.0 and provides convenience wrappers for all the Cassandra.io REST calls. Ruby Helper Library on Github » |
| PHP | The PHP helper library is stable for V1.0 and provides convenience wrappers for all the Cassandra.io REST calls. PHP Helper Library on Github » |
| Obj-C | The Objective-C library is in private beta. Contact support if you're looking for early access. |
The base URL is used to make requests to the REST API.
After signing up, you will receive a token and account ID to access our API. These are your username and password for authenticated requests.
For example:
curl https://{your token}:{your account ID}@api.cassandra.io/1/accountstats
In Cassandra, the keyspace is the container for your application data, similar to a schema in a relational database. Keyspaces are used to group column families together.
This GET request returns a list of the account's keyspaces.
Example Response:
{ "keyspaces":["MyKeyspace1","MyKeyspace2"] }
This POST request creates a new keyspace with the the name provided: {kName}
Example Response:
{
"message":"Success",
"status":"200",
"detail":"Keyspace added successfully."
}
This DELETE request deletes an existing keyspace with the the name provided: {kName}
Example Response:
{
"message":"Success",
"status":"200",
"detail":"Keyspace deleted successfully."
}
In Cassandra, Column Families are like tables in a relational database. Column Families can (and should) define metadata about the columns.
This GET request returns all the Column Families for the keyspace provided: {kName}
Example Response:
{
"columnfamilies":[
{
"columnfamily":{
"sortedby":"UTF8Type",
"name":"CF_METADATA"
},
"columns":[
]
},
{
"columnfamily":{
"sortedby":"UTF8Type",
"name":"TestCF"
},
"columns": [
{
"index":"true",
"validator":"UTF8Type",
"name":"name"
}
]
}
]
}
This GET request returns the information on the Column Family provided: {cfName} for the keyspace: {kName}
Example Response:
{
"columnfamily":{
"sortedby":"UTF8Type",
"name":"TestCF"
},
"columns":[
{
"index":"true",
"validator":"UTF8Type",
"name":"name"
}
]
}
This POST request creates a new Column Family of type {cType} named {cfName} in the keyspace: {kName}
Example Response:
{
"message":"Success",
"status":"200",
"detail":"TestCF ColumnFamily created successfully"
}
This DELETE request deletes an existing Column Family named {cfName} in the keyspace: {kName}
Example Response:
{
"message":"Success",
"status":"200",
"detail":"TestCF dropped."
}
A column is the smallest increment of data in Cassandra. It is a tuple containing a name, a value and a timestamp.
This POST request creates a new column {cName} in the column family {cfName} in the keyspace {kName}. This call is required to create an indexed column. If you do not specify the type of your column before inserting data, the type defaults to UTF8.
This request takes GET parameters
| Parameter | Description |
|---|---|
isIndex (optional) |
[true|false] parameter indicating whether
or not the new column should be index. This is not changable.
The default value is false
|
Example Response:
{
"message":"Success",
"status":"200",
"detail":"name Column created successfully"
}
The Data API provides basic CRUD methods for manipulating your data in Cassandra.io.
This POST request adds data to the specified column family {cfName} using the rowkey {rowKey}. You can optionally specify a TTL for this record. Time to live will expire the record automatically and purge it from Cassandra.io after {ttl} number of seconds.
This request takes GET parameters
| Parameter | Description |
|---|---|
ttl (optional) |
Time to Live (in seconds). Default is no TTL. |
This request takes POST parameters of your key value pairs to be stored in Cassandra.io
For example: key=value&key2=value2&key3=value3
Example Response:
{
"message":"Success",
"status":"200",
"detail":"testkey upsert successfull."
}
This GET request returns the data for the rowKey {rowKey} in the column family {cfName} for the keyspace: {kName}. The data is pagable using the optional GET parameters.
This request takes GET parameters
| Parameter | Description |
|---|---|
limit (optional) |
The maximum number of results to return. |
fromKey (optional) |
The key from which to start the range of the query results. This can be used to paginate data. |
Example Response:
{
"columnfamily":{
"sortedby":"UTF8Type",
"name":"TestCF"
},
"columns":[
{
"index":"true",
"validator":"UTF8Type",
"name":"name"
}
]
}
This DELETE request deletes a specific column {cName} in a Column Family {cfName} with the given rowKey {rowKey}. Data will also be removed.
Example Response:
{
"message":"Success",
"status":"200",
"detail":"Deleted entry successfully."
}
This DELETE request empties an existing row with the rowkey {rowKey} in the Column Family named {cfName} in the keyspace: {kName}. This row will remain empty until the next Cassandra.io compaction job deletes it permanently.
Example Response:
{
"message":"Success",
"status":"200",
"detail":"Deleted entry successfully."
}
In Cassandra, you can access your data using simple CQL commands. Cassandra.io transforms your CQL commands over a simple REST API.
This POST request inserts or updates data in the column family {cfName} of keyspace {kName}. Insert and Update do basically the same thing in Cassandra. For more information on these verbs see DataStax Insert/Update »
This request takes POST parameters
| Parameter | Description |
|---|---|
update |
The update CQL clause for the affected data set. For example:
update=update set 'mysqlkey' = 'mycqlval', 'mykey2' = myval2' WHERE KEY IN ('"+ ROWKEY +"', '"+ COLNAME +"'")
|
insert |
The insert CQL clause for the affected data set. For example:
insert=insert set 'mysqlkey' = 'mycqlval', 'mykey2' = myval2' WHERE KEY IN ('"+ ROWKEY +"', '"+ COLNAME +"'")
|
Example Response:
{
"message":"Success",
"status":"200",
"detail":"testkey upsert successfull."
}
This GET request queries the column family {cfName} in the keyspace {kName} using a CQL statement that is passed via GET parameters
This request takes GET parameters
| Parameter | Description |
|---|---|
select (required) |
CQL statement excluding the 'from' clause. For example, select= select * WHERE 'key' =
'value'.
|
Example Response:
{
"testkey":{
"KEY":"testkey",
"accessDate":"1319058980611",
"mycqlkey":"mycqlval",
"mykey2":"myval2",
"name":"cassadraio",
"random":"0.029457936085185765",
"test":"B%26GE"
}
}
The Account API provides access to account plan information and usage stats.
This GET request returns information about your account, plan and usage.
Example Response:
{
"email":"user@yourdomain.com",
"token":"XXXXXXXXXX",
"accountId":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
"prefix":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"plan":"DEV",
"keyspaces":["MyKeyspace1","MyKeyspace2"],
"planModel":{
"cost":"0.00",
"rf":3,
"maxKeyspaces":2,
"maxColumnFamilies":100,
"maxSize":512000,
"actualKeyspaces":2,
"actualColumnFamilies":4,
"actualSize":256,
"actualIndexes":5
}
}