Online Database

Learn how to create an online database with Simbla

cover pic.png

Rest API

The Rest API allows you to perform actions such as queries and data update.
In order to connect via API you must receive the following parameters:
1. X-Parse-Application-Id – the database’s identifier. This parameter isn’t confidential.
2. X-Parse-Master-Key – the master password for your database. With its help, you have the highest permissions to the database. You must keep it unexposed to the users.
For the purpose of the exercise, we’ll create within the database a table named Accounts (in the case it doesn’t exist). In the table we will launch three fields –
1. Name – string
2. PhoneNumber – string
3. Score – Number
We will use an API simulator - https://apitester.com/

First example, Querying  the Accounts table: 
Test1.png


- In the field ‘Request’ we’ll enter a general name for the example.

- We’ll choose ‘Post’ and enter the service address for Accounts - https://apps.simbla.com/parse/classes/Accounts

- In the field ‘Post Data’ we’ll enter the following value:

{

"_method":"get"

{

- In the Header we’ll add three values:

1. Content-Type: application/json

2. X-Parse-Application-Id: Your application ID

3. X-Parse-Master-Key: Your Master Key

Now, once we examine the service (clicking Test), we’ll receive a list of clients’ objects existing within the database.

At this point, we’ll change the content of ‘Post’ and add a condition/filter Accounts by the name equals to John:

{

“_method”:”get”,

“where”:{“Name”:”John”}

}

Let test it again.

The following is a list of usable operations:

 Key       Operation

$lt           Less Than

$lte         Less Than Or Equal To

$gt         Greater Than

$gte       Greater Than Or Equal To

$ne        Not Equal To

$in         Contained In

$nin       Not Contained in

$exists  A value is set for the key

$select This matches a value for a key in the result of a different query

$dontSelect Requires that a key’s value not match a value for a key in the result of a different query

$all       Contains all of the given values

$regex  Requires that a key’s value match a regular expression

$text      Performs a full text search on indexed fields

Additional examples:

Retrieve accounts where name like Jo.

{

"_method":"get",

"where":{"Name":{"$regex":"^Jo"}}

}

Retrieve accounts where name is John and Phone Number is like 054.

{

"_method":"get",

"where":{"PhoneNumber":{"$regex":"^054"}, "Name":"John"}

}

retrieve scores between 1000 and 3000, including the endpoints, we could issue:

{"score":{"$gte":1000,"$lte":3000}}'

 retrieve scores equal to an odd number below 10, we could issue:

{"score":{"$in":[1,3,5,7,9]}}

Read here the complete manual of the Rest API:

https://docs.parseplatform.org/rest/guide/


About Simbla

We believe end users know exactly what they need to perform more efficiently and effectively. Simbla allows them to produce game-changing cloud CRM without writing a single line of code.

Simbla is an AI-generated cloud CRM and a no-code development platform that helps non-coders build quick, flexible, efficient solutions quickly and easily.

Our team has years of experience developing sophisticated cloud-based systems. Drawing on that experience, we built a platform that allowed non-coders to create a tailored CRM that exactly fits the business needs without long deployment and without the help of professionals.

It is a no-code platform with an AI layer, capable of reducing the cost of deploying and maintaining a tailored cloud CRM by as much as 90%.