{"openapi":"3.0.1","info":{"title":"Profiles","description":"Profiles","version":"v3"},"servers":[{"url":"https://talk.perspio.io/profiles/v3","description":"AU Region"},{"url":"https://us-talk.perspio.io/profiles/v3","description":"US Region"}],"paths":{"/counters":{"post":{"tags":["Custom Counters"],"summary":"Create Custom Counter","description":"Create a new custom counter definition.","operationId":"createcustomcounterdefinition","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCustomCounter-RequestObject"},"example":{"name":"Fridge Temperature","description":"Utilization of Fridge","enabled":"true","conditions":{"all":[{"fact":"temperature","operator":"greaterthan","value":"21"},{"fact":"humidity","operator":"greaterthan","value":"15"}]}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"correlationId":{"type":"string","description":"Client-supplied correlation id, echoed back for request tracing."},"countCondition":{"type":"object","properties":{"attribute":{"type":"string"},"operative":{"type":"string"},"value":{"type":"string"}},"description":"Condition that increments the counter."},"counterField":{"type":"string","description":"Field the counter is measured against."},"createdBy":{"type":"string","description":"User or system that created the record."},"createdDate":{"type":"string","description":"UTC timestamp when the record was created.","format":"date-time"},"description":{"type":"string","description":"Free-text description."},"enabled":{"type":"string","description":"Whether the profile is enabled."},"id":{"type":"string","description":"Unique identifier of this record."},"name":{"type":"string","description":"Display name."},"ownedBy":{"type":"string","description":"Owner of the record."},"type":{"type":"string","description":"Type / record-type discriminator."},"updatedBy":{"type":"string","description":"User or system that last modified the record."},"updatedDate":{"type":"string","description":"UTC timestamp when the record was last modified.","format":"date-time"}}},"example":{"correlationId":"PR-000123","countCondition":{"attribute":"attribute","operative":"operative","value":"value"},"counterField":"counterField","createdBy":"admin","createdDate":"2022-10-21T02:27:17.0000000+00:00","description":"Default profile created for the tenant.","enabled":"enabled","id":"PR-000123","name":"Default Profile","ownedBy":"admin","type":"profile","updatedBy":"admin","updatedDate":"2022-10-21T02:27:17.0000000+00:00"}}}},"400":{"description":"Invalid Request"},"401":{"description":"Invalid API Key provided or Invalid Access token"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.Profiles.AssetCounters.CreateCustomMeterDefinition","errorType":"NullReferenceException","statusCode":500,"request":"POST /api/counters","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Internal Server Error: Object reference not set to an instance of an object."}}}}}},"get":{"tags":["Custom Counters"],"summary":"Get Custom Counters","description":"List the custom counter definitions.","operationId":"getcustomcounterdefinitions","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"correlationId":{"type":"string","description":"Client-supplied correlation id, echoed back for request tracing."},"countCondition":{"type":"object","properties":{"attribute":{"type":"string"},"operative":{"type":"string"},"value":{"type":"string"}},"description":"Condition that increments the counter."},"counterField":{"type":"string","description":"Field the counter is measured against."},"createdBy":{"type":"string","description":"User or system that created the record."},"createdDate":{"type":"string","description":"UTC timestamp when the record was created.","format":"date-time"},"description":{"type":"string","description":"Free-text description."},"enabled":{"type":"string","description":"Whether the profile is enabled."},"id":{"type":"string","description":"Unique identifier of this record."},"name":{"type":"string","description":"Display name."},"ownedBy":{"type":"string","description":"Owner of the record."},"type":{"type":"string","description":"Type / record-type discriminator."},"updatedBy":{"type":"string","description":"User or system that last modified the record."},"updatedDate":{"type":"string","description":"UTC timestamp when the record was last modified.","format":"date-time"}}}},"example":[{"correlationId":"corr-4567","countCondition":{"attribute":"speed","operative":">=","value":"80"},"counterField":"overSpeedEvents","createdBy":"admin@example.com","createdDate":"2025-07-02T08:00:00.0000000+00:00","description":"Count of over-speeding events in trips","enabled":"true","id":"counter-1234","name":"OverSpeedCounter","ownedBy":"fleet-ops","type":"SpeedCounter","updatedBy":"admin@example.com","updatedDate":"2025-07-02T09:30:00.0000000+00:00"}]}}},"400":{"description":"Invalid Request"},"401":{"description":"Invalid API Key provided or Invalid Access token"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.Profiles.AssetCounters.GetCustomMeterDefinitions","errorType":"NullReferenceException","statusCode":500,"request":"GET /api/counters","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Internal Server Error: Object reference not set to an instance of an object."}}}}}}},"/counters/{id}":{"delete":{"tags":["Custom Counters"],"summary":"Delete Custom Counter","description":"Delete a custom counter definition by id.","operationId":"deletecustomcounterdefinition","parameters":[{"name":"id","in":"path","description":"Custom Counter Id","required":true,"schema":{"type":"string","example":"in-cc-000002"}}],"responses":{"200":{"description":"The profile was deleted."},"400":{"description":"Invalid Request"},"401":{"description":"Invalid API Key provided or Invalid Access token"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.Profiles.AssetCounters.DeleteCustomMeterDefinition","errorType":"NullReferenceException","statusCode":500,"request":"DELETE /api/counters/in-cc-000002","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Internal Server Error: Object reference not set to an instance of an object."}}}}}},"get":{"tags":["Custom Counters"],"summary":"Get Custom Counter","description":"Fetch a single custom counter definition by id.","operationId":"getcustomcounterdefinition","parameters":[{"name":"id","in":"path","description":"Custom Counter Id","required":true,"schema":{"type":"string","example":"in-cc-000002"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"correlationId":{"type":"string","description":"Client-supplied correlation id, echoed back for request tracing."},"countCondition":{"type":"object","properties":{"attribute":{"type":"string"},"operative":{"type":"string"},"value":{"type":"string"}},"description":"Condition that increments the counter."},"counterField":{"type":"string","description":"Field the counter is measured against."},"createdBy":{"type":"string","description":"User or system that created the record."},"createdDate":{"type":"string","description":"UTC timestamp when the record was created.","format":"date-time"},"description":{"type":"string","description":"Free-text description."},"enabled":{"type":"string","description":"Whether the profile is enabled."},"id":{"type":"string","description":"Unique identifier of this record."},"name":{"type":"string","description":"Display name."},"ownedBy":{"type":"string","description":"Owner of the record."},"type":{"type":"string","description":"Type / record-type discriminator."},"updatedBy":{"type":"string","description":"User or system that last modified the record."},"updatedDate":{"type":"string","description":"UTC timestamp when the record was last modified.","format":"date-time"}}},"example":{"correlationId":"corr-4567","countCondition":{"attribute":"speed","operative":">=","value":"80"},"counterField":"overSpeedEvents","createdBy":"admin@example.com","createdDate":"2025-07-02T08:00:00.0000000+00:00","description":"Count of over-speeding events in trips","enabled":"true","id":"counter-1234","name":"OverSpeedCounter","ownedBy":"fleet-ops","type":"SpeedCounter","updatedBy":"admin@example.com","updatedDate":"2025-07-02T09:30:00.0000000+00:00"}}}},"400":{"description":"Invalid Request"},"401":{"description":"Invalid API Key provided or Invalid Access token"},"404":{"description":"Resource Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.Profiles.AssetCounters.GetCustomMeterDefinition","errorType":"RecordNotFoundException","statusCode":404,"request":"GET /api/counters/in-cc-000002","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Internal Server Error: RecordNotFoundException : Failed to find item 'in-prof-000123'"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.Profiles.AssetCounters.GetCustomMeterDefinition","errorType":"NullReferenceException","statusCode":500,"request":"GET /api/counters/in-cc-000002","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Internal Server Error: Object reference not set to an instance of an object."}}}}}},"put":{"tags":["Custom Counters"],"summary":"Update Custom Counter","description":"Update a custom counter definition by id.","operationId":"updateCustoCounterDefinition","parameters":[{"name":"id","in":"path","description":"Custom Counter Id","required":true,"schema":{"type":"string","example":"in-cc-000002"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCustomCounterDefinition-RequestObject"},"example":{"name":"Fridge Temperature","description":"Updated Utilization of Fridge","enabled":"true","conditions":{"any":[{"fact":"temperature","operator":"greaterthan","value":"21"},{"fact":"humidity","operator":"greaterthan","value":"50"}]}}}}},"responses":{"200":{"description":"The profile was updated."},"400":{"description":"Invalid Request"},"401":{"description":"Invalid API Key provided or Invalid Access token"},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.Profiles.AssetCounters.UpdateCustomMeterDefinition","errorType":"RecordNotFoundException","statusCode":404,"request":"PUT /api/counters/in-cc-000002","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Internal Server Error: RecordNotFoundException : Failed to find item 'in-prof-000123'"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.Profiles.AssetCounters.UpdateCustomMeterDefinition","errorType":"NullReferenceException","statusCode":500,"request":"PUT /api/counters/in-cc-000002","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Internal Server Error: Object reference not set to an instance of an object."}}}}}}},"/workinghours":{"post":{"tags":["Working Hours"],"summary":"Create Working Hours Profile","description":"Create a new working hours profile.","operationId":"createworkinghoursprofile","requestBody":{"description":"Working Hours Profile object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkingHoursProfile"},"example":{"id":"profile-123","recordType":"workingHours","name":"Office Hours","description":"Standard office hours","enabled":true,"timeZone":"Australia/Sydney","schedule":{"days":["Monday","Tuesday","Wednesday","Thursday","Friday"],"startTime":"2026-08-06T09:00:00.0000000+00:00","endTime":"2026-08-06T05:00:00.0000000+00:00"},"createdBy":"admin@example.com","createdDateUTC":"2025-07-16T02:00:00.0000000+00:00","updatedBy":"admin@example.com","updatedDateUTC":"2025-07-16T02:00:00.0000000+00:00"}}}},"responses":{"200":{"description":"The profile was created.","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Display name."},"description":{"type":"string","description":"Free-text description."},"enabled":{"type":"boolean","description":"Whether the profile is enabled."},"timeZone":{"type":"string","description":"Time zone of the profile."},"schedule":{"type":"array","items":{"type":"object","properties":{"dayOfWeek":{"type":"number"},"timeIntervals":{"type":"string"}}},"description":"Working-hours schedule."},"createdBy":{"type":"string","description":"User or system that created the record."},"createdDate":{"type":"string","description":"UTC timestamp when the record was created."},"updatedBy":{"type":"string","description":"User or system that last modified the record."},"ownedBy":{"description":"Owner of the record."},"updatedDate":{"type":"string","description":"UTC timestamp when the record was last modified."},"id":{"type":"string","description":"Unique identifier of this record."},"type":{"type":"string","description":"Type / record-type discriminator."},"correlationId":{"type":"string","description":"Client-supplied correlation id, echoed back for request tracing."},"_ts":{"type":"number"}}},"example":{"name":"Fleet Operating Schedule","description":"Standard operating hours for the fleet","enabled":true,"timeZone":"Australia/Sydney","schedule":[{"dayOfWeek":1,"timeIntervals":"08:00-17:00"},{"dayOfWeek":2,"timeIntervals":"08:00-17:00"},{"dayOfWeek":3,"timeIntervals":"08:00-17:00"},{"dayOfWeek":4,"timeIntervals":"08:00-17:00"},{"dayOfWeek":5,"timeIntervals":"08:00-17:00"}],"createdBy":"admin-user","createdDate":"2025-06-25T08:00:00.0000000+00:00","updatedBy":"scheduler-service","ownedBy":"operations-team","updatedDate":"2025-06-26T09:00:00.0000000+00:00","id":"sched-abc123","type":"Schedule","correlationId":"corr-20250625-080000-xyz789","_ts":1761601234}}}},"400":{"description":"Invalid Request"},"401":{"description":"Invalid API Key provided or Invalid Access token"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.Profiles.AssetWorkingHours.CreateWorkingHoursProfile","errorType":"NullReferenceException","statusCode":500,"request":"POST /api/workinghours","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Internal Server Error: Object reference not set to an instance of an object."}}}}}},"get":{"tags":["Working Hours"],"summary":"Get Working Hours Profiles","description":"Fetch all working hours profiles.","operationId":"getworkinghoursprofiles","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Display name."},"description":{"type":"string","description":"Free-text description."},"enabled":{"type":"boolean","description":"Whether the profile is enabled."},"timeZone":{"type":"string","description":"Time zone of the profile."},"schedule":{"type":"array","items":{"type":"object","properties":{"dayOfWeek":{"type":"number"},"timeIntervals":{"type":"string"}}},"description":"Working-hours schedule."},"createdBy":{"type":"string","description":"User or system that created the record."},"createdDate":{"type":"string","description":"UTC timestamp when the record was created."},"updatedBy":{"type":"string","description":"User or system that last modified the record."},"ownedBy":{"description":"Owner of the record."},"updatedDate":{"type":"string","description":"UTC timestamp when the record was last modified."},"id":{"type":"string","description":"Unique identifier of this record."},"type":{"type":"string","description":"Type / record-type discriminator."},"correlationId":{"type":"string","description":"Client-supplied correlation id, echoed back for request tracing."},"_ts":{"type":"number"}}}},"example":[{"name":"Standard Operating Hours","description":"Default schedule for weekdays","enabled":true,"timeZone":"Australia/Sydney","schedule":[{"dayOfWeek":1,"timeIntervals":"08:00-17:00"},{"dayOfWeek":2,"timeIntervals":"08:00-17:00"},{"dayOfWeek":3,"timeIntervals":"08:00-17:00"},{"dayOfWeek":4,"timeIntervals":"08:00-17:00"},{"dayOfWeek":5,"timeIntervals":"08:00-17:00"}],"createdBy":"admin","createdDate":"2025-06-25T09:00:00.0000000+00:00","updatedBy":"scheduler-manager","ownedBy":"operations-team","updatedDate":"2025-06-26T10:30:00.0000000+00:00","id":"sched-0001","type":"Schedule","correlationId":"corr-20250625-090000-abc123","_ts":1761600001},{"name":"Weekend Maintenance Hours","description":"Limited weekend schedule","enabled":true,"timeZone":"Australia/Sydney","schedule":[{"dayOfWeek":6,"timeIntervals":"2026-08-20T09:00:00.0000000-13:00"},{"dayOfWeek":0,"timeIntervals":"2026-08-21T09:00:00.0000000-12:00"}],"createdBy":"admin","createdDate":"2025-06-20T09:00:00.0000000+00:00","updatedBy":"scheduler-manager","ownedBy":"maintenance-team","updatedDate":"2025-06-24T11:00:00.0000000+00:00","id":"sched-0002","type":"Schedule","correlationId":"corr-20250620-090000-def456","_ts":1761500002}]}}},"400":{"description":"Invalid Request"},"401":{"description":"Invalid API Key provided or Invalid Access token"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.Profiles.AssetWorkingHours.GetWorkingHourProfiles","errorType":"NullReferenceException","statusCode":500,"request":"GET /api/workinghours","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Internal Server Error: Object reference not set to an instance of an object."}}}}}}},"/workinghours/{id}":{"delete":{"tags":["Working Hours"],"summary":"Delete Working Hours Profile","description":"Delete a working-hours profile by id.","operationId":"deleteworkinghoursprofile","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","example":"in-wh-000001"}}],"responses":{"200":{"description":"The profile was deleted."},"400":{"description":"Invalid Request"},"401":{"description":"Invalid API Key provided or Invalid Access token"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.Profiles.AssetWorkingHours.DeleteWorkingHoursProfile","errorType":"NullReferenceException","statusCode":500,"request":"DELETE /api/workinghours/in-wh-000001","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Internal Server Error: Object reference not set to an instance of an object."}}}}}},"put":{"tags":["Working Hours"],"summary":"Update Working Hours Profile","description":"Update a working-hours profile by id.","operationId":"updateworkinghoursprofile","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","example":"in-wh-000002"}}],"requestBody":{"description":"Working Hours Profile object to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkingHoursProfile"},"example":{"id":"profile-123","recordType":"workingHours","name":"Updated Office Hours","description":"Updated description for working hours","enabled":true,"timeZone":"Australia/Sydney","schedule":{"days":["Monday","Tuesday","Wednesday","Thursday","Friday"],"startTime":"2026-08-06T09:00:00.0000000+00:00","endTime":"2026-08-06T05:00:00.0000000+00:00"},"createdBy":"admin@example.com","createdDateUTC":"2025-07-16T02:00:00.0000000+00:00","updatedBy":"admin@example.com","updatedDateUTC":"2025-07-17T02:00:00.0000000+00:00"}}}},"responses":{"200":{"description":"The profile was updated."},"400":{"description":"Invalid Request"},"401":{"description":"Invalid API Key provided or Invalid Access token"},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.Profiles.AssetWorkingHours.UpdateWorkingHoursProfile","errorType":"RecordNotFoundException","statusCode":404,"request":"PUT /api/workinghours/in-wh-000002","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Internal Server Error: RecordNotFoundException : Failed to find item 'in-prof-000123'"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.Profiles.AssetWorkingHours.UpdateWorkingHoursProfile","errorType":"NullReferenceException","statusCode":500,"request":"PUT /api/workinghours/in-wh-000002","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Internal Server Error: Object reference not set to an instance of an object."}}}}}},"get":{"tags":["Working Hours"],"summary":"Get Working Hours Profile","description":"Fetch a single working-hours profile by id.","operationId":"getworkinghoursprofile","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","example":"in-wh-000002"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Display name."},"description":{"type":"string","description":"Free-text description."},"enabled":{"type":"boolean","description":"Whether the profile is enabled."},"timeZone":{"type":"string","description":"Time zone of the profile."},"schedule":{"type":"array","items":{"type":"object","properties":{"dayOfWeek":{"type":"number"},"timeIntervals":{"type":"string"}}},"description":"Working-hours schedule."},"createdBy":{"type":"string","description":"User or system that created the record."},"createdDate":{"type":"string","description":"UTC timestamp when the record was created."},"updatedBy":{"type":"string","description":"User or system that last modified the record."},"ownedBy":{"description":"Owner of the record."},"updatedDate":{"type":"string","description":"UTC timestamp when the record was last modified."},"id":{"type":"string","description":"Unique identifier of this record."},"type":{"type":"string","description":"Type / record-type discriminator."},"correlationId":{"type":"string","description":"Client-supplied correlation id, echoed back for request tracing."},"_ts":{"type":"number"}}},"example":{"name":"Fleet Operating Schedule","description":"Standard operating hours for the fleet","enabled":true,"timeZone":"Australia/Sydney","schedule":[{"dayOfWeek":1,"timeIntervals":"08:00-17:00"},{"dayOfWeek":2,"timeIntervals":"08:00-17:00"},{"dayOfWeek":3,"timeIntervals":"08:00-17:00"},{"dayOfWeek":4,"timeIntervals":"08:00-17:00"},{"dayOfWeek":5,"timeIntervals":"08:00-17:00"}],"createdBy":"admin-user","createdDate":"2025-06-25T08:00:00.0000000+00:00","updatedBy":"scheduler-service","ownedBy":"operations-team","updatedDate":"2025-06-26T09:00:00.0000000+00:00","id":"sched-abc123","type":"Schedule","correlationId":"corr-20250625-080000-xyz789","_ts":1761601234}}}},"400":{"description":"Invalid Request"},"401":{"description":"Invalid API Key provided or Invalid Access token"},"404":{"description":"Resource Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.Profiles.AssetWorkingHours.GetWorkingHourProfile","errorType":"RecordNotFoundException","statusCode":404,"request":"GET /api/workinghours/in-wh-000002","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Internal Server Error: RecordNotFoundException : Failed to find item 'in-prof-000123'"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.Profiles.AssetWorkingHours.GetWorkingHourProfile","errorType":"NullReferenceException","statusCode":500,"request":"GET /api/workinghours/in-wh-000002","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Internal Server Error: Object reference not set to an instance of an object."}}}}}}},"/users":{"get":{"tags":["User Profiles"],"summary":"Get User Profiles","description":"List the user (role) profiles for the tenant.","operationId":"getuserprofiles","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RoleDefinitionRecord"}},"example":[{"userType":"web","category":"custom","roleDisplayName":"Fleet Manager","roleDescription":"Role with full access to fleet management modules","modules":[{"id":"mod-vehicles","enabled":true,"canToggle":true,"requiredPermissions":["vehicle.read","vehicle.write"],"readWrite":true,"description":"Vehicle management module","subModules":[{"id":"mod-vehicle-inspection","enabled":true,"canToggle":true,"requiredPermissions":["inspection.read","inspection.write"],"readWrite":true,"description":"Vehicle inspection submodule","subModules":[]}]},{"id":"mod-drivers","enabled":true,"canToggle":false,"requiredPermissions":["driver.read"],"readWrite":false,"description":"Driver management module","subModules":[]}],"isGlobal":false,"readWrite":true,"id":"role-123456","type":"RoleDefinitionRecord","correlationId":"corr-78910"}]}}},"400":{"description":"Invalid Request"},"401":{"description":"Invalid API Key provided or Invalid Access token"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.Profiles.UserProfiles.GetUserProfiles","errorType":"NullReferenceException","statusCode":500,"request":"GET /api/users","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Internal Server Error: Object reference not set to an instance of an object."}}}}}},"post":{"tags":["User Profiles"],"summary":"Create User Profile","description":"Create a new user profile.","operationId":"createuserprofile","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileRequest"},"example":{"name":"My Custom Profile","description":"This is a custom user profile","type":"web","permissions":{"home":"read","assets":"read","people":"off","reports":"readwrite","inventory":"off","geofences":"read","admin":"off","connectors":"off","groups":"read","workflows":"read","servicing":"read","utilisation":"read","transport":"off","data-explorer":"read","search":"read","dashboards":"read","assets.live":"read","assets.asset-details":"read","assets.activity":"read","assets.metrics":"read","assets.utilisation":"read","assets.events":"read","assets.history-replay":"read","assets.erp-history":"read","assets.devices":"read","assets.configuration":"read","assets.audit-log":"off","assets.servicing":"read"}}}}},"responses":{"200":{"description":"The profile was created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleDefinitionRecord"},"example":{"userType":"standard","category":"fleet","roleDisplayName":"Fleet Viewer","roleDescription":"Read-only fleet access.","modules":[],"isGlobal":false,"readWrite":false,"id":"RP-000123","type":"roleDefinition","correlationId":"c-001","homePage":"dashboard","markerProfile":null,"createdBy":"admin","createdDate":"2026-06-01T12:00:00.0000000+00:00","updatedBy":"admin","updatedDate":"2026-06-10T12:00:00.0000000+00:00"}}}},"400":{"description":"Invalid Request"},"401":{"description":"Invalid API Key provided or Invalid Access token"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.Profiles.UserProfiles.CreateUserProfile","errorType":"NullReferenceException","statusCode":500,"request":"POST /api/users","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Internal Server Error: Object reference not set to an instance of an object."}}}}}}},"/users/{id}":{"get":{"tags":["User Profiles"],"summary":"Get User Profile","description":"Fetch a single user profile by id.","operationId":"getuserprofile","parameters":[{"name":"id","in":"path","description":"User Profile Id","required":true,"schema":{"type":"string","example":"in-up-000001"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleDefinitionRecord"},"example":{"userType":"web","category":"custom","roleDisplayName":"Fleet Manager","roleDescription":"Role with full access to fleet management modules","modules":[{"id":"mod-vehicles","enabled":true,"canToggle":true,"requiredPermissions":["vehicle.read","vehicle.write"],"readWrite":true,"description":"Vehicle management module","subModules":[{"id":"mod-vehicle-inspection","enabled":true,"canToggle":true,"requiredPermissions":["inspection.read","inspection.write"],"readWrite":true,"description":"Vehicle inspection submodule","subModules":[]}]},{"id":"mod-drivers","enabled":true,"canToggle":false,"requiredPermissions":["driver.read"],"readWrite":false,"description":"Driver management module","subModules":[]}],"isGlobal":false,"readWrite":true,"id":"role-123456","type":"RoleDefinitionRecord","correlationId":"corr-78910"}}}},"400":{"description":"Invalid Request"},"401":{"description":"Invalid API Key provided or Invalid Access token"},"404":{"description":"Resource Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.Users.UsersApi.GetUser","errorType":"RecordNotFoundException","statusCode":404,"request":"GET /api/users/in-up-000001","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Internal Server Error: RecordNotFoundException : Failed to find item 'in-prof-000123'"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.Users.UsersApi.GetUser","errorType":"NullReferenceException","statusCode":500,"request":"GET /api/users/in-up-000001","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Internal Server Error: Object reference not set to an instance of an object."}}}}}},"patch":{"tags":["User Profiles"],"summary":"Update User Profile","description":"Update a user profile by id.","operationId":"updateuserprofile","parameters":[{"name":"id","in":"path","description":"User Profile Id","required":true,"schema":{"type":"string","example":"in-up-000001"}}],"requestBody":{"content":{"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/JsonPatchDocument"},"example":[{"op":"string","path":"string","value":{}}]}}},"responses":{"200":{"description":"The profile was updated."},"400":{"description":"Invalid Request"},"401":{"description":"Invalid API Key provided or Invalid Access token"},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.Users.UsersApi.UpdateUser","errorType":"RecordNotFoundException","statusCode":404,"request":"PATCH /api/users/in-up-000001","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Internal Server Error: RecordNotFoundException : Failed to find item 'in-prof-000123'"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.Users.UsersApi.UpdateUser","errorType":"NullReferenceException","statusCode":500,"request":"PATCH /api/users/in-up-000001","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Internal Server Error: Object reference not set to an instance of an object."}}}}}},"delete":{"tags":["User Profiles"],"summary":"Delete User Profile","description":"Delete a user profile by id.","operationId":"deleteuserprofile","parameters":[{"name":"id","in":"path","description":"User Profile Id","required":true,"schema":{"type":"string","example":"in-up-000001"}}],"responses":{"200":{"description":"The profile was deleted."},"400":{"description":"Invalid Request"},"401":{"description":"Invalid API Key provided or Invalid Access token"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.Users.UsersApi.DeleteUser","errorType":"NullReferenceException","statusCode":500,"request":"DELETE /api/users/in-up-000001","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Internal Server Error: Object reference not set to an instance of an object."}}}}}}},"/assetmarkers":{"post":{"tags":["Asset Marker Profiles"],"summary":"Create Asset Marker Profile","description":"Create a new asset marker profile.","operationId":"createassetmarkerprofile","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAssetMarkerProfileRequest"},"example":{"title":"Profile 1","items":[{"color":"black","data":"no devices","conditions":{"fact":"relatedobjectscount","operator":"equal","value":"0"}},{"color":"grey","data":"not communicating","conditions":{"fact":"lastcommunicatedutc","operator":"equal","value":"0001-01-01T12:00:00.0000000+00:00"}},{"color":"red","data":"not communicating for 24 hours","conditions":{"fact":"lastcommunicatedutc","operator":"hoursago","value":"24"}},{"color":"lightblue","data":"active","conditions":{"fact":"active","operator":"equal","value":"true"}},{"color":"blue","data":"inactive","conditions":{"fact":"active","operator":"equal","value":"false"}},{"color":"black","data":null,"conditions":null}]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"correlationId":{"type":"string","description":"Client-supplied correlation id, echoed back for request tracing."},"countCondition":{"type":"object","properties":{"attribute":{"type":"string"},"operative":{"type":"string"},"value":{"type":"string"}},"description":"Condition that increments the counter."},"counterField":{"type":"string","description":"Field the counter is measured against."},"createdBy":{"type":"string","description":"User or system that created the record."},"createdDate":{"type":"string","description":"UTC timestamp when the record was created.","format":"date-time"},"description":{"type":"string","description":"Free-text description."},"enabled":{"type":"string","description":"Whether the profile is enabled."},"id":{"type":"string","description":"Unique identifier of this record."},"IsNew":{"type":"boolean"},"name":{"type":"string","description":"Display name."},"ownedBy":{"type":"string","description":"Owner of the record."},"type":{"type":"string","description":"Type / record-type discriminator."},"TsDateTime":{"type":"string","format":"date-time"},"updatedBy":{"type":"string","description":"User or system that last modified the record."},"updatedDate":{"type":"string","description":"UTC timestamp when the record was last modified.","format":"date-time"}}},"example":{"correlationId":"PR-000123","countCondition":{"attribute":"attribute","operative":"operative","value":"value"},"counterField":"counterField","createdBy":"admin","createdDate":"2022-10-21T02:27:17.0000000+00:00","description":"Default profile created for the tenant.","enabled":"enabled","id":"PR-000123","IsNew":false,"name":"Default Profile","ownedBy":"admin","type":"profile","TsDateTime":"2022-10-21T02:27:17.0000000+00:00","updatedBy":"admin","updatedDate":"2022-10-21T02:27:17.0000000+00:00"}}}},"400":{"description":"Invalid Request"},"401":{"description":"Invalid API Key provided or Invalid Access token"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.Profiles.AssetMarkers.CreateAssetMarkerProfile","errorType":"NullReferenceException","statusCode":500,"request":"POST /api/assetmarkers","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Internal Server Error: Object reference not set to an instance of an object."}}}}}},"get":{"tags":["Asset Marker Profiles"],"summary":"Get Asset Marker Profiles","description":"Fetch all asset marker profiles.","operationId":"getassetmarkerprofiles","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AssetMarkerProfileObject"}},"example":[{"name":"Profile 1","description":null,"enabled":false,"items":[{"color":"black","data":"no devices","conditions":{"fact":"relatedobjectscount","operator":"equal","value":"0"}},{"color":"grey","data":"not communicating","conditions":{"fact":"lastcommunicatedutc","operator":"equal","value":"0001-01-01T12:00:00.0000000+00:00"}},{"color":"red","data":"not communicating for 24 hours","conditions":{"fact":"lastcommunicatedutc","operator":"hoursago","value":"24"}},{"color":"lightblue","data":"active","conditions":{"fact":"active","operator":"equal","value":"true"}},{"color":"blue","data":"inactive","conditions":{"fact":"active","operator":"equal","value":"false"}},{"color":"black","data":null,"conditions":null}],"createdBy":null,"createdDate":"2025-03-21T04:34:13.0000000+00:00","updatedBy":null,"updatedDate":"2025-03-21T04:34:13.0000000+00:00","id":"in-am-000001","type":"AssetMarker","correlationId":"api-20250321-043413-132-6046d","_ts":1742531832,"ttl":-1}]}}},"400":{"description":"Invalid Request"},"401":{"description":"Invalid API Key provided or Invalid Access token"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.Profiles.AssetMarkers.GetAssetMarkerProfiles","errorType":"NullReferenceException","statusCode":500,"request":"GET /api/assetmarkers","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Internal Server Error: Object reference not set to an instance of an object."}}}}}}},"/assetmarkers/{id}":{"delete":{"tags":["Asset Marker Profiles"],"summary":"Delete Asset Marker Profile","description":"Delete a asset marker profile by id.","operationId":"deleteassetmarkerprofile","parameters":[{"name":"id","in":"path","description":"Asset Marker Profile Id","required":true,"schema":{"type":"string","example":"in-am-000001"}}],"responses":{"200":{"description":"The profile was deleted."},"400":{"description":"Invalid Request"},"401":{"description":"Invalid API Key provided or Invalid Access token"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.Profiles.AssetMarkers.DeleteAssetMarkerProfile","errorType":"NullReferenceException","statusCode":500,"request":"DELETE /api/assetmarkers/in-am-000001","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Internal Server Error: Object reference not set to an instance of an object."}}}}}},"get":{"tags":["Asset Marker Profiles"],"summary":"Get Asset Marker Profile","description":"Fetch a single asset marker profile by id.","operationId":"getassetmarkerprofile","parameters":[{"name":"id","in":"path","description":"Asset Marker Profile Id","required":true,"schema":{"type":"string","example":"in-am-000001"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetMarkerProfileObject"},"example":{"name":"Profile 1","description":null,"enabled":false,"items":[{"color":"black","data":"no devices","conditions":{"fact":"relatedobjectscount","operator":"equal","value":"0"}},{"color":"grey","data":"not communicating","conditions":{"fact":"lastcommunicatedutc","operator":"equal","value":"0001-01-01T12:00:00.0000000+00:00"}},{"color":"red","data":"not communicating for 24 hours","conditions":{"fact":"lastcommunicatedutc","operator":"hoursago","value":"24"}},{"color":"lightblue","data":"active","conditions":{"fact":"active","operator":"equal","value":"true"}},{"color":"blue","data":"inactive","conditions":{"fact":"active","operator":"equal","value":"false"}},{"color":"black","data":null,"conditions":null}],"createdBy":null,"createdDate":"2025-03-21T04:34:13.0000000+00:00","updatedBy":null,"updatedDate":"2025-03-21T04:34:13.0000000+00:00","id":"in-am-000001","type":"AssetMarker","correlationId":"api-20250321-043413-132-6046d","_ts":1742531832,"ttl":-1}}}},"400":{"description":"Invalid Request"},"401":{"description":"Invalid API Key provided or Invalid Access token"},"404":{"description":"Resource Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.Profiles.AssetMarkers.GetAssetMarkerProfile","errorType":"RecordNotFoundException","statusCode":404,"request":"GET /api/assetmarkers/in-am-000001","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Internal Server Error: RecordNotFoundException : Failed to find item 'in-prof-000123'"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.Profiles.AssetMarkers.GetAssetMarkerProfile","errorType":"NullReferenceException","statusCode":500,"request":"GET /api/assetmarkers/in-am-000001","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Internal Server Error: Object reference not set to an instance of an object."}}}}}},"patch":{"tags":["Asset Marker Profiles"],"summary":"Update Asset Marker Profile","description":"Update a asset marker profile by id.","operationId":"updateassetmarkerprofile","parameters":[{"name":"id","in":"path","description":"Asset Marker Profile Id","required":true,"schema":{"type":"string","example":"in-am-000001"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCustomCounterDefinition-RequestObject"},"example":{"name":"Fridge Temperature","description":"Updated Utilization of Fridge","enabled":"true","conditions":{"any":[{"fact":"temperature","operator":"greaterthan","value":"21"},{"fact":"humidity","operator":"greaterthan","value":"50"}]}}},"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/JsonPatchDocument"},"example":[{"op":"string","path":"string","value":{}}]}}},"responses":{"200":{"description":"The profile was updated."},"400":{"description":"Invalid Request"},"401":{"description":"Invalid API Key provided or Invalid Access token"},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.Profiles.AssetMarkers.UpdateAssetMarkerProfile","errorType":"RecordNotFoundException","statusCode":404,"request":"PATCH /api/assetmarkers/in-am-000001","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Internal Server Error: RecordNotFoundException : Failed to find item 'in-prof-000123'"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.Profiles.AssetMarkers.UpdateAssetMarkerProfile","errorType":"NullReferenceException","statusCode":500,"request":"PATCH /api/assetmarkers/in-am-000001","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Internal Server Error: Object reference not set to an instance of an object."}}}}}}},"/share-details/{id}":{"get":{"tags":["Share Details"],"summary":"Get Details Sharing Profile","description":"Fetch a single details-sharing profile by id.","operationId":"getDetailssSharingProfile","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","example":"in-ad-000002"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Display name."},"description":{"type":"string","description":"Free-text description."},"enabled":{"type":"boolean","description":"Whether the profile is enabled."},"details":{"type":"array","items":{"type":"string"},"description":"Detail fields shared by this profile."},"createdBy":{"type":"string","description":"User or system that created the record."},"createdDate":{"type":"string","description":"UTC timestamp when the record was created."},"updatedBy":{"type":"string","description":"User or system that last modified the record."},"ownedBy":{"description":"Owner of the record."},"updatedDate":{"type":"string","description":"UTC timestamp when the record was last modified."},"id":{"type":"string","description":"Unique identifier of this record."},"type":{"type":"string","description":"Type / record-type discriminator."},"correlationId":{"type":"string","description":"Client-supplied correlation id, echoed back for request tracing."},"_ts":{"type":"number"}}},"example":{"name":"Asset Maintenance Rule","description":"Rule to monitor asset maintenance schedules","enabled":true,"details":["Notify if maintenance is overdue","Check every 7 days","Escalate to manager if unresolved"],"createdBy":"admin-user","createdDate":"2025-06-25T08:00:00.0000000+00:00","updatedBy":"system-automation","ownedBy":"maintenance-team","updatedDate":"2025-06-26T09:00:00.0000000+00:00","id":"rule-987654321","type":"RuleConfiguration","correlationId":"corr-20250625-080000-abc123","_ts":1761605678}}}},"400":{"description":"Invalid Request"},"401":{"description":"Invalid API Key provided or Invalid Access token"},"404":{"description":"Resource Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.Profiles.AssetDetailsShare.GetDetailsSharingProfile","errorType":"RecordNotFoundException","statusCode":404,"request":"GET /api/share-details/in-ad-000002","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Internal Server Error: RecordNotFoundException : Failed to find item 'in-prof-000123'"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.Profiles.AssetDetailsShare.GetDetailsSharingProfile","errorType":"NullReferenceException","statusCode":500,"request":"GET /api/share-details/in-ad-000002","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Internal Server Error: Object reference not set to an instance of an object."}}}}}},"put":{"tags":["Share Details"],"summary":"Update Details Sharing Profile","description":"Update a details-sharing profile by id.","operationId":"updateDetailsSharingProfile","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","example":"in-ad-000001"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailsSharingProfileRequest"},"example":{"name":"assetSummary","description":"Share Asset Summary for Reporting","enabled":false,"details":["payload.assetInfo.assetId","payload.assetInfo.serialNumber","payload.assetInfo.model","payload.assetInfo.branch"],"createdBy":"admin@perspio.io","createdDate":"2024-06-15T10:22:30.0000000+00:00","updatedBy":"john.doe@perspio.io","updatedDate":"2025-05-30T02:45:12.0000000+00:00","id":"in-as-000025","type":"SummaryShare","correlationId":"api-20250530-144512-abc123","_ts":1748121512,"ttl":3600}}}},"responses":{"200":{"description":"The profile was updated."},"400":{"description":"Invalid Request"},"401":{"description":"Invalid API Key provided or Invalid Access token"},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.Profiles.AssetDetailsShare.UpdateDetailsSharingProfile","errorType":"RecordNotFoundException","statusCode":404,"request":"PUT /api/share-details/in-ad-000001","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Internal Server Error: RecordNotFoundException : Failed to find item 'in-prof-000123'"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.Profiles.AssetDetailsShare.UpdateDetailsSharingProfile","errorType":"NullReferenceException","statusCode":500,"request":"PUT /api/share-details/in-ad-000001","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Internal Server Error: Object reference not set to an instance of an object."}}}}}},"delete":{"tags":["Share Details"],"summary":"Delete Details Sharing Profile","description":"Delete a details-sharing profile by id.","operationId":"deleteDetailsSharingProfile","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","example":"in-ad-000002"}}],"responses":{"200":{"description":"The profile was deleted."},"400":{"description":"Invalid Request"},"401":{"description":"Invalid API Key provided or Invalid Access token"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.Profiles.AssetDetailsShare.DeleteDetailsSharingProfile","errorType":"NullReferenceException","statusCode":500,"request":"DELETE /api/share-details/in-ad-000002","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Internal Server Error: Object reference not set to an instance of an object."}}}}}}},"/share-details":{"get":{"tags":["Share Details"],"summary":"Get Details Sharing Profiles","description":"Fetch all details sharing profiles.","operationId":"getDetailsSharingProfiles","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Display name."},"description":{"type":"string","description":"Free-text description."},"enabled":{"type":"boolean","description":"Whether the profile is enabled."},"details":{"type":"array","items":{"type":"string"},"description":"Detail fields shared by this profile."},"createdBy":{"type":"string","description":"User or system that created the record."},"createdDate":{"type":"string","description":"UTC timestamp when the record was created."},"updatedBy":{"type":"string","description":"User or system that last modified the record."},"ownedBy":{"description":"Owner of the record."},"updatedDate":{"type":"string","description":"UTC timestamp when the record was last modified."},"id":{"type":"string","description":"Unique identifier of this record."},"type":{"type":"string","description":"Type / record-type discriminator."},"correlationId":{"type":"string","description":"Client-supplied correlation id, echoed back for request tracing."},"_ts":{"type":"number"}}}},"example":[{"name":"Asset Maintenance Rule","description":"Monitors asset maintenance schedules and alerts when due","enabled":true,"details":["Send notification 7 days before maintenance due date","Escalate if overdue by 3 days","Log maintenance completion"],"createdBy":"adminUser","createdDate":"2025-06-25T10:00:00.0000000+00:00","updatedBy":"system","ownedBy":"maintenanceTeam","updatedDate":"2025-06-26T12:00:00.0000000+00:00","id":"rule-001","type":"RuleConfiguration","correlationId":"corr-20250625-001","_ts":1761600000},{"name":"Driver Compliance Check","description":"Ensures drivers maintain valid licenses and certifications","enabled":false,"details":["Verify license expiration date","Notify drivers 30 days before expiry","Generate monthly compliance report"],"createdBy":"complianceAdmin","createdDate":"2025-05-20T14:30:00.0000000+00:00","updatedBy":"complianceSystem","ownedBy":"complianceDept","updatedDate":"2025-06-20T09:15:00.0000000+00:00","id":"rule-002","type":"RuleConfiguration","correlationId":"corr-20250520-002","_ts":1761000000},{"name":"Geofence Breach Alert","description":"Alerts when assets leave designated geofence areas","enabled":true,"details":["Monitor geofence boundary crossings","Send SMS alerts to supervisors","Record breach events in dashboard"],"createdBy":"geoAdmin","createdDate":"2025-04-10T08:45:00.0000000+00:00","updatedBy":"geoSystem","ownedBy":"operationsTeam","updatedDate":"2025-06-22T16:00:00.0000000+00:00","id":"rule-003","type":"RuleConfiguration","correlationId":"corr-20250410-003","_ts":1760500000}]}}},"400":{"description":"Invalid Request"},"401":{"description":"Invalid API Key provided or Invalid Access token"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.Profiles.AssetDetailsShare.GetDetailsSharingProfiles","errorType":"NullReferenceException","statusCode":500,"request":"GET /api/share-details","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Internal Server Error: Object reference not set to an instance of an object."}}}}}},"post":{"tags":["Share Details"],"summary":"Create Details Sharing Profile","description":"Create a new details-sharing profile.","operationId":"createDetailsSharingProfile","requestBody":{"description":"Details Sharing Profile object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailsSharingProfile"},"example":{"id":"profile-123","recordType":"detailsSharing","name":"Confidential Info Sharing","description":"Profile for confidential info sharing settings","enabled":true,"details":["email","phone","address"],"createdBy":"admin@example.com","createdDateUTC":"2025-07-16T02:00:00.0000000+00:00","updatedBy":"admin@example.com","updatedDateUTC":"2025-07-17T02:00:00.0000000+00:00"}}}},"responses":{"200":{"description":"The profile was created.","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Display name."},"description":{"type":"string","description":"Free-text description."},"enabled":{"type":"boolean","description":"Whether the profile is enabled."},"details":{"type":"array","items":{"type":"string"},"description":"Detail fields shared by this profile."},"createdBy":{"type":"string","description":"User or system that created the record."},"createdDate":{"type":"string","description":"UTC timestamp when the record was created."},"updatedBy":{"type":"string","description":"User or system that last modified the record."},"ownedBy":{"description":"Owner of the record."},"updatedDate":{"type":"string","description":"UTC timestamp when the record was last modified."},"id":{"type":"string","description":"Unique identifier of this record."},"type":{"type":"string","description":"Type / record-type discriminator."},"correlationId":{"type":"string","description":"Client-supplied correlation id, echoed back for request tracing."},"_ts":{"type":"number"}}},"example":{"name":"Asset Maintenance Rule","description":"Rule to monitor asset maintenance schedules","enabled":true,"details":["Notify if maintenance is overdue","Check every 7 days","Escalate to manager if unresolved"],"createdBy":"admin-user","createdDate":"2025-06-25T08:00:00.0000000+00:00","updatedBy":"system-automation","ownedBy":"maintenance-team","updatedDate":"2025-06-26T09:00:00.0000000+00:00","id":"rule-987654321","type":"RuleConfiguration","correlationId":"corr-20250625-080000-abc123","_ts":1761605678}}}},"400":{"description":"Invalid Request"},"401":{"description":"Invalid API Key provided or Invalid Access token"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerspioError"},"example":{"functionName":"Perspio.API.Profiles.AssetDetailsShare.CreateDetailsSharingProfile","errorType":"NullReferenceException","statusCode":500,"request":"POST /api/share-details","tenantId":"in-93b1a4c6-1234-4c1c-9d2a-1f2e3d4c5b6a","message":"Internal Server Error: Object reference not set to an instance of an object."}}}}}}}},"components":{"schemas":{"PerspioError":{"type":"object","properties":{"functionName":{"type":"string","description":"Name of the backend function that raised the error."},"errorType":{"type":"string","description":"Exception/error type name."},"statusCode":{"type":"integer","description":"HTTP status code of the error.","format":"int32"},"request":{"type":"string","description":"Method and URL of the failing request."},"tenantId":{"type":"string","description":"Tenant the request was executed for."},"message":{"type":"string","description":"Human-readable error message."}},"description":"Standard Perspio backend error body (ErrorResultObject emitted by the error-handling middleware)."},"CreateCustomCounter-RequestObject":{"type":"object","properties":{"name":{"type":"string","description":"Display name."},"description":{"type":"string","description":"Free-text description."},"enabled":{"type":"string","description":"Whether the profile is enabled."},"conditions":{"type":"object","properties":{"all":{"type":"array","items":{"required":["fact","operator","value"],"type":"object","properties":{"fact":{"type":"string"},"operator":{"type":"string"},"value":{"type":"string"}}}}}}}},"UpdateCustomCounterDefinition-RequestObject":{"type":"object","properties":{"name":{"type":"string","description":"Display name."},"description":{"type":"string","description":"Free-text description."},"enabled":{"type":"string","description":"Whether the profile is enabled."},"conditions":{"type":"object","properties":{"any":{"type":"array","items":{"required":["fact","operator","value"],"type":"object","properties":{"fact":{"type":"string"},"operator":{"type":"string"},"value":{"type":"string"}}}}}}}},"UpdateCustomCountersForAsset-RequestObject":{"type":"array","items":{"required":["op","path","value"],"type":"object","properties":{"op":{"type":"string"},"path":{"type":"string"},"value":{"type":"string"}}}},"RoleDefinitionRecord":{"type":"object","properties":{"userType":{"type":"string","description":"The type of user (e.g., 'web')"},"category":{"type":"string","description":"The category of the role (e.g., 'custom')"},"roleDisplayName":{"type":"string","description":"Display name for the role"},"roleDescription":{"type":"string","description":"Description of the role","nullable":true},"modules":{"type":"array","items":{"$ref":"#/components/schemas/Module"},"description":"List of modules associated with the role"},"isGlobal":{"type":"boolean","description":"Indicates if the role is global"},"readWrite":{"type":"boolean","description":"Indicates if the role is read/write"},"id":{"type":"string","description":"Unique identifier for this role definition"},"type":{"type":"string","description":"Indicates the record type (e.g., 'RoleDefinitionRecord')"},"correlationId":{"type":"string","description":"Correlation ID for tracking"},"homePage":{"type":"string","description":"Home page URL for the custom profile"},"markerProfile":{"type":"string","description":"Asset marker profile ID associated with this user profile"},"createdBy":{"type":"string","description":"User or system that created the record."},"createdDate":{"type":"string","description":"UTC timestamp when the record was created.","format":"date-time"},"updatedBy":{"type":"string","description":"User or system that last modified the record."},"updatedDate":{"type":"string","description":"UTC timestamp when the record was last modified.","format":"date-time"}}},"Module":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the module"},"enabled":{"type":"boolean","description":"Indicates if the module is enabled"},"canToggle":{"type":"boolean","description":"Indicates if the module can be toggled"},"requiredPermissions":{"type":"array","items":{"type":"string"},"description":"List of required permissions"},"readWrite":{"type":"boolean","description":"Indicates read/write access for this module"},"description":{"type":"string","description":"Description of the module","nullable":true},"subModules":{"type":"array","items":{"$ref":"#/components/schemas/Module"},"description":"Nested modules within this module"}}},"UserProfileRequest":{"required":["roleDisplayName","userType","permissions"],"type":"object","properties":{"roleDisplayName":{"type":"string","description":"Name of the custom profile"},"roleDescription":{"type":"string","description":"Description of the custom profile"},"userType":{"type":"string","description":"Profile type (e.g., 'web')"},"homePage":{"type":"string","description":"Home page URL for the custom profile"},"markerProfile":{"type":"string","description":"Asset marker profile ID associated with this user profile"},"permissions":{"type":"object","additionalProperties":{"enum":["off","read","readwrite"],"type":"string"},"description":"Key-value map of permissions for each module/feature"}}},"AssetMarkerProfileObject":{"type":"object","properties":{"name":{"type":"string","description":"Display name."},"description":{"type":"string","description":"Free-text description."},"enabled":{"type":"boolean","description":"Whether the profile is enabled."},"items":{"type":"array","items":{"type":"object","properties":{"color":{"type":"string"},"data":{"type":"string"},"conditions":{"type":"object","properties":{"fact":{"type":"string"},"operator":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false},"description":"Marker items in the profile."},"createdBy":{"type":"string","description":"User or system that created the record."},"createdDate":{"type":"string","description":"UTC timestamp when the record was created.","format":"date-time"},"updatedBy":{"type":"string","description":"User or system that last modified the record."},"updatedDate":{"type":"string","description":"UTC timestamp when the record was last modified.","format":"date-time"},"id":{"type":"string","description":"Unique identifier of this record."},"type":{"type":"string","description":"Type / record-type discriminator."},"correlationId":{"type":"string","description":"Client-supplied correlation id, echoed back for request tracing."},"_ts":{"type":"number"},"ttl":{"type":"number","description":"Time-to-live in seconds."}}},"CreateAssetMarkerProfileRequest":{"required":["title","items"],"type":"object","properties":{"title":{"type":"string"},"items":{"type":"array","items":{"required":["color","data","conditions"],"type":"object","properties":{"color":{"type":"string"},"data":{"type":"string"},"conditions":{"required":["fact","operator","value"],"type":"object","properties":{"fact":{"type":"string"},"operator":{"type":"string"},"value":{"type":"string"}}}}},"description":"Marker items in the profile."}}},"DetailsSharingProfileRequest":{"required":["name","description","enabled","details","createdBy","createdDate","updatedBy","updatedDate","id","type","correlationId","_ts","ttl"],"type":"object","properties":{"name":{"type":"string","description":"Name of the shared asset details configuration","example":"assetDetails"},"description":{"type":"string","description":"Description of the shared asset details","example":"share Asset Details Trial - BugBash"},"enabled":{"type":"boolean","description":"Indicates if the share config is enabled","example":true},"details":{"type":"array","items":{"type":"string"},"description":"List of details paths to be shared","example":["payload.assetInfo.assetTypeId","payload.assetInfo.type","payload.assetInfo.category","payload.assetInfo.make"]},"createdBy":{"type":"string","description":"User who created the config","example":"system"},"createdDate":{"type":"string","description":"Date when the config was created","format":"date-time","example":"2023-11-09T06:01:16.0000000+00:00"},"updatedBy":{"type":"string","description":"User who last updated the config","example":"bhaskar@inauro.io"},"updatedDate":{"type":"string","description":"Date when the config was last updated","format":"date-time","example":"2025-05-22T08:01:42.0000000+00:00"},"id":{"type":"string","description":"Unique identifier of the share config","example":"in-ad-000010"},"type":{"type":"string","description":"Type of the config","example":"DetailsShare"},"correlationId":{"type":"string","description":"Correlation ID for tracking","example":"api-20250522-080142-457-b76dc"},"_ts":{"type":"integer","description":"Timestamp","example":1747900902},"ttl":{"type":"integer","description":"Time to live for the record","example":-1}}},"JsonPatchDocument":{"type":"array","items":{"required":["op","path"],"type":"object","properties":{"op":{"type":"string"},"path":{"type":"string"},"value":{"type":"object"}}}},"WorkingHoursProfile":{"required":["recordType","name","schedule"],"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of this record."},"recordType":{"enum":["workingHours"],"type":"string","description":"Must be 'workingHours'"},"name":{"type":"string","description":"Name of the working hours profile"},"description":{"type":"string","description":"Description of the profile"},"enabled":{"type":"boolean","description":"Whether the profile is enabled"},"timeZone":{"type":"string","description":"Time zone identifier, e.g. 'Australia/Sydney'"},"schedule":{"$ref":"#/components/schemas/RuleSchedule"},"createdBy":{"type":"string","description":"User or system that created the record."},"createdDateUTC":{"type":"string","format":"date-time"},"updatedBy":{"type":"string","description":"User or system that last modified the record."},"updatedDateUTC":{"type":"string","format":"date-time"}}},"RuleSchedule":{"required":["days","startTime","endTime"],"type":"object","properties":{"days":{"type":"array","items":{"enum":["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],"type":"string"},"description":"Days of the week included in the schedule"},"startTime":{"pattern":"^([01]\\d|2[0-3]):([0-5]\\d):([0-5]\\d)$","type":"string","description":"Start time in HH:mm:ss 24-hour format"},"endTime":{"pattern":"^([01]\\d|2[0-3]):([0-5]\\d):([0-5]\\d)$","type":"string","description":"End time in HH:mm:ss 24-hour format"}}},"DetailsSharingProfile":{"required":["recordType","name","details"],"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the profile"},"recordType":{"type":"string","description":"Record type, must be 'detailsSharing'"},"name":{"type":"string","description":"Profile name"},"description":{"type":"string","description":"Profile description"},"enabled":{"type":"boolean","description":"Whether the profile is enabled"},"details":{"type":"array","items":{"type":"string"},"description":"List of detail fields included in the profile"},"createdBy":{"type":"string","description":"User who created the profile"},"createdDateUTC":{"type":"string","description":"UTC creation timestamp","format":"date-time"},"updatedBy":{"type":"string","description":"User who last updated the profile"},"updatedDateUTC":{"type":"string","description":"UTC last updated timestamp","format":"date-time"}}}},"securitySchemes":{"oauth2":{"type":"oauth2","description":"Client credentials from your Perspio API application. See Get Access Token.","flows":{"clientCredentials":{"tokenUrl":"/auth/v3/token","scopes":{}}}},"subscriptionKey":{"type":"apiKey","name":"Ocp-Apim-Subscription-Key","in":"header","description":"Your tenant's subscription key, from your API application."},"tenantId":{"type":"apiKey","name":"tid","in":"header","description":"Your tenant ID (tid), from your API application."}}},"security":[{"oauth2":[],"subscriptionKey":[],"tenantId":[]}],"tags":[{"name":"Custom Counters","description":"Custom counter (meter) definitions."},{"name":"Working Hours","description":"Working-hours profiles."},{"name":"Share Details","description":"Detail-sharing profiles."},{"name":"User Profiles","description":"User (role) profiles."},{"name":"Asset Marker Profiles","description":"Asset marker profiles."}],"x-readme":{"oauth-options":{"useInsecureClientAuthentication":true}}}