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-09-15 19:27] – [by_proto_and_search_term_and_sortstring_and_id] druprotogrid: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 'key', the second one is called 'value'. The keys have to be unique. A lookup to a view always expects a key, several keys or a range of keys. The response of a lookup consists of all requested keys together with their values. Example for respond: A Database View can be seen as a table with two columns. The first column is called 'key', the second one is called 'value'. The keys have to be unique. A lookup to a view always expects a key, several keys or a range of keys. The response of a lookup consists of all requested keys together with their values. Example for respond:
  
-<code json>+<code javascript>
 { {
   "errors": [],   "errors": [],
-  "protogrid_environment_version": "1.4.10", 
   "result": {   "result": {
     "rows": [     "rows": [
Line 14: Line 13:
           "4bcbdb7f-89c3-4640-b04e-3bd468df7c57"           "4bcbdb7f-89c3-4640-b04e-3bd468df7c57"
         ],         ],
-        "shortname": "CWH ONE", 
         "value": null         "value": null
       },       },
Line 22: Line 20:
           "7e3e7a96-6ea7-4dc7-a58a-1c781ae35e7b"           "7e3e7a96-6ea7-4dc7-a58a-1c781ae35e7b"
         ],         ],
-        "shortname": "DirtKiller 64 -  washing machines", 
         "value": null         "value": null
       },       },
Line 30: Line 27:
           "89e74e40-b0ef-4bc3-8e89-a43a43763087"           "89e74e40-b0ef-4bc3-8e89-a43a43763087"
         ],         ],
-        "shortname": "SuperCleaner 2000 -  washing machines", 
         "value": null         "value": null
       }       }
Line 39: Line 35:
  
 For details about listings / views and how to request it, please see section about view [[protogrid:api_endpoints|endpoints]]. Please note that all views have the Card id as the last key component due to how Protogrid is implemented on top of CouchDB. In most cases it is useful to specify the start_key and end_key URL parameters with null and {} (empty object) as their last element. This will give all keys matching the other specified keys. For details about listings / views and how to request it, please see section about view [[protogrid:api_endpoints|endpoints]]. Please note that all views have the Card id as the last key component due to how Protogrid is implemented on top of CouchDB. In most cases it is useful to specify the start_key and end_key URL parameters with null and {} (empty object) as their last element. This will give all keys matching the other specified keys.
 +
 +For newcomers: In 90% of use cases, the [[#by_proto_and_design_element_and_value_and_sortstring_and_id|"by_proto_and_design_element_and_value_and_sortstring_and_id"]] view fits best.
  
 ===== Protogrid Standard Views ===== ===== Protogrid Standard Views =====
-==== all_by_id ====+ 
 +==== Simple Overall Views ==== 
 + 
 +=== all_by_id ===
 This view basically lists all the ids of all the Cards. The row values are null (i.e. unused). The result is paged, which means that you might need several requests to load all the ids. To load the next page, you can use the "next_card_key" of the previous page as startkey. This view basically lists all the ids of all the Cards. The row values are null (i.e. unused). The result is paged, which means that you might need several requests to load all the ids. To load the next page, you can use the "next_card_key" of the previous page as startkey.
  
Line 50: Line 51:
  
 Example respond: Example respond:
-<code json>+<code javascript >
 { {
   "errors": [],   "errors": [],
-  "protogrid_environment_version": "1.4.10", 
   "result": {   "result": {
     "next_card_key": [     "next_card_key": [
-    "51b97f49-3262-4339-a8c7-2e8166887761"+      "51b97f49-3262-4339-a8c7-2e8166887761"
     ],     ],
     "rows": [     "rows": [
-    +      
-      "key":+        "key":
-      "4d523d95-31dd-4cb3-b60a-c974404e4ffd" +          "4d523d95-31dd-4cb3-b60a-c974404e4ffd" 
-      ], +        ], 
-      "shortname": {}, +        "value": null
-      "value": null+
       },       },
       ...       ...
-      ] +    ]
-    }+
   }   }
 +}
 </code> </code>
    
-==== by_id ====+=== by_id ===
 This View contains all non-deleted and non-hidden Card IDs as keys. The value is null. This gives you fast access to all the Card IDs in your Application. This can be useful for example when doing some kind of synchronization and checking for new documents.  This View contains all non-deleted and non-hidden Card IDs as keys. The value is null. This gives you fast access to all the Card IDs in your Application. This can be useful for example when doing some kind of synchronization and checking for new documents. 
  
Line 83: 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):
-<code json>+<code javascript >
 { {
     "errors": [],     "errors": [],
-    "protogrid_environment_version": "1.4.14", 
     "result": {     "result": {
         "next_card_key": [         "next_card_key": [
Line 189: Line 187:
                     "&&adminMenuDefinition"                     "&&adminMenuDefinition"
                 ],                 ],
-                "shortname": "Menu:Administration", 
                 "value": null                 "value": null
             },             },
Line 198: Line 195:
 </code> </code>
  
 +==== Overall Views With Filtering/Sorting ====
  
-==== by_proto_and_sortstring_and_id ==== +=== by_sortstring_and_id ===
-This view contains all non-deleted and non-hidden Cards with corresponding Proto by id. The key is composed of the Proto key, the Card sorting string and the Card key. The value is null. This view can be used to get all Cards belonging to a special Proto given the Proto key.+
  
-Example Request to get all Cards belonging to the Proto with key "12532072-0d76-4457-8cf8-7847d0470738":+=== by_design_element_and_sortstring_and_id === 
 + 
 +=== by_design_element_and_value_and_sortstring_and_id === 
 +This view contains all non-deleted and non-hidden Cards by design_element, date and id. Therefore the key is composed of the key of the design element, the value of the design element, the Card sorting string and the Card key. Example:
 <code> <code>
-https://example.protogrid.com/api/v2/apps/produktekatalog/views/by_proto_and_sortstring_and_id?start_key=["12532072-0d76-4457-8cf8-7847d0470738", null, null]&end_key=["12532072-0d76-4457-8cf8-7847d0470738", {}, {}] +["234486c7-939f-49f4-88b2-6fd51369a1d9", "Basic Toilet 2016 ", "Basic Toilet 2016 ", "d81047c2-0d92-48ee-a352-f0c8d4e63b2b"]
-</code> +
- +
-We use "null" and "{}" as boundaries for the Card key.  +
- +
-Example respond: +
-<code json> +
-+
-    "errors": [], +
-    "protogrid_environment_version": "1.4.14", +
-    "result":+
-        "rows":+
-            { +
-                "key":+
-                    "12532072-0d76-4457-8cf8-7847d0470738", +
-                    "CWH ONE", +
-                    "4bcbdb7f-89c3-4640-b04e-3bd468df7c57" +
-                ], +
-                "shortname": "CWH ONE", +
-                "value": null +
-            }, +
-            ... +
-        ] +
-    } +
-+
-</code> +
- +
- +
-==== 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> +
-["behavior", "ScriptLibrary:Server-ScriptLibrary Next Steps", "1475e62a-47d7-4a29-98c2-c89f50edd497"]+
 </code> </code>
 The value is null. 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 Cardyou 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 get all Cardswhere the name (in my example having with fieldkey "816950eb-1b70-41e2-89f5-5400f9636345"starts with "nor "o":
- +
-Example request to find all cards containing the word "behavior":+
 <code> <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", {}, {}]+https://example.protogrid.com/api/v2/apps/produktekatalog/views/by_design_element_and_value_and_sortstring_and_id?start_key=["816950eb-1b70-41e2-89f5-5400f9636345","n",null,null]&end_key=["816950eb-1b70-41e2-89f5-5400f9636345","m",{},{}]
 </code> </code>
  
 Example response: Example response:
-<code json>+<code javascript >
 { {
     "errors": [],     "errors": [],
-    "protogrid_environment_version": "1.4.14", 
     "result": {     "result": {
-        "next_card_key": [ 
-            "behavior", 
-            "ScriptLibrary:Server-ScriptLibrary Products", 
-            "ba9859e1-68ad-4004-b8e0-c4f0812edf20" 
-        ], 
         "rows": [         "rows": [
             {             {
                 "key": [                 "key": [
-                    "behavior", +                    "816950eb-1b70-41e2-89f5-5400f9636345", 
-                    "ScriptLibrary:Server-ScriptLibrary Next Steps", +                    "night knight PRO", 
-                    "1475e62a-47d7-4a29-98c2-c89f50edd497"+                    "night knight PRO", 
 +                    "9a5f37ab-30a7-4c91-b99f-f573a1c7d1b9"
                 ],                 ],
-                "shortname": "ScriptLibrary:Server-ScriptLibrary Next Steps", 
                 "value": null                 "value": null
             },             },
             {             {
                 "key": [                 "key": [
-                    "behavior", +                    "816950eb-1b70-41e2-89f5-5400f9636345", 
-                    "ScriptLibrary:Server-ScriptLibrary Next Steps", +                    "nightTable 2.0", 
-                    "1475e62a-47d7-4a29-98c2-c89f50edd497"+                    "nightTable 2.0 furniture", 
 +                    "f6e2f9c9-e061-46f4-ab8f-a2594c2b38ae"
                 ],                 ],
-                "shortname": "ScriptLibrary:Server-ScriptLibrary Next Steps", 
                 "value": null                 "value": null
-            }+            }
-            { +
-                "key":+
-                    "behavior", +
-                    "ScriptLibrary:Server-ScriptLibrary Products", +
-                    "ba9859e1-68ad-4004-b8e0-c4f0812edf20" +
-                ], +
-                "shortname": "ScriptLibrary:Server-ScriptLibrary Products", +
-                "value": null +
-            }, +
-            ...+
         ]         ]
     }     }
Line 291: Line 242:
 </code> </code>
  
-You might have duplicates in the code due to several occurrences of the same search term on the same Card.+==== Proto Specific Views ====
  
 +=== by_proto_and_sortstring_and_id ====
 +This view contains all non-deleted and non-hidden Cards with corresponding Proto by id. The key is composed of the Proto key, the Card sorting string and the Card key. The value is null. This view can be used to get all Cards belonging to a special Proto given the Proto key.
  
- +Example Request to get all Cards belonging to the Proto with key "12532072-0d76-4457-8cf8-7847d0470738":
-==== by_design_element_and_value_and_sortstring_and_id ==== +
-This view contains all non-deleted and non-hidden Cards by design_element, date and id. Therefore the key is composed of the key of the design element, the value of the design element, the Card sorting string and the Card key. Example:+
 <code> <code>
-["234486c7-939f-49f4-88b2-6fd51369a1d9", "Basic Toilet 2016 ", "Basic Toilet 2016 ", "d81047c2-0d92-48ee-a352-f0c8d4e63b2b"]+https://example.protogrid.com/api/v2/apps/produktekatalog/views/by_proto_and_sortstring_and_id?start_key=["12532072-0d76-4457-8cf8-7847d0470738",null,null]&end_key=["12532072-0d76-4457-8cf8-7847d0470738",{},{}]
 </code> </code>
-The value is null. 
  
-Example request to get all Cards, where the name (in my example having with fieldkey "816950eb-1b70-41e2-89f5-5400f9636345") starts with "n" or "o": +We use "null" and "{}" as boundaries for the Card key. 
-<code> +
-https://example.protogrid.com/api/v2/apps/produktekatalog/views/by_design_element_and_value_and_sortstring_and_id?start_key=["816950eb-1b70-41e2-89f5-5400f9636345", "n"null, null]&end_key=["816950eb-1b70-41e2-89f5-5400f9636345", "m", {}, {}] +
-</code>+
  
-Example response+Example respond
-<code json>+<code javascript >
 { {
     "errors": [],     "errors": [],
-    "protogrid_environment_version": "1.4.14", 
     "result": {     "result": {
         "rows": [         "rows": [
             {             {
                 "key": [                 "key": [
-                    "816950eb-1b70-41e2-89f5-5400f9636345", +                    "12532072-0d76-4457-8cf8-7847d0470738", 
-                    "night knight PRO", +                    "CWH ONE", 
-                    "night knight PRO", +                    "4bcbdb7f-89c3-4640-b04e-3bd468df7c57"
-                    "9a5f37ab-30a7-4c91-b99f-f573a1c7d1b9"+
                 ],                 ],
-                "shortname": "night knight PRO", 
                 "value": null                 "value": null
             },             },
-            +            ...
-                "key":+
-                    "816950eb-1b70-41e2-89f5-5400f9636345", +
-                    "nightTable 2.0", +
-                    "nightTable 2.0 - furniture", +
-                    "f6e2f9c9-e061-46f4-ab8f-a2594c2b38ae" +
-                ], +
-                "shortname": "nightTable 2.0 - furniture", +
-                "value": null +
-            }+
         ]         ]
     }     }
Line 339: Line 274:
 </code> </code>
  
-==== by_proto_and_design_element_and_value_and_sortstring_and_id ====+=== by_proto_and_design_element_and_sortstring_and_id ==
 + 
 +=== by_proto_and_design_element_and_value_and_sortstring_and_id ===
 This view contains all non-deleted and non-hidden Cards by  Proto, design_element, date and id. Therefore the keys is composed of the Proto key, the fieldkey of the design element, the value of the design element, the Card sorting string and the Card key. Example: This view contains all non-deleted and non-hidden Cards by  Proto, design_element, date and id. Therefore the keys is composed of the Proto key, the fieldkey of the design element, the value of the design element, the Card sorting string and the Card key. Example:
 <code> <code>
Line 348: Line 285:
 Example Request to find all Cards based on Proto "12532072-0d76-4457-8cf8-7847d0470738" whos price ("ed2c109d-a825-4b97-a0bb-31c13185408d") lies between 400 and 500: Example Request to find all Cards based on Proto "12532072-0d76-4457-8cf8-7847d0470738" whos price ("ed2c109d-a825-4b97-a0bb-31c13185408d") lies between 400 and 500:
 <code> <code>
-https://example.protogrid.com/api/v2/apps/produktekatalog/views/by_proto_and_design_element_and_value_and_sortstring_and_id?start_key=["12532072-0d76-4457-8cf8-7847d0470738","ed2c109d-a825-4b97-a0bb-31c13185408d", "400", null, null]&end_key=["12532072-0d76-4457-8cf8-7847d0470738", "ed2c109d-a825-4b97-a0bb-31c13185408d", "500", {}, {}]+https://example.protogrid.com/api/v2/apps/produktekatalog/views/by_proto_and_design_element_and_value_and_sortstring_and_id?start_key=["12532072-0d76-4457-8cf8-7847d0470738","ed2c109d-a825-4b97-a0bb-31c13185408d","400",null,null]&end_key=["12532072-0d76-4457-8cf8-7847d0470738","ed2c109d-a825-4b97-a0bb-31c13185408d","500",{},{}]
 </code> </code>
  
 Example response: Example response:
-<code json>+<code javascript >
 { {
     "errors": [],     "errors": [],
-    "protogrid_environment_version": "2.0beta7", 
     "result": {     "result": {
         "rows": [         "rows": [
Line 366: Line 302:
                     "4bcbdb7f-89c3-4640-b04e-3bd468df7c57"                     "4bcbdb7f-89c3-4640-b04e-3bd468df7c57"
                 ],                 ],
-                "shortname": "CWH ONE - toilet", 
                 "value": null                 "value": null
             },             },
Line 377: Line 312:
                     "e086c668-500b-4acf-982c-df4f3be65a6b"                     "e086c668-500b-4acf-982c-df4f3be65a6b"
                 ],                 ],
-                "shortname": "ForestFire 2016 - lawn mover", 
                 "value": null                 "value": null
             }             }
Line 385: Line 319:
 </code> </code>
  
-==== deleted_by_sortstring_and_id ==== +==== Views for Deleted Cards ====
-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_id|"by_id"]].+
  
-==== deleted_by_search_term_and_sortstring_and_id ==== +=== deleted_by_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"]].+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_design_element_and_sortstring_and_id ====+=== deleted_by_design_element_and_sortstring_and_id ===
 This view contains all deleted Cards sorted by a certain design element. The value is null. The request and response are analog to view [[#by_design_element_and_sortstring_and_id|"by_design_element_and_sortstring_and_id"]]. This view contains all deleted Cards sorted by a certain design element. The value is null. The request and response are analog to view [[#by_design_element_and_sortstring_and_id|"by_design_element_and_sortstring_and_id"]].
  
-==== deleted_by_proto_and_design_element_and_value_and_sortstring_and_id ==== +=== deleted_by_design_element_and_value_and_sortstring_and_id === 
-This view contains all deleted Cards by a certain Proto, design_element, value, sortstring and id. The value is null. The request and response are analog to view [[#by_proto_and_design_element_and_value_and_sortstring_and_id|"by_proto_and_design_element_and_value_and_sortstring_and_id"]].+This view contains all deleted Cards by a certain Proto, design_element, value, sortstring and id. The value is null. The request and response are analog to view [[#by_design_element_and_value_and_sortstring_and_id|"by_design_element_and_value_and_sortstring_and_id"]].
  
 +==== Views for Navigation in Relational Tree (Up / Down) ====
  
-==== 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 "234486c7-939f-49f4-88b2-6fd51369a1d9": Example request to find all Cards related to the Card "234486c7-939f-49f4-88b2-6fd51369a1d9":
 <code> <code>
-https://example.protogrid.com/api/v2/apps/produktekatalog/views/related_keys_by_id?keys=["234486c7-939f-49f4-88b2-6fd51369a1d9"]+https://example.protogrid.com/api/v2/apps/produktekatalog/views/related_keys_by_id?keys=[["234486c7-939f-49f4-88b2-6fd51369a1d9"]]
 </code> </code>
  
 Example response: Example response:
-<code json>+<code javascript >
 { {
     "errors": [],     "errors": [],
-    "protogrid_environment_version": "1.4.15", 
     "result": {     "result": {
         "rows": [         "rows": [
             {             {
-                "key": "234486c7-939f-49f4-88b2-6fd51369a1d9", +                "key": 
-                "shortname": "name",+                    "234486c7-939f-49f4-88b2-6fd51369a1d9" 
 +                ],
                 "value": [                 "value": [
                     [                     [
Line 462: Line 394:
 </code> </code>
  
-==== relating_cards_by_related_key ====+=== relating_cards_by_related_key_and_id ===
 This view contains all Relating Cards of the (Related) Card specified by key. The key is composed of the Related Card key and the Relating Card key. The value is null. This view contains all Relating Cards of the (Related) Card specified by key. The key is composed of the Related Card key and the Relating Card key. The value is null.
  
 Example request to find all Cards relating to the (Related) Card with key "626f04f7-179d-40d7-99f0-9e54343abf98": Example request to find all Cards relating to the (Related) Card with key "626f04f7-179d-40d7-99f0-9e54343abf98":
 <code> <code>
-https://example.protogrid.com/api/v2/apps/produktekatalog/views/relating_cards_by_related_key?start_key=["626f04f7-179d-40d7-99f0-9e54343abf98", null]&end_key=["626f04f7-179d-40d7-99f0-9e54343abf98", {}]+https://example.protogrid.com/api/v2/apps/produktekatalog/views/relating_cards_by_related_key_and_id?start_key=["626f04f7-179d-40d7-99f0-9e54343abf98",null]&end_key=["626f04f7-179d-40d7-99f0-9e54343abf98",{}]
 </code> </code>
  
 Example response: Example response:
-<code json>+<code javascript >
 { {
     "errors": [],     "errors": [],
-    "protogrid_environment_version": "1.4.15", 
     "result": {     "result": {
         "rows": [         "rows": [
Line 482: Line 413:
                     "00ded64d-5e1b-42a1-a61e-f8e46c0c552a"                     "00ded64d-5e1b-42a1-a61e-f8e46c0c552a"
                 ],                 ],
-                "shortname": "Liguan 2.0 TDI", 
                 "value": null                 "value": null
             },             },
Line 490: Line 420:
                     "50a9098b-bd4e-47fe-9e99-7d8f1d43517a"                     "50a9098b-bd4e-47fe-9e99-7d8f1d43517a"
                 ],                 ],
-                "shortname": "Paolo Schnuffi - wishes a callback ", 
                 "value": null                 "value": null
             },             },
Line 498: Line 427:
                     "5d068708-9546-4536-94c6-da27b6a909b2"                     "5d068708-9546-4536-94c6-da27b6a909b2"
                 ],                 ],
-                "shortname": "Freddie Mac - wishes a callback  - nightTable 2.0", 
                 "value": null                 "value": null
             },             },
Line 506: Line 434:
                     "fa6f178c-a398-4852-a3b3-7e66978c9a65"                     "fa6f178c-a398-4852-a3b3-7e66978c9a65"
                 ],                 ],
-                "shortname": "EcoDischarger", 
                 "value": null                 "value": null
             },             },
Line 514: Line 441:
                     "fbf79fc6-2da1-41f2-9954-1606dbe3fa01"                     "fbf79fc6-2da1-41f2-9954-1606dbe3fa01"
                 ],                 ],
-                "shortname": "Liguan 2.0 TDI", 
                 "value": null                 "value": null
             }             }
Line 521: Line 447:
 } }
 </code> </code>
-==== tableview_data_by_id ====+ 
 +==== Views for Direct Human Readable Presentation ==== 
 + 
 +=== tableview_data_by_id ===
 This view contains all Cards contained in a tableview by id. The value contains the raw card.  This view contains all Cards contained in a tableview by id. The value contains the raw card. 
  
Line 530: Line 459:
  
 Example response: Example response:
-<code json>+<code javascript >
 { {
     "errors": [],     "errors": [],
-    "protogrid_environment_version": "1.4.15", 
     "result": {     "result": {
         "rows": [         "rows": [
             {             {
-                "key": "5f12ccf6-9de0-4796-d366-106e4b7b8af9", +                "key": 
-                "shortname": "Card: 5f12ccf6-9de0-4796-d366-106e4b7b8af9",+                    "5f12ccf6-9de0-4796-d366-106e4b7b8af9" 
 +                ],
                 "value": {                 "value": {
                     "#": [                     "#": [
Line 579: Line 508:
 </code> </code>
  
- +=== shortname_objects_by_id === 
-==== shortname_by_language_objects_by_id ==== +This view contains all Cards which contain shortname data by id. The value contains the shortnames by language.
-This view contains all Cards which contains shortname data by id. The value contains the shortnames by language.+
  
 Example request to get the shortnames of the Card with key "a0e6717f-c613-404a-bc08-a090311c651c": Example request to get the shortnames of the Card with key "a0e6717f-c613-404a-bc08-a090311c651c":
 <code> <code>
-https://example.protogrid.com/api/v2/apps/produktekatalog/views/shortname_by_language_objects_by_id?keys=[["a0e6717f-c613-404a-bc08-a090311c651c"]]+https://example.protogrid.com/api/v2/apps/produktekatalog/views/shortname_objects_by_id?keys=[["a0e6717f-c613-404a-bc08-a090311c651c"]]
 </code> </code>
  
 Example response: Example response:
-<code json>+<code javascript >
 { {
     "errors": [],     "errors": [],
-    "protogrid_environment_version": "1.4.15", 
     "result": {     "result": {
         "rows": [         "rows": [
             {             {
-                "key": "a0e6717f-c613-404a-bc08-a090311c651c", +                "key": 
-                "shortname": "Priscilla Molesworth - wishes an offer",+                    "a0e6717f-c613-404a-bc08-a090311c651c" 
 +                ],
                 "value": {                 "value": {
                     "de": "Priscilla Molesworth - wishes an offer",                     "de": "Priscilla Molesworth - wishes an offer",
Line 607: Line 535:
 } }
 </code> </code>
- 
- 
  
 ===== Views of Dedicated Search Dialog Boxes ===== ===== Views of Dedicated Search Dialog Boxes =====
 It is also possible to access the views of dedicated [[protogrid:TableView#Search Dialog Boxes|Search Dialog Box]] from the JSON API. Just use the Card ID of the Search Dialog Box as view name. It is also possible to access the views of dedicated [[protogrid:TableView#Search Dialog Boxes|Search Dialog Box]] from the JSON API. Just use the Card ID of the Search Dialog Box as view name.
 +
 +Hint: For straight forward API usage in most cases it is recommended to use Search Dialog Boxes in "Simple Keys in JSON API only" display mode.
 +
 +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: "2021-11-11T00:00:00.000Z"). If the date-time value is configured as a sort field or filter field with range (greater/less than option enabled), the time portion is left as it is (example: "2021-11-11T22:22:00.000Z").
  
 Example Request: Example Request:
Line 619: 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 "descending" parameter set to true "start_key" and "end_key" must now be exchanged.
 +  - 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 "\u0009" instead of "\u9999".
 +  - All views: The second last column "sortstring" is now indexed in a shorter manner: "<SORTSTRING>" instead of "<PROTO KEY>\u9999<SORTSTRING>\u9999<CARD KEY>"
 +  - 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:00:00.000Z”). If the date-time value is configured as a sort field or filter field with range (greater/less than option enabled), the time portion is left as it is (example: “2021-11-11T22:22:00.000Z”).
 +  - Dedicated Search Boxes with "sortable" display mode: Columns are now indexed in a shorter manner:
 +    * For Relation/Tag Field values: "< SORTSTRING >\u0009<KEY>" instead of "<SORTSTRING>\u9999<KEY>\u9999<KEY>"
 +    * For other field values: "<VALUE>" instead of "\u9999<VALUE>\u9999<VALUE>"
 +    * 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 "by_design_element_and_sortstring_and_id", "by_proto_and_design_element_and_sortstring_and_id" and "deleted_by_design_element_and_sortstring_and_id" the design element's sortstrings are now indexed in a shorter manner:
 +    * For Relation/Tag Field values: "< SORTSTRING >\u0009<KEY>" instead of "<SORTSTRING>\u9999<KEY>\u9999<KEY>"
 +    * For other field values: "<VALUE>" instead of "\u9999<VALUE>\u9999<VALUE>"
 +    * Note: If you don't explicitly need sorting by design element value is anyway recommended to use the views "by_design_element_and_value_and_sortstring_and_id", by_proto_and_design_element_and_value_and_sortstring_and_id"" or "deleted_by_design_element_and_value_and_sortstring_and_id".
 +  - In views "by_design_element_and_sortstring_and_id", "by_proto_and_design_element_and_sortstring_and_id" and "deleted_by_design_element_and_sortstring_and_id" there is a new column for the Card's sortstring after the design element's sortstring. Example:
 +    * 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"]
 +
 +==== 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