searchPivot
POST
/{modelName}/searchPivotGet the pivot table data based on the specified fields, filters, orders, groupBy, splitBy.
Request
Path Params
modelName
string
required
Body Params application/json
aggFunctions
object (AggFunctions)
optional
Support multiple aggregation queries:
- []
- ["SUM", "amount"]
- [["SUM", "amount"], ["COUNT", "id"]]
Example:
["SUM","amount"]
effectiveDate
string <date>
optional
Effective date, default is Today
.
fields
array[string]
optional
Fields list to get, empty means all fields of the model.
Example:
["id","name"]
filters
object (Filters)
optional
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"]]
Example:
["name","=","PM"]
groupBy
array[string]
optional
Fields to group by, empty means no grouping.
Example:
[]
orders
object (Orders)
optional
Support multiple order conditions:
- []
- ["name", "ASC"]
- [["name", "ASC"], ["sequence", "DESC"]]
- or string format: "name ASC, sequence DESC"
Example:
["name","ASC"]
pageNumber
integer <int32>
optional
Page number, start from 1, default 1.
Example:
1
pageSize
integer <int32>
optional
Page size, or limit size for searchList, default 50.
Example:
50
splitBy
array[string]
optional
Pivot split field list.
Example:
[]
subQueries
object
optional
Sub queries for relational fields: {fieldName: SubQuery}
Example:
{}
Additional properties
object (SubQuery)
optional
Sub queries for relational fields: {fieldName: SubQuery}
Example:
{}
summary
boolean
optional
Whether to return the summary result of numeric fields, default no summary.
Example
{
"aggFunctions": [
"SUM",
"amount"
],
"effectiveDate": "2019-08-24",
"fields": [
"id",
"name"
],
"filters": [
"name",
"=",
"PM"
],
"groupBy": [],
"orders": [
"name",
"ASC"
],
"pageNumber": 1,
"pageSize": 50,
"splitBy": [],
"subQueries": {},
"summary": true
}
Request samples
Responses
OK(200)
HTTP Code: 200
Content Type : JSONapplication/json
Data Schema
code
integer <int32>
optional
Status Code
data
boolean
optional
Result Data
error
string
optional
Error Message
message
string
optional
Common Message
Example
Not configured
Last modified: 8 days ago