[starting from version: 2.8]
A request for all fields with their types (i.e., meta-object or schema).
{ "type": string, "index": string }
Parameter/Type | Description |
---|---|
type String |
The type of the request. In this case, it is "fields" . |
index String |
The dataset identifier. |
{ "fields": FieldInfoObject[], "aggregations": string[] | { "any": string[], "date": string[], "number": string[], "string": string[] }, "filters": boolean | { "any": boolean | FilterConfigObject, "date": boolean | FilterConfigObject, "number": boolean | FilterConfigObject, "string": boolean | FilterConfigObject, "advanced": boolean }, "sorted": boolean }
Parameter/Type | Description |
---|---|
fields FieldInfoObject[] |
Contains information about fields. |
aggregations String[] | Object |
optional Supported aggregation functions for all fields or fields of a certain type. Supported aggregations for a certain field can be defined in the field's aggregations property. To define supported aggregations for all fields, specify aggregations as an array of strings. Supported values include: "sum" , "count" , "distinctcount" , "average" , "median" , "product" , "min" , "max" ,"stdevp" , "stdevs" , "none" , or a custom aggregation. Note: for fields of the "number" type, Flexmonster Pivot supports built-in front-end aggregations.To define supported aggregations for certain field types, specify the aggregations property as an object. |
aggregations.any String[] |
optional Supported aggregation functions for any field type. |
aggregations.date String[] |
optional Supported aggregation functions for the "date" field type. |
aggregations.number String[] |
optional Supported aggregation functions for the "number" field type. Note: for fields of this type, Flexmonster Pivot supports built-in front-end aggregations. |
aggregations.string String[] |
optional Supported aggregation functions for the "string" field type. |
filters Boolean | Object |
optional Supported filters for all fields or for fields of a certain type. To define filters for a specific field, use the field's filters property. The filters for all fields are turned off by default. They can be turned on all at once by setting this property to true , or each filter type can be configured separately for fields of a certain type. In this case, the filters property should be an object. |
filters.any Boolean | FilterConfigObject |
optional Supported filters for any field type. |
filters.date Boolean | FilterConfigObject |
optional Supported filters for the "date" field type. |
filters.number Boolean | FilterConfigObject |
optional Supported filters for the "number" field type. |
filters.string Boolean | FilterConfigObject |
optional Supported filters for the "string" field type. |
filters.advanced Boolean |
optional Indicates whether the server has advanced hierarchical filters implemented. When the advanced parameter is set to true , it means that the server supports hierarchies and can filter them, so multilevel hierarchies can be configured in the component.When advanced is false , the server cannot filter the hierarchical data. In this case, if multilevel hierarchies are configured in the MappingObject, these configurations will be ignored.Default value: false .
|
sorted Boolean |
optional If true , the fields’ order from the response will be used to display fields in the Field List. |
Request:
{ "type": "fields", "index": "fm-product-sales" }
Response:
{ "fields": [ { "uniqueName": "Category", "type": "string" }, { "uniqueName": "Country", "type": "string" }, { "uniqueName": "Price", "type": "number" }, { "uniqueName": "Quantity", "type": "number" }, ], "aggregations": { "any": ["count", "distinctcount"], "date": ["count", "distinctcount", "min", "max"], "number": ["sum", "average", "count", "distinctcount", "min", "max"] }, "filters": { "date": { "members": true, "query": ["equal", "not_equal", "between", "not_between"], "valueQuery": ["greater", "greater_equal", "less", "less_equal"] }, "number": { "members": true, "query": ["equal", "not_equal", "between", "not_between"], "valueQuery": ["top", "bottom"] }, "string": { "members": true, "query": ["contain", "not_contain"], "valueQuery": ["top", "bottom"] }, "advanced": true }, "sorted": false }
/handshake request
/members request
/select request for pivot table
/select request for flat table
/select request for drill-through view