❄️✨Ho-ho-holiday offer for new projects! Check out our pricing page.

Flexmonster data server api problem

Answered
Fenil Patel asked 4 days ago

Hello there,

 

I am currently working on building a custom data server (using python) for Flexmonster, and I am encountering several challenges. I would like to access detailed documentation—specifically, how Flexmonster expects data from the server, the required data types, and other technical details such as the expected structure of responses for various API calls.

For example, when the /select endpoint is triggered for expanding a row, what exact data format should the server return to the Flexmonster report UI?

 

At the moment, I am facing an issue where triggering a /select request to expand a row results in the entire row being removed from the UI. I would like to understand why this happens and how to resolve it.

 

 

as you can see in images before there is one row 3737 when i click on that and try to expend it is removes that row and row below it got in place as shown in second image.

 

this is my response from server when i expended row and got response from /select api call

{
  "aggs": [
    {
      "keys": {
        "PktCharniGroup": "Melee"
      },
      "values": {
        "Prc_Comp_Pcs": {
          "sum": 0.0
        },
        "Prc_Comp_PolWt": {
          "sum": 0.0
        },
        "RP_Baki_ExpWt": {
          "sum": 0.0
        },
        "RP_Baki_Pcs": {
          "sum": 0.0
        },
        "SBA_Run_ExpWt": {
          "sum": 1.567
        },
        "SBA_Run_Pcs": {
          "sum": 26.0
        },
        "Wt_Baki_ExpWt": {
          "sum": 0.0
        },
        "Wt_Baki_Pcs": {
          "sum": 0.0
        }
      }
    },
    {
      "keys": {
        "PktCharniGroup": "Melee",
        "ResultBatchNo": 3737.0
      },
      "values": {
        "Prc_Comp_Pcs": {
          "sum": 0.0
        },
        "Prc_Comp_PolWt": {
          "sum": 0.0
        },
        "RP_Baki_ExpWt": {
          "sum": 0.0
        },
        "RP_Baki_Pcs": {
          "sum": 0.0
        },
        "SBA_Run_ExpWt": {
          "sum": 1.567
        },
        "SBA_Run_Pcs": {
          "sum": 26.0
        },
        "Wt_Baki_ExpWt": {
          "sum": 0.0
        },
        "Wt_Baki_Pcs": {
          "sum": 0.0
        }
      }
    },
    {
      "keys": {
        "PktCharniGroup": "Melee",
        "RBNo_PolishCleanDt": "",
        "ResultBatchNo": 3737.0
      },
      "values": {
        "Prc_Comp_Pcs": {
          "sum": 0.0
        },
        "Prc_Comp_PolWt": {
          "sum": 0.0
        },
        "RP_Baki_ExpWt": {
          "sum": 0.0
        },
        "RP_Baki_Pcs": {
          "sum": 0.0
        },
        "SBA_Run_ExpWt": {
          "sum": 1.567
        },
        "SBA_Run_Pcs": {
          "sum": 26.0
        },
        "Wt_Baki_ExpWt": {
          "sum": 0.0
        },
        "Wt_Baki_Pcs": {
          "sum": 0.0
        }
      }
    },
    {
      "values": {
        "Prc_Comp_Pcs": {
          "sum": 0.0
        },
        "Prc_Comp_PolWt": {
          "sum": 0.0
        },
        "RP_Baki_ExpWt": {
          "sum": 0.0
        },
        "RP_Baki_Pcs": {
          "sum": 0.0
        },
        "SBA_Run_ExpWt": {
          "sum": 1.567
        },
        "SBA_Run_Pcs": {
          "sum": 26.0
        },
        "Wt_Baki_ExpWt": {
          "sum": 0.0
        },
        "Wt_Baki_Pcs": {
          "sum": 0.0
        }
      }
    }
  ]
}

1 answer

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster 2 days ago

Hello, Fenil!

Thank you for reaching out to us.

Kindly note that when using the custom data source API protocol, Flexmonster sends four different types of requests to the provided server URL. You are welcome to look through the detailed examples of all requests and responses used in the custom data source API communication protocol by the link: https://www.flexmonster.com/api/all-requests/.
As for the data types, these are sent in the response to the /fields request. You are welcome to check the following page to look through all field configurations that you can send: https://www.flexmonster.com/api/field-info-object/.

Regarding your question about the expand response, the structure is the same as the regular /select response with the filter applied. Our team has examined the provided response and hasn't observed any apparent inconsistencies. If the third nested field in Rows has the "RBNo_PolishCleanDt" name, the response seems correct. However, we couldn't dig deeper into the case without having the data sample and the report configurations.
For further investigation on your side, we recommend installing Flexmonster Data Server, which is our own implementation of the custom data source API protocol, connecting it to the JSON/CSV file with your data sample, and checking all responses that the server returns in the Network tab.

Hope you will find our answer helpful. Please let us know if you have any further questions.

Kind regards,
Solomiia

Please sign in or register to submit your answer