Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
protogrid:json_api_database_views [2019-02-07 09:09] – [sums_by_proto_and_design_element_and_condition] 46.140.51.3protogrid:json_api_database_views [2020-12-16 11:13] – [by_id_and_value] dru
Line 242: Line 242:
 </code> </code>
  
-===== by_id_and_value ===== 
-This view contains all  non-deleted and non-hidden Cards. The value is raw Card. In typical use, you want to use this view to load your Cards, since you do not want to load Cards which are deleted or hidden by accident. 
- 
-**Be aware**: This is one of the very few views, where the key is **NOT** surrounded by "[ ... ]"! 
- 
-Example request to get the Cards whose ID is within the range "a3c8b1b5-ea36-4ae0-f1bd-5366543ae36c" to "a5a8815d-9cff-4489-9e21-6f54163408ee": 
-<code> 
-https://example.protogrid.com/api/v2/apps/produktekatalog/views/by_id_and_value?start_key="a3c8b1b5-ea36-4ae0-f1bd-5366543ae36c"&end_key="a5a8815d-9cff-4489-9e21-6f54163408ee" 
-</code> 
- 
-Example respond (do not be confused by the special content of the Card: It is a Multilanguage Card): 
-<code json> 
-{ 
-    "errors": [], 
-    "protogrid_environment_version": "1.4.14", 
-    "result": { 
-        "rows": [ 
-            { 
-                "key": "a3c8b1b5-ea36-4ae0-f1bd-5366543ae36c", 
-                "shortname": "Product Catalog", 
-                "value": { 
-                    "_id": "a3c8b1b5-ea36-4ae0-f1bd-5366543ae36c", 
-                    "_rev": "4-001d21026ea44eccea11cabe45358dbf", 
-                    "denormalized": { 
-                        "&&multilanguageProto": { 
-                            "allow_editing_cards_to_users": 0, 
-                            "creator_role": "", 
-                            "editor_role": "", 
-                            "show_cards_to_users": 0 
-                        }, 
-                        "a3c8b1b5-ea36-4ae0-f1bd-5366543ae36c": { 
-                            "displayable_type": { 
-                                "de": "DynamicCard", 
-                                "en": "DynamicCard" 
-                            }, 
-                            "shortname": { 
-                                "de": "Product Catalog", 
-                                "en": "Product Catalog" 
-                            } 
-                        } 
-                    }, 
-                    "design_elements": [ 
-                        { 
-                            "definition_key": "en", 
-                            "value": "Product Catalog" 
-                        }, 
-                        { 
-                            "definition_key": "de", 
-                            "value": "Produktekatalog" 
-                        } 
-                    ], 
-                    "get_design_element": {}, 
-                    "get_design_element_properties": {}, 
-                    "get_key": {}, 
-                    "get_proto_key": {}, 
-                    "get_shortname": {}, 
-                    "get_type": {}, 
-                    "get_value": {}, 
-                    "last_healed": "2016-02-17T05:31:30", 
-                    "modification_log": [ 
-                        { 
-                            "time": "2016-03-23T12:11:47", 
-                            "user": "a77b8462-ec5f-4b8e-9bc3-29fe8784c69e" 
-                        }, 
-                        { 
-                            "time": "2016-03-23T12:13:11", 
-                            "user": "a77b8462-ec5f-4b8e-9bc3-29fe8784c69e" 
-                        }, 
-                        { 
-                            "time": "2016-03-23T12:16:46", 
-                            "user": "a77b8462-ec5f-4b8e-9bc3-29fe8784c69e" 
-                        }, 
-                        { 
-                            "time": "2016-03-23T18:02:59", 
-                            "user": "6ab4c76c-07a3-4edd-99aa-c61923866020" 
-                        } 
-                    ], 
-                    "proto_key": "&&multilanguageProto", 
-                    "reader_role_key": "", 
-                    "set_design_element_value": {}, 
-                    "set_element_value": {} 
-                } 
-            }, 
-            { 
-                "key": "a5a8815d-9cff-4489-9e21-6f54163408ee", 
-                ... 
-            } 
-        ] 
-    } 
-} 
-</code> 
  
 ===== deleted_by_id ===== ===== deleted_by_id =====
Print/export