Get Free Trial
  1. API reference
    1. Introduction
    2. Flexmonster()
  2. Objects
    1. All objects
    2. Report Object
    3. Data Source Object
    4. Mapping Object
    5. Slice Object
    6. Options Object
    7. Filtering
      1. Filter Object
      2. Number Query Object
      3. String Query Object
      4. Date Query Object
      5. Time Query Object
      6. Value Query Object
    8. Format Object
    9. Conditional Format Object
    10. Table Sizes Object
    11. Cell Data Object
    12. Chart Data Object
    13. Toolbar Object
    14. Chart Legend Data Object
    15. Share Report Connection Object
  3. Methods
    1. All methods
    2. addCalculatedMeasure
    3. addCondition
    4. alert
    5. clear
    6. clearFilter
    7. clearXMLACache
    8. closeFieldsList
    9. collapseAllData
    10. collapseCell
    11. collapseData
    12. connectTo
    13. customizeAPIRequest
    14. customizeCell
    15. customizeChartElement
    16. customizeContextMenu
    17. dispose
    18. drillDownCell
    19. drillUpCell
    20. expandAllData
    21. expandCell
    22. expandData
    23. exportTo
    24. getAllConditions
    25. getAllHierarchies
    26. getAllHierarchiesAsync
    27. getAllMeasures
    28. getAllMeasuresAsync
    29. getCell
    30. getColumns
    31. getColumnsAsync
    32. getCondition
    33. getFilter
    34. getFlatSort
    35. getFormat
    36. getMeasures
    37. getMeasuresAsync
    38. getMembers
    39. getMembersAsync
    40. getOptions
    41. getReport
    42. getReportFilters
    43. getReportFiltersAsync
    44. getRows
    45. getRowsAsync
    46. getSelectedCell
    47. getSort
    48. getTableSizes
    49. getXMLACatalogs
    50. getXMLACatalogsAsync
    51. getXMLACubes
    52. getXMLACubesAsync
    53. getXMLADataSources
    54. getXMLADataSourcesAsync
    55. getXMLAProviderName
    56. getXMLAProviderNameAsync
    57. load
    58. off
    59. on
    60. open
    61. openCalculatedValueEditor
    62. openFieldsList
    63. openFilter
    64. print
    65. refresh
    66. removeAllCalculatedMeasures
    67. removeAllConditions
    68. removeCalculatedMeasure
    69. removeCondition
    70. removeSelection
    71. runQuery
    72. save
    73. scrollToColumn
    74. scrollToRow
    75. setFilter
    76. setFlatSort
    77. setFormat
    78. setOptions
    79. setReport
    80. setSort
    81. setTableSizes
    82. shareReport
    83. showCharts
    84. showGrid
    85. showGridAndCharts
    86. sortingMethod
    87. sortValues
    88. updateData
  4. Events
    1. All events
    2. afterchartdraw
    3. aftergriddraw
    4. beforegriddraw
    5. beforetoolbarcreated
    6. cellclick
    7. celldoubleclick
    8. chartclick
    9. datachanged
    10. dataerror
    11. datafilecancelled
    12. dataloaded
    13. drillthroughclose
    14. drillthroughopen
    15. exportcomplete
    16. exportstart
    17. fieldslistclose
    18. fieldslistopen
    19. filterclose
    20. filteropen
    21. loadingdata
    22. loadinglocalization
    23. loadingolapstructure
    24. loadingreportfile
    25. localizationerror
    26. localizationloaded
    27. olapstructureerror
    28. olapstructureloaded
    29. openingreportfile
    30. printcomplete
    31. printstart
    32. querycomplete
    33. queryerror
    34. ready
    35. reportchange
    36. reportcomplete
    37. reportfilecancelled
    38. reportfileerror
    39. runningquery
    40. unauthorizederror
    41. update
  5. Custom data source API
    1. All requests
    2. /handshake request
    3. /fields request
    4. /members request
    5. /select request for the pivot table
    6. /select request for the flat table
    7. /select request for the drill-through view
    8. Field Object
    9. Filter Object
    10. Filter Group Object
  6. MongoDB Connector API
    1. All methods
    2. getSchema
    3. getMembers
    4. getSelectResult
  7. Flexmonster Connector for amCharts
    1. All methods
    2. amcharts.getData
    3. amcharts.getCategoryName
    4. amcharts.getMeasureNameByIndex
    5. amcharts.getNumberOfMeasures
    6. amcharts.getNumberFormatPattern
Table of contents

/fields request

[starting from version: 2.8]

A request for all fields with their types (i.e., meta-object or schema).

Request

{
"type": "fields"
"index": string
}

The request has the following parameters:

  • type — String. The type of the request. In this case, it is "fields".
  • index – String. The dataset identifier.

Response

{
    "fields"[]: {
        "uniqueName": string,
        "type": "string" | "number" | "date",
        "caption": string,
"hierarchy": string,
"parent": string,
        "folder": string,
        "interval": string,
       "aggregations"[]: string,
        "filters": boolean | {
            "members": boolean,
            "query": boolean | string[],
            "valueQuery": boolean | string[]
        }
    },
    "aggregations": string[] | {
       "any"[]: string,
       "date"[]: string,
       "number"[]: string,
       "string"[]: string
    },
    "filters": boolean | {
        "any": boolean | {
            "members": boolean,
            "query": boolean | string[],
            "valueQuery": boolean | string[]
        },
        "date": boolean | {
            "members": boolean,
            "query": boolean | string[],
            "valueQuery": boolean | string[]
        },
        "number": boolean | {
            "members": boolean,
            "query": boolean | string[],
            "valueQuery": boolean | string[]
        },
        "string": boolean | {
            "members": boolean,
            "query": boolean | string[],
            "valueQuery": boolean | string[]
       },
"advanced": boolean
    },
    "sorted": boolean
}

The response has the following parameters:

  • fields – Array of objects. Contains the following information about fields:
    • uniqueName – String. The field’s unique name. Will later be used in /members and /select requests.
    • type – String. The field’s type. Supported values are: "string", "number", "date".
    • caption (optional) – String. The field’s caption to appear on the UI.
    • hierarchy (optional) – String. The hierarchy’s name. Used to configure multilevel hierarchies. Specify this property to set the field as a level of a hierarchy.
      See how to configure multilevel hierarchies.
    • parent (optional) – String. The parent level’s unique name. This property is necessary to specify if the field is a level of a hierarchy and has a parent level.
      See how to configure multilevel hierarchies.
    • folder (optional) – String. The field’s folder. Folders are used to organize groups of fields in the Field List. folder supports nesting via / (e.g., "Folder/Subfolder").
    • interval (optional) – String. A date’s aggregation interval to group dates on the server. The component will automatically send it in /members and /select requests. Possible values depend on how the server handles date intervals. Only for fields of the "date" type.
    • aggregations (optional) – Array of strings. A list of supported aggregation functions for the field. To define supported aggregations for all fields, use the root aggregations property.
      Supported values include: "sum", "count", "distinctcount", "average", "median", "product", "min", "max", "stdevp", "stdevs", "none", or a custom aggregation. Note: for the fields of the "number" type, Flexmonster Pivot supports built-in front-end aggregations.
    • filters (optional) – Boolean|Object. Supported filters for the field. To define supported filters for all fields, specify the root filters property.
      Filters for the field can be enabled all at once by setting this property to true, or each filter type can be turned on separately:
      • members (optional) – Boolean. A configuration of an include/exclude members filter. If true, the members filter is enabled for the field in Flexmonster.
      • query (optional) – Boolean|Array of strings. A configuration of a conditional filter on members. To turn on this filter, either set query to true or specify an array of supported conditions.
        If the property is set to true, this enables all the conditions that exist in Flexmonster for the members filter. See the list of supported conditions for “string”, “number”, and “date” field types.
      • valueQuery (optional) – Boolean|Array of strings. A configuration of a conditional filter on values. To turn on this filter, either set valueQuery to true or specify an array of supported conditions.
        If the property is set to true, this enables all the conditions that exist in Flexmonster for the values filter. See the list of supported conditions.
  • aggregations (optional) – Array of strings|Object. Supported aggregation functions for all fields or fields of a certain type. Supported aggregations for a certain field can be defined in the fields.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 the 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 with the following properties:
    • any (optional) – Array of strings. Supported aggregation functions for any field type.
    • date (optional) – Array of strings. Supported aggregation functions for the "date" field type.
    • number (optional) – Array of strings. Supported aggregation functions for the "number" field type. Note: for the fields of this type, Flexmonster Pivot supports built-in front-end aggregations.
    • string (optional) – Array of strings. Supported aggregation functions for the "string" field type.
  • filters (optional) – Boolean|Object. Supported filters for all fields or for fields of a certain type. To define filters for a specific field, use the fields.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:
    • any (optional) – Boolean|Object. Supported filters for any field type.
      • members (optional) – Boolean. A configuration of an include/exclude members filter. If true, the members filter is enabled in Flexmonster.
      • query (optional) – Boolean|Array of strings. A configuration of a conditional filter on members. To turn on this filter, either set query to true or specify an array of supported conditions.
        If the property is set to true, this enables all the conditions that exist in Flexmonster for the members filter. There are 4 common conditions for all field types that can be specified here: "equal", "not_equal", "between", "not_between".
      • valueQuery (optional) – Boolean|Array of strings. A configuration of a conditional filter on values. To turn on this filter, either set valueQuery to true or specify an array of supported conditions.
        If the property is set to true, this enables all the conditions that exist in Flexmonster for the values filter. See the list of supported conditions.
    • date (optional) – Boolean|Object. Supported filters for the "date" field type.
      • members (optional) – Boolean. A configuration of an include/exclude members filter. If true, the members filter is enabled in Flexmonster.
      • query (optional) – Boolean|Array of strings. A configuration of a conditional filter on members. To turn on this filter, either set query to true or specify an array of supported conditions.
        If the property is set to true, this enables all the conditions that exist in Flexmonster for the members filter. See the list of supported conditions for the “date” field type.
      • valueQuery (optional) – Boolean|Array of strings. A configuration of a conditional filter on values. To turn on this filter, either set valueQuery to true or specify an array of supported conditions.
        If the property is set to true, this enables all the conditions that exist in Flexmonster for the values filter. See the list of supported conditions.
    • number (optional) – Boolean|Object. Supported filters for the "number" field type.
      • members (optional) – Boolean. A configuration of an include/exclude members filter. If true, the members filter is enabled in Flexmonster.
      • query (optional) – Boolean|Array of strings. A configuration of a conditional filter on members. To turn on this filter, either set query to true or specify an array of supported conditions.
        If the property is set to true, this enables all the conditions that exist in Flexmonster for the members filter. See the list of supported conditions for the “number” field type.
      • valueQuery (optional) – Boolean|Array of strings. A configuration of a conditional filter on values. To turn on this filter, either set valueQuery to true or specify an array of supported conditions.
        If the property is set to true, this enables all the conditions that exist in Flexmonster for the values filter. See the list of supported conditions.
    • string (optional) – Boolean|Object. Supported filters for the "string" field type.
      • members (optional) – Boolean. A configuration of an include/exclude members filter. If true, the members filter is enabled in Flexmonster.
      • query (optional) – Boolean|Array of strings. A configuration of a conditional filter on members. To turn on this filter, either set query to true or specify an array of supported conditions.
        If the property is set to true, this enables all the conditions that exist in Flexmonster for the members filter. See the list of supported conditions for the “string” field type.
      • valueQuery (optional) – Boolean|Array of strings. A configuration of a conditional filter on values. To turn on this filter, either set valueQuery to true or specify an array of supported conditions.
        If the property is set to true, this enables all the conditions that exist in Flexmonster for the values filter. See the list of supported conditions.
    • advanced – Boolean. 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 the parameter is false, the server cannot filter the hierarchical data. In this case, if multilevel hierarchies were configured in the Mapping Object, these configurations will be ignored. Default value: false.
  • sorted (optional) – Boolean. If true, the fields’ order from the response will be used to display fields in the Field List.

See also

/handshake request
/members request
/select request for pivot table
/select request for flat table
/select request for drill-through view