Request Body : {"SiteIds":[],"DepartmentIds":[],"CategoryIds":[],"StatusIds":[],"ReportedByIds":[],"FromDate":"2026-05-29","ToDate":"2026-06-05"}


Request URL : https://api-sandbox.oqsha.com/Organisation/262/Users/DropDown?siteId=881&siteId=883&siteId=886&siteId=884&siteId=841&siteId=888&siteId=887&siteId=882&siteId=889&siteId=885


Request URL : https://api-sandbox.oqsha.com/Organisations/262/Modules/135/Workflows/States/Types


Request URL : https://api-sandbox.oqsha.com/Organisations/262/Modules/135/Categories/All


Request URL : https://api-sandbox.oqsha.com/Organisations/262/R5/All


Request Body : {"SiteIds":[881,883,886,884,841,888,887,882,889,885],"PageNumber":1,"PageLimit":1000,"UserId":267}


Request URL : https://api-sandbox.oqsha.com/Organisations/262/Modules/135/Workflows/States/Startable


Request Body : {"SiteIds":[881],"PageNumber":1,"PageLimit":1000,"UserId":267}


Request URL : https://api-sandbox.oqsha.com/Organisations/262/Modules/135/Categories/153


Request URL : https://api-sandbox.oqsha.com/Organisations/262/Departments


Request Body : {"Dimensions":{"CategoryTypeId":153}}


Request Body : {"SiteId":[881],"SearchTerm":"","SortingColumn":["Name"],"SortingOrder":["asc"],"PageNumber":1,"PageSize":1000}


Request URL : https://api-sandbox.oqsha.com/Organisations/255/Divisions


Request URL : https://api-sandbox.oqsha.com/Organisations/255/IncidentLocations?isActive=1


Request URL : https://api-sandbox.oqsha.com/Organisations/255/Users/267/incidentsites?isActive=1


Request URL : https://api-sandbox.oqsha.com/Organisations/255


Request URL : https://api-sandbox.oqsha.com/Organisations/255/Users/267


Request URL : https://api-sandbox.oqsha.com/Organisation/255/Modules


Request URL : https://api-sandbox.oqsha.com/Reports/IncidentCountReport?OrgId=255&StartDate=2026-06-05&EndDate=2026-06-05


Request URL : https://api-sandbox.oqsha.com/Organisations/255/Divisions/Dropdown


Request URL : https://api-sandbox.oqsha.com/Languages


Request URL : https://api-sandbox.oqsha.com/Organisations/255/PendingActionsNotifications


Request URL : https://api-sandbox.oqsha.com/AccessControl/Modules/255


Request URL : https://api-sandbox.oqsha.com/Organisation/255/UserPreference


Request URL : https://api-sandbox.oqsha.com/Organisation/255/OrganisationStats?FromDate=2026-05-29&ToDate=2026-06-05&


Request URL : https://api-sandbox.oqsha.com/Organisations/255/EscalatedIncidents


Request URL : https://api-sandbox.oqsha.com/Organisations/255/IncidentStatuses


Request URL : https://api-sandbox.oqsha.com/Organisations/255/User/267/Dashboards


Request URL : https://api-sandbox.oqsha.com/Organisations/255/Reports/Dashboards


Request URL : https://api-sandbox.oqsha.com/ExportAllPermitToWork?Export=true


[ExportAllPermitToWork] Export data fetch


Request URL : https://api-sandbox.oqsha.com/Organisations/264/Modules/83/Workflows/States/Types


Request URL : https://api-sandbox.oqsha.com/Organisation/264/Users/DropDown?ModuleName=Action Trackers&siteId=845


Request URL : https://api-sandbox.oqsha.com/Organisations/264/Company/All?&IsActive=1


Request URL : https://api-sandbox.oqsha.com/Organisations/264/Modules/83/Categories/All


Request Body : {"SiteIds":[845],"PageNumber":1,"PageLimit":1000,"UserId":678}


Request URL : https://api-sandbox.oqsha.com/Organisations/264/Modules/83/Workflows/States/Startable


Request Body : {"Dimensions":{"CategoryTypeId":108}}


Request URL : https://api-sandbox.oqsha.com/Organisations/264/Modules/83/Categories/108


[ExportAllPermitToWork] Export data fetch completed


Request URL : https://api-sandbox.oqsha.com/Organisations/248/IncidentLocations?isActive=1


[ExportAllPermitToWork] Populating flow modifier names started


[ExportAllPermitToWork] Populating flow modifier names completed


[ExportAllPermitToWork] Setting PTW data started


Request URL : https://api-sandbox.oqsha.com/Organisations/248/Users/267/incidentsites?isActive=1


Request URL : https://api-sandbox.oqsha.com/Organisations/248/Divisions


Request URL : https://api-sandbox.oqsha.com/AccessControl/Modules/248


Request URL : https://api-sandbox.oqsha.com/Organisation/248/Modules


Request URL : https://api-sandbox.oqsha.com/Organisation/248/UserPreference


Request URL : https://api-sandbox.oqsha.com/Resources/eng?orgId=248


Request URL : https://api-sandbox.oqsha.com/Health


Request URL : https://api-sandbox.oqsha.com/Resources/package-features-eng


Request URL : https://api-sandbox.oqsha.com/Organisations/264/Modules/79/Workflows/States/Types


Request URL : https://api-sandbox.oqsha.com/Organisations/264/Departments?siteId=845&siteId=846


Request URL : https://api-sandbox.oqsha.com/Organisations/264/Modules/79/Categories/All


Request URL : https://api-sandbox.oqsha.com/Organisation/264/Users/DropDown?ModuleName=Incident Management&siteId=845&siteId=846


Request Body : {"SiteIds":[845,846],"PageNumber":1,"PageLimit":1000,"UserId":678}


Request URL : https://api-sandbox.oqsha.com/Organisations/264/Fir/All


Request URL : https://api-sandbox.oqsha.com/Organisations/248/Users/267


Request URL : https://api-sandbox.oqsha.com/Organisations/264/Investigations/47


Request URL : https://api-sandbox.oqsha.com/Organisations/264/Investigations/48


Request URL : https://api-sandbox.oqsha.com/Reports/IncidentCountReport?OrgId=248&StartDate=2026-06-05&EndDate=2026-06-05


Request URL : https://api-sandbox.oqsha.com/Organisations/248/Divisions/Dropdown


Request URL : https://api-sandbox.oqsha.com/Organisations/248


Request URL : https://api-sandbox.oqsha.com/Languages


Request URL : https://api-sandbox.oqsha.com/Organisations/248/PendingActionsNotifications


Request URL : https://api-sandbox.oqsha.com/Reports/IncidentStatusReport?OrgId=248&FromDate=2026-05-29&ToDate=2026-06-05&DivisionId=1637&DivisionId=1574&DivisionId=1575&DivisionId=1576


Request URL : https://api-sandbox.oqsha.com/Organisation/248/Modules


Request URL : https://api-sandbox.oqsha.com/AccessControl/Modules/248


Request URL : https://api-sandbox.oqsha.com/Reports/IncidentCountReport?OrgId=248&StartDate=2026-05-29&EndDate=2026-06-05&DivisionId=1637&DivisionId=1574&DivisionId=1575&DivisionId=1576


Request URL : https://api-sandbox.oqsha.com/Organisation/248/OrganisationStats?FromDate=2026-05-29&ToDate=2026-06-05&


Request URL : https://api-sandbox.oqsha.com/Organisations/248/EscalatedIncidents


Request URL : https://api-sandbox.oqsha.com/Organisations/248/IncidentStatuses


Request URL : https://api-sandbox.oqsha.com/Organisations/264/Fir/102


Request URL : https://api-sandbox.oqsha.com/Organisations/264/Fir/All


Request URL : https://api-sandbox.oqsha.com/Organisations/264/Investigations/46


Request URL : https://api-sandbox.oqsha.com/Organisations/264/Modules/79/Workflows/States/Types


Request URL : https://api-sandbox.oqsha.com/Organisation/264/AccessControl/Roles


Request URL : https://api-sandbox.oqsha.com/Organisations/264/Modules/79/Workflows/States/Startable


[ExportAllPermitToWork] Setting PTW data completed


[ExportAllPermitToWork] Setting Pending with started


Request URL : https://api-sandbox.oqsha.com/Organisations/264/Modules/79/Categories/All


[ExportAllPermitToWork] Setting Pending with completed


[ExportAllPermitToWork] Fetching comments and attachments started


Fetching comments and attachments started


Request Body : {"SiteIds":[845],"PageNumber":1,"PageLimit":1000,"UserId":678}


One or more errors occurred.

System.AggregateException: One or more errors occurred. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at MySql.Data.MySqlClient.Statement.ExecuteNext()
   at MySql.Data.MySqlClient.PreparableStatement.Execute()
   at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
   at Dapper.SqlMapper.ExecuteReaderWithFlagsFallback(IDbCommand cmd, Boolean wasClosed, CommandBehavior behavior)
   at Dapper.SqlMapper.<QueryImpl>d__138`1.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Dapper.SqlMapper.Query[T](IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Boolean buffered, Nullable`1 commandTimeout, Nullable`1 commandType)
   at IncidentReporter.DAL.Repositories.PtwRepo.GetWorkPermitCommentsByPtwId(List`1 permitIds, Int32 orgId) in C:\GitLab-Runner\builds\27n6lYj0J\0\incident-reporter\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\PtwRepo.cs:line 2986
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
   --- End of inner exception stack trace ---
---> (Inner Exception #0) System.NullReferenceException: Object reference not set to an instance of an object.
   at MySql.Data.MySqlClient.Statement.ExecuteNext()
   at MySql.Data.MySqlClient.PreparableStatement.Execute()
   at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
   at Dapper.SqlMapper.ExecuteReaderWithFlagsFallback(IDbCommand cmd, Boolean wasClosed, CommandBehavior behavior)
   at Dapper.SqlMapper.<QueryImpl>d__138`1.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Dapper.SqlMapper.Query[T](IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Boolean buffered, Nullable`1 commandTimeout, Nullable`1 commandType)
   at IncidentReporter.DAL.Repositories.PtwRepo.GetWorkPermitCommentsByPtwId(List`1 permitIds, Int32 orgId) in C:\GitLab-Runner\builds\27n6lYj0J\0\incident-reporter\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\PtwRepo.cs:line 2986
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()<---

---> (Inner Exception #1) MySql.Data.MySqlClient.MySqlException (0x80004005): There is already an open DataReader associated with this Connection which must be closed first.
   at MySql.Data.MySqlClient.Interceptors.ExceptionInterceptor.Throw(Exception exception)
   at MySql.Data.MySqlClient.MySqlCommand.Throw(Exception ex)
   at MySql.Data.MySqlClient.MySqlCommand.CheckState()
   at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
   at Dapper.SqlMapper.ExecuteReaderWithFlagsFallback(IDbCommand cmd, Boolean wasClosed, CommandBehavior behavior)
   at Dapper.SqlMapper.<QueryImpl>d__138`1.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Dapper.SqlMapper.Query[T](IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Boolean buffered, Nullable`1 commandTimeout, Nullable`1 commandType)
   at IncidentReporter.DAL.Repositories.PtwRepo.GetPtwHistoryAttachments(List`1 ptwIds) in C:\GitLab-Runner\builds\27n6lYj0J\0\incident-reporter\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\PtwRepo.cs:line 3065
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()<---


Request URL : https://api-sandbox.oqsha.com/Organisations/248/Users/267


Request URL : https://api-sandbox.oqsha.com/Organisation/248/Modules


Request URL : https://api-sandbox.oqsha.com/Languages


Request URL : https://api-sandbox.oqsha.com/Organisations/248


Request URL : https://api-sandbox.oqsha.com/Organisations/248/PendingActionsNotifications


Request URL : https://api-sandbox.oqsha.com/Organisations/248/Training/Counts


Request URL : https://api-sandbox.oqsha.com/Organisations/248/TaskCategories/Dropdown


Request URL : https://api-sandbox.oqsha.com/Organisations/264/Modules/79/Categories/106


Request URL : https://api-sandbox.oqsha.com/AccessControl/Modules/248


Request Body : {"SiteId":["708","744","707","705","709","706"],"UserId":267}


Request Body : {"SiteIds":["708","744","707","705","709","706"],"FromDate":"2026-04-01","ToDate":"2026-06-05"}


Request URL : https://api-sandbox.oqsha.com/Organisations/264/Modules/79/Workflows/States/Startable


Request Body : {"Dimensions":{"CategoryTypeId":106}}


Request URL : https://api-sandbox.oqsha.com/Organisations/264/Investigations/All


Request URL : https://api-sandbox.oqsha.com/Organisations/248/Divisions/Dropdown


Request Body : {"SiteId":[845],"CategoryId":[],"StateTypeId":[],"StartDate":"","EndDate":"","SearchTerm":"","SortingColumn":["CreatedOn"],"SortingOrder":["desc"],"PageNumber":1,"PageLimit":500}


Request URL : https://api-sandbox.oqsha.com/Organisations/264/Departments


Request URL : https://api-sandbox.oqsha.com/Organisations/248/Incidents/Counts


Request Body : {"SiteId":[845],"SearchTerm":"","SortingColumn":["Name"],"SortingOrder":["asc"],"PageNumber":1,"PageSize":1000}


Request URL : https://api-sandbox.oqsha.com/Organisations/248/Tasks/List/Counts


Request URL : https://api-sandbox.oqsha.com/Organisations/248/KPI/PlantMaster/Sites/Counts


Request URL : https://api-sandbox.oqsha.com/Organisations/248/Inspections/Counts


Request URL : https://api-sandbox.oqsha.com/Organisations/248/PermitToWork/All/Sites/Counts


Request URL : https://api-sandbox.oqsha.com/Organisations/248/Courses/Counts


Request URL : https://api-sandbox.oqsha.com/Organisations/248/IncidentManagement/Firs/Counts


Request URL : https://api-sandbox.oqsha.com/Organisations/248/ManagementOfChangeList/Counts


Request URL : https://api-sandbox.oqsha.com/Organisation/264/Users/DropDown?siteId=845&isActive=true


Request Body : {"SiteIds":["708","744","707","705","709","706"],"FromDate":"2026-04-01","ToDate":"2026-06-05","AcmModuleId":46}


Request Body : {"SiteIds":["708","744","707","705","709","706"],"FromDate":"2026-04-01","ToDate":"2026-06-05","CategoryId":[1637,1574,1575,1576]}


Request Body : {"SiteIds":["708","744","707","705","709","706"],"FromDate":"2026-04-01","ToDate":"2026-06-05"}


Request Body : {"SiteIds":["708","744","707","705","709","706"]}


Request Body : {"SiteIds":["708","744","707","705","709","706"],"FromDate":"2026-04-01","ToDate":"2026-06-05","CategoryId":[]}


Request URL : https://api-sandbox.oqsha.com/Organisations/248/Reports/Dashboards


Request URL : https://api-sandbox.oqsha.com/Organisations/248/WorkPermit/Statuses


Request URL : https://api-sandbox.oqsha.com/Organisations/248/Library/Categories


Request URL : https://api-sandbox.oqsha.com/Organisation/248/Users/DropDown?ModuleName=Library


Request URL : https://api-sandbox.oqsha.com/Organisation/248/KPI/PlantMasterDropdown


Request URL : https://api-sandbox.oqsha.com/Organisation/248/KPI/EmployeeMasterDropdown


Request Body : {"OrgId":248,"UserId":267}


Request URL : https://api-sandbox.oqsha.com/Organisations/248/EmployeeRecognition


Request Body : {"OrgId":[248],"SiteId":["708","744","707","705","709","706"]}


Request URL : https://api-sandbox.oqsha.com/Organisation/248/KPI/PlantMaster/AverageRatings


Request Body : {"KpiId":[45,46,47,48,49,21,22,23,24,25,33,34,35,36,37,27,28,29,30,31,38,39,40,41,42,59,58,57,56,55,44,16],"SiteIds":["708","744","707","705","709","706"]}


Request URL : https://api-sandbox.oqsha.com/Organisations/248/Modules/95/Categories/All


Request Body : {"SiteIds":[],"PageNumber":1,"PageLimit":10,"SortingColumn":["CreatedOn"],"SortingOrder":["desc"],"UserId":267}


Request URL : https://api-sandbox.oqsha.com/Organisations/262/Modules/135/FileUpload


Request URL : https://api-sandbox.oqsha.com/Organisations/262/R5


Request URL : https://api-sandbox.oqsha.com/Organisations/262/Modules/135/Categories/All


Request URL : https://api-sandbox.oqsha.com/Organisations/262/Modules/135/Workflows/States/Types


Request URL : https://api-sandbox.oqsha.com/Organisation/262/Users/DropDown?siteId=881&siteId=883&siteId=886&siteId=884&siteId=841&siteId=888&siteId=887&siteId=882&siteId=889&siteId=885


Request URL : https://api-sandbox.oqsha.com/Organisations/262/R5/All


Request Body : {"SiteIds":[881,883,886,884,841,888,887,882,889,885],"PageNumber":1,"PageLimit":1000,"UserId":267}


Request URL : https://api-sandbox.oqsha.com/Organisation/248/AccessControl/Roles


Request URL : https://api-sandbox.oqsha.com/Organisations/248/Modules/95/Workflows/States/Types


Request URL : https://api-sandbox.oqsha.com/Organisations/248/Modules/95/Workflows/States


Request Body : {}


Request URL : https://api-sandbox.oqsha.com/Organisations/248/Modules/95/Categories/Dropdown


Request URL : https://api-sandbox.oqsha.com/Resources/app-language-eng


Request URL : https://api-sandbox.oqsha.com/Languages


Request URL : https://api-sandbox.oqsha.com/Modules/APIs


Request URL : https://api-sandbox.oqsha.com/Modules/Version/All?Appversion=5.12.0


Request URL : https://api-sandbox.oqsha.com/Incidents


Request URL : https://api-sandbox.oqsha.com/Organisations/159/TicketStatus/Counts


Request URL : https://api-sandbox.oqsha.com/Organisations/262/R5/2


Request Body : {"SiteIds":[881],"PageNumber":1,"PageLimit":1000,"UserId":267}


Request URL : https://api-sandbox.oqsha.com/Organisations/262/Action-Trackers/All


Request URL : https://api-sandbox.oqsha.com/Organisations/262/Departments


Request Body : {"SiteId":[881],"SearchTerm":"","SortingColumn":["Name"],"SortingOrder":["asc"],"PageNumber":1,"PageSize":1000}


Request URL : https://api-sandbox.oqsha.com/Organisations/262/Modules/135/Workflows/Transitions/Available


Request URL : https://api-sandbox.oqsha.com/Organisations/248/Modules/95/Categories/113


Request Body : {"Dimensions":{"CategoryTypeId":"113"}}


Request URL : https://api-sandbox.oqsha.com/Organisations/264/Fir


Request URL : https://api-sandbox.oqsha.com/Organisations/262/Modules/135/Categories/All


Request Body : {"SiteIds":[],"PageNumber":1,"PageLimit":10,"SortingColumn":["CreatedOn"],"SortingOrder":["desc"],"UserId":267}


Request URL : https://api-sandbox.oqsha.com/Organisations/264/Modules/79/Workflows/States/Types


Request URL : https://api-sandbox.oqsha.com/Organisations/264/Departments?siteId=845&siteId=846


Request URL : https://api-sandbox.oqsha.com/Organisations/264/Modules/79/Categories/All


Request URL : https://api-sandbox.oqsha.com/Organisation/264/Users/DropDown?ModuleName=Incident Management&siteId=845&siteId=846


Request Body : {"SiteIds":[845,846],"PageNumber":1,"PageLimit":1000,"UserId":678}


Request URL : https://api-sandbox.oqsha.com/Organisations/264/Fir/All


Request URL : https://api-sandbox.oqsha.com/Organisations/262/Modules/135/Workflows/States/Types


Request URL : https://api-sandbox.oqsha.com/Organisation/262/AccessControl/Roles


Request URL : https://api-sandbox.oqsha.com/Organisations/262/Modules/135/Categories/153


Request URL : https://api-sandbox.oqsha.com/Organisations/264/Investigations/47


Request URL : https://api-sandbox.oqsha.com/Organisations/264/Investigations/48


Request URL : https://api-sandbox.oqsha.com/Organisations/262/Departments


Request URL : https://api-sandbox.oqsha.com/Organisation/264/AccessControl/Roles


Request URL : https://api-sandbox.oqsha.com/Organisations/264/Fir/103


Request URL : https://api-sandbox.oqsha.com/Organisations/264/Modules/79/Categories/106


Request Body : {"SiteIds":[845],"PageNumber":1,"PageLimit":1000,"UserId":678}


Request URL : https://api-sandbox.oqsha.com/Organisations/264/Modules/79/Workflows/Transitions/Available


Request URL : https://api-sandbox.oqsha.com/Organisations/264/Investigations/All


Request URL : https://api-sandbox.oqsha.com/Transition-History?orgId=264&ModuleId=79&EntityId=103


Request Body : {"SiteId":[845],"CategoryId":[],"StateTypeId":[],"StartDate":"","EndDate":"","SearchTerm":"","SortingColumn":["CreatedOn"],"SortingOrder":["desc"],"PageNumber":1,"PageLimit":500}


Request URL : https://api-sandbox.oqsha.com/Organisations/264/Departments


Request Body : {"SiteId":[845],"SearchTerm":"","SortingColumn":["Name"],"SortingOrder":["asc"],"PageNumber":1,"PageSize":1000}


Request URL : https://api-sandbox.oqsha.com/Organisation/264/Users/DropDown?siteId=845&isActive=true


Request URL : https://api-sandbox.oqsha.com/Resources/app-language-eng


Request URL : https://api-sandbox.oqsha.com/Languages


Request URL : https://api-sandbox.oqsha.com/Modules/APIs


Request URL : https://api-sandbox.oqsha.com/Modules/Version/All?Appversion=6.6.0


Request URL : https://api-sandbox.oqsha.com/Health


Request URL : https://api-sandbox.oqsha.com/AppVersions?DeviceType=android&IsLatestVersion=true&IsOqsha=true


Request URL : https://api-sandbox.oqsha.com/AppVersions?DeviceType=android&Version=5.12.0&IsOqsha=true


Request URL : https://api-sandbox.oqsha.com/Organisation/257/Users/DropDown?ModuleName=FIR


Request URL : https://api-sandbox.oqsha.com/Organisations/257/Fir/All


Request Body : {"PageNumber":1,"PageLimit":50,"AssociationFilters":[],"StartDate":"2026-05-06","EndDate":"2026-06-12","OrgId":257,"CurrentUserId":267}


Request URL : https://api-sandbox.oqsha.com/Organisations/262/Modules/135/Categories/153


Request URL : https://api-sandbox.oqsha.com/Countries


Request URL : https://api-sandbox.oqsha.com/AppVersions?DeviceType=ios&IsLatestVersion=true&IsOqsha=true


Request URL : https://api-sandbox.oqsha.com/Users/null