{"_id":"569eaed5c237d225002df5bd","parentDoc":null,"user":"5553d33065e8260d00244199","version":{"_id":"55fc9b793c21291900e7e0d7","__v":12,"project":"5553d36165e8260d0024419a","createdAt":"2015-09-18T23:17:13.545Z","releaseDate":"2015-09-18T23:17:13.545Z","categories":["55fc9b7a3c21291900e7e0d8","55fc9b7a3c21291900e7e0d9","55fc9b7a3c21291900e7e0da","55fc9b7a3c21291900e7e0db","55fc9b7a3c21291900e7e0dc","55fc9b7a3c21291900e7e0dd","55fc9b7a3c21291900e7e0de","55fc9b7a3c21291900e7e0df","55fc9b7a3c21291900e7e0e0","55fc9b7a3c21291900e7e0e1","55fc9b7a3c21291900e7e0e2","55fc9b7a3c21291900e7e0e3","55fc9bad4c80910d00b9bece","56394a0c3539050d00082122","56394a2f68b11f0d0048c9ff","56394a462fc5520d001a4db3","56394a4c2fc5520d001a4db4","56394a5b049e420d00476b5c","56394a6a2fc5520d001a4db5","56394f791593e4190073a44b","567b3adfb56bac0d0019d8d9","569d590e5a2b060d008741eb","569ea93dffccd10d00a05c7f"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"2.0.0","version":"2"},"__v":3,"project":"5553d36165e8260d0024419a","category":{"_id":"569ea93dffccd10d00a05c7f","__v":5,"version":"55fc9b793c21291900e7e0d7","pages":["569ea97fd233620d007055cc","569ea9bdc237d225002df5b6","569eae7e8f6d4b0d00f13b61","569eaed5c237d225002df5bd","569eaf04c237d225002df5bf"],"project":"5553d36165e8260d0024419a","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-01-19T21:23:09.676Z","from_sync":false,"order":11,"slug":"environment-variables","title":"Environment variables"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-01-19T21:47:01.778Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":4,"body":"Currently, in the APImetrics software, it is possible to bind two related objects to a workspace: **API Call** and **Work flow**.\n\nBecause of the nature of the **Work flow** workspace to force its API calls to run in its environment, the **Work flow** workspace always overrides the **API Call** workspace.\n\nVariables in **API Call** objects are searched for first in the **Work flow** workspace, then in **API Call** workspace and lastly in the **global** workspace.\n\nThe variable search order (scope) is\n\n1. **Work flow** workspace\n2. **API Call** workspace\n3. **global** workspace\n\nThe **global** workspace is always the last workspace to be searched for variables. If the workspace of **Work flow** is **global**, the order will be\n\n1. **API Call** workspaces\n2. **global** workspace\n\nAPI Call elements subject to contain variables (and parsed for retrieval):\n\n• API URL\n• URI Parameters: name and value\n• Headers: name and value\n• Content: body content\n◦ text\n◦ json\n◦ xml\n◦ URLEncoded variables: name and value\n• Conditions: Property and Value\n• WebHooks: parameters","excerpt":"","slug":"environment-variables-usage","type":"basic","title":"Environment variables usage"}

Environment variables usage


Currently, in the APImetrics software, it is possible to bind two related objects to a workspace: **API Call** and **Work flow**. Because of the nature of the **Work flow** workspace to force its API calls to run in its environment, the **Work flow** workspace always overrides the **API Call** workspace. Variables in **API Call** objects are searched for first in the **Work flow** workspace, then in **API Call** workspace and lastly in the **global** workspace. The variable search order (scope) is 1. **Work flow** workspace 2. **API Call** workspace 3. **global** workspace The **global** workspace is always the last workspace to be searched for variables. If the workspace of **Work flow** is **global**, the order will be 1. **API Call** workspaces 2. **global** workspace API Call elements subject to contain variables (and parsed for retrieval): • API URL • URI Parameters: name and value • Headers: name and value • Content: body content ◦ text ◦ json ◦ xml ◦ URLEncoded variables: name and value • Conditions: Property and Value • WebHooks: parameters