/// <summary>
        /// This action is used to add a module to the specified page.
        /// </summary>
        /// <param name="moduleName">name of the module to add</param>
        /// <param name="pageId">id of the page to add module to</param>
        /// <param name="column">number of the column to add module to</param>
        /// <param name="row">number of the row to add module to</param>
        /// <param name="dataModuleId">id of the test to add view for
        /// for example if moduleName=External dataModuleId should be id of the External monitor, which results you want to be shown on the page</param>
        /// <param name="height">height of the module in pixels (default value is 200)</param>
        /// <param name="output">Type of output - XML or JSON</param>
        /// <param name="validation">HMACSHA1 for checksum validation or token for authToken validation</param>
        /// <returns>pageModuleId</returns>
        public int AddPageModule(ModulName moduleName, int pageId, int column, int row, int dataModuleId,
                                 int?height = null, OutputType?output = null, Validation?validation = null)
        {
            OutputType outputType = GetOutput(output);
            var        parameters = new Dictionary <string, object>();

            parameters.Add(Params.moduleName, moduleName);
            parameters.Add(Params.pageId, pageId);
            parameters.Add(Params.row, row);
            parameters.Add(Params.column, column);
            AddIfNotNull(parameters, Params.height, height);
            parameters.Add(Params.dataModuleId, dataModuleId);
            RestResponse response = MakePostRequest(LayoutAction.addPageModule, parameters, output: outputType,
                                                    validation: validation);

            Helper.CheckStatus(response, outputType);
            int    pageModuleId;
            string key = Helper.GetValueOfKey(response, Params.pageModuleId, outputType);

            Int32.TryParse(key, out pageModuleId);
            return(pageModuleId);
        }
 /// <summary>
 /// This action is used to add a module to the specified page. 
 /// </summary>
 /// <param name="moduleName">name of the module to add</param>
 /// <param name="pageId">id of the page to add module to</param>
 /// <param name="column">number of the column to add module to</param>
 /// <param name="row">number of the row to add module to</param>
 /// <param name="dataModuleId">id of the test to add view for
 /// for example if moduleName=External dataModuleId should be id of the External monitor, which results you want to be shown on the page</param>
 /// <param name="height">height of the module in pixels (default value is 200)</param>
 /// <param name="output">Type of output - XML or JSON</param>
 /// <param name="validation">HMACSHA1 for checksum validation or token for authToken validation</param>
 /// <returns>pageModuleId</returns>
 public int AddPageModule(ModulName moduleName, int pageId, int column, int row, int dataModuleId,
                          int? height = null, OutputType? output = null, Validation? validation = null)
 {
     OutputType outputType = GetOutput(output);
     var parameters = new Dictionary<string, object>();
     parameters.Add(Params.moduleName, moduleName);
     parameters.Add(Params.pageId, pageId);
     parameters.Add(Params.row, row);
     parameters.Add(Params.column, column);
     AddIfNotNull(parameters, Params.height, height);
     parameters.Add(Params.dataModuleId, dataModuleId);
     RestResponse response = MakePostRequest(LayoutAction.addPageModule, parameters, output: outputType,
                                             validation: validation);
     Helper.CheckStatus(response, outputType);
     int pageModuleId;
     string key = Helper.GetValueOfKey(response, Params.pageModuleId, outputType);
     Int32.TryParse(key, out pageModuleId);
     return pageModuleId;
 }