{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":721,"path":"api-reference/server-api-reference/CdmQueryScopedAPI.md","title":"CdmQuery - Scoped","bundle":null,"doc_type":null,"release":"australia","body":"\n# CdmQuery- Scoped\n\nThe CdmQuery script include provides methods that enable you to query the CDM data model tree. It returns a list of node objects that are specific fields/columns in the CDM Node \\[sn\\_cdm\\_node\\] table. These values are returned as properties in the object. Every object is a node in the data model.\n\nThis script include is fluent which means most of its methods support chaining and return a CdmQuery object. The methods within this script include are classified into different types. You must specify them in a particular order within a call, based on their type. All methods except the result methods are chainable.\n\n**Note:** This documentation only covers the usage of the CdmQuery script include in querying snapshot data, therefore, only methods necessary for this process are currently documented. Querying snapshot data is needed when writing PaCE policy scripts for data validation and CDM exporter scripts for data export.\n\nMethod types:\n\n-   entry method: This method specifies the entry node. CdmQuery limits its query to the entry node and its descendant nodes. Specifying the entry node is mandatory.\n\n    [CdmQuery - snapshotId\\(String snapshotSysID\\)](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/CdmQueryScopedAPI.md)\n\n-   query method: This method executes the specified query.\n\n    [CdmQuery - query\\(\\)](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/CdmQueryScopedAPI.md)\n\n-   result methods: These methods return a specific set of results data.\n    -   [CdmQuery - forEach\\(Function function\\)](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/CdmQueryScopedAPI.md)\n    -   [CdmQuery - getTree\\(Boolean simpleTree, Boolean prettify\\)](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/CdmQueryScopedAPI.md)\n    -   [CdmQuery - getValue\\(String fieldName\\)](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/CdmQueryScopedAPI.md)\n    -   [CdmQuery - next\\(\\)](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/CdmQueryScopedAPI.md)\n-   setting methods: These methods modify the behavior of CdmQuery\\(\\).\n    -   [CdmQuery - decryptPassword\\(Boolean decrypt\\)](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/CdmQueryScopedAPI.md)\n    -   [CdmQuery - followIncludes\\(Boolean followIncludes\\)](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/CdmQueryScopedAPI.md)\n    -   [CdmQuery - includeFileMetadata\\(\\)](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/CdmQueryScopedAPI.md)\n    -   [CdmQuery - substituteVariable\\(Boolean substitute\\)](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/CdmQueryScopedAPI.md)\n    -   [CdmQuery - useCache\\(Boolean useCache\\)](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/CdmQueryScopedAPI.md)\n\nThe snapshotId\\(\\) and query\\(\\) methods are mandatory. You must add filter and setting methods before the query\\(\\) method, but after the snapshotId\\(\\) method. The order in which you add filter and setting methods is not important, unless they are conflicting, in which case the latest relevant method prevails. You must add any result methods, such as getTree\\(\\) to fetch the result, after the query\\(\\) method.\n\nFor example:\n\n```\nvar primarySnapshot = new sn_cdm.CdmQuery()\n  .snapshotId(\"1a2fe2e6c3a27010cc0a259d7640dd59\")\n  .decryptPassword(true)\n  .includeFileMetadata()\n  .query()\n  .getTree(true, false);\n```\n\nThis API runs in the `sn_cdm` namespace and you must have the sn\\_cdm.cdm\\_viewer or sn\\_cdm.cdm\\_secrets roles to access its various methods.\n\n**Parent Topic:**[Server API reference](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/api-server.md)\n\n## CdmQuery - CdmQuery\\(\\)\n\nInstantiates a CdmQuery object. You must call this method prior to calling any other CdmQuery methods.\n\n|Name|Type|Description|\n|----|----|-----------|\n|None| ||\n\nThe following code examples shows how to call the CdmQuery method to instantiate a CdmQuery object in the sn\\_cdm namespace.\n\n```\nvar primarySnapshot = new sn_cdm.CdmQuery()\n.snapshotId(\"1a2fe2e6c3a27010cc0a259d7640dd59\")\n.decryptPassword(true)\n.query()\n.getTree();\n```\n\n## CdmQuery - decryptPassword\\(Boolean decrypt\\)\n\nEnables you to specify whether decrypted values for encrypted configuration data item \\(CDI\\) and variable nodes are returned in the results.\n\nAn error is thrown if the user does not have the required sn\\_cdm.cdm\\_secrets role.\n\n<table id=\"table_lwv_kkz_5wb\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\ndecrypt\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nOptional. Flag that indicates whether to return decrypted values for the CDI and variable nodes.Valid values:\n\n-   true: Return decrypted values for the CDI and variable nodes.\n-   false: Return encrypted values for the CDI and variable nodes.\n\nDefault: false\n\n</td></tr></tbody>\n</table>|Type|Description|\n|----|-----------|\n|None| |\n\nThe following code example shows how to call the CdmQuery\\(\\) API and specify to return encrypted values for the CDI and variable nodes.\n\n```\nvar primarySnapshot = new sn_cdm.CdmQuery()\n.snapshotId(\"9f12a80047352150fd6ce977746d4364\")\n.decryptPassword(false)\n.query()\n.getTree(true,true);\n\ngs.info(primarySnapshot);\n```\n\nReturn results:\n\n```\n{\n  \"Development_1\": {\n    \"vars\": {},\n    \"services\": {\n      \"vars\": {},\n      \"paymentComponent\": {\n        \"applicationSLA\": \"24x7\",\n        \"paymentService\": {\n          \"database\": {\n            \"backup\": {\n              \"dbServer\": \"db23.paymentx.be\"\n            },\n            \"dbIpAddress\": \"10.20.40.50\",\n            \"dbName\": \"paymentX_dev2\",\n            \"dbPort\": \"8050\",\n            \"dbServer\": \"db22.paymentx.be\",\n            \"dbUserName\": \"root\",\n            \"dbPassword\": \"*******\"\n          }\n        }\n      }\n    }\n  }\n}\n```\n\nThe following code example shows how to call the CdmQuery\\(\\) API and specify to return decrypted values for the CDI and variable nodes.\n\n```\nvar primarySnapshot = new sn_cdm.CdmQuery()\n.snapshotId(\"9f12a80047352150fd6ce977746d4364\")\n.decryptPassword(true)\n.query()\n.getTree(true,true);\n\ngs.info(primarySnapshot);\n```\n\nReturn results:\n\n```\n{\n  \"Development_1\": {\n    \"vars\": {},\n    \"services\": {\n      \"vars\": {},\n      \"paymentComponent\": {\n        \"applicationSLA\": \"24x7\",\n        \"paymentService\": {\n          \"database\": {\n            \"backup\": {\n              \"dbServer\": \"db23.paymentx.be\"\n            },\n            \"dbIpAddress\": \"10.20.40.50\",\n            \"dbName\": \"paymentX_dev2\",\n            \"dbPort\": \"8050\",\n            \"dbServer\": \"db22.paymentx.be\",\n            \"dbUserName\": \"root\",\n            \"dbPassword\": \"dev1-password\"\n          }\n        }\n      }\n    }\n  }\n}\n```\n\n## CdmQuery - followIncludes\\(Boolean followIncludes\\)\n\nEnables you to specify whether linked nodes are fully resolved, such that descendant nodes of a referenced node appear under a linked node.\n\n<table id=\"table_ebw_4xz_5wb\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nfollowIncludes\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nOptional. Flag that indicates whether linked nodes are fully resolved.Valid values:\n\n-   true: Linked nodes are fully resolved.\n-   false: Linked nodes are not fully resolved.\n\nDefault: true\n\n</td></tr></tbody>\n</table>|Type|Description|\n|----|-----------|\n|None| |\n\nThe following code example shows how to return data that is fully resolved, **followIncludes** = true.\n\n```\nvar primarySnapshot = new sn_cdm.CdmQuery()\n  .snapshotId(\"9f12a80047352150fd6ce977746d4364\")\n  .followIncludes(true)\n  .query()\n  .getTree(false, true);\n```\n\nExample return data:\n\n```\n{\n  \"sys_id\": \"62a0a0cc47f12150fd6ce977746d431a\",\n  \"type\": \"sn_cdm_node_deployable\",\n  \"main_id\": \"111673\",\n  \"name\": \"Development_1\",\n  \"node_path\": \"!K<+!K<0!K<1\",\n  \"effective_path\": \"!K<+!K<0!K<1\",\n  \"main_id_encoded\": \"K<1\",\n  \"node_classifier\": \"/application/deployables/env:Development\",\n  \"status\": \"valid\",\n  \"level\": \"2\",\n  \"children\": [\n    {\n      \"sys_id\": \"2aa0a0cc47f12150fd6ce977746d431a\",\n      \"type\": \"sn_cdm_node_folder\",\n      \"main_id\": \"111674\",\n      \"name\": \"vars\",\n      \"node_path\": \"!K<+!K<0!K<1!K<2\",\n      \"effective_path\": \"!K<+!K<0!K<1!K<2\",\n      \"main_id_encoded\": \"K<2\",\n      \"node_classifier\": \"/application/deployables/env:Development/vars\",\n      \"status\": \"valid\",\n      \"level\": \"3\",\n      \"children\": [],\n      \"hasParent\": true\n    },\n    {\n      \"sys_id\": \"2ca1600047352150fd6ce977746d4391\",\n      \"type\": \"sn_cdm_node_linked\",\n      \"main_id\": \"111693\",\n      \"name\": \"services\",\n      \"node_path\": \"!K<+!K<0!K<1!K<G\",\n      \"effective_path\": \"!K<+!K<0!K<1!K<G\",\n      \"main_id_encoded\": \"K<G\",\n      \"node_classifier\": \"/application/deployables/env:Development\",\n      \"status\": \"valid\",\n      \"level\": \"3\",\n      \"children\": [\n        {\n          \"sys_id\": \"2bb0e0cc47f12150fd6ce977746d43e2\",\n          \"type\": \"sn_cdm_node_folder\",\n          \"main_id\": \"111680\",\n          \"name\": \"vars\",\n          \"node_path\": \"!K<+!K</!K<7!K<8\",\n          \"effective_path\": \"!K<+!K<0!K<1!K<G!K<8\",\n          \"main_id_encoded\": \"K<8\",\n          \"node_classifier\": \"/application/collections/vars\",\n          \"status\": \"valid\",\n          \"level\": \"3\",\n          \"children\": [],\n          \"hasParent\": true\n        },\n        {\n          \"sys_id\": \"ccf1640047352150fd6ce977746d438b\",\n          \"type\": \"sn_cdm_node_component\",\n          \"main_id\": \"111697\",\n          \"name\": \"paymentComponent\",\n          \"node_path\": \"!K<+!K<0!K<1!K<G!K<K\",\n          \"effective_path\": \"!K<+!K<0!K<1!K<G!K<K\",\n          \"main_id_encoded\": \"K<K\",\n          \"node_classifier\": \"/application/deployables/env:Development\",\n          \"status\": \"valid\",\n          \"level\": \"4\",\n          \"children\": [\n            {\n              \"sys_id\": \"7fd064cc47f12150fd6ce977746d4372\",\n              \"type\": \"sn_cdm_node_cdi\",\n              \"main_id\": \"111682\",\n              \"name\": \"applicationSLA\",\n              \"node_path\": \"!K<+!K<,!K<9!K<:\",\n              \"value\": \"24x7\",\n              \"effective_path\": \"!K<+!K<0!K<1!K<G!K<K!K<:\",\n              \"main_id_encoded\": \"K<:\",\n              \"node_classifier\": \"/application/components\",\n              \"status\": \"valid\",\n              \"level\": \"3\",\n              \"children\": [],\n              \"hasParent\": true\n            },\n            {\n              \"sys_id\": \"44f1a40047352150fd6ce977746d43dc\",\n              \"type\": \"sn_cdm_node_component\",\n              \"main_id\": \"111698\",\n              \"name\": \"paymentService\",\n              \"node_path\": \"!K<+!K<0!K<1!K<G!K<K!K<L\",\n              \"effective_path\": \"!K<+!K<0!K<1!K<G!K<K!K<L\",\n              \"main_id_encoded\": \"K<L\",\n              \"node_classifier\": \"/application/deployables/env:Development\",\n              \"status\": \"valid\",\n              \"level\": \"5\",\n              \"children\": [\n                {\n                  \"sys_id\": \"8cf1a40047352150fd6ce977746d43dc\",\n                  \"type\": \"sn_cdm_node_component\",\n                  \"main_id\": \"111699\",\n                  \"name\": \"database\",\n                  \"node_path\": \"!K<+!K<0!K<1!K<G!K<K!K<L!K<M\",\n                  \"effective_path\": \"!K<+!K<0!K<1!K<G!K<K!K<L!K<M\",\n                  \"main_id_encoded\": \"K<M\",\n                  \"node_classifier\": \"/application/deployables/env:Development\",\n                  \"status\": \"valid\",\n                  \"level\": \"6\",\n                  \"children\": [\n                    {\n                      \"sys_id\": \"b3d064cc47f12150fd6ce977746d4374\",\n                      \"type\": \"sn_cdm_node_component\",\n                      \"main_id\": \"111685\",\n                      \"name\": \"backup\",\n                      \"node_path\": \"!K<+!K<,!K<9!K<;!K<<!K<?\",\n                      \"effective_path\": \"!K<+!K<0!K<1!K<G!K<K!K<L!K<M!K<?\",\n                      \"main_id_encoded\": \"K<?\",\n                      \"node_classifier\": \"/application/components\",\n                      \"status\": \"valid\",\n                      \"level\": \"5\",\n                      \"children\": [\n                        {\n                          \"sys_id\": \"7bd064cc47f12150fd6ce977746d4374\",\n                          \"type\": \"sn_cdm_node_cdi\",\n                          \"main_id\": \"111686\",\n                          \"name\": \"dbServer\",\n                          \"node_path\": \"!K<+!K<,!K<9!K<;!K<<!K<?!K<@\",\n                          \"value\": \"db23.paymentx.be\",\n                          \"effective_path\": \"!K<+!K<0!K<1!K<G!K<K!K<L!K<M!K<?!K<@\",\n                          \"main_id_encoded\": \"K<@\",\n                          \"node_classifier\": \"/application/components\",\n                          \"status\": \"valid\",\n                          \"level\": \"6\",\n                          \"children\": [],\n                          \"hasParent\": true\n                        }\n                      ],\n                      \"hasParent\": true\n                    },\n                    {\n                      \"sys_id\": \"33d064cc47f12150fd6ce977746d4375\",\n                      \"type\": \"sn_cdm_node_cdi\",\n                      \"main_id\": \"111687\",\n                      \"name\": \"dbIpAddress\",\n                      \"node_path\": \"!K<+!K<,!K<9!K<;!K<<!K<A\",\n                      \"value\": \"10.20.40.50\",\n                      \"effective_path\": \"!K<+!K<0!K<1!K<G!K<K!K<L!K<M!K<A\",\n                      \"main_id_encoded\": \"K<A\",\n                      \"node_classifier\": \"/application/components\",\n                      \"status\": \"valid\",\n                      \"level\": \"5\",\n                      \"children\": [],\n                      \"hasParent\": true\n                    },\n                    {\n                      \"sys_id\": \"f7d064cc47f12150fd6ce977746d4375\",\n                      \"type\": \"sn_cdm_node_cdi\",\n                      \"main_id\": \"111688\",\n                      \"name\": \"dbName\",\n                      \"node_path\": \"!K<+!K<,!K<9!K<;!K<<!K<B\",\n                      \"value\": \"paymentX_dev2\",\n                      \"effective_path\": \"!K<+!K<0!K<1!K<G!K<K!K<L!K<M!K<B\",\n                      \"main_id_encoded\": \"K<B\",\n                      \"node_classifier\": \"/application/components\",\n                      \"status\": \"valid\",\n                      \"level\": \"5\",\n                      \"children\": [],\n                      \"hasParent\": true\n                    },\n                    {\n                      \"sys_id\": \"77d064cc47f12150fd6ce977746d4376\",\n                      \"type\": \"sn_cdm_node_cdi\",\n                      \"main_id\": \"111690\",\n                      \"name\": \"dbPort\",\n                      \"node_path\": \"!K<+!K<,!K<9!K<;!K<<!K<D\",\n                      \"value\": \"8050\",\n                      \"effective_path\": \"!K<+!K<0!K<1!K<G!K<K!K<L!K<M!K<D\",\n                      \"main_id_encoded\": \"K<D\",\n                      \"node_classifier\": \"/application/components\",\n                      \"status\": \"valid\",\n                      \"level\": \"5\",\n                      \"children\": [],\n                      \"hasParent\": true\n                    },\n                    {\n                      \"sys_id\": \"3fd064cc47f12150fd6ce977746d4376\",\n                      \"type\": \"sn_cdm_node_cdi\",\n                      \"main_id\": \"111691\",\n                      \"name\": \"dbServer\",\n                      \"node_path\": \"!K<+!K<,!K<9!K<;!K<<!K<E\",\n                      \"value\": \"db22.paymentx.be\",\n                      \"effective_path\": \"!K<+!K<0!K<1!K<G!K<K!K<L!K<M!K<E\",\n                      \"main_id_encoded\": \"K<E\",\n                      \"node_classifier\": \"/application/components\",\n                      \"status\": \"valid\",\n                      \"level\": \"5\",\n                      \"children\": [],\n                      \"hasParent\": true\n                    },\n                    {\n                      \"sys_id\": \"f3d064cc47f12150fd6ce977746d4377\",\n                      \"type\": \"sn_cdm_node_cdi\",\n                      \"main_id\": \"111692\",\n                      \"name\": \"dbUserName\",\n                      \"node_path\": \"!K<+!K<,!K<9!K<;!K<<!K<F\",\n                      \"value\": \"root\",\n                      \"effective_path\": \"!K<+!K<0!K<1!K<G!K<K!K<L!K<M!K<F\",\n                      \"main_id_encoded\": \"K<F\",\n                      \"node_classifier\": \"/application/components\",\n                      \"status\": \"valid\",\n                      \"level\": \"5\",\n                      \"children\": [],\n                      \"hasParent\": true\n                    },\n                    {\n                      \"sys_id\": \"c4f1a40047352150fd6ce977746d43dd\",\n                      \"type\": \"sn_cdm_node_cdi\",\n                      \"main_id\": \"111700\",\n                      \"name\": \"dbPassword\",\n                      \"node_path\": \"!K<+!K<0!K<1!K<G!K<K!K<L!K<M!K<N\",\n                      \"secure_value\": \"﷞﷟﷒dac329a2476c6110fd6ce977746d43e1﷬﷔1﷬﷭w8YJ85PO5byT5YNmeG_HwQ==WrNQP39n-PWKFs_VXFSjr3TJsGxS1ESKpyl4PUE=﷮﷯\",\n                      \"effective_path\": \"!K<+!K<0!K<1!K<G!K<K!K<L!K<M!K<N\",\n                      \"main_id_encoded\": \"K<N\",\n                      \"node_classifier\": \"/application/deployables/env:Development\",\n                      \"status\": \"valid\",\n                      \"level\": \"7\",\n                      \"masked_value\": \"*******\",\n                      \"children\": [],\n                      \"hasParent\": true\n                    }\n                  ],\n                  \"hasParent\": true\n                }\n              ],\n              \"hasParent\": true\n            }\n          ],\n          \"hasParent\": true\n        }\n      ],\n      \"hasParent\": true\n    }\n  ]\n}\n```\n\nThe following code example shows how to return data that is not fully resolved, **followIncludes** = false.\n\n```\nvar primarySnapshot = new sn_cdm.CdmQuery()\n  .snapshotId(\"9f12a80047352150fd6ce977746d4364\")\n  .followIncludes(false)\n  .query()\n  .getTree(false, true);\n```\n\nExample return data:\n\n```\n{\n  \"sys_id\": \"62a0a0cc47f12150fd6ce977746d431a\",\n  \"type\": \"sn_cdm_node_deployable\",\n  \"main_id\": \"111673\",\n  \"name\": \"Development_1\",\n  \"node_path\": \"!K<+!K<0!K<1\",\n  \"effective_path\": \"!K<+!K<0!K<1\",\n  \"main_id_encoded\": \"K<1\",\n  \"node_classifier\": \"/application/deployables/env:Development\",\n  \"status\": \"valid\",\n  \"level\": \"2\",\n  \"children\": [\n    {\n      \"sys_id\": \"2aa0a0cc47f12150fd6ce977746d431a\",\n      \"type\": \"sn_cdm_node_folder\",\n      \"main_id\": \"111674\",\n      \"name\": \"vars\",\n      \"node_path\": \"!K<+!K<0!K<1!K<2\",\n      \"effective_path\": \"!K<+!K<0!K<1!K<2\",\n      \"main_id_encoded\": \"K<2\",\n      \"node_classifier\": \"/application/deployables/env:Development/vars\",\n      \"status\": \"valid\",\n      \"level\": \"3\",\n      \"children\": [],\n      \"hasParent\": true\n    },\n    {\n      \"sys_id\": \"2ca1600047352150fd6ce977746d4391\",\n      \"type\": \"sn_cdm_node_linked\",\n      \"main_id\": \"111693\",\n      \"name\": \"services\",\n      \"node_path\": \"!K<+!K<0!K<1!K<G\",\n      \"effective_path\": \"!K<+!K<0!K<1!K<G\",\n      \"main_id_encoded\": \"K<G\",\n      \"node_classifier\": \"/application/deployables/env:Development\",\n      \"status\": \"valid\",\n      \"level\": \"3\",\n      \"children\": [\n        {\n          \"sys_id\": \"ccf1640047352150fd6ce977746d438b\",\n          \"type\": \"sn_cdm_node_component\",\n          \"main_id\": \"111697\",\n          \"name\": \"paymentComponent\",\n          \"node_path\": \"!K<+!K<0!K<1!K<G!K<K\",\n          \"effective_path\": \"!K<+!K<0!K<1!K<G!K<K\",\n          \"main_id_encoded\": \"K<K\",\n          \"node_classifier\": \"/application/deployables/env:Development\",\n          \"status\": \"valid\",\n          \"level\": \"4\",\n          \"children\": [\n            {\n              \"sys_id\": \"44f1a40047352150fd6ce977746d43dc\",\n              \"type\": \"sn_cdm_node_component\",\n              \"main_id\": \"111698\",\n              \"name\": \"paymentService\",\n              \"node_path\": \"!K<+!K<0!K<1!K<G!K<K!K<L\",\n              \"effective_path\": \"!K<+!K<0!K<1!K<G!K<K!K<L\",\n              \"main_id_encoded\": \"K<L\",\n              \"node_classifier\": \"/application/deployables/env:Development\",\n              \"status\": \"valid\",\n              \"level\": \"5\",\n              \"children\": [\n                {\n                  \"sys_id\": \"8cf1a40047352150fd6ce977746d43dc\",\n                  \"type\": \"sn_cdm_node_component\",\n                  \"main_id\": \"111699\",\n                  \"name\": \"database\",\n                  \"node_path\": \"!K<+!K<0!K<1!K<G!K<K!K<L!K<M\",\n                  \"effective_path\": \"!K<+!K<0!K<1!K<G!K<K!K<L!K<M\",\n                  \"main_id_encoded\": \"K<M\",\n                  \"node_classifier\": \"/application/deployables/env:Development\",\n                  \"status\": \"valid\",\n                  \"level\": \"6\",\n                  \"children\": [\n                    {\n                      \"sys_id\": \"c4f1a40047352150fd6ce977746d43dd\",\n                      \"type\": \"sn_cdm_node_cdi\",\n                      \"main_id\": \"111700\",\n                      \"name\": \"dbPassword\",\n                      \"node_path\": \"!K<+!K<0!K<1!K<G!K<K!K<L!K<M!K<N\",\n                      \"secure_value\": \"﷞﷟﷒dac329a2476c6110fd6ce977746d43e1﷬﷔1﷬﷭w8YJ85PO5byT5YNmeG_HwQ==WrNQP39n-PWKFs_VXFSjr3TJsGxS1ESKpyl4PUE=﷮﷯\",\n                      \"effective_path\": \"!K<+!K<0!K<1!K<G!K<K!K<L!K<M!K<N\",\n                      \"main_id_encoded\": \"K<N\",\n                      \"node_classifier\": \"/application/deployables/env:Development\",\n                      \"status\": \"valid\",\n                      \"level\": \"7\",\n                      \"masked_value\": \"*******\",\n                      \"children\": [],\n                      \"hasParent\": true\n                    }\n                  ],\n                  \"hasParent\": true\n                }\n              ],\n              \"hasParent\": true\n            }\n          ],\n          \"hasParent\": true\n        }\n      ],\n      \"hasParent\": true\n    }\n  ]\n}\n```\n\n## CdmQuery - forEach\\(Function function\\)\n\nIterates through each of the result nodes and applies the provided function that accepts a CdmNode object.\n\n|Name|Type|Description|\n|----|----|-----------|\n|function|Function|Function to apply to the CdmNode object.|\n\n|Type|Description|\n|----|-----------|\n|None| |\n\nThis code example shows how to call the forEach\\(\\) method.\n\n```\nCdmQuery.forEach(function (node) {\n  gs.info(\"Node - {0}:{1} \", [node.getValue(\"name\"), node.getValue(\"value\")]);\n});\n```\n\n## CdmQuery - getTree\\(Boolean simpleTree, Boolean prettify\\)\n\nReturns the specified CDM query results.\n\nYou can specify the level and format of the content to return by setting the associated flags within the call. The default is to return a formatted string containing the node metadata and its child nodes, and where the entry node is the top node.\n\n<table id=\"table_pfp_ywf_vwb\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nsimpleTree\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nOptional. Flag that indicates the level of content to return.Valid values:\n\n-   true: Returns a simplified JSON object of hierarchical key-values pairs, excluding all node metadata.\n-   false: Returns a JSON object containing the node metadata and all its child nodes, and specifies where the entry node is the top node.\n\nDefault: false\n\n</td></tr><tr><td>\n\nprettify\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nOptional. Flag that indicates whether to return a formatted string instead of a JSON object.Valid values:\n\n-   true: Return the content in a JSON object.\n-   false: Return the content as a formatted string. Only use this option in UI and exporters as it adds new line and escape characters to the response.\n\nDefault: false\n\n</td></tr></tbody>\n</table>|Type|Description|\n|----|-----------|\n|CdmQuery|CdmQuery object containing the specified query information.|\n\nThe following code example shows how to call the getTree\\(\\) method using the default settings. This returns a formatted string containing the node metadata and all its child nodes.\n\n```\nvar primarySnapshot = new sn_cdm.CdmQuery()\n  .snapshotId(\"9f12a80047352150fd6ce977746d4364\")\n  .query()\n  .getTree();\n\ngs.info(JSON.stringify(primarySnapshot));\n```\n\nReturn results:\n\n```\n{\"sys_id\":\"62a0a0cc47f12150fd6ce977746d431a\",\"type\":\"sn_cdm_node_deployable\",\"main_id\":\"111673\",\"name\":\"Development_1\",\"node_path\":\"!K<+!K<0!K<1\",\"effective_path\":\"!K<+!K<0!K<1\",\"main_id_encoded\":\"K<1\",\"node_classifier\":\"/application/deployables/env:Development\",\"status\":\"valid\",\"level\":\"2\",\"children\":[{\"sys_id\":\"2aa0a0cc47f12150fd6ce977746d431a\",\"type\":\"sn_cdm_node_folder\",\"main_id\":\"111674\",\"name\":\"vars\",\"node_path\":\"!K<+!K<0!K<1!K<2\",\"effective_path\":\"!K<+!K<0!K<1!K<2\",\"main_id_encoded\":\"K<2\",\"node_classifier\":\"/application/deployables/env:Development/vars\",\"status\":\"valid\",\"level\":\"3\",\"children\":[],\"hasParent\":true},{\"sys_id\":\"2ca1600047352150fd6ce977746d4391\",\"type\":\"sn_cdm_node_linked\",\"main_id\":\"111693\",\"name\":\"services\",\"node_path\":\"!K<+!K<0!K<1!K<G\",\"effective_path\":\"!K<+!K<0!K<1!K<G\",\"main_id_encoded\":\"K<G\",\"node_classifier\":\"/application/deployables/env:Development\",\"status\":\"valid\",\"level\":\"3\",\"children\":[{\"sys_id\":\"2bb0e0cc47f12150fd6ce977746d43e2\",\"type\":\"sn_cdm_node_folder\",\"main_id\":\"111680\",\"name\":\"vars\",\"node_path\":\"!K<+!K</!K<7!K<8\",\"effective_path\":\"!K<+!K<0!K<1!K<G!K<8\",\"main_id_encoded\":\"K<8\",\"node_classifier\":\"/application/collections/vars\",\"status\":\"valid\",\"level\":\"3\",\"children\":[],\"hasParent\":true},{\"sys_id\":\"ccf1640047352150fd6ce977746d438b\",\"type\":\"sn_cdm_node_component\",\"main_id\":\"111697\",\"name\":\"paymentComponent\",\"node_path\":\"!K<+!K<0!K<1!K<G!K<K\",\"effective_path\":\"!K<+!K<0!K<1!K<G!K<K\",\"main_id_encoded\":\"K<K\",\"node_classifier\":\"/application/deployables/env:Development\",\"status\":\"valid\",\"level\":\"4\",\"children\":[{\"sys_id\":\"7fd064cc47f12150fd6ce977746d4372\",\"type\":\"sn_cdm_node_cdi\",\"main_id\":\"111682\",\"name\":\"applicationSLA\",\"node_path\":\"!K<+!K<,!K<9!K<:\",\"value\":\"24x7\",\"effective_path\":\"!K<+!K<0!K<1!K<G!K<K!K<:\",\"main_id_encoded\":\"K<:\",\"node_classifier\":\"/application/components\",\"status\":\"valid\",\"level\":\"3\",\"children\":[],\"hasParent\":true},{\"sys_id\":\"44f1a40047352150fd6ce977746d43dc\",\"type\":\"sn_cdm_node_component\",\"main_id\":\"111698\",\"name\":\"paymentService\",\"node_path\":\"!K<+!K<0!K<1!K<G!K<K!K<L\",\"effective_path\":\"!K<+!K<0!K<1!K<G!K<K!K<L\",\"main_id_encoded\":\"K<L\",\"node_classifier\":\"/application/deployables/env:Development\",\"status\":\"valid\",\"level\":\"5\",\"children\":[{\"sys_id\":\"8cf1a40047352150fd6ce977746d43dc\",\"type\":\"sn_cdm_node_component\",\"main_id\":\"111699\",\"name\":\"database\",\"node_path\":\"!K<+!K<0!K<1!K<G!K<K!K<L!K<M\",\"effective_path\":\"!K<+!K<0!K<1!K<G!K<K!K<L!K<M\",\"main_id_encoded\":\"K<M\",\"node_classifier\":\"/application/deployables/env:Development\",\"status\":\"valid\",\"level\":\"6\",\"children\":[{\"sys_id\":\"b3d064cc47f12150fd6ce977746d4374\",\"type\":\"sn_cdm_node_component\",\"main_id\":\"111685\",\"name\":\"backup\",\"node_path\":\"!K<+!K<,!K<9!K<;!K<<!K<?\",\"effective_path\":\"!K<+!K<0!K<1!K<G!K<K!K<L!K<M!K<?\",\"main_id_encoded\":\"K<?\",\"node_classifier\":\"/application/components\",\"status\":\"valid\",\"level\":\"5\",\"children\":[{\"sys_id\":\"7bd064cc47f12150fd6ce977746d4374\",\"type\":\"sn_cdm_node_cdi\",\"main_id\":\"111686\",\"name\":\"dbServer\",\"node_path\":\"!K<+!K<,!K<9!K<;!K<<!K<?!K<@\",\"value\":\"db23.paymentx.be\",\"effective_path\":\"!K<+!K<0!K<1!K<G!K<K!K<L!K<M!K<?!K<@\",\"main_id_encoded\":\"K<@\",\"node_classifier\":\"/application/components\",\"status\":\"valid\",\"level\":\"6\",\"children\":[],\"hasParent\":true}],\"hasParent\":true},{\"sys_id\":\"33d064cc47f12150fd6ce977746d4375\",\"type\":\"sn_cdm_node_cdi\",\"main_id\":\"111687\",\"name\":\"dbIpAddress\",\"node_path\":\"!K<+!K<,!K<9!K<;!K<<!K<A\",\"value\":\"10.20.40.50\",\"effective_path\":\"!K<+!K<0!K<1!K<G!K<K!K<L!K<M!K<A\",\"main_id_encoded\":\"K<A\",\"node_classifier\":\"/application/components\",\"status\":\"valid\",\"level\":\"5\",\"children\":[],\"hasParent\":true},{\"sys_id\":\"f7d064cc47f12150fd6ce977746d4375\",\"type\":\"sn_cdm_node_cdi\",\"main_id\":\"111688\",\"name\":\"dbName\",\"node_path\":\"!K<+!K<,!K<9!K<;!K<<!K<B\",\"value\":\"paymentX_dev2\",\"effective_path\":\"!K<+!K<0!K<1!K<G!K<K!K<L!K<M!K<B\",\"main_id_encoded\":\"K<B\",\"node_classifier\":\"/application/components\",\"status\":\"valid\",\"level\":\"5\",\"children\":[],\"hasParent\":true},{\"sys_id\":\"77d064cc47f12150fd6ce977746d4376\",\"type\":\"sn_cdm_node_cdi\",\"main_id\":\"111690\",\"name\":\"dbPort\",\"node_path\":\"!K<+!K<,!K<9!K<;!K<<!K<D\",\"value\":\"8050\",\"effective_path\":\"!K<+!K<0!K<1!K<G!K<K!K<L!K<M!K<D\",\"main_id_encoded\":\"K<D\",\"node_classifier\":\"/application/components\",\"status\":\"valid\",\"level\":\"5\",\"children\":[],\"hasParent\":true},{\"sys_id\":\"3fd064cc47f12150fd6ce977746d4376\",\"type\":\"sn_cdm_node_cdi\",\"main_id\":\"111691\",\"name\":\"dbServer\",\"node_path\":\"!K<+!K<,!K<9!K<;!K<<!K<E\",\"value\":\"db22.paymentx.be\",\"effective_path\":\"!K<+!K<0!K<1!K<G!K<K!K<L!K<M!K<E\",\"main_id_encoded\":\"K<E\",\"node_classifier\":\"/application/components\",\"status\":\"valid\",\"level\":\"5\",\"children\":[],\"hasParent\":true},{\"sys_id\":\"f3d064cc47f12150fd6ce977746d4377\",\"type\":\"sn_cdm_node_cdi\",\"main_id\":\"111692\",\"name\":\"dbUserName\",\"node_path\":\"!K<+!K<,!K<9!K<;!K<<!K<F\",\"value\":\"root\",\"effective_path\":\"!K<+!K<0!K<1!K<G!K<K!K<L!K<M!K<F\",\"main_id_encoded\":\"K<F\",\"node_classifier\":\"/application/components\",\"status\":\"valid\",\"level\":\"5\",\"children\":[],\"hasParent\":true},{\"sys_id\":\"c4f1a40047352150fd6ce977746d43dd\",\"type\":\"sn_cdm_node_cdi\",\"main_id\":\"111700\",\"name\":\"dbPassword\",\"node_path\":\"!K<+!K<0!K<1!K<G!K<K!K<L!K<M!K<N\",\"secure_value\":\"﷞﷟﷒dac329a2476c6110fd6ce977746d43e1﷬﷔1﷬﷭w8YJ85PO5byT5YNmeG_HwQ==WrNQP39n-PWKFs_VXFSjr3TJsGxS1ESKpyl4PUE=﷮﷯\",\"effective_path\":\"!K<+!K<0!K<1!K<G!K<K!K<L!K<M!K<N\",\"main_id_encoded\":\"K<N\",\"node_classifier\":\"/application/deployables/env:Development\",\"status\":\"valid\",\"level\":\"7\",\"masked_value\":\"*******\",\"children\":[],\"hasParent\":true}],\"hasParent\":true}],\"hasParent\":true}],\"hasParent\":true}],\"hasParent\":true}]}\n\n```\n\nThe following code example shows how to call the getTree\\(\\) method to return a simplified JSON object of hierarchical key-values pairs.\n\n```\nvar primarySnapshot = new sn_cdm.CdmQuery()\n  .snapshotId(\"9f12a80047352150fd6ce977746d4364\")\n  .query()\n  .getTree(true, true);\n\ngs.info(JSON.stringify(primarySnapshot));\n```\n\nReturn results:\n\n```\n{\n  \"Development_1\": {\n    \"vars\": {},\n    \"services\": {\n      \"vars\": {},\n      \"paymentComponent\": {\n        \"applicationSLA\": \"24x7\",\n        \"paymentService\": {\n          \"database\": {\n            \"backup\": {\n              \"dbServer\": \"db23.paymentx.be\"\n            },\n            \"dbIpAddress\": \"10.20.40.50\",\n            \"dbName\": \"paymentX_dev2\",\n            \"dbPort\": \"8050\",\n            \"dbServer\": \"db22.paymentx.be\",\n            \"dbUserName\": \"root\",\n            \"dbPassword\": \"*******\"\n          }\n        }\n      }\n    }\n  }\n}\n```\n\nThe following code example shows how to call the getTree\\(\\) method to return a JSON object containing the node metadata and all its child nodes.\n\n```\nvar primarySnapshot = new sn_cdm.CdmQuery()\n  .snapshotId(\"9f12a80047352150fd6ce977746d4364\")\n  .query()\n  .getTree(false, true);\n\ngs.info(JSON.stringify(primarySnapshot));\n```\n\nReturn results:\n\n```\n{\n  \"sys_id\": \"62a0a0cc47f12150fd6ce977746d431a\",\n  \"type\": \"sn_cdm_node_deployable\",\n  \"main_id\": \"111673\",\n  \"name\": \"Development_1\",\n  \"node_path\": \"!K<+!K<0!K<1\",\n  \"effective_path\": \"!K<+!K<0!K<1\",\n  \"main_id_encoded\": \"K<1\",\n  \"node_classifier\": \"/application/deployables/env:Development\",\n  \"status\": \"valid\",\n  \"level\": \"2\",\n  \"children\": [\n    {\n      \"sys_id\": \"2aa0a0cc47f12150fd6ce977746d431a\",\n      \"type\": \"sn_cdm_node_folder\",\n      \"main_id\": \"111674\",\n      \"name\": \"vars\",\n      \"node_path\": \"!K<+!K<0!K<1!K<2\",\n      \"effective_path\": \"!K<+!K<0!K<1!K<2\",\n      \"main_id_encoded\": \"K<2\",\n      \"node_classifier\": \"/application/deployables/env:Development/vars\",\n      \"status\": \"valid\",\n      \"level\": \"3\",\n      \"children\": [],\n      \"hasParent\": true\n    },\n    {\n      \"sys_id\": \"2ca1600047352150fd6ce977746d4391\",\n      \"type\": \"sn_cdm_node_linked\",\n      \"main_id\": \"111693\",\n      \"name\": \"services\",\n      \"node_path\": \"!K<+!K<0!K<1!K<G\",\n      \"effective_path\": \"!K<+!K<0!K<1!K<G\",\n      \"main_id_encoded\": \"K<G\",\n      \"node_classifier\": \"/application/deployables/env:Development\",\n      \"status\": \"valid\",\n      \"level\": \"3\",\n      \"children\": [\n        {\n          \"sys_id\": \"2bb0e0cc47f12150fd6ce977746d43e2\",\n          \"type\": \"sn_cdm_node_folder\",\n          \"main_id\": \"111680\",\n          \"name\": \"vars\",\n          \"node_path\": \"!K<+!K</!K<7!K<8\",\n          \"effective_path\": \"!K<+!K<0!K<1!K<G!K<8\",\n          \"main_id_encoded\": \"K<8\",\n          \"node_classifier\": \"/application/collections/vars\",\n          \"status\": \"valid\",\n          \"level\": \"3\",\n          \"children\": [],\n          \"hasParent\": true\n        },\n        {\n          \"sys_id\": \"ccf1640047352150fd6ce977746d438b\",\n          \"type\": \"sn_cdm_node_component\",\n          \"main_id\": \"111697\",\n          \"name\": \"paymentComponent\",\n          \"node_path\": \"!K<+!K<0!K<1!K<G!K<K\",\n          \"effective_path\": \"!K<+!K<0!K<1!K<G!K<K\",\n          \"main_id_encoded\": \"K<K\",\n          \"node_classifier\": \"/application/deployables/env:Development\",\n          \"status\": \"valid\",\n          \"level\": \"4\",\n          \"children\": [\n            {\n              \"sys_id\": \"7fd064cc47f12150fd6ce977746d4372\",\n              \"type\": \"sn_cdm_node_cdi\",\n              \"main_id\": \"111682\",\n              \"name\": \"applicationSLA\",\n              \"node_path\": \"!K<+!K<,!K<9!K<:\",\n              \"value\": \"24x7\",\n              \"effective_path\": \"!K<+!K<0!K<1!K<G!K<K!K<:\",\n              \"main_id_encoded\": \"K<:\",\n              \"node_classifier\": \"/application/components\",\n              \"status\": \"valid\",\n              \"level\": \"3\",\n              \"children\": [],\n              \"hasParent\": true\n            },\n            {\n              \"sys_id\": \"44f1a40047352150fd6ce977746d43dc\",\n              \"type\": \"sn_cdm_node_component\",\n              \"main_id\": \"111698\",\n              \"name\": \"paymentService\",\n              \"node_path\": \"!K<+!K<0!K<1!K<G!K<K!K<L\",\n              \"effective_path\": \"!K<+!K<0!K<1!K<G!K<K!K<L\",\n              \"main_id_encoded\": \"K<L\",\n              \"node_classifier\": \"/application/deployables/env:Development\",\n              \"status\": \"valid\",\n              \"level\": \"5\",\n              \"children\": [\n                {\n                  \"sys_id\": \"8cf1a40047352150fd6ce977746d43dc\",\n                  \"type\": \"sn_cdm_node_component\",\n                  \"main_id\": \"111699\",\n                  \"name\": \"database\",\n                  \"node_path\": \"!K<+!K<0!K<1!K<G!K<K!K<L!K<M\",\n                  \"effective_path\": \"!K<+!K<0!K<1!K<G!K<K!K<L!K<M\",\n                  \"main_id_encoded\": \"K<M\",\n                  \"node_classifier\": \"/application/deployables/env:Development\",\n                  \"status\": \"valid\",\n                  \"level\": \"6\",\n                  \"children\": [\n                    {\n                      \"sys_id\": \"b3d064cc47f12150fd6ce977746d4374\",\n                      \"type\": \"sn_cdm_node_component\",\n                      \"main_id\": \"111685\",\n                      \"name\": \"backup\",\n                      \"node_path\": \"!K<+!K<,!K<9!K<;!K<<!K<?\",\n                      \"effective_path\": \"!K<+!K<0!K<1!K<G!K<K!K<L!K<M!K<?\",\n                      \"main_id_encoded\": \"K<?\",\n                      \"node_classifier\": \"/application/components\",\n                      \"status\": \"valid\",\n                      \"level\": \"5\",\n                      \"children\": [\n                        {\n                          \"sys_id\": \"7bd064cc47f12150fd6ce977746d4374\",\n                          \"type\": \"sn_cdm_node_cdi\",\n                          \"main_id\": \"111686\",\n                          \"name\": \"dbServer\",\n                          \"node_path\": \"!K<+!K<,!K<9!K<;!K<<!K<?!K<@\",\n                          \"value\": \"db23.paymentx.be\",\n                          \"effective_path\": \"!K<+!K<0!K<1!K<G!K<K!K<L!K<M!K<?!K<@\",\n                          \"main_id_encoded\": \"K<@\",\n                          \"node_classifier\": \"/application/components\",\n                          \"status\": \"valid\",\n                          \"level\": \"6\",\n                          \"children\": [],\n                          \"hasParent\": true\n                        }\n                      ],\n                      \"hasParent\": true\n                    },\n                    {\n                      \"sys_id\": \"33d064cc47f12150fd6ce977746d4375\",\n                      \"type\": \"sn_cdm_node_cdi\",\n                      \"main_id\": \"111687\",\n                      \"name\": \"dbIpAddress\",\n                      \"node_path\": \"!K<+!K<,!K<9!K<;!K<<!K<A\",\n                      \"value\": \"10.20.40.50\",\n                      \"effective_path\": \"!K<+!K<0!K<1!K<G!K<K!K<L!K<M!K<A\",\n                      \"main_id_encoded\": \"K<A\",\n                      \"node_classifier\": \"/application/components\",\n                      \"status\": \"valid\",\n                      \"level\": \"5\",\n                      \"children\": [],\n                      \"hasParent\": true\n                    },\n                    {\n                      \"sys_id\": \"f7d064cc47f12150fd6ce977746d4375\",\n                      \"type\": \"sn_cdm_node_cdi\",\n                      \"main_id\": \"111688\",\n                      \"name\": \"dbName\",\n                      \"node_path\": \"!K<+!K<,!K<9!K<;!K<<!K<B\",\n                      \"value\": \"paymentX_dev2\",\n                      \"effective_path\": \"!K<+!K<0!K<1!K<G!K<K!K<L!K<M!K<B\",\n                      \"main_id_encoded\": \"K<B\",\n                      \"node_classifier\": \"/application/components\",\n                      \"status\": \"valid\",\n                      \"level\": \"5\",\n                      \"children\": [],\n                      \"hasParent\": true\n                    },\n                    {\n                      \"sys_id\": \"77d064cc47f12150fd6ce977746d4376\",\n                      \"type\": \"sn_cdm_node_cdi\",\n                      \"main_id\": \"111690\",\n                      \"name\": \"dbPort\",\n                      \"node_path\": \"!K<+!K<,!K<9!K<;!K<<!K<D\",\n                      \"value\": \"8050\",\n                      \"effective_path\": \"!K<+!K<0!K<1!K<G!K<K!K<L!K<M!K<D\",\n                      \"main_id_encoded\": \"K<D\",\n                      \"node_classifier\": \"/application/components\",\n                      \"status\": \"valid\",\n                      \"level\": \"5\",\n                      \"children\": [],\n                      \"hasParent\": true\n                    },\n                    {\n                      \"sys_id\": \"3fd064cc47f12150fd6ce977746d4376\",\n                      \"type\": \"sn_cdm_node_cdi\",\n                      \"main_id\": \"111691\",\n                      \"name\": \"dbServer\",\n                      \"node_path\": \"!K<+!K<,!K<9!K<;!K<<!K<E\",\n                      \"value\": \"db22.paymentx.be\",\n                      \"effective_path\": \"!K<+!K<0!K<1!K<G!K<K!K<L!K<M!K<E\",\n                      \"main_id_encoded\": \"K<E\",\n                      \"node_classifier\": \"/application/components\",\n                      \"status\": \"valid\",\n                      \"level\": \"5\",\n                      \"children\": [],\n                      \"hasParent\": true\n                    },\n                    {\n                      \"sys_id\": \"f3d064cc47f12150fd6ce977746d4377\",\n                      \"type\": \"sn_cdm_node_cdi\",\n                      \"main_id\": \"111692\",\n                      \"name\": \"dbUserName\",\n                      \"node_path\": \"!K<+!K<,!K<9!K<;!K<<!K<F\",\n                      \"value\": \"root\",\n                      \"effective_path\": \"!K<+!K<0!K<1!K<G!K<K!K<L!K<M!K<F\",\n                      \"main_id_encoded\": \"K<F\",\n                      \"node_classifier\": \"/application/components\",\n                      \"status\": \"valid\",\n                      \"level\": \"5\",\n                      \"children\": [],\n                      \"hasParent\": true\n                    },\n                    {\n                      \"sys_id\": \"c4f1a40047352150fd6ce977746d43dd\",\n                      \"type\": \"sn_cdm_node_cdi\",\n                      \"main_id\": \"111700\",\n                      \"name\": \"dbPassword\",\n                      \"node_path\": \"!K<+!K<0!K<1!K<G!K<K!K<L!K<M!K<N\",\n                      \"secure_value\": \"﷞﷟﷒dac329a2476c6110fd6ce977746d43e1﷬﷔1﷬﷭w8YJ85PO5byT5YNmeG_HwQ==WrNQP39n-PWKFs_VXFSjr3TJsGxS1ESKpyl4PUE=﷮﷯\",\n                      \"effective_path\": \"!K<+!K<0!K<1!K<G!K<K!K<L!K<M!K<N\",\n                      \"main_id_encoded\": \"K<N\",\n                      \"node_classifier\": \"/application/deployables/env:Development\",\n                      \"status\": \"valid\",\n                      \"level\": \"7\",\n                      \"masked_value\": \"*******\",\n                      \"children\": [],\n                      \"hasParent\": true\n                    }\n                  ],\n                  \"hasParent\": true\n                }\n              ],\n              \"hasParent\": true\n            }\n          ],\n          \"hasParent\": true\n        }\n      ],\n      \"hasParent\": true\n    }\n  ]\n}\n```\n\n## CdmQuery - getValue\\(String fieldName\\)\n\nReturns the value of the specified field of the current iterated node result.\n\n|Name|Type|Description|\n|----|----|-----------|\n|fieldName|String|Name of the field with the snapshot record to return.|\n\n|Type|Description|\n|----|-----------|\n|None| |\n\nThe following code example shows how to use the getValue\\(\\) method to extract required data.\n\n```\nvar cdmQuery = new sn_cdm.CdmQuery()\n  .snapshotId(\"1a2fe2e6c3a27010cc0a259d7640dd59\")\n  .decryptPassword(true)\n  .query();  \n\nvar output = [];\n  while(cdmQuery.next()) {\n    var name = cdmQuery.getValue('name');\n    var type = cdmQuery.getValue('type');\n\n    if (type == 'sg_cdm_node_cdi' || type == 'sg_cdm_node_variable') {\n      var value = cdmQuery.getValue('value');\n      output.push(gs.getMessage(\"{0} : {1} [{2}]\", [name, value, type]));\n    } else {\n      output.push(gs.getMessage(\"{0} [{1}]\", [name, type]));\n  }\n} \n```\n\nReturn values:\n\n```\n[\n  \"test_login_service [sg_cdm_node_deployable]\",\n  \"vars [sg_cdm_node_folder]\",\n  \"service_password : service12345 [sg_cdm_node_variable]\",\n  \"login_service [sg_cdm_node_linked]\",\n  \"vars [sg_cdm_node_folder]\",\n  \"core_component [sg_cdm_node_component]\",\n  \"user_name : admin [sg_cdm_node_cdi]\",\n  \"user_password : service12345 [sg_cdm_node_cdi]\"\n]\n```\n\n## CdmQuery - includeFileMetadata\\(\\)\n\nEnables you to specify whether to fetch the file metadata information for file nodes. The file metadata contains attachment\\_id, file\\_name, content\\_type, and checksum.\n\n**Note:** Metadata is only returned for non-simple trees. For additional information on this type of data return, see [CdmQuery - getTree\\(Boolean simpleTree, Boolean prettify\\)](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/CdmQueryScopedAPI.md).\n\n|Name|Type|Description|\n|----|----|-----------|\n|None| | |\n\n|Type|Description|\n|----|-----------|\n|None| |\n\nThe following code example shows how to call the CdmQuery\\(\\) API and return file metadata information.\n\n```\nvar cdmQuery = new CdmQuery()\n.snapshotId(\"20c365a2476c6110fd6ce977746d4336\")\n.includeFileMetadata()\n.query()\n.getTree(false, true);\n```\n\nReturns:\n\n```\n{\n  \"sys_id\": \"62a0a0cc47f12150fd6ce977746d431a\",\n  \"type\": \"sn_cdm_node_deployable\",\n  \"main_id\": \"111673\",\n  \"name\": \"Development_1\",\n  \"node_path\": \"!K<+!K<0!K<1\",\n  \"effective_path\": \"!K<+!K<0!K<1\",\n  \"main_id_encoded\": \"K<1\",\n  \"node_classifier\": \"/application/deployables/env:Development\",\n  \"status\": \"valid\",\n  \"level\": \"2\",\n  \"children\": [\n    {\n      \"sys_id\": \"2aa0a0cc47f12150fd6ce977746d431a\",\n      \"type\": \"sn_cdm_node_folder\",\n      \"main_id\": \"111674\",\n      \"name\": \"vars\",\n      \"node_path\": \"!K<+!K<0!K<1!K<2\",\n      \"effective_path\": \"!K<+!K<0!K<1!K<2\",\n      \"main_id_encoded\": \"K<2\",\n      \"node_classifier\": \"/application/deployables/env:Development/vars\",\n      \"status\": \"valid\",\n      \"level\": \"3\",\n      \"children\": [],\n      \"hasParent\": true\n    },\n    {\n      \"sys_id\": \"b83eb65fffdf6110f0ccffffffffff7d\",\n      \"type\": \"sn_cdm_node_file\",\n      \"main_id\": \"111675\",\n      \"name\": \"deploy_config.xml\",\n      \"node_path\": \"!K<+!K<0!K<1!K<G\",\n      \"value\": \"file: http://instance.servicenow.com/sys_attachment.do?sys_id=bc3eb65fffdf6110f0ccffffffffff7d\",\n      \"effective_path\": \"!K<+!K<0!K<1!K<G\",\n      \"main_id_encoded\": \"V\",\n      \"node_classifier\": \"/application/deployables/env:Development\",\n      \"status\": \"valid\",\n      \"level\": \"3\",\n      \"file_metadata\": {\n        \"attachment_id\": \"bc3eb65fffdf6110f0ccffffffffff7d\",\n        \"file_name\": \"deploy_config.xml\",\n        \"content_type\": \"application/xml\",\n        \"checksum\": \"UbWkF5HZOQTQ89bFrqyFBg==\"\n      },\n      \"children\": [],\n      \"hasParent\": true\n    }\n  ]\n}\n```\n\n## CdmQuery - next\\(\\)\n\nIterates to the next node result and returns it if it exists.\n\n|Name|Type|Description|\n|----|----|-----------|\n|None| | |\n\n<table id=\"table_ncd_1hh_vwb\" class=\"returns\"><thead><tr><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nCdmQuery\n\n</td><td>\n\nIf available, the CdmQuery object of the next node.If no additional nodes are available it returns a null or undefined.\n\n</td></tr></tbody>\n</table>The following code example shows how the next\\(\\) method to iterate through the available node.\n\n```\nvar cdmQuery = new sn_cdm.CdmQuery()\n  .snapshotId(\"1a2fe2e6c3a27010cc0a259d7640dd59\")\n  .decryptPassword(true)\n  .query(); \n\nvar output = [];\nwhile(cdmQuery.next()) {\n  var name = cdmQuery.getValue('name');\n  var type = cdmQuery.getValue('type');\n    if (type == 'sg_cdm_node_cdi' || type == 'sg_cdm_node_variable') {\n      var value = cdmQuery.getValue('value');\n      output.push(gs.getMessage(\"{0} : {1} [{2}]\", [name, value, type]));\n  } else {\n    output.push(gs.getMessage(\"{0} [{1}]\", [name, type]));\n  }\t \n} \n```\n\nReturn results:\n\n```\n[\n  \"test_login_service [sg_cdm_node_deployable]\",\n  \"vars [sg_cdm_node_folder]\",\n  \"service_password : service12345 [sg_cdm_node_variable]\",\n  \"login_service [sg_cdm_node_linked]\",\n  \"vars [sg_cdm_node_folder]\",\n  \"core_component [sg_cdm_node_component]\",\n  \"user_name : username [sg_cdm_node_cdi]\",\n  \"user_password : service12345 [sg_cdm_node_cdi]\" \n]\n```\n\n## CdmQuery - query\\(\\)\n\nExecutes the specified query against the CDM database or the cache based on the settings, entry node, and filter settings.\n\n|Name|Type|Description|\n|----|----|-----------|\n|None| | |\n\n|Type|Description|\n|----|-----------|\n|CdmQuery|CdmQuery object.|\n\nThe following code example shows how to call the CdmQuery\\(\\) API and specify the deployable snapshot to query.\n\n```\nvar primarySnapshot = new sn_cdm.CdmQuery()\n.snapshotId(\"1a2fe2e6c3a27010cc0a259d7640dd59\")\n.decryptPassword(true)\n.query()\n.getTree();\n```\n\nReturn results:\n\n```\n{ \n  \"_decryptPassword\": true,\n  \"sys_id\": \"d73d6666c3a27010cc0a259d7640dde7\",\n  \"type\": \"sg_cdm_node_deployable\",\n  \"main_id\": \"731\",\n  \"name\": \"test_login_service\",\n  \"node_path\": \"!1+!1/!10\",\n  \"effective_path\": \"!1+!1/!10\",\n  \"main_id_encoded\": \"10\",\n  \"node_classifier\": \"/application/deployables/dep:test_login_service\", \n  \"status\": \"valid\", \n  \"children\": [\n    {\n      \"_decryptPassword\": true,\n      \"sys_id\": \"9f3d6666c3a27010cc0a259d7640dde7\",\n      \"type\": \"sg_cdm_node_folder\",\n      \"main_id\": \"732\",\n      \"name\": \"vars\",\n      \"node_path\": \"!1+!1/!10!11\",\n      \"effective_path\": \"!1+!1/!10!11\",\n      \"main_id_encoded\": \"11\",\n      \"node_classifier\": \"/application/deployables/dep:test_login_service/vars\",\n      \"status\": \"valid\",\n      \"children\": [\n        {\n          \"_decryptPassword\": true,\n          \"sys_id\": \"49dd2e66c3a27010cc0a259d7640ddf9\",\n          \"type\": \"sg_cdm_node_variable\", \n          \"main_id\": \"741\",\n          \"name\": \"service_password\",\n          \"node_path\": \"!1+!1/!10!11!1:\",\n          \"value\": \"service12345\",\n          \"effective_path\": \"!1+!1/!10!11!1:\",\n          \"main_id_encoded\": \"1:\",\n          \"node_classifier\": \"/application/deployables/dep:test_login_service/vars\",\n          \"status\": \"valid\",\n          \"children\": [],\n          \"hasParent\": true \n        }\n      ], \n      \"hasParent\": true \n    }, \n    {\n      \"_decryptPassword\": true,\n      \"sys_id\": \"26bd2e66c3a27010cc0a259d7640dd74\",\n      \"type\": \"sg_cdm_node_linked\",\n      \"main_id\": \"740\",\n      \"name\": \"login_service\",\n      \"node_path\": \"!1+!1/!10!19\",\n      \"effective_path\": \"!1+!1/!10!19\",\n      \"main_id_encoded\": \"19\",\n      \"node_classifier\": \"/application/deployables/dep:test_login_service\",\n      \"status\": \"valid\",\n      \"children\": [\n        {\n          \"_decryptPassword\": true,\n          \"sys_id\": \"eeadea66c3a27010cc0a259d7640dd8c\",\n          \"type\": \"sg_cdm_node_folder\",\n          \"main_id\": \"738\",\n          \"name\": \"vars\",\n          \"node_path\": \"!1+!1.!16!17\",\n          \"effective_path\": \"!1+!1/!10!19!17\",\n          \"main_id_encoded\": \"17\",\n          \"node_classifier\": \"/application/collections/vars\",\n          \"status\": \"valid\",\n          \"children\": [],\n          \"hasParent\": true \n        },\n        { \n          \"_decryptPassword\": true,\n          \"sys_id\": \"da1f22e6c3a27010cc0a259d7640dda2\",\n          \"type\": \"sg_cdm_node_component\",\n          \"main_id\": \"742\",\n          \"name\": \"core_component\",\n          \"node_path\": \"!1+!1/!10!19!1;\",\n          \"effective_path\": \"!1+!1/!10!19!1;\",\n          \"main_id_encoded\": \"1;\",\n          \"node_classifier\": \"/application/deployables/dep:test_login_service\",\n          \"status\": \"valid\",\n          \"children\": [\n            { \n              \"_decryptPassword\": true,\n              \"sys_id\": \"921f22e6c3a27010cc0a259d7640dda3\",\n              \"type\": \"sg_cdm_node_cdi\",\n              \"main_id\": \"743\",\n              \"name\": \"user_name\",\n              \"node_path\": \"!1+!1/!10!19!1;!1<\",\n              \"value\": \"admin\",\n              \"effective_path\": \"!1+!1/!10!19!1;!1<\",\n              \"main_id_encoded\": \"1<\",\n              \"node_classifier\": \"/application/deployables/dep:test_login_service\",\n              \"status\": \"valid\",\n              \"children\": [],\n              \"hasParent\": true\n            },\n            { \n              \"_decryptPassword\": true,\n              \"sys_id\": \"5a1f22e6c3a27010cc0a259d7640dda3\",\n              \"type\": \"sg_cdm_node_cdi\",\n              \"main_id\": \"744\",\n              \"name\": \"user_password\",\n              \"node_path\": \"!1+!1/!10!19!1;!1?\",\n              \"value\": \"service12345\",\n              \"effective_path\": \"!1+!1/!10!19!1;!1?\",\n              \"main_id_encoded\": \"1?\",\n              \"node_classifier\": \"/application/deployables/dep:test_login_service\",\n              \"status\": \"valid\",\n              \"children\": [],\n              \"hasParent\": true\n            }\n          ],\n          \"hasParent\": true\n        }\n      ],\n      \"hasParent\": true\n    }\n  ],\n  \"hasParent\": false\n}\n```\n\n## CdmQuery - snapshotId\\(String snapshotSysID\\)\n\nSpecifies the entry node. The CdmQuery API limits its query to the entry node and its descendant nodes. Calling this method is mandatory.\n\n<table id=\"table_vhw_cbz_5wb\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nsnapshotSysId\n\n</td><td>\n\nString\n\n</td><td>\n\nSys\\_id of the deployable snapshot to query.Internally it sets the sys\\_id of the changeset and the sys\\_id of the deployable node.\n\nTable: CDM Snapshot \\[sn\\_cdm\\_snapshot\\]\n\n</td></tr></tbody>\n</table>|Type|Description|\n|----|-----------|\n|None| |\n\nThe following code example shows how to call the CdmQuery\\(\\) API and specify the deployable snapshot to query.\n\n```\nvar primarySnapshot = new sn_cdm.CdmQuery()\n.snapshotId(\"1a2fe2e6c3a27010cc0a259d7640dd59\")\n.decryptPassword(true)\n.query()\n.getTree();\n```\n\nReturn results:\n\n```\n{ \n  \"_decryptPassword\": true,\n  \"sys_id\": \"d73d6666c3a27010cc0a259d7640dde7\",\n  \"type\": \"sg_cdm_node_deployable\",\n  \"main_id\": \"731\",\n  \"name\": \"test_login_service\",\n  \"node_path\": \"!1+!1/!10\",\n  \"effective_path\": \"!1+!1/!10\",\n  \"main_id_encoded\": \"10\",\n  \"node_classifier\": \"/application/deployables/dep:test_login_service\", \n  \"status\": \"valid\", \n  \"children\": [\n    {\n      \"_decryptPassword\": true,\n      \"sys_id\": \"9f3d6666c3a27010cc0a259d7640dde7\",\n      \"type\": \"sg_cdm_node_folder\",\n      \"main_id\": \"732\",\n      \"name\": \"vars\",\n      \"node_path\": \"!1+!1/!10!11\",\n      \"effective_path\": \"!1+!1/!10!11\",\n      \"main_id_encoded\": \"11\",\n      \"node_classifier\": \"/application/deployables/dep:test_login_service/vars\",\n      \"status\": \"valid\",\n      \"children\": [\n        {\n          \"_decryptPassword\": true,\n          \"sys_id\": \"49dd2e66c3a27010cc0a259d7640ddf9\",\n          \"type\": \"sg_cdm_node_variable\", \n          \"main_id\": \"741\",\n          \"name\": \"service_password\",\n          \"node_path\": \"!1+!1/!10!11!1:\",\n          \"value\": \"service12345\",\n          \"effective_path\": \"!1+!1/!10!11!1:\",\n          \"main_id_encoded\": \"1:\",\n          \"node_classifier\": \"/application/deployables/dep:test_login_service/vars\",\n          \"status\": \"valid\",\n          \"children\": [],\n          \"hasParent\": true \n        }\n      ], \n      \"hasParent\": true \n    }, \n    {\n      \"_decryptPassword\": true,\n      \"sys_id\": \"26bd2e66c3a27010cc0a259d7640dd74\",\n      \"type\": \"sg_cdm_node_linked\",\n      \"main_id\": \"740\",\n      \"name\": \"login_service\",\n      \"node_path\": \"!1+!1/!10!19\",\n      \"effective_path\": \"!1+!1/!10!19\",\n      \"main_id_encoded\": \"19\",\n      \"node_classifier\": \"/application/deployables/dep:test_login_service\",\n      \"status\": \"valid\",\n      \"children\": [\n        {\n          \"_decryptPassword\": true,\n          \"sys_id\": \"eeadea66c3a27010cc0a259d7640dd8c\",\n          \"type\": \"sg_cdm_node_folder\",\n          \"main_id\": \"738\",\n          \"name\": \"vars\",\n          \"node_path\": \"!1+!1.!16!17\",\n          \"effective_path\": \"!1+!1/!10!19!17\",\n          \"main_id_encoded\": \"17\",\n          \"node_classifier\": \"/application/collections/vars\",\n          \"status\": \"valid\",\n          \"children\": [],\n          \"hasParent\": true \n        },\n        { \n          \"_decryptPassword\": true,\n          \"sys_id\": \"da1f22e6c3a27010cc0a259d7640dda2\",\n          \"type\": \"sg_cdm_node_component\",\n          \"main_id\": \"742\",\n          \"name\": \"core_component\",\n          \"node_path\": \"!1+!1/!10!19!1;\",\n          \"effective_path\": \"!1+!1/!10!19!1;\",\n          \"main_id_encoded\": \"1;\",\n          \"node_classifier\": \"/application/deployables/dep:test_login_service\",\n          \"status\": \"valid\",\n          \"children\": [\n            { \n              \"_decryptPassword\": true,\n              \"sys_id\": \"921f22e6c3a27010cc0a259d7640dda3\",\n              \"type\": \"sg_cdm_node_cdi\",\n              \"main_id\": \"743\",\n              \"name\": \"user_name\",\n              \"node_path\": \"!1+!1/!10!19!1;!1<\",\n              \"value\": \"admin\",\n              \"effective_path\": \"!1+!1/!10!19!1;!1<\",\n              \"main_id_encoded\": \"1<\",\n              \"node_classifier\": \"/application/deployables/dep:test_login_service\",\n              \"status\": \"valid\",\n              \"children\": [],\n              \"hasParent\": true\n            },\n            { \n              \"_decryptPassword\": true,\n              \"sys_id\": \"5a1f22e6c3a27010cc0a259d7640dda3\",\n              \"type\": \"sg_cdm_node_cdi\",\n              \"main_id\": \"744\",\n              \"name\": \"user_password\",\n              \"node_path\": \"!1+!1/!10!19!1;!1?\",\n              \"value\": \"service12345\",\n              \"effective_path\": \"!1+!1/!10!19!1;!1?\",\n              \"main_id_encoded\": \"1?\",\n              \"node_classifier\": \"/application/deployables/dep:test_login_service\",\n              \"status\": \"valid\",\n              \"children\": [],\n              \"hasParent\": true\n            }\n          ],\n          \"hasParent\": true\n        }\n      ],\n      \"hasParent\": true\n    }\n  ],\n  \"hasParent\": false\n}\n```\n\n## CdmQuery - substituteVariable\\(Boolean substitute\\)\n\nEnables you to specify whether to substitute variable references in configuration data item \\(CDI\\) nodes with the value of the referenced variable node.\n\n<table id=\"table_r4r_1rz_5wb\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nsubstitute\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nOptional. Flag that indicates whether to substitute variable references in CDI nodes with the value of the referenced variable node.Valid values:\n\n-   true: Substitute variable references in CDI nodes with the value of the referenced variable node.\n-   false: Do not substitute variable references in CDI nodes with the value of the referenced variable node.\n\nDefault: true\n\n</td></tr></tbody>\n</table>|Type|Description|\n|----|-----------|\n|None| |\n\nThe following code examples shows how to turn off substitution of variable references in CDI nodes.\n\n```\nvar primarySnapshot = new sn_cdm.CdmQuery()\n.snapshotId(\"20c365a2476c6110fd6ce977746d4336\")\n.substituteVariable(false)\n.query()\n.getTree(true, true);\n\ngs.info(primarySnapshot);\n```\n\nExample return results:\n\n```\n{\n  \"paymentService-V1.1\": {\n    \"featureToggles\": {\n      \"paymentRefund\": \"enabled\",\n      \"myPreferredPaymentMethods\": \"enabled\",\n      \"invoicePrinting\": \"enabled\",\n      \"payOnDelivery\": \"disabled\",\n      \"payByVoucher\": \"enabled\"\n    },\n    \"vars\": {\n      \"paymentService\": {\n        \"database\": {\n          \"dbName\": \"paymentX_dev2\",\n          \"dbUserName\": \"root\",\n          \"dbPassword\": \"admin123\",\n          \"dbServer\": \"db22.paymentx.be\",\n          \"dbPort\": \"8050\",\n          \"dbIpAddress\": \"10.20.40.50\",\n          \"backup\": {\n            \"dbServer\": \"db23.paymentx.be\"\n          }\n        }\n      },\n      \"applicationSLA\": \"24x7\"\n    },\n    \"settings\": {\n      \"merchantId\": \"10334\",\n      \"paymentMethods\": \"1,3,5,6\",\n      \"allowed.billing.countries\": \"74,76,88,136,139,176,197\",\n      \"creditcards.cacf.type.ids\": \"43,44,45,46,48,49,50\",\n      \"creditcards.oney.type.ids\": \"33,34,35\",\n      \"included.availabilityids\": \"999\",\n      \"included.warrantiestypeids.cacf\": \"19002,19005,19006,19009,19010,19011,19014,19016\",\n      \"dbIPAddress\": \"@@paymentService/database/dbIpAddress@@\",\n      \"dbPort\": \"@@paymentService/database/dbPort@@\",\n      \"dbConnectionString\": \"@@paymentService/database/dbUserName@@:@@paymentService/database/dbPassword@@ @@paymentService/database/dbServer@@:@@paymentService/database/dbPort@@ @@paymentService/database/dbName@@\",\n      \"dbConnectionStringBackup\": \"@@paymentService/database/dbUserName@@:@@paymentService/database/dbPassword@@ @@paymentService/database/backup/dbServer@@ @@paymentService/database/dbName@@\",\n      \"paypal\": \"enabled\",\n      \"applePay\": \"disabled\",\n      \"ogone\": \"enabled\"\n    }\n  }\n}\n```\n\nThe following code examples shows how to turn on substitution of variable references in CDI nodes and the associated return results for the same record.\n\n```\nvar primarySnapshot = new sn_cdm.CdmQuery()\n.snapshotId(\"20c365a2476c6110fd6ce977746d4336\")\n.substituteVariable(true)\n.query()\n.getTree(false, true);\n\ngs.info(primarySnapshot);\n```\n\nExample return results:\n\n```\n{\n  \"paymentService-V1.1\": {\n    \"featureToggles\": {\n      \"paymentRefund\": \"enabled\",\n      \"myPreferredPaymentMethods\": \"enabled\",\n      \"invoicePrinting\": \"enabled\",\n      \"payOnDelivery\": \"disabled\",\n      \"payByVoucher\": \"enabled\"\n    },\n    \"vars\": {\n      \"paymentService\": {\n        \"database\": {\n          \"dbName\": \"paymentX_dev2\",\n          \"dbUserName\": \"root\",\n          \"dbPassword\": \"admin123\",\n          \"dbServer\": \"db22.paymentx.be\",\n          \"dbPort\": \"8050\",\n          \"dbIpAddress\": \"10.20.40.50\",\n          \"backup\": {\n            \"dbServer\": \"db23.paymentx.be\"\n          }\n        }\n      },\n      \"applicationSLA\": \"24x7\"\n    },\n    \"settings\": {\n      \"merchantId\": \"10334\",\n      \"paymentMethods\": \"1,3,5,6\",\n      \"allowed.billing.countries\": \"74,76,88,136,139,176,197\",\n      \"creditcards.cacf.type.ids\": \"43,44,45,46,48,49,50\",\n      \"creditcards.oney.type.ids\": \"33,34,35\",\n      \"included.availabilityids\": \"999\",\n      \"included.warrantiestypeids.cacf\": \"19002,19005,19006,19009,19010,19011,19014,19016\",\n      \"dbIPAddress\": \"10.20.40.50\",\n      \"dbPort\": \"8050\",\n      \"dbConnectionString\": \"root:admin123 db22.paymentx.be:8050 paymentX_dev2\",\n      \"dbConnectionStringBackup\": \"root:admin123 db23.paymentx.be paymentX_dev2\",\n      \"paypal\": \"enabled\",\n      \"applePay\": \"disabled\",\n      \"ogone\": \"enabled\"\n    }\n  }\n}\n```\n\n## CdmQuery - useCache\\(Boolean useCache\\)\n\nEnables you to specify whether to retrieve data from the cache, if any, instead of querying the database.\n\n<table id=\"table_wr1_p5z_5wb\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nuseCache\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nOptional. Flag that indicates whether to retrieve data from the cache, if any, instead of querying the database.Valid values:\n\n-   true: Retrieve data from the cache.\n-   false: Query the database to retrieve the data.\n\nDefault: true\n\n</td></tr></tbody>\n</table>|Type|Description|\n|----|-----------|\n|None| |\n\nThe following code examples shows how to turn off using the cache to obtain data.\n\n```\nvar cdmQuery = new sn_cdm.CdmQuery()\n  .snapshotId(\"1a2fe2e6c3a27010cc0a259d7640dd59\")\n  .decryptPassword(true)\n  .useCache(false)\n  .query();\n```\n\n"}}