{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":1378,"path":"api-reference/web-services/t_GenerateMessageVariables.md","title":"Generate REST message variables","bundle":null,"doc_type":null,"release":"australia","body":"\n# Generate REST message variables\n\nPopulate the list of variable substitutions automatically based on variables defined in several REST message HTTP method fields.\n\n## Before you begin\n\nBefore starting this procedure, create a REST Message record with at least one HTTP method that uses variables.\n\nRole required: web\\_service\\_admin\n\n## Procedure\n\n1.  Navigate to **All** &gt; **System Web Services** &gt; **REST Message**.\n\n2.  Select a REST Message record.\n\n3.  Select a method from the HTTP Methods related list.\n\n4.  Click the **Auto-generate variables** related link.\n\n    The **Variable Substitutions** related list is automatically populated for any variables defined in the HTTP Method **Endpoint** field and the **HTTP Headers** and **HTTP Query Parameters** embedded lists. For POST and PUT messages, variables defined in the **Content** field are also used.\n\n\n## What to do next\n\nYou can use the REST Message workflow activity to send the message, or click **Preview Script Usage** to get a sample script. The sample script includes a setStringParameter call for each defined variable substitution that allows you to assign a value to the variable in your script.\n\n**Parent Topic:**[Variable substitution in outbound REST messages](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/web-services/c_VariableSubstitutionREST.md)\n\n"}}