/api/schema/<user-path>/<instance>/<database>/<table>[/operation] schema APIs (apply the schema)
/api/gen/<user-path>/<instance>/<database>/<table>[/operation] generated APIs (schemaless)
/api/custom-api/<user-path>/<path of the custom API> custom APIs
/api/system-api/<user-path>/<name> system APIs (always POST)
/api/third-party/<user-path>/<bundle>/<version>/<path> third party APIs (deprecated)
<instance>::<tenant> a tenant of a multi-tenant instance
Operation
Method and path suffix
Get all · get all by stream
GET / · GET /stream
Get by id
GET /get-by-id/:id[/:primaryKey]
Save · master save
POST /save-single-or-multiple · POST /master-save
Update by id · update many · replace by id (MongoDB)
PUT /update-by-id/:id[/:primaryKey] · PUT /update-many · PUT /replace-by-id/:id[/:primaryKey]
Array operations (MongoDB)
PUT /array-operations
Remove by id · remove by query
DELETE /:id[/:primaryKey] · POST /query/delete
Query · query by stream
POST /query · POST /query-stream
Count · aggregate (MongoDB)
POST /count · POST /aggregate
Distinct · distinct with query
GET /distinct/:field[/:order] · POST /distinct/:field[/:order]
Query params (get all, get by id, streams ; in the body for the query APIs)¶
?find={status:'ACTIVE',price:{$gte:100}} JSON5 : $eq $ne $gt $gte $lt $lte $in $nin $and $or $not $like $regex $isNull
?select=name,price ?select=-password include, or exclude with -
?sort=-created_at,name - for descending
?skip=20&limit=10 paging
?getTotalCount=true totalCount in the reply
?deep=[{s_key:'category'}] related rows, from the schema relation or with t_instance t_db t_col t_key find select isMultiple limit skip sort deep
?customer_id=42 ?price>=100 ?name=Bob,Alice any column as a filter
?find={'owner.customer_id':42} find and join : a field of a related table
?upsert=true ?returnDocument=before update by id
?throwErrorIfRecordNotFound=true update by id, replace by id, remove by id : 400 instead of null when the id is unknown
name:<ISchemaProperty>{__type:EType.string,// string number boolean date objectId file files, [EType.string] for arrays, a nested object for objectsisPrimaryKey:true,isAutoGenerateByAM:{valueGeneratorType:'ObjectID'|'GUID_UUID'|'ULID'|'ShortUUID'},isAutoIncrementByAM:{start:1000,step:1},// or trueisAutoIncrementByDB:true,isConcurrencyControlField:true,// version field of optimistic concurrency controlvalidations:{required,min,max,minLength,maxLength,email,enum:[],validatorFun:(value,all)=>true},conversions:{trim,trimStart,trimEnd,toLowerCase,toUpperCase,conversionFun:(value,all)=>value,encryption,hashing,defaults:{defaultValue,defaultFun,shouldReplaceNullWithDefault,shouldReplaceEmptyStringWithDefault}},instance:'x',database:'y',collection:'z',column:'_id',// relation for deep, find and join, master saveisVirtualField:true,s_columnVirtualLinker:'_id',t_columnVirtualLinker:'product_id',// one to many}