Clik here to view.

There are a few easy ways to connect and interact with the ObjectRocket database service.
The first step is to create an instance using the instance/create instance button. When you create an instance your connect strings are provisioned for you automatically. You have the choice of any of a few different connection methods:
- Native MongoDB driver, plain text
- Native MongoDB driver, SSL encrypted
- ObjectRocket API, SSL Encrypted
Before we get into how to connect, some overview is in order. The ObjectRocket service is an inherently and automatically sharded system. That means when you connect, you are instantly connected to at least one shard (depending on your layout). The instance will also have at least 3 members in the replica set. Upon connection you automatically get routed to the current master for that shard. There is no configuration needed in your drivers or with our system, it’s all seamless.
The ObjectRocket service is not ‘open’ by default. We view security as a very important attribute in any proper enterprise grade system. Thus, In order to connect, you must ensure your client has been added to your own ACL list for access. This is done via the GUI on the database/Connections tab. Adding an ACL entry allows you to open the firewall for yourself, and provide a comment to help keep things orgainized. You can add any CIDR compliant address. This allows for opening a range of addresses. For instance, open all your EC2 webservers in one shot.
ObjectRocket is strategically located close to popular datacenters across the US. Our unique network peering arangement allows for ObjectRocket to be accessed from any application very quickly. In many cases customers won’t notice any latency penalty with using ObjectRocket vs using the local cloud provider.
Native Connections
Native connections to ObjectRocket are fairly simple. Just use a connect string as you normally would via any MongoDB driver;
$>mongo w-mongos0.objectrocket.com:4343
What is a bit unique is this host and port is fully load balanced and fully redundant. An application doesn’t need to specify many host addresses or have a complicated configuration. The host name specified gets routed to one of N MongoS servers. Simply use the connect string provided in your applications configuration and you are all set. You can shard at will and there are never any configuration changes required.
SSL
SSL connections are a bit different. The connection is a standard SSL connection directly terminated on the ObjectRocket POD. You will need a client compiled with SSL if you are using the shell, or many drivers now have SSL support. If you aren’t already running an SSL compiled client, contact us and we can send you one to incorporate into your source. Alternatively, stunnel works seamlessly with the ObjectRocket service, and will allow you to continue to use a non-SSL enabled MongoDB client without modifying your existing software stack. The connection is still load balanced, redundant, and requires no changes as shards are added.
An additional feature that we provide with SSL is the use of client certificates; This allows you to further restrict connections to your database only to SSL clients that authenticate using a client certificate authenticated against ObjectRocket; This works in addition to the standard MongoDB authentication hooks to provide an extra measure of security.
REST API
The ObjectRocket REST API has been designed to be both a data API, but also a metadata API. Most all MongoDB CRUD operations can be performed via the API. Metadata operations work the same way. The API server only listens via HTTPS SSL. Details on the API are in the database/API tab for your instance.
For example:
$>curl --data 'api_key=c92c60b14f88404eb377eabe91d51d2b&doc={"fname":"Chuck"}' 'https://api.objectrocket.com/db/test/collection/test/add' { "data": { "_id": { "$oid": "506b7a995b335249c7000000" }, "fname": "Chuck" }, "rc": 0 } $> curl --data 'api_key=c92c60b14f88404eb377eabe91d51d2b&doc={"fname":"Chuck"}&set={"lname":"Yeager"}' 'https://api.objectrocket.com/db/test/collection/test/update' { "rc": 0, "n": 1 }
Each RESTful url sent to the API must post the API Key. The return result is JSON formatted text and will always have a result code (“rc”) attribute. If the operation is successful a “data” attribute will be returned, it’s value is the data requested from the operation.
The following operations are supported today:
- query
- insert
- update
- delete
- field subsetting
- atomic operators
- all the conditional operations
- meta operators
- regular expressions
The Metadata API works the same way. Just specify the proper API Key and URL. This is how the rocketstat utility works, it simply is asking for an API URL. There are operations for many different functions. These calls are useful for integration into other utilities, monitoring, etc.
- space usage
- serverStatus
- profiler
- up/down status
- instance details
- list databases
- add database
We are adding more and more API functionality every release.