Get Your Front End On – A Guest Blog Post by Andrew Baldock

Andrew is a Frontend Engineer in San Francisco. He recently built an application called Skylab FM, a single-page application that uses RequireJS, BackboneJS, the SoundCloud API, and DreamFactory on the backend. In this guest blog post, Andrew walks you through how he built his app without writing any server-side code. 

Continue reading “Get Your Front End On – A Guest Blog Post by Andrew Baldock”

DreamFactory Developer Survey – Enterprise Mobile Development in 2013

BenBusse We sent out a survey to our registered users last week to get feedback on the DreamFactory Services Platform and to learn about mobile app usage and the technologies that our users are adopting. We thought it would be helpful to share some of the results with our community and with anyone interested in how mobile technologies are evolving.

Continue reading “DreamFactory Developer Survey – Enterprise Mobile Development in 2013”

DynamoDB App Tutorial with the DreamFactory SDK

ToddAppletonThis blog post is about building a to do list app using Amazon’s DynamoDB for storage along with the DreamFactory Services Platform (DSP) for the backend. We’ll show you how to add DynamoDB as a service on your DSP then we’ll use DreamFactory’s JavaScript SDK to authenticate and make CRUD calls to that service.

Related Reading: Create an Amazon DynamoDB REST API

Continue reading “DynamoDB App Tutorial with the DreamFactory SDK”

Tutorial: DreamFactory Essentials for AWS – Create a Mobile Backend in Minutes with Bitnami

BenBusse We recently announced a partnership with Bitnami that makes building and deploying mobile applications on AWS incredibly easy with the DreamFactory Services Platform. In this blog post, I’ll show you how to install DreamFactory on AWS account in one click, securely connect to Amazon S3 file storage and Amazon DynamoDB NoSQL data with our REST API, and start building a mobile app that uses these great services.

This 7-step tutorial will have you up and running with a full mobile application backend on AWS, including an EC2 instance, REST-accessible S3 file storage, and REST-accessible DynamoDB NoSQL data. You’ll be up and running with a full RESTful mobile backend on AWS in less than 20 minutes, even if you know absolutely nothing about DreamFactory, AWS or Bitnami! (Note that if you just want to try out DreamFactory first without installing it on AWS you can sign up for a free developer account on our website or launch a free demo trial on Bitnami with username: [email protected] and password: bitnami).

Continue reading “Tutorial: DreamFactory Essentials for AWS – Create a Mobile Backend in Minutes with Bitnami”

BitNami Interviews DreamFactory Founder Bill Appleton

DreamFactory is excited to announce a new partnership with Bitnami. Bitnami makes installing DreamFactory a breeze. Now you can to install the DreamFactory Services Platform with one-click on AWS, VMWare, Windows Azure, Linux, and OS X!  

Bitnami sat down with DreamFactory founder Bill Appleton to talk a little about DreamFactory’s history and where he sees the platform headed. Here are some excerpts from the interview. Continue reading “BitNami Interviews DreamFactory Founder Bill Appleton”

Adding Users to Your DSP

team-lee So, you have your DSP setup and an idea for an awesome app, now what? Well, unless you are the type that likes to be the sole beneficiary of your work and/or you like working all by your lonesome, then you are going to need to get other people in the mix.

Whether its adding consumers, collaborators, or customers, DreamFactory DSP provides several ways to add users to your DSP. Once added, you control what they can do by provisioning their role-based accesses. Continue reading “Adding Users to Your DSP”

Using OAuth with the New Portal Service

As all developers know, your creations can become tired, bored, and sometimes angry when forced to talk to only a single server or service. Applications are, for all intents and purposes, tiny monsters: they grow hungry to communicate with others to expand their knowledge, reach, and power. We at DreamFactory know this all too well and wanted to create an easy way to allow your monsters to feed their yearning. With the next release of the DreamFactory Services Platform™ (version 1.1.3), satisfying that need will become a whole lot easier. What makes this possible you ask? A new system service called Portal does. Continue reading “Using OAuth with the New Portal Service”

The New Mobile Architecture

There are a number of software systems for generating HTML pages on the server side, including Websphere, Weblogic, JSP, PHP, Python, and Ruby.

But the increasing prevalence of mobile devices has started to chip away at the usefulness of this strategy. The “click, get a page” model works well enough on a desktop browser with a dedicated connection, but on a tablet or phone this is a cumbersome and heavyweight solution. Each page is likely to carry graphics, page layout, scripts, and other elements along with the actual data. This is a lot of content to download for just another screen update, especially with an expensive data plan. Intermittent connectivity is also an issue as mobile applications move between zones or into areas without coverage altogether.

The rich client model has been around a long time, I’ve been working in this area since the late 1990’s, but the mobile revolution has brought this idea into the mainstream of application development. The rise of the native application model on iOS further demonstrated the advantages of being rich. The development of HTML5 was the browser’s way of supporting this model, and as the number of different mobile devices increase the popularity of this approach will grow, especially for enterprise applications.

This big change at the client suggests the need for some corresponding big changes on the server, but where are the ideal platforms for rich client development?

This is exactly the motivation for the DreamFactory Services Platform. A service platform can conduct compressed document exchange transactions with a mobile client and achieve very large reductions in network bandwidth.

Since the services are atomistic and under client control, occasionally connected applications are also possible. Because the interfaces are standards based, many different client environments are supported, including HTML5, native application, and server to server communication.

In the old model all the graphics, logic, and user interface must be generated on the server side. But when we move to a rich client model, there is an opportunity to replace all of that infrastructure with a pre-built and standards-based service platform. Based on our experience building rich client applications, we know that the right palette of services will support a very large number of application scenarios.

Since the services interface talks directly to the database, the speed and performance of the system is maximized. And because there is no need for user experience or graphics generation on the server, this model is much less expensive to deploy on a pay per use cloud server. But the most significant cost savings are in time to market and reduced software development. More about that in the next post.

How Circa5 Connects an iOS Mobile App to DreamFactory

BenBusseThis case study provides an overview of how Circa5 uses DreamFactory as a backend for Heisenbug, a collaborative bug tracking system designed for mobile devices. The case study describes how the iOS version of the application interacts with the DreamFactory open source backend services platform.

Heisenbug iPhone resized 600

We refer to each instance of the DreamFactory platform as a “DSP” which is short for DreamFactory Services Platform. As you’ll see, each DSP provides a database and a full-featured REST API to simplify the process of building your mobile application.

App Overview

Heisenbug is a simple issue tracking system that allows users to log and track project issues from their phone or tablet. The app is designed to motivate and encourage resolution using a gamification points system.

The primary use case for Heisenbug is creating and tracking “projects.” A project is either a bug to fix or a feature to complete. The details of a project are configurable to suit the working methods of each Heisenbug user. For example, a project can have an executive overview as well as more detailed information appropriate to an individual tasked with finishing the project.

Heisenbug motivates users to complete projects with a points system, a leveling game mechanic, and fun encouragement messages. For example, a user can close a bug to earn points and receive positive affirmation after reaching each level. The app provides a series of default phrases that can easily be customized.

The application is designed for collaboration. Groups of people can easily collaborate to finish a particular project. An access management screen allows an administrator to configure user permissions and sharing assignments for organizations, groups, or single-user accounts working on projects.

Other collaboration features include a Share feature that displays the ongoing discussion that a user is part of and as well as simple workflow notifications with SMS and email. These features help users stay in the loop when project information changes, enabling better collaboration across a project team.

Heisenbug iPad affirmation resized 600

Administering the DreamFactory Backend

Before building the frontend application, you need to configure your backend settings using the Dreamfactory admin console.

The first step of setting up the your backend instance is to create the application. On the left side menu choose Applications, enter your app name, check the box for native app, and click the “Create Application” button.

The next step is to create a Role for users of the application. Go to the Roles tab and enter a role name, for example “End User.” You need to associate the role with your application and also select which services are available for this role. Heisenbug end users all have the same service permissions, so the configuration is simple: just select “All” from the dropdown list and click “Add Service Access.” Don’t forget to check the “Active” checkbox before saving.

describe the image

Setting Up Database Tables

DreamFactory comes with a SQL database and a simple admin console for defining tables and fields. You can also import schema definitions in JSON format.

You set up your application’s schema from the “Manage Schema” tab. The Heisenbug schema consists of Records, Components, Messages, Priorities, Severities and Statuses. The tables are connected using SQL relationships. For example, the Records table references the Priorities table using a foreign key relationship. You can explore the complete schema using the Live API /schema.

Note: You can also easily connect RESTfully to your own SQL or NoSQL database by simply adding your database as a service in the DreamFactory admin console. This blog post provides an example of how to connect to your own database.

describe the image

Using the Live API Documentation

In the DSP admin console, you can click on the “API Documentation” tab to view every available API call. The API is documented with a tool called Swagger, which lets you quickly learn about each API call by viewing the request URL, response URL, and data returned in JSON format.

This is a powerful capability because it enables you to set up your backend, create some sample data, and make API calls before you even start implementing your application. For example, Heisenbug makes an API call to log users into the application to start a session. With Swagger, we could quickly see how the POST/user/session API call works before we implemented the call in our app.

Circa5 used an open source library called AFNetworking to make API calls from the client app. AFNetworking is very popular among iOS developers and is hosted on GitHub here.

describe the image

API Calls for User Authentication and Sessions

User management is a common requirement for many applications. DreamFactory’s REST API for user management made it very easy to manage user authentication, user roles, and session security.    

The Heisenbug app uses DreamFactory’s REST API for user authentication and session management.

When a new user registers, a POST is made to /user/register to create a new user in the database.

 -(void)
 registerWithEmail:(NSString*)email 
 firstName:(NSString*)firstName 
 lastName:(NSString*)lastName 
 displayName:(NSString*)displayName{
 
 static NSString *const baseURLString = 
 @"https://dsp-creativeappsagencydemo.cloud.dreamfactory.com";
 
 NSString *userSessionURLString = 
 [baseURLString stringByAppendingString:@"/rest/user/register"];
  
 NSDictionary *parametersDictionary = 
 [NSDictionary dictionaryWithObjectsAndKeys:email,@"email",firstName,@"first_name",lastName,@"last_name",displayName,@"display_name", nil];
 
 AFHTTPClient *httpClient = 
 [[AFHTTPClient alloc] 
 initWithBaseURL:[NSURL URLWithString:baseURLString]];
 [httpClient setDefaultHeader:@"X-DreamFactory-Application-Name" value:@"Heisenbug"];
 [httpClient setParameterEncoding:AFJSONParameterEncoding];
 
 NSMutableURLRequest *request = 
 [httpClient requestWithMethod:@"POST"
 path:userSessionURLString
 parameters:parametersDictionary];
 
 AFJSONRequestOperation *operation =
 [AFJSONRequestOperation 
 JSONRequestOperationWithRequest:request
 success:^(NSURLRequest *request, NSHTTPURLResponse *response, id JSON) {NSDictionary *jsonDic = (NSDictionary *)JSON;
 
 //registration completed successfully
 }
 
 failure:^(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id JSON) {NSLog(@"%@",error);
 
 //registration error                                                
                                                       
 }];
 
 [operation start];
   
 }

Each time a user logs into Heisenbug, a POST is made to /user/session to create a new session.

 -(void)
 loginWithEmail:(NSString *)email 
 password:(NSString *)password{
     
 static NSString *const baseURLString = 
 @"https://dsp-creativeappsagencydemo.cloud.dreamfactory.com";
 
 NSString *userSessionURLString = 
 [baseURLString stringByAppendingString:@"/rest/user/session"];
     
 NSDictionary *parametersDictionary = 
 [NSDictionary dictionaryWithObjectsAndKeys:email,@"email",password,@"password", nil];
     
 AFHTTPClient *httpClient = 
 [[AFHTTPClient alloc] 
 initWithBaseURL:[NSURL URLWithString:baseURLString]];
 [httpClient setDefaultHeader:@"X-DreamFactory-Application-Name" value:@"Heisenbug"];
 [httpClient setParameterEncoding:AFJSONParameterEncoding];
 
 NSMutableURLRequest *request = 
 [httpClient 
 requestWithMethod:@"POST"
 path:userSessionURLString
 parameters:parametersDictionary];
 
 AFJSONRequestOperation *operation =
 [AFJSONRequestOperation 
 JSONRequestOperationWithRequest:request
 success:^(NSURLRequest *request, NSHTTPURLResponse *response, id JSON) {NSDictionary *jsonDic = (NSDictionary *)JSON;
 
 UserData *userData = [UserData sharedInstance];
 userData.sessionId = [jsonDic objectForKey:@"session_id"];
 userData.userId = [(NSNumber *)[jsonDic valueForKey:@"id"] intValue];
 userData.displayName = [jsonDic objectForKey:@"display_name"];
 userData.email = [jsonDic objectForKey:@"email"];
 
 User *user = [[User alloc] init];
 user.email = userData.email;
 user.userID = userData.userId;
 user.sessionId = userData.sessionId;
 user.displayName = userData.email;
 user.password = password;
                                                    
 [Utility saveUser:user];
                                                         
 [self.delegate loginResult:YES];
                                                        
 }
 
 failure:^(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id JSON) {NSLog(@"%@",error);
 
 [self.delegate loginResult:NO];
                                            
 }];
 
 [operation start];
 
 }

API Calls for Database CRUD Operations

Creating, reading, updating, and deleting records is a universal requirement for any data-driven mobile application that stores information in a database. DreamFactory comes with a SQL database already installed and a straightforward REST API for CRUD operations, making it simple to operate on single records or multiple records at once.

Heisenbug uses a “bug” object to store information about bugs entered by users. In some cases, the application needs to perform CRUD operations on multiple records at once, for example fetch all the bugs assigned to a specific user.

In the case of multiple records, the application calls /db/{table_name} with either a POST (create), GET (retrieve), PUT (update), or DELETE (delete) API call. The DSP returns standard JSON in the API response.

For example, the following code performs a GET request to get a list of all bugs.

 -(void)requestBugs{
     
 static NSString *const DBBaseURLString = 
 @"https://dsp-creativeappsagencydemo.cloud.dreamfactory.com/rest/db/Bugs";
 
 AFHTTPClient *httpClient =
 [[AFHTTPClient alloc] 
 initWithBaseURL:[NSURL URLWithString:DBBaseURLString]];
 [httpClient setDefaultHeader:@"X-DreamFactory-Application-Name" value:@"Heisenbug"];
 [httpClient setDefaultHeader:@"X-DreamFactory-Session-Token" value:[UserData sharedInstance].sessionId];
 [httpClient setParameterEncoding:AFJSONParameterEncoding];
 
 NSMutableURLRequest *request = 
 [httpClient requestWithMethod:@"GET"
 path:DBBaseURLString
 parameters:nil];
 
 AFJSONRequestOperation *operation =
 [AFJSONRequestOperation JSONRequestOperationWithRequest:request
 success:^(NSURLRequest *request, NSHTTPURLResponse *response, id JSON) {
  NSDictionary *jsonDic = (NSDictionary *)JSON;
  NSArray *records  = [jsonDic objectForKey:@"record"];
  NSMutableArray *bugs = [[NSMutableArray alloc] init];
                                                         
  [records enumerateObjectsUsingBlock:^(id obj,NSUInteger idx, BOOL *stop){
  
   Bug *bug = [[Bug alloc] init];
   bug.bugID  = [(NSNumber *)[obj valueForKey:@"id"] intValue];
   bug.title = [obj valueForKey:@"title"];
   bug.details = [obj valueForKey:@"details"];
   bug.points = [(NSNumber *)[obj valueForKey:@"points"] intValue];
   bug.rank =[(NSNumber *)[obj valueForKey:@"rank"] intValue];
   int type = [(NSNumber *)[obj valueForKey:@"type"] intValue];
   bug.type = (type == 1)? bugTypeBug : bugTypeFeature;
   bug.speedToComplete = [(NSNumber *)[obj valueForKey:@"speedToComplete"] boolValue];
   bug.milestone = [(NSNumber *)[obj valueForKey:@"milestone"] boolValue];                                                            
   bug.archived = [(NSNumber *)[obj valueForKey:@"archived"] boolValue];
   bug.severity = [(NSNumber *)[obj valueForKey:@"severity"] intValue];
   bug.priority = [(NSNumber *)[obj valueForKey:@"priority"] intValue];
   bug.status = [(NSNumber *)[obj valueForKey:@"status"] intValue];
   bug.component = [(NSNumber *)[obj valueForKey:@"component"] intValue];
   bug.assignedUser = [(NSNumber *)[obj valueForKey:@"assignedUser"] intValue];;
   bug.issueType = [(NSNumber *)[obj valueForKey:@"issueType"] intValue];
   bug.notes = [obj valueForKey:@"notes"];
 
  }];
 
  self.bugs = bugs;
  [self.delegate bugsUpdateResult:YES dataReturned:bugs error:nil];
 }
 
 failure:^(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id JSON) {
  NSLog(@"%@",error);
  [self.delegate bugsUpdateResult:NO dataReturned:nil error:error];
                                                     
  }];
 
 [operation start];
 
 }

In other cases, the application simply needs to perform a CRUD operation on a single record, for example delete a specific bug.

In the case of single records, the application simply calls /db/{table_name}/{id} with the relevant HTTP verb for that record: either GET, POST, PUT, or DELETE. The DSP returns standard JSON in the API response.

 -(void)
 deleteBug:(Bug*)bug {
 
 NSString *DBBaseURLString = 
 [NSString stringWithFormat:@"https://dsp-creativeappsagencydemo.cloud.dreamfactory.com/rest/db/Bugs?ids=%d",bug.bugID];
  
 AFHTTPClient *httpClient = 
 [[AFHTTPClient alloc] 
 initWithBaseURL:[NSURL URLWithString:DBBaseURLString]];
 [httpClient setDefaultHeader:@"X-DreamFactory-Application-Name" value:@"Heisenbug"];
 [httpClient setDefaultHeader:@"X-DreamFactory-Session-Token" value:[UserData sharedInstance].sessionId];
 [httpClient setParameterEncoding:AFJSONParameterEncoding];
 
 NSMutableURLRequest *request = 
 [httpClient requestWithMethod:@"DELETE"
 path:DBBaseURLString
 parameters:nil];
 
 AFJSONRequestOperation *operation =
 [AFJSONRequestOperation JSONRequestOperationWithRequest:request
 success:^(NSURLRequest *request, NSHTTPURLResponse *response, id JSON) {
 
 [self.delegate bugDeleted:YES];
                                         
 }
 
 failure:^(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id JSON) {
 NSLog(@"%@",error);
                                           
 [self.delegate bugDeleted:NO];
                                               
 }];
 
 [operation start];
   
 }

Learn More

If you’re building a native iOS app, think about whether using a backend services platform with REST might work well for you. DreamFactory’s REST API made it very easy for Circa5 to develop Heisenbug without writing any server-side code or having to create their own API.

We’ve just covered a small part of what’s available in the DreamFactory backend. Other services are available for NoSQL data, binary documents, user permissions, and external services (like remote databases, file storage, and web services). For more information or to try it out for free, check out the following links. Thanks for reading and good luck with your apps!

DreamFactory Now Supports MongoHQ

              <div class="hs-migrated-cms-post"> 
               <p><img id="img-1378227826564" class="alignLeft" src="//staticassets.dreamfactory.com/images/team-ben.jpg?t=1527092313664&amp;width=86&amp;height=57&amp;name=team-ben.jpg" alt="BenBusse" width="86" height="57" border="0" srcset="//staticassets.dreamfactory.com/images/team-ben.jpg?t=1527092313664&amp;width=43&amp;height=29&amp;name=team-ben.jpg 43w, //staticassets.dreamfactory.com/images/team-ben.jpg?t=1527092313664&amp;width=86&amp;height=57&amp;name=team-ben.jpg 86w, //staticassets.dreamfactory.com/images/team-ben.jpg?t=1527092313664&amp;width=129&amp;height=86&amp;name=team-ben.jpg 129w, //staticassets.dreamfactory.com/images/team-ben.jpg?t=1527092313664&amp;width=172&amp;height=114&amp;name=team-ben.jpg 172w, //staticassets.dreamfactory.com/images/team-ben.jpg?t=1527092313664&amp;width=215&amp;height=143&amp;name=team-ben.jpg 215w, //staticassets.dreamfactory.com/images/team-ben.jpg?t=1527092313664&amp;width=258&amp;height=171&amp;name=team-ben.jpg 258w" sizes="(max-width: 86px) 100vw, 86px">We’re excited to announce that we’ve partnered with MongoHQ. Now you can connect directly to any MongoHQ database instance from the DreamFactory Services Platform (DSP). In a nutshell, this new feature makes accessing your MongoHQ data really easy.</p> 
               <ol> 
                <li>Securely store your MongoHQ credentials on a server. You never want to do this on the client for security reasons!</li> 
                <li>Make database calls to your MongoHQ database with a ready-to-go REST API. Now you don’t have to write your own API to access MongoHQ. DreamFactory creates the API for you. Just make an API call and get a JSON document back from the server.</li> 
                <li>Apply CRUD permissions at the collection level based on user role. This is a great feature if you need to apply different data permissions for different users in your application.</li> 
               </ol> 
               <p>In this blog post, we’ll show you how to connect to MongoHQ in 60 seconds, quickly browse the REST API to access your data stored in MongoHQ, and apply CRUD permissions for different user roles.</p> 
               <p>Before getting started, you’ll need to <a href="http://tour.mongohq.com/c/dreamfactory">sign up for a MongoHQ account</a> if you don’t already have one. The link above provides developers a $50 credit for opening a new account with MongoHQ. </p> 
               <p>Once you’ve logged into your DreamFactory Services Platform (DSP), you’ll need to configure your connection to MongoHQ. Make sure to <a href="https://www.dreamfactory.com/user/register">sign up for a DreamFactory account</a> if you don’t already have one. </p> 
               <h2>Set Up a MongoHQ Service</h2> 
               <p>Once you’re logged into your DSP as an administrator, start by clicking on the ‘Services’ tab on the left-hand side of the screen.</p> 
               <p><img id="img-1380909709522" src="//staticassets.dreamfactory.com/images/services_nav.png?t=1527092313664" alt="services nav" border="0"></p> 
               <p>Then click to Create New Service and fill out the required information about your MongoHQ database. See the screenshot below for an example.</p> 
               <p>Make sure to select ‘NoSQL DB’ in the Type list box and ‘MongoHQ’ in the NoSQL Type list box. You’ll then need to enter your MongoHQ connection string, database name, database username, and database password. Don’t forget to click the Save button at the bottom of the screen.</p> 
               <p><img id="img-1380931620416" src="//staticassets.dreamfactory.com/images/mongohq_setup1-resized-600.png?t=1527092313664" alt="describe the image" border="0"></p> 
               <h2>Browse the REST API for MongoHQ</h2> 
               <p>Once you’ve saved your MongoHQ connection settings, DreamFactory automatically creates a REST API for your MongoHQ database. To browse the API, just click on the ‘API Documentation’ tab on the left-hand side of the screen.</p> 
               <p><img id="img-1380931614416" src="//staticassets.dreamfactory.com/images/api_nav.png?t=1527092313664" alt="api nav" border="0"></p> 
               <p>Then find the API name that you used for MongoHQ (in our example we called the API ‘mongohq’ in the setup screen). You’ll see a total of 14 API calls that allow you to manipulate your MongoHQ data with standard GET, POST, PATCH, PUT, and DELETE verbs.</p> 
               <p><img src="//staticassets.dreamfactory.com/images/mongohq_api-resized-600.png?t=1527092313664" alt="mongohq api resized 600" border="0"></p> 
               <p>We use a great tool called Swagger for our API docs, which makes it really easy to interact with the API and inspect your MongoHQ data right from your web browser. We suggest taking a look at the live Swagger API before writing client-side code to access MongoHQ data from your app.</p> 
               <p>For example, we have a collection called 'zips' that contains demographic data by zipcode. Let’s say we want to run a simple filter on this data to look at cities in California with a population greater than 50,000. In this example, we’ll also limit the number of records returned to 5.</p> 
               <p>Doing so is easy. In the API docs, just navigate to the GET request for /mongohq/{table_name}. Then simply enter the name of the ‘zips’ collection, a simple filter string, and set the limit to 5.  </p> 
               <p><img src="//staticassets.dreamfactory.com/images/mongohq_params-resized-600.png?t=1527092313664" alt="mongohq params resized 600" border="0"></p> 
               <p>Now click the ‘Try it out!’ button and you’ll see the API request and response.</p> 
               <p><img src="//staticassets.dreamfactory.com/images/mongohq_json-resized-600.png?t=1527092313664" alt="mongohq json resized 600" border="0"></p> 
               <p>You can also make API calls from the command line. For example, you can use cURL to make a GET request on a particular MongoHQ table and append a BSON filter string in the request. You’ll see the corresponding JSON returned in the response.</p> 
               <p>And you can see the available MongoHQ API operations right in your browser using the DreamFactory Javascript SDK (for example with FireBug). </p> 
               <p><img id="img-1380932434548" src="//staticassets.dreamfactory.com/images/mongohq_firebug-resized-600.png?t=1527092313664" alt="mongohq firebug resized 600" border="0"></p> 
               <h2>Set Up CRUD Permissions to MongoHQ by User Role</h2> 
               <p>Lastly, if your application requires different data permissions for different user roles, you can easily configure CRUD access for your various MongoHQ collections.</p> 
               <p>For example, let’s say we have a ‘sales rep’ role and we only want to grant READ and WRITE access to a collection called ‘opportunities.’ We don’t want to allow a ‘sales rep’ user to be able to access other collections and we don’t want a ‘sales rep’ user to create or delete data in the ‘opportunities’ collection.</p> 
               <p>Setting up data access permissions only takes a few seconds. In this example, you’d simply create a Role called ‘sales rep.’ Then you’d click on the Roles tab on the left-hand side of the screen and assign ‘Read and Write’ service access to opportunities for the MongoHQ service that we just set up. That’s it!</p> 
               <p><img src="//staticassets.dreamfactory.com/images/mongohq_roles.png?t=1527092313664" alt="mongohq roles" border="0"></p> 
               <p><img src="//staticassets.dreamfactory.com/images/mongo_hq_crud1-resized-600.png?t=1527092313664" alt="describe the image" border="0"></p> 
               <h2>Conclusion</h2> 
               <p>We hope this quick tutorial shows how easy it is to set up MongoHQ in your DSP and access your data with REST and highly configurable CRUD permissions.</p> 
               <p>Please let us know what you think in the comments section!</p> 
              </div>