Skip to content
Documentation
Getting Started
OpenAPI Overview

Common Model APIs

The latest online API documentation is available at https://api.openmeta.info

The following are common model-level API.

POST copyList

POST /{modelName}/copyList

Copy multiple rows based on ids, and return the new data ids.

Params

NameLocationTypeRequiredDescription
modelNamepathstringyesnone
idsqueryarray[object]yesData source IDs to be copied.

Response Examples

200 Response

{
  "code": 0,
  "data": true,
  "error": "string",
  "message": "string"
}

Responses

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema

POST copyListAndReturn

POST /{modelName}/copyListAndReturn

Copy multiple rows based on ids, and return the new rows.

Params

NameLocationTypeRequiredDescription
modelNamepathstringyesnone
idsqueryarray[object]yesData source IDs to be copied.

Response Examples

200 Response

{
  "code": 0,
  "data": true,
  "error": "string",
  "message": "string"
}

Responses

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema

POST copyOne

POST /{modelName}/copyOne

Copy a single row based on id, and return the id of the new row.

Params

NameLocationTypeRequiredDescription
modelNamepathstringyesnone
idquerynumberyesData source ID to be copied.

Response Examples

200 Response

{
  "code": 0,
  "data": true,
  "error": "string",
  "message": "string"
}

Responses

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema

POST copyOneAndReturn

POST /{modelName}/copyOneAndReturn

Copy a single row based on id, and return the new row.

Params

NameLocationTypeRequiredDescription
modelNamepathstringyesnone
idquerynumberyesData source ID to be copied.

Response Examples

200 Response

{
  "code": 0,
  "data": true,
  "error": "string",
  "message": "string"
}

Responses

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema

GET copyWithoutCreate

GET /{modelName}/copyWithoutCreate

Copy one row by id, only return the copyable field values, without inserting into database.

Params

NameLocationTypeRequiredDescription
modelNamepathstringyesnone
idquerynumberyesData source ID to be copied.

Response Examples

200 Response

{
  "code": 0,
  "data": true,
  "error": "string",
  "message": "string"
}

Responses

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema

GET count

GET /{modelName}/count

Returns a count or group counting based on the specified filter, groupBy, and orders.

Params

NameLocationTypeRequiredDescription
modelNamepathstringyesnone
filtersqueryarraynoFilters for data to be counted.
groupByqueryarray[string]noFields for group counts, Return the total count if not specified.
ordersqueryarraynoThe field order of the grouped results
effectiveDatequerystring(date)noEffective date for timeline model.

Response Examples

200 Response

{
  "code": 0,
  "data": true,
  "error": "string",
  "message": "string"
}

Responses

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema

POST createList

POST /{modelName}/createList

Create multiple rows and return the id list.

Body Parameters

[
  {
    "property1": {},
    "property2": {}
  }
]

Params

NameLocationTypeRequiredDescription
modelNamepathstringyesnone
bodybodyarray[object]nonone

Response Examples

200 Response

{
  "code": 0,
  "data": true,
  "error": "string",
  "message": "string"
}

Responses

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema

POST createListAndReturn

POST /{modelName}/createListAndReturn

Create multiple rows and return the latest values from database.

Body Parameters

[
  {
    "property1": {},
    "property2": {}
  }
]

Params

NameLocationTypeRequiredDescription
modelNamepathstringyesnone
bodybodyarray[object]nonone

Response Examples

200 Response

{
  "code": 0,
  "data": true,
  "error": "string",
  "message": "string"
}

Responses

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema

POST createOne

POST /{modelName}/createOne

Create a single row and return the id.

Body Parameters

{
  "property1": {},
  "property2": {}
}

Params

NameLocationTypeRequiredDescription
modelNamepathstringyesnone
bodybodyobjectnonone
» additionalPropertiesbodyobjectnonone

Response Examples

200 Response

{
  "code": 0,
  "data": true,
  "error": "string",
  "message": "string"
}

Responses

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema

POST createOneAndReturn

POST /{modelName}/createOneAndReturn

Create one row return the latest values from database.

Body Parameters

{
  "property1": {},
  "property2": {}
}

Params

NameLocationTypeRequiredDescription
modelNamepathstringyesnone
bodybodyobjectnonone
» additionalPropertiesbodyobjectnonone

Response Examples

200 Response

{
  "code": 0,
  "data": true,
  "error": "string",
  "message": "string"
}

Responses

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema

POST deleteList

POST /{modelName}/deleteList

Delete multiple rows by ids.

Params

NameLocationTypeRequiredDescription
modelNamepathstringyesnone
idsqueryarray[object]yesData IDs to be deleted.

Response Examples

200 Response

{
  "code": 0,
  "data": true,
  "error": "string",
  "message": "string"
}

Responses

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema

POST deleteOne

POST /{modelName}/deleteOne

Delete one row by id. All slices related to this id will be deleted for timeline model.

Params

NameLocationTypeRequiredDescription
modelNamepathstringyesnone
idquerynumberyesData ID to be deleted

Response Examples

200 Response

{
  "code": 0,
  "data": true,
  "error": "string",
  "message": "string"
}

Responses

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema

POST deleteSlice

POST /{modelName}/deleteSlice

Delete a slice of the timeline model by sliceId.

Params

NameLocationTypeRequiredDescription
modelNamepathstringyesnone
sliceIdquerynumberyessliceId of the timeline slice data to delete.

Response Examples

200 Response

{
  "code": 0,
  "data": true,
  "error": "string",
  "message": "string"
}

Responses

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema

GET getUnmaskedField

GET /{modelName}/getUnmaskedField

Get the original value for masking field.

Params

NameLocationTypeRequiredDescription
modelNamepathstringyesnone
idquerynumberyesData ID to be read
fieldquerystringyesThe masking field name to get the original value
effectiveDatequerystring(date)noEffective date for timeline model.

Response Examples

200 Response

{
  "code": 0,
  "data": true,
  "error": "string",
  "message": "string"
}

Responses

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema

GET getUnmaskedFields

GET /{modelName}/getUnmaskedFields

Get the original values for multiple masking fields.

Params

NameLocationTypeRequiredDescription
modelNamepathstringyesnone
idquerynumberyesData ID to be read
fieldsqueryarray[string]yesThe masking field list to get the original values
effectiveDatequerystring(date)noEffective date for timeline model.

Response Examples

200 Response

{
  "code": 0,
  "data": true,
  "error": "string",
  "message": "string"
}

Responses

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema

GET readList

GET /{modelName}/readList

Read multiple rows by ids.

Params

NameLocationTypeRequiredDescription
modelNamepathstringyesnone
idsqueryarray[object]yesData IDs to be read.
fieldsqueryarray[string]noA list of field names to be read. If not specified, it defaults to all visible fields.
effectiveDatequerystring(date)noEffective date for timeline model.

Response Examples

200 Response

{
  "code": 0,
  "data": true,
  "error": "string",
  "message": "string"
}

Responses

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema

GET readOne

GET /{modelName}/readOne

Read one row by id.

Params

NameLocationTypeRequiredDescription
modelNamepathstringyesnone
idquerynumberyesData ID, number or string type.
fieldsqueryarray[string]noA list of field names to be read. If not specified, it defaults to all visible fields.
effectiveDatequerystring(date)noEffective date for timeline model.

Response Examples

200 Response

{
  "code": 0,
  "data": true,
  "error": "string",
  "message": "string"
}

Responses

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema

POST searchList

POST /{modelName}/searchList

Get the data list based on the specifiedfields, filters, orders, limitSize, aggFunctions, and subQueries. Default limit to 50.

Body Parameters

{
  "aggFunctions": [
    "SUM",
    "amount"
  ],
  "effectiveDate": "2019-08-24",
  "fields": [
    "id",
    "name"
  ],
  "filters": {},
  "groupBy": [],
  "orders": [
    "name",
    "ASC"
  ],
  "pageNumber": 1,
  "pageSize": 50,
  "splitBy": [],
  "subQueries": {},
  "summary": true
}

Params

NameLocationTypeRequiredDescription
modelNamepathstringyesnone
bodybodyQueryParamsnonone

Response Examples

200 Response

{
  "code": 0,
  "data": true,
  "error": "string",
  "message": "string"
}

Responses

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema

POST searchPage

POST /{modelName}/searchPage

Paging aggregation query parameters, including fields, filters, orders, pageNumber, pageSizegroupBy, aggFunctions, subQueries, etc. Use the backend default value when not specified.

Body Parameters

{
  "aggFunctions": [
    "SUM",
    "amount"
  ],
  "effectiveDate": "2019-08-24",
  "fields": [
    "id",
    "name"
  ],
  "filters": {},
  "groupBy": [],
  "orders": [
    "name",
    "ASC"
  ],
  "pageNumber": 1,
  "pageSize": 50,
  "splitBy": [],
  "subQueries": {},
  "summary": true
}

Params

NameLocationTypeRequiredDescription
modelNamepathstringyesnone
bodybodyQueryParamsnonone

Response Examples

200 Response

{
  "code": 0,
  "data": true,
  "error": "string",
  "message": "string"
}

Responses

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema

POST searchPivot

POST /{modelName}/searchPivot

Get the pivot table data based on the specified fields, filters, orders, groupBy, splitBy.

Body Parameters

{
  "aggFunctions": [
    "SUM",
    "amount"
  ],
  "effectiveDate": "2019-08-24",
  "fields": [
    "id",
    "name"
  ],
  "filters": {},
  "groupBy": [],
  "orders": [
    "name",
    "ASC"
  ],
  "pageNumber": 1,
  "pageSize": 50,
  "splitBy": [],
  "subQueries": {},
  "summary": true
}

Params

NameLocationTypeRequiredDescription
modelNamepathstringyesnone
bodybodyQueryParamsnonone

Response Examples

200 Response

{
  "code": 0,
  "data": true,
  "error": "string",
  "message": "string"
}

Responses

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema

POST searchSimpleAgg

POST /{modelName}/searchSimpleAgg

Pure SUM, AVG, MIN, MAX, COUNT aggregate query, like ["SUM", "amount"] or [["SUM", "amount"], [], ...], the return key is sumAmount.

Body Parameters

{
  "aggFunctions": [
    "SUM",
    "amount"
  ],
  "effectiveDate": "2019-08-24",
  "filters": {}
}

Params

NameLocationTypeRequiredDescription
modelNamepathstringyesnone
bodybodySimpleQueryParamsnonone

Response Examples

200 Response

{
  "code": 0,
  "data": true,
  "error": "string",
  "message": "string"
}

Responses

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema

POST updateByFilter

POST /{modelName}/updateByFilter

Update data according to the filters, within the current user’s permission scope.

Body Parameters

{
  "property1": {},
  "property2": {}
}

Params

NameLocationTypeRequiredDescription
modelNamepathstringyesnone
filtersqueryarraynoData filter to update.
bodybodyobjectnonone
» additionalPropertiesbodyobjectnonone

Response Examples

200 Response

{
  "code": 0,
  "data": true,
  "error": "string",
  "message": "string"
}

Responses

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema

POST updateList

POST /{modelName}/updateList

Update multiple rows by id. Return true on success.

Body Parameters

[
  {
    "property1": {},
    "property2": {}
  }
]

Params

NameLocationTypeRequiredDescription
modelNamepathstringyesnone
bodybodyarray[object]nonone

Response Examples

200 Response

{
  "code": 0,
  "data": true,
  "error": "string",
  "message": "string"
}

Responses

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema

POST updateListAndReturn

POST /{modelName}/updateListAndReturn

Update multiple rows by id, and return the latest values from database.

Body Parameters

[
  {
    "property1": {},
    "property2": {}
  }
]

Params

NameLocationTypeRequiredDescription
modelNamepathstringyesnone
bodybodyarray[object]nonone

Response Examples

200 Response

{
  "code": 0,
  "data": true,
  "error": "string",
  "message": "string"
}

Responses

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema

POST updateOne

POST /{modelName}/updateOne

Update one row by id. Return true on success.

Body Parameters

{
  "property1": {},
  "property2": {}
}

Params

NameLocationTypeRequiredDescription
modelNamepathstringyesnone
bodybodyobjectnonone
» additionalPropertiesbodyobjectnonone

Response Examples

200 Response

{
  "code": 0,
  "data": true,
  "error": "string",
  "message": "string"
}

Responses

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema

POST updateOneAndReturn

POST /{modelName}/updateOneAndReturn

Update one row by id, and return the latest values from database.

Body Parameters

{
  "property1": {},
  "property2": {}
}

Params

NameLocationTypeRequiredDescription
modelNamepathstringyesnone
bodybodyobjectnonone
» additionalPropertiesbodyobjectnonone

Response Examples

200 Response

{
  "code": 0,
  "data": true,
  "error": "string",
  "message": "string"
}

Responses

HTTP Status CodeMeaningDescriptionData schema
200OKnoneInline

Responses Data Schema

Data Schema

API Response Body

{
  "code": 0,
  "data": true,
  "error": "string",
  "message": "string"
}
 

Attribute

NameTypeRequiredRestrictionsTitleDescription
codeinteger(int32)falsenoneStatus Code
databooleanfalsenoneResult Data
errorstringfalsenoneError Message
messagestringfalsenoneCommon Message

AggFunctions

[
  "SUM",
  "amount"
]
 

Support multiple aggregation queries:

  • []
  • [“SUM”, “amount”]
  • [[“SUM”, “amount”], [“COUNT”, “id”]]

Attribute

None

Orders

[
  "name",
  "ASC"
]
 

Support multiple order conditions:

  • []
  • [“name”, “ASC”]
  • [[“name”, “ASC”], [“sequence”, “DESC”]]
  • or string format: “name ASC, sequence DESC”

Attribute

None

SubQuery

{}
 

Sub queries for relational fields: {fieldName: SubQuery}

Attribute

NameTypeRequiredRestrictionsTitleDescription
countbooleanfalsenoneOnly count the sub records, true/false
fields[string]falsenoneSub query fields.
filtersobjectfalsenonenone
ordersOrdersfalsenoneSupport multiple order conditions:
* []
* [“name”, “ASC”]
* [[“name”, “ASC”], [“sequence”, “DESC”]]
* or string format: “name ASC, sequence DESC”
topNinteger(int32)falsenoneTopN query on OneToMany field, using with orders.

Filters

[
  "name",
  "=",
  "Tom"
]
 

Support nested filters, such as [a OR b] AND [c OR d OR [e AND f] OR g]

  • []
  • [“name”, ”=”, “Tom”]
  • [[“name”, ”=”, “Tom”], [“version”, ”=”, “6”]]
  • [[“name”, ”=”, “Tom”], “OR”, [“code”, ”=”, “A010”], “OR”, [“version”, ”=”, “2”]]
  • [[“name”, ”=”, “Tom”], “OR”, [“code”, ”=”, “A010”]], “AND”, [“version”, ”=”, “2”]]

Attribute

None

QueryParams

{
  "aggFunctions": [
    "SUM",
    "amount"
  ],
  "effectiveDate": "2019-08-24",
  "fields": [
    "id",
    "name"
  ],
  "filters": {},
  "groupBy": [],
  "orders": [
    "name",
    "ASC"
  ],
  "pageNumber": 1,
  "pageSize": 50,
  "splitBy": [],
  "subQueries": {},
  "summary": true
}
 

Attribute

NameTypeRequiredRestrictionsTitleDescription
aggFunctionsAggFunctionsfalsenoneSupport multiple aggregation queries:
* []
* [“SUM”, “amount”]
* [[“SUM”, “amount”], [“COUNT”, “id”]]
effectiveDatestring(date)falsenoneEffective date, default is Today.
fields[string]falsenoneFields list to get, empty means all fields of the model.
filtersobjectfalsenonenone
groupBy[string]falsenoneFields to group by, empty means no grouping.
ordersOrdersfalsenoneSupport multiple order conditions:
* []
* [“name”, “ASC”]
* [[“name”, “ASC”], [“sequence”, “DESC”]]
* or string format: “name ASC, sequence DESC”
pageNumberinteger(int32)falsenonePage number, start from 1, default 1.
pageSizeinteger(int32)falsenonePage size, or limit size for searchList, default 50.
splitBy[string]falsenonePivot split field list.
subQueriesobjectfalsenoneSub queries for relational fields: {fieldName: SubQuery}
» additionalPropertiesSubQueryfalsenoneSub queries for relational fields: {fieldName: SubQuery}
summarybooleanfalsenoneWhether to return the summary result of numeric fields, default no summary.

SimpleQueryParams

{
  "aggFunctions": [
    "SUM",
    "amount"
  ],
  "effectiveDate": "2019-08-24",
  "filters": {}
}
 

Attribute

NameTypeRequiredRestrictionsTitleDescription
aggFunctionsAggFunctionsfalsenoneSupport multiple aggregation queries:
* []
* [“SUM”, “amount”]
* [[“SUM”, “amount”], [“COUNT”, “id”]]
effectiveDatestring(date)falsenoneEffective date, default is Today.
filtersobjectfalsenonenone

Copyright ©2025 OpenMeta