Cloud Intro Guide
Purpose of this tutorial is to represent how to work with Clusterpoint Cloud Interface and use it's features.
Cloud Sign Up
First of all you need to sign up in Cloud. Note, that e-mail address you use for registration should be valid, because you will receive verification link. Cloud page will redirect you to the nearest "server" region you are located at the registration moment:
After Cloud account is signed up and verified, you can start with Database and Collection creation.
Creating Database and Collection
To continue work with Cloud, you should import data in created Collection.
You can use “Import data” in upper menu toolbar:
It is possible to upload files in the following formats: .csv, .xml, .json. Once the files are uploaded, you can import them into any of your collections if the data format is correct.
We uploaded file “world_population.csv”, using "+ Add files" -> "Upload to server" :
To start importing data into the database, press Start import.
It is necessary to choose Database and Collection name (or create new database/collection) in the Import configuration page.
We imported previously uploaded file "world_population.csv" to collection "world_population_2".
After import is done, you can "View import log", that shows the status of import.
Next step is to check Collection Data Model - a set of indexies, that allows to perform JS/SQL commands for different types of values. For each new document in Collection Data Model is automatically defined and supplemented. You can change certain field configuration by clicking on "Edit" button.
To view and modify Data model, we should go back to created Database “world_population_2”: click on "Databases" (in upper menu) -> choose Database “world_population_2 -> choose Collection“world_population_2 -> “Configure” button in action toolbar:
After configuration is changed, it should be Saved and Reindexed. Reindex option will appear automatically after policy is saved; or you can find “Reindex” in action toolbar.
More about Data Model rules and indexies you can read in section "Database Data Model".
When data is prepared, we can make different commands: select, update, insert, replace, delete. It could be done in “Run Query” section (in actions toolbar menu).
Here you can execute Clusterpoint API commands against any of your collections.
You can enter query in command editor and press "Run Query". All matching results are listed below the query.
As example, we defined SELECT query to search for documents where "Country" value is "USA" and we limited our result set to first five matches:
SELECT City_Urban_area, Country, Population, Land_area, Density FROM world_population_2 WHERE Country == "USA" LIMIT 5
After request is executed, you can view matching documents below JS/SQL editor:
He is an example of INSERT a new document in database "world_population_2":
Once you have results you want, you can copy query form the console into your REST API code.
More about JS/SQL syntax you can learn in section "Data manipulation".
In main menu "Users" you can manage your profile and create your account's sub-users. Users can be granted different permissions for various operations on the specific account databases. You can manage these settings by clicking on the Edit button next to the user account.
It is possible to create two user types:
1. GUI user - can access Cloud UI (e-mail address must be valid, because verification code is send to specified e-mail and should be verified);
2. API user - without Cloud UI access, user can connect to Cloud and execute commands only through API (there is no requirement for registration with valid e-mail as username).
For example, we created user “firstname.lastname@example.org” (button "+ Create user").
It is possible to manage:
- Admin permissions:
- Account Manager - main Cloud account contact person; can access to Billing section; receives Cloud notifications and bill information;
- Can edit users - can add/delete users, manage permissions;
- Can edit databases - can create/delete new databases;
- Database permissions - read/write permissions to certain databases
- Allowed IP's - IP's that have access to Cloud (if allowed IP's are set, then it is possible to connect to Cloud only from this certain IP's). This feature is available only for API users and not yet for GUI users.
- HMAC keys (at the moment HMAC keys are available only for version 3.0)
- Passwords and user details
You can use "Help" button - "?" for easy handling. “Help” briefly describes the appropriate section you are navigating at the moment. “Help” also provides Documentation and Tutorials.