MSPX API DISCOVERY The interface exposes how the data is structured using the following two calls. /schema Return a list of all available tables. /schema/:table Return the description for :table. The list of tables names is a list with strings for each table in the database. (If you add the parameter ?link=true, the server will add links to all returned tables, making it easier to navigate the structure.) The schema for a table is a description for the specified table and it contains an object with the following properties (* indicates optional properties) { name : string, publicFields : [list of fieldDescription], *collections : [list collections], *uniqueFields : [list of unique key lists] } publicFields : object with the following properties (* indicates optional properties) { name : string, type : [text | password | date | enum | int | timestamp | datetime | int unsigned | smallint | float | bit | money | language | currency | year | percentage | area | primaryKey | foreignKey], *enums : [list] *maxLength : int, *mandatory : boolean, *unique : boolean, *limit : int } All datetimes retrieved from API will be sent in UTC timezone. https://www.timeanddate.com/time/aboututc.html Types : text, password, enum String (length may be limited by maxLength) timestamp, datetime ISO 8601 (2017-06-25T11:00:00.000Z) date ISO 8601 (2017-06-25) int Min:-2147483648, Max:2147483647 int unsigned Min:0, Max:4294967295 smallint Min:-32768, Max:32767 (d) float Min:-3.402823466E+38, Max:-1.175494351E-38 float unsigned Min:1.175494351E-38, Max:3.402823466E+38 bit Boolean (true | false). money 19 digits where 2 are after decimal point language ISO 639-2 currency ISO 4217 year 4 digits integer percentage 19 digits where 3 are before decimal point area 8 digits where 2 are before decimal point primaryKey, foreignKey Key string from system (Max length: 80 char) key lists List of fields (d) indicated deprecated (or candidates for deprication). enums : This property contains a list of valid strings. The strings are mandatory for a value of type enum, but they can also be used for a value of type text and are then to be regarded as suggestions. maxLength : max length of strings. mandatory : True if the value must be set, otherwise false or not set. unique : True if value must be unique, otherwise false or not set. limit : int which can be set to limit the number of records getting data from the table will return (if not overridden by a parameter when getting data). EXAMPLES curl -k -u "$UNAME:$PASSWD" https://api.mspecs.se/schema curl -k -u "$UNAME:$PASSWD" https://api.mspecs.se/schema/deals