Peter Santa created FINERACT-1747:
-------------------------------------
Summary: Have an API endpoint to query values from Data Table
Key: FINERACT-1747
URL: https://issues.apache.org/jira/browse/FINERACT-1747
Project: Apache Fineract
Issue Type: New Feature
Components: Data Tables
Reporter: Peter Santa
h1. 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.
h1. Goal
Have an API endpoint provided by Fineract, that allows filtering rows from Data
Tables based on a value.
h1. Solution Concept
Implement an API endpoint in Fineract with {{GET}} method, that executes a
query on a specified Data Table.
E.g.:
Data Table:
{code:java}
my_great_data_table{code}
||client_id||special_value_1||special_value_2||special_value_3||
|1|ABC1|DEF|GHI|
|2|ABC2|FED|IHG|
h3. Request
* data table ID - {{dataTableId}}
* data table filter column name - {{dataTableFilterColumnName}}
* requested filter value in the column - {{filterValue}} (or suggest pls a
better name for the parameter)
* columns, from which the value should be included in the response -
{{resultColumns}} (comma separated column names)
{code:java}
...?dataTableId=my_great_data_table&dataTableFilterColumnName=special_value_1&filterValue=ABC2&resultColumns=special_value_2,special_value_3{code}
h3. Response
{{}}
{{[ // 0th record in the resultSet}}{{ {}}{{ "special_value_2": "FED",}}{{
"special_value_3": "IHG"}}{{ }}}
{{]}}
h1. Acceptance Criteria
* The new API endpoint accepts as input
** data table ID - {{dataTableId}}
** data table filter column name - {{dataTableFilterColumnName}}
** requested filter value in the column - {{filterValue}} (or suggest pls a
better name for the parameter)
** 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.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)