Uploaded image for project: 'Apache Fineract'
  1. Apache Fineract
  2. FINERACT-1747

Have an API endpoint to query values from Data Table

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.9.0
    • 1.9.0
    • Data Tables

    Description

      Background

      It is needed to be able to find rows in a Data Table, based on a value in a specified column, and get the whole row based on the given value.

      Goal

      Have an API endpoint provided by Fineract, that allows filtering rows from Data Tables based on a value.

      Solution Concept

      Implement an API endpoint in Fineract with GET method, that executes a query on a specified Data Table.

      E.g.:

      Data Table: 

      my_great_data_table
      client_id special_value_1 special_value_2 special_value_3 created_at updated_at
      1 ABC1 DEF GHI ... ...
      2 ABC2 FED IHG ... ...

      Request

      • data table ID - datatable
      • data table filter column name - columnFilter
      • requested filter value in the column - valueFilter
      • columns, from which the value should be included in the response - resultColumns (comma separated column names)
      ...my_great_data_table/query?columnFilter=special_value_1&valueFilter=ABC2&resultColumns=special_value_2,special_value_3

      Response

      [
        {
          "special_value_2": "FED",
          "special_value_3": "IHG"
        }
      ] 

      Acceptance Criteria

      • The new API endpoint accepts as input
        • data table ID - datatable
        • data table filter column name - columnFilter
        • requested filter value in the column - valueFilter
        • columns, from which the value should be included in the response - resultColumns (comma separated column names)
      • The response contains the list of records, that satisfy the conditions in the input.

      Attachments

        Issue Links

          Activity

            People

              ezolnbl Zoltán Nébli
              peter.santa Peter Santa
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: