Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
protogrid:json_api_database_views [2021-12-02 15:42] druprotogrid:json_api_database_views [2023-01-10 23:16] (current) – [Standard Views Decommissioned With Version 2.6.0] dru
Line 198: 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 javascript > 
-["behavior", "ScriptLibrary:Server-ScriptLibrary Next Steps", "1475e62a-47d7-4a29-98c2-c89f50edd497"] 
-</code> 
-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 "wishes an offer") in the corresponding relation field. Nevertheless, the Card only stores the Card key of the related Card (say "c18bc1c2-5499-49cc-90e0-f06b4af1474f"), therefore you will not find Card A when searching for Cards containing "wishes". 
- 
-Example request to find all cards containing the word "behavior": 
-<code> 
-https://example.protogrid.com/api/v2/apps/produktekatalog/views/by_search_term_and_sortstring_and_id?start_key=["behavior",null,null]&end_key=["behavior",{},{}] 
-</code> 
- 
-Example response: 
-<code javascript > 
-{ 
-    "errors": [], 
-    "result": { 
-        "next_card_key": [ 
-            "behavior", 
-            "ScriptLibrary:Server-ScriptLibrary Products", 
-            "ba9859e1-68ad-4004-b8e0-c4f0812edf20" 
-        ], 
-        "rows": [ 
-            { 
-                "key": [ 
-                    "behavior", 
-                    "ScriptLibrary:Server-ScriptLibrary Next Steps", 
-                    "1475e62a-47d7-4a29-98c2-c89f50edd497" 
-                ], 
-                "value": null 
-            }, 
-            { 
-                "key": [ 
-                    "behavior", 
-                    "ScriptLibrary:Server-ScriptLibrary Next Steps", 
-                    "1475e62a-47d7-4a29-98c2-c89f50edd497" 
-                ], 
-                "value": null 
-            }, 
-            { 
-                "key": [ 
-                    "behavior", 
-                    "ScriptLibrary:Server-ScriptLibrary Products", 
-                    "ba9859e1-68ad-4004-b8e0-c4f0812edf20" 
-                ], 
-                "value": null 
-            }, 
-            ... 
-        ] 
-    } 
-} 
-</code> 
- 
-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 330: Line 273:
 } }
 </code> </code>
- 
-=== 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 [[#by_search_term_and_sortstring_and_id|by_search_term_and_sortstring_and_id]]. Therefore the key is composed of the Proto key, the searchterm, the Card sorting string and the Card key. Example: 
-<code> 
-["9c2bdd7d-05bd-4d16-8339-11116e737b3a", "wants", "Priscilla Molesworth - wishes an offer - Luxor 600t", "21f28df9-b0fd-431d-a773-5c6f58ff94a2"] 
-</code> 
- 
-Example Request to get all Cards of Proto "9c2bdd7d-05bd-4d16-8339-11116e737b3a" containing the string "wants": 
-<code> 
-https://example.protogrid.com/api/v2/apps/produktekatalog/views/by_proto_and_search_term_and_sortstring_and_id?start_key=["9c2bdd7d-05bd-4d16-8339-11116e737b3a","wants",null,null]&end_key=["9c2bdd7d-05bd-4d16-8339-11116e737b3a","wants",{},{}] 
-</code> 
- 
-Example response: 
-<code javascript > 
-{ 
-    "errors": [], 
-    "result": { 
-        "rows": [ 
-            { 
-                "key": [ 
-                    "9c2bdd7d-05bd-4d16-8339-11116e737b3a", 
-                    "wants", 
-                    "Priscilla Molesworth - wishes an offer - Luxor 600t", 
-                    "21f28df9-b0fd-431d-a773-5c6f58ff94a2" 
-                ], 
-                "value": null 
-            }, 
-            ... 
-        ] 
-    } 
-} 
-</code> 
- 
  
 === by_proto_and_design_element_and_sortstring_and_id === === by_proto_and_design_element_and_sortstring_and_id ===
Line 413: 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 [[#by_sortstring_and_id|"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 [[#by_sortstring_and_id|"by_sortstring_and_id"]].
- 
-=== 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 [[#by_search_term_and_sortstring_and_id|"by_search_term_and_sortstring_and_id"]]. 
  
 === deleted_by_design_element_and_sortstring_and_id === === deleted_by_design_element_and_sortstring_and_id ===
Line 702: Line 609:
     * View columns of "by_design_element_and_sortstring_and_id" before: ["816950eb-1b70-41e2-89f5-5400f9636345", "nightTable 2.0", "9a5f37ab-30a7-4c91-b99f-f573a1c7d1b9"]     * View columns of "by_design_element_and_sortstring_and_id" before: ["816950eb-1b70-41e2-89f5-5400f9636345", "nightTable 2.0", "9a5f37ab-30a7-4c91-b99f-f573a1c7d1b9"]
     * View columns of by_design_element_and_sortstring_and_id"" now: ["816950eb-1b70-41e2-89f5-5400f9636345", "nightTable 2.0", "nightTable 2.0 - furniture", "9a5f37ab-30a7-4c91-b99f-f573a1c7d1b9"]     * View columns of by_design_element_and_sortstring_and_id"" now: ["816950eb-1b70-41e2-89f5-5400f9636345", "nightTable 2.0", "nightTable 2.0 - furniture", "9a5f37ab-30a7-4c91-b99f-f573a1c7d1b9"]
 +
 +==== 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
Print/export