☝️Small business or a startup? See if you qualify for our special offer.
+

Problems with creating request

Answered
Mathias Dangl asked on July 2, 2025

Hello, i do have a Problem based on this Metadata JSON: 

"slice": {
"reportFilters": [
{
"uniqueName": "fiBookingPos_bookingDateMonth",
"caption": "Monat"
},
{
"uniqueName": "fiBookingBook_aName",
"caption": "Buch",
"filter": {
"members": [
"fibookingbook_aname.[hauptbuch]"
]
}
},
{
"uniqueName": "fiAccountType_aName",
"caption": "Typ",
"filter": {
"exclude": [
"fiaccounttype_aname.[personenkonto kreditor]",
"fiaccounttype_aname.[personenkonto debitor]"
]
}
},
{
"uniqueName": "CostCenter_aName",
"caption": "Kostenstelle"
},
{
"uniqueName": "CostUnit_aName",
"caption": "Kostenträger"
},
{
"uniqueName": "fiAccountChart",
"caption": "Kontenrahmen"
},
{
"uniqueName": "CostKind_aName",
"caption": "Kostenart"
},
{
"uniqueName": "CostProject_aName",
"caption": "Kostenprojekt"
},
{
"uniqueName": "fiAccountCat_aName",
"caption": "Kontoklasse"
},
{
"uniqueName": "fiAccount_isTaxable",
"caption": "Steuerbar"
},
{
"uniqueName": "fiTaxCode_aName",
"caption": "Steuercode"
},
{
"uniqueName": "fiBookingCode_aName",
"caption": "BuCode"
},
{
"uniqueName": "fiAccount_CRMPartnerSID_true_false",
"caption": "Personenkonto"
}
],
"rows": [
{
"uniqueName": "fiAccGrouping0",
"caption": "Gliederungsart",
"filter": {
"members": [
"fiaccgrouping0.[db rechnung - fabular.]"
]
}
},
{
"uniqueName": "fiAccGrouping1",
"caption": "Gliederungsebene 1"
},
{
"uniqueName": "fiAccGrouping2",
"caption": "Gliederungsebene 2"
},
{
"uniqueName": "fiAccGrouping3",
"caption": "Gliederungsebene 3"
},
{
"uniqueName": "fiAccGrouping4",
"caption": "Gliederungsebene 4"
},
{
"uniqueName": "fiAccGrouping5",
"caption": "Gliederungsebene 5"
},
{
"uniqueName": "fiAccount_aName",
"caption": "Bezeichnung"
},
{
"uniqueName": "fiAccount_accountID",
"caption": "Konto"
}
],
"columns": [
{
"uniqueName": "FiBookingPeriod_Year",
"caption": "Buchungsperiode Jahr",
"filter": {
"members": [
"fibookingperiod_year.[2023]",
"fibookingperiod_year.[2024]",
"fibookingperiod_year.[2022]",
"fibookingperiod_year.[2021]"
]
}
},
{
"uniqueName": "FiBookingPeriod_aName",
"caption": "Buchungsperiode"
},
{
"uniqueName": "[Measures]"
}
],
"measures": [
{
"uniqueName": "fiBookingPos_Debit",
"aggregation": "sum",
"caption": "Soll"
},
{
"uniqueName": "fiBookingPos_Credit",
"aggregation": "sum",
"caption": "Haben"
},
{
"uniqueName": "fiBookingPos_valueNet",
"aggregation": "sum",
"caption": "Wert"
},
{
"uniqueName": "fiBookingPos_valueNet",
"aggregation": "runningtotalsofcolumn",
"caption": "Wert"
},
{
"uniqueName": "fiBookingPos_valueNet",
"aggregation": "%differenceofrow",
"caption": "Wert"
}
],
"expands": {
"rows": [
{
"tuple": [
"fiaccgrouping0.[db rechnung - fabular.]"
]
},
{
"tuple": [
"fiaccgrouping0.[bilanz]"
]
},
{
"tuple": [
"fiaccgrouping0.[bilanz]",
"fiaccgrouping1.[passivseite]"
]
},
{
"tuple": [
"fiaccgrouping0.[bilanz]",
"fiaccgrouping1.[aktivseite]"
]
},
{
"tuple": [
"fiaccgrouping0.[db rechnung - fabular.]",
"fiaccgrouping1.[01. warenrohgewinn]"
]
},
{
"tuple": [
"fiaccgrouping0.[db rechnung - fabular.]",
"fiaccgrouping1.[02. db artikel]"
]
},
{
"tuple": [
"fiaccgrouping0.[db rechnung - fabular.]",
"fiaccgrouping1.[03. deckungsbeitrag i]"
]
},
{
"tuple": [
"fiaccgrouping0.[db rechnung - fabular.]",
"fiaccgrouping1.[04. db ii]"
]
}
]
}
},

My Frontend creates based on this MetaData 5 Requests, but i don´t unterstand how its doing, here just one smaple Request:

{
"index": "5027",
"page": 0,
"query": {
"aggs": {
"by": {
"cols": [
{
"uniquename": "fibookingperiod_year"
}
],
"rows": [
{
"uniquename": "fiaccgrouping0"
},
{
"uniquename": "fiaccgrouping1"
},
{
"uniquename": "fiaccgrouping2"
}
]
},
"values": [
{
"func": {
"value": "sum"
},
"field": {
"uniquename": "fibookingpos_debit"
}
},
{
"func": {
"value": "sum"
},
"field": {
"uniquename": "fibookingpos_credit"
}
},
{
"func": {
"value": "sum"
},
"field": {
"uniquename": "fibookingpos_valuenet"
}
}
]
},
"filter": [
{
"field": {
"uniquename": "fiaccgrouping0"
},
"include": [
{
"member": "db rechnung - fabular."
},
{
"member": "db rechnung - fabular."
}
]
},
{
"field": {
"uniquename": "fiaccgrouping1"
},
"include": [
{
"member": "04. db ii"
}
]
},
{
"field": {
"uniquename": "fibookingperiod_year"
},
"include": [
{
"member": "2023"
},
{
"member": "2024"
},
{
"member": "2022"
},
{
"member": "2021"
}
]
},
{
"field": {
"uniquename": "fibookingbook_aname"
},
"include": [
{
"member": "hauptbuch"
}
]
},
{
"field": {
"uniquename": "fiaccounttype_aname"
},
"exclude": [
{
"member": "personenkonto kreditor"
},
{
"member": "personenkonto debitor"
}
]
}
]
},
"type": "select",
"params": {
"preventselect": false
},
"querytype": "expand"

}

I try to build a Backend automation, which creates these Reqeusts and Caches them, so i can provide a better Performance.

Thanks a lot for help.

All the best, mathias

3 answers

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster July 3, 2025

Hello, Mathias!

Thank you for reaching out to us.

Kindly note that Flexmonster sends separate /select requests with querytype expand/drillDown for each expanded node in the grid. You can read more about the requests sent by Flexmonster in our docs: https://www.flexmonster.com/api/select-request-for-pivot-table/.

We also recommend the following approaches to improve the performance with the custom data source API:

  • Use concurrentRequests property to send requests for expands&drills simultaneously, where it is possible.
  • Use Flexmonster to generate requests&responses that need to be cached. The idea is to run Flexmonster in a headless browser(e.g., Puppeteer) and run each report through it. This way, Flexmonster will generate all the necessary requests, and the server will be able to cache the responses needed for each report.

Hope you will find our answer helpful. Feel free to ask if there are any further questions.

Kind regards,
Solomiia

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster July 16, 2025

Hello, Mathias!

Hope you are doing well.

Our team is wondering if you had a chance to read our previous answer. Could you please let us know if the suggested approach of pre-caching data by running all requests in a headless browser works well for your use case?

Looking forward to hearing your feedback.

Kind regards,
Solomiia

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster July 24, 2025

Hello, Mathias!

Hope you are having a great week.

Just checking in to ask if the suggested approach of pre-caching data by running all requests in a headless browser works for you.

Looking forward to hearing from you.

Kind regards,
Solomiia

Please login or Register to Submit Answer