Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
protogrid:json_api_database_views [2021-09-16 11:29] – dru | protogrid:json_api_database_views [2023-01-10 23:16] (current) – [Standard Views Decommissioned With Version 2.6.0] dru | ||
---|---|---|---|
Line 3: | Line 3: | ||
A Database View can be seen as a table with two columns. The first column is called ' | A Database View can be seen as a table with two columns. The first column is called ' | ||
- | < | + | < |
{ | { | ||
" | " | ||
- | " | ||
" | " | ||
" | " | ||
Line 36: | Line 35: | ||
For details about listings / views and how to request it, please see section about view [[protogrid: | For details about listings / views and how to request it, please see section about view [[protogrid: | ||
+ | |||
+ | For newcomers: In 90% of use cases, the [[# | ||
===== Protogrid Standard Views ===== | ===== Protogrid Standard Views ===== | ||
Line 50: | Line 51: | ||
Example respond: | Example respond: | ||
- | < | + | < |
{ | { | ||
" | " | ||
- | " | ||
" | " | ||
" | " | ||
Line 59: | Line 59: | ||
], | ], | ||
" | " | ||
- | | + | |
- | " | + | " |
- | " | + | " |
- | ], | + | ], |
- | " | + | " |
}, | }, | ||
... | ... | ||
- | | + | |
- | } | + | |
} | } | ||
+ | } | ||
</ | </ | ||
Line 82: | Line 82: | ||
Example respond (be aware, that this Card is a System Card and therefore looks different to the typical Cards): | Example respond (be aware, that this Card is a System Card and therefore looks different to the typical Cards): | ||
- | < | + | < |
{ | { | ||
" | " | ||
- | " | ||
" | " | ||
" | " | ||
Line 199: | Line 198: | ||
=== by_sortstring_and_id === | === by_sortstring_and_id === | ||
- | |||
- | === by_search_term_and_sortstring_and_id === | ||
- | This view contains Cards for a certain search term by id. The key is composed of the search term, the Card sorting string and the Card key. Search term means a specific string, for which you want to find all Cards containing this string in the values. You may not find Cards having this string only in the labels of the fields. Example: | ||
- | <code json> | ||
- | [" | ||
- | </ | ||
- | The value is null. | ||
- | |||
- | **Be aware**: The search only goes over values stored in this Card. This may differ from the visual representation Card. For example when Card A references another Card, you see the Shortname of the referenced Card (say " | ||
- | |||
- | Example request to find all cards containing the word " | ||
- | < | ||
- | https:// | ||
- | </ | ||
- | |||
- | Example response: | ||
- | <code json> | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | ], | ||
- | " | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | ], | ||
- | " | ||
- | }, | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | ], | ||
- | " | ||
- | }, | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | ], | ||
- | " | ||
- | }, | ||
- | ... | ||
- | ] | ||
- | } | ||
- | } | ||
- | </ | ||
- | |||
- | You might have duplicates in the code due to several occurrences of the same search term on the same Card. | ||
=== by_design_element_and_sortstring_and_id === | === by_design_element_and_sortstring_and_id === | ||
Line 269: | Line 210: | ||
Example request to get all Cards, where the name (in my example having with fieldkey " | Example request to get all Cards, where the name (in my example having with fieldkey " | ||
< | < | ||
- | https:// | + | https:// |
</ | </ | ||
Example response: | Example response: | ||
- | < | + | < |
{ | { | ||
" | " | ||
- | " | ||
" | " | ||
" | " | ||
Line 309: | Line 249: | ||
Example Request to get all Cards belonging to the Proto with key " | Example Request to get all Cards belonging to the Proto with key " | ||
< | < | ||
- | https:// | + | https:// |
</ | </ | ||
Line 315: | Line 255: | ||
Example respond: | Example respond: | ||
- | < | + | < |
{ | { | ||
" | " | ||
- | " | ||
" | " | ||
" | " | ||
Line 334: | Line 273: | ||
} | } | ||
</ | </ | ||
- | |||
- | === by_proto_and_search_term_and_sortstring_and_id === | ||
- | This view contains all non-deleted and non-hidden Cards by proto and searchterm (see also [[# | ||
- | < | ||
- | [" | ||
- | </ | ||
- | |||
- | Example Request to get all Cards of Proto " | ||
- | < | ||
- | https:// | ||
- | </ | ||
- | |||
- | Example response: | ||
- | <code json> | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | ], | ||
- | " | ||
- | }, | ||
- | ... | ||
- | ] | ||
- | } | ||
- | } | ||
- | </ | ||
- | |||
=== by_proto_and_design_element_and_sortstring_and_id === | === by_proto_and_design_element_and_sortstring_and_id === | ||
Line 380: | Line 285: | ||
Example Request to find all Cards based on Proto " | Example Request to find all Cards based on Proto " | ||
< | < | ||
- | https:// | + | https:// |
</ | </ | ||
Example response: | Example response: | ||
- | < | + | < |
{ | { | ||
" | " | ||
- | " | ||
" | " | ||
" | " | ||
Line 419: | Line 323: | ||
=== deleted_by_sortstring_and_id === | === deleted_by_sortstring_and_id === | ||
This view contains the IDs of all the deleted Cards as keys. The value is null. The request and response are analog to view [[# | This view contains the IDs of all the deleted Cards as keys. The value is null. The request and response are analog to view [[# | ||
- | |||
- | === deleted_by_search_term_and_sortstring_and_id === | ||
- | This view contains all deleted Cards for a certain search term by id. The value is null. The request and response are analog to view [[# | ||
=== deleted_by_design_element_and_sortstring_and_id === | === deleted_by_design_element_and_sortstring_and_id === | ||
Line 433: | Line 334: | ||
=== related_keys_by_id === | === related_keys_by_id === | ||
This view contains all Cards by id. The value contains the related keys. | This view contains all Cards by id. The value contains the related keys. | ||
- | |||
- | **Be aware**: This is one of the very few views, where the key is **NOT** surrounded by "[ ... ]"! | ||
Example request to find all Cards related to the Card " | Example request to find all Cards related to the Card " | ||
< | < | ||
- | https:// | + | https:// |
</ | </ | ||
Example response: | Example response: | ||
- | < | + | < |
{ | { | ||
" | " | ||
- | " | ||
" | " | ||
" | " | ||
{ | { | ||
- | " | + | " |
+ | | ||
+ | ], | ||
" | " | ||
[ | [ | ||
Line 499: | Line 399: | ||
Example request to find all Cards relating to the (Related) Card with key " | Example request to find all Cards relating to the (Related) Card with key " | ||
< | < | ||
- | https:// | + | https:// |
</ | </ | ||
Example response: | Example response: | ||
- | < | + | < |
{ | { | ||
" | " | ||
- | " | ||
" | " | ||
" | " | ||
Line 560: | Line 459: | ||
Example response: | Example response: | ||
- | < | + | < |
{ | { | ||
" | " | ||
- | " | ||
" | " | ||
" | " | ||
{ | { | ||
- | " | + | " |
+ | | ||
+ | ], | ||
" | " | ||
"#": | "#": | ||
Line 608: | Line 508: | ||
</ | </ | ||
- | + | === shortname_objects_by_id | |
- | === shortname_by_language_objects_by_id | + | This view contains all Cards which contain |
- | This view contains all Cards which contains | + | |
Example request to get the shortnames of the Card with key " | Example request to get the shortnames of the Card with key " | ||
< | < | ||
- | https:// | + | https:// |
</ | </ | ||
Example response: | Example response: | ||
- | < | + | < |
{ | { | ||
" | " | ||
- | " | ||
" | " | ||
" | " | ||
{ | { | ||
- | " | + | " |
+ | | ||
+ | ], | ||
" | " | ||
" | " | ||
Line 635: | Line 535: | ||
} | } | ||
</ | </ | ||
- | |||
- | |||
===== Views of Dedicated Search Dialog Boxes ===== | ===== Views of Dedicated Search Dialog Boxes ===== | ||
It is also possible to access the views of dedicated [[protogrid: | It is also possible to access the views of dedicated [[protogrid: | ||
+ | |||
+ | Hint: For straight forward API usage in most cases it is recommended to use Search Dialog Boxes in " | ||
+ | |||
+ | Please note that Datetime Fields in Dedicated Search Boxes are indexed slightly differently than in normal views: If the date-time value is configured as a fixed filter field, the time component will always be set to 0 (example: " | ||
Example Request: | Example Request: | ||
Line 647: | Line 549: | ||
The key depends on the individually configured Filter Fields for the acessed Search Dialog Box. | The key depends on the individually configured Filter Fields for the acessed Search Dialog Box. | ||
+ | |||
+ | ===== Change Log ===== | ||
+ | ==== Standard Views Decommissioned With Version 2.1.5 ==== | ||
+ | * by_id_and_value | ||
+ | * by_proto_and_search_term_and_id | ||
+ | * by_search_term_and_id | ||
+ | * data_protos_by_id | ||
+ | * data_protos_by_search_term_and_id | ||
+ | * datetime_field_definitions_by_id | ||
+ | * datetime_field_definitions_by_search_term_and_id | ||
+ | * deleted_by_design_element_and_value_and_id | ||
+ | * deleted_by_id | ||
+ | * deleted_by_search_term_and_id | ||
+ | * logs_by_time_and_id | ||
+ | * navroot_candidates_by_design_element_and_value_and_id | ||
+ | * navroot_candidates_by_id | ||
+ | * navroot_candidates_by_search_term_and_id | ||
+ | * number_field_definitions_by_id | ||
+ | * number_field_definitions_by_search_term_and_id | ||
+ | * relational_definitions_by_id_and_related_proto | ||
+ | * text_field_definitions_by_id | ||
+ | * text_field_definitions_by_search_term_and_id | ||
+ | |||
+ | ==== Standard Views Decommissioned With Version 2.2.1 ==== | ||
+ | * by_design_element_and_value_and_id | ||
+ | * by_proto_and_id | ||
+ | * by_proto_and_design_element_and_value_and_id | ||
+ | * deleted_by_proto_and_design_element_and_value_and_id | ||
+ | * navroot_candidates_by_design_element_and_sortstring_and_id | ||
+ | * navroot_candidates_by_design_element_and_value_and_sortstring_and_id | ||
+ | * sums_by_proto_and_design_element | ||
+ | * sums_by_proto_and_design_element_and_condition | ||
+ | * datetime_field_definitions_by_sortstring_and_id | ||
+ | * datetime_field_definitions_by_search_term_and_sortstring_and_id | ||
+ | * text_field_definitions_by_sortstring_and_id | ||
+ | * text_field_definitions_by_search_term_and_sortstring_and_id | ||
+ | * number_field_definitions_by_sortstring_and_id | ||
+ | * number_field_definitions_by_search_term_and_sortstring_and_id | ||
+ | * all_protos_by_id | ||
+ | * all_agents_by_id | ||
+ | * all_connectors_by_url_name | ||
+ | |||
+ | ==== Adjustments to Views With Version 2.2.2 ==== | ||
+ | - All views: If a view is requested with the " | ||
+ | - All views: All string values as well as sortstrings are now cut off after 300 characters. | ||
+ | - All views: The separator between human readable values and keys is now " | ||
+ | - All views: The second last column " | ||
+ | - Dedicated Search Boxes: Now all filters must be set. An empty filter field in a Search Dialog Boxes now means a filter for those Cards where the target field is also empty. | ||
+ | - Dedicated Search Boxes: Datetime Fields in Dedicated Search Boxes are now indexed slightly differently than in normal views: If the date-time value is configured as a fixed filter field, the time component will always be set to 0 (example: “2021-11-11T00: | ||
+ | - Dedicated Search Boxes with " | ||
+ | * For Relation/ | ||
+ | * For other field values: "< | ||
+ | * Note: It is anyway recommended to use Search Dialog Boxes with display mode “Simple Keys in JSON API only” (i. e. non-sortable). | ||
+ | - In views " | ||
+ | * For Relation/ | ||
+ | * For other field values: "< | ||
+ | * Note: If you don't explicitly need sorting by design element value is anyway recommended to use the views " | ||
+ | - In views " | ||
+ | * View columns of " | ||
+ | * View columns of by_design_element_and_sortstring_and_id"" | ||
+ | |||
+ | ==== Standard Views Decommissioned With Version 2.6.0 ==== | ||
+ | * by_search_term_and_sortstring_and_id | ||
+ | * by_proto_and_search_term_and_sortstring_and_id | ||
+ | * deleted_by_search_term_and_sortstring_and_id | ||
+ | * navroot_candidates_by_sortstring_and_id | ||
+ | * navroot_candidates_by_search_term_and_sortstring_and_id | ||
+ | * data_protos_by_sortstring_and_id | ||
+ | * data_protos_by_search_term_and_sortstring_and_id |