Documentation

Get started with your own restdb.io database.


Data Fields

A Collection is defined by its Data fields and their corresponding Data type.

For example, in our test database (simpledb-abee.restdb.io) we created a Contact Collection with the following Data fields:

fields

Text, email and image are just some of the basic data types supported in restdb.io.

A complete table of the avaliable data types is shown below.

Data types

Data typeDescriptionPropertiesValidationExample
Primary types
textAny charactersingleline, multiline, Markdowninput mask or regular expressionThe quick brown fox
numberIntegersauto incrementinteger123
float_numberFloating pointformula:
{{temp}}/3.14
double3.1456789
moneyFloating pointformula:
{{salary}}*1.25
double 2 decimals1200.00
emailemail addressvalid emailjones@restdb.io
rich textHTML textHTMLBold is the new italic
Date types
dateDateformat:
DD MM YYYY
default: ISO date string
valid date09 22 2015
datetimeDate with timeformat:
DD-MM-YYYY hh:ss
valid date + time09-22-2015 20:36
timeTimeformat: hh:ss01.01.1970 + time20:36
Media types
image(s)Imagejpg, png, gifA random image: avatar
file(s)Any filepdficon
Status types
boolBooleantrue or falsefalse
optionPredefined choicesOne or manyOne of the predefined options["ABBA", "Rolling Stones"]
Custom types
JSONA JSON objectValid JSON string / object{"state": "on", "readings": [23.4, 34.2, 900.0]}
Relations to Collections
collectionAn existing Collection in your databaseone item, many items, sub listValid ObjectID["56011d51e1321c7300000010", "55bb3bf70b37951e000001dd"]

Required / Unique fields

All primary Data fields can have a property to define if a Field is required and/or unique. Activating the Field dialog shows the settings for Required and/or Unique.

uniq