{"_id":"588f722bbcace50f0052b9f3","parentDoc":null,"category":{"_id":"588f722bbcace50f0052b9e3","version":"588f722bbcace50f0052b9e1","project":"565f5fa26bafd40d0030a064","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-12-09T21:22:52.427Z","from_sync":false,"order":1,"slug":"user-guide","title":"Reference"},"version":{"_id":"588f722bbcace50f0052b9e1","project":"565f5fa26bafd40d0030a064","__v":1,"createdAt":"2017-01-30T17:04:43.410Z","releaseDate":"2017-01-30T17:04:43.410Z","categories":["588f722bbcace50f0052b9e2","588f722bbcace50f0052b9e3","588f722bbcace50f0052b9e4","588f722bbcace50f0052b9e5","588f722bbcace50f0052b9e6","588f722bbcace50f0052b9e7"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"5.3.0","version":"5.3.0"},"__v":0,"user":"565f3941ea46251700972783","project":"565f5fa26bafd40d0030a064","updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-12-14T20:32:56.527Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":6,"body":"Environments allow you to define a set of variables that are specific to an environment (e.g. development, testing, production). These Environment variables can then be referenced within the JavaScript code blocks of Proxy Endpoints, and also used to specify different sets of Header and query parameters in Remote Endpoints.\n \nThe Environments view shows a list of Environments and enables you to create a new one and edit or delete an existing one.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/cc5wN9ZuS7HjBwUclpcP_env.png\",\n        \"env.png\",\n        \"1447\",\n        \"925\",\n        \"#6184ac\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n## Environment Properties and Variables\n\nAfter saving a new Environment, you can drill into the name or hover over the row and click the pencil icon to edit it.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/ih8DvVG0Sou794cC366B_user-guide-environments-edit-environment.png\",\n        \"user-guide-environments-edit-environment.png\",\n        \"1280\",\n        \"52\",\n        \"#fca66b\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\nWithin the Edit Environment view, there is a section of Environment properties, followed by a list of Environment Variables.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/NwILzHCxTPizludPANTB_environment.png\",\n        \"environment.png\",\n        \"1638\",\n        \"1022\",\n        \"#932320\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n## Environment Properties\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Property\",\n    \"h-1\": \"Description\",\n    \"1-0\": \"**Session Name**\",\n    \"3-0\": \"**Session Auth Key**\",\n    \"4-0\": \"**Session Encryption Key**\",\n    \"5-0\": \"**Session Auth Key Rotate**\",\n    \"6-0\": \"**Session Encryption Key Rotate**\",\n    \"1-1\": \"String used to prefix sessions.\",\n    \"3-1\": \"Auth key used for sessions.\",\n    \"4-1\": \"Encryption key used for sessions.\",\n    \"5-1\": \"Auth key used for sessions during rotation.\",\n    \"6-1\": \"Encryption key used for sessions during rotation.\",\n    \"7-0\": \"**Show JavaScript errors**\",\n    \"7-1\": \"Whether or not to return the actual JavaScript error that may have occurred in your endpoint's code blocks. This is turned on for your first 'Development' environment, but should be turned off for production environments so as to not leak implementation details to API users.\",\n    \"0-0\": \"**Session Type**\",\n    \"0-1\": \"Client or Server. Client is a cookie based session, Server is stored on the server side with a reference key passed around via an HTTP header.\",\n    \"2-0\": \"**Session Header**\",\n    \"2-1\": \"The header name for the session ID when stored on the server.\"\n  },\n  \"cols\": 2,\n  \"rows\": 8\n}\n[/block]\nThe Environment Variables section includes two fields per row, which correspond to the variable name and value respectively.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/b1hVXO12SJiYNrjtuh2I_user-guide-environments-edit-environment-variables.png\",\n        \"user-guide-environments-edit-environment-variables.png\",\n        \"2204\",\n        \"436\",\n        \"#f3f3f3\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"environments","type":"basic","title":"Environments"}
Environments allow you to define a set of variables that are specific to an environment (e.g. development, testing, production). These Environment variables can then be referenced within the JavaScript code blocks of Proxy Endpoints, and also used to specify different sets of Header and query parameters in Remote Endpoints. The Environments view shows a list of Environments and enables you to create a new one and edit or delete an existing one. [block:image] { "images": [ { "image": [ "https://files.readme.io/cc5wN9ZuS7HjBwUclpcP_env.png", "env.png", "1447", "925", "#6184ac", "" ] } ] } [/block] ## Environment Properties and Variables After saving a new Environment, you can drill into the name or hover over the row and click the pencil icon to edit it. [block:image] { "images": [ { "image": [ "https://files.readme.io/ih8DvVG0Sou794cC366B_user-guide-environments-edit-environment.png", "user-guide-environments-edit-environment.png", "1280", "52", "#fca66b", "" ] } ] } [/block] Within the Edit Environment view, there is a section of Environment properties, followed by a list of Environment Variables. [block:image] { "images": [ { "image": [ "https://files.readme.io/NwILzHCxTPizludPANTB_environment.png", "environment.png", "1638", "1022", "#932320", "" ] } ] } [/block] ## Environment Properties [block:parameters] { "data": { "h-0": "Property", "h-1": "Description", "1-0": "**Session Name**", "3-0": "**Session Auth Key**", "4-0": "**Session Encryption Key**", "5-0": "**Session Auth Key Rotate**", "6-0": "**Session Encryption Key Rotate**", "1-1": "String used to prefix sessions.", "3-1": "Auth key used for sessions.", "4-1": "Encryption key used for sessions.", "5-1": "Auth key used for sessions during rotation.", "6-1": "Encryption key used for sessions during rotation.", "7-0": "**Show JavaScript errors**", "7-1": "Whether or not to return the actual JavaScript error that may have occurred in your endpoint's code blocks. This is turned on for your first 'Development' environment, but should be turned off for production environments so as to not leak implementation details to API users.", "0-0": "**Session Type**", "0-1": "Client or Server. Client is a cookie based session, Server is stored on the server side with a reference key passed around via an HTTP header.", "2-0": "**Session Header**", "2-1": "The header name for the session ID when stored on the server." }, "cols": 2, "rows": 8 } [/block] The Environment Variables section includes two fields per row, which correspond to the variable name and value respectively. [block:image] { "images": [ { "image": [ "https://files.readme.io/b1hVXO12SJiYNrjtuh2I_user-guide-environments-edit-environment-variables.png", "user-guide-environments-edit-environment-variables.png", "2204", "436", "#f3f3f3", "" ] } ] } [/block]