openapi: 3.2.0 info: title: Kelowna Production Sonar API version: v1 tags: - name: Sonar paths: /Hardware/Sonar/Overview/FilterData: get: tags: - Sonar summary: Get data necessary for the overview filter parameters: - name: technologyTypes in: query description: Technology types to include. schema: type: array items: $ref: '#/components/schemas/HardwareType' - name: DivisionId in: query schema: type: integer format: int32 - name: PlantId in: query schema: type: integer format: int32 - name: Region in: query schema: type: string - name: Country in: query schema: type: string - name: State in: query schema: type: string - name: City in: query schema: type: string - name: SystemId in: query schema: type: string responses: '200': description: OK content: text/plain: schema: $ref: '#/components/schemas/SonarCustomerFilter' application/json: schema: $ref: '#/components/schemas/SonarCustomerFilter' text/json: schema: $ref: '#/components/schemas/SonarCustomerFilter' security: - OrcaAuth: - applicationId - roles - {} - {} operationId: getHardwareSonarOverviewFilterData x-operation-id-source: derived /Hardware/Sonar/Overview/SystemSummary: get: tags: - Sonar summary: Gets a summary of operation, downed and snoozed systems parameters: - name: technologyTypes in: query description: Technology types to include. schema: type: array items: $ref: '#/components/schemas/HardwareType' - name: DivisionId in: query schema: type: integer format: int32 - name: PlantId in: query schema: type: integer format: int32 - name: Region in: query schema: type: string - name: Country in: query schema: type: string - name: State in: query schema: type: string - name: City in: query schema: type: string - name: SystemId in: query schema: type: string responses: '200': description: OK content: text/plain: schema: $ref: '#/components/schemas/SonarSystemSummaryResponse' application/json: schema: $ref: '#/components/schemas/SonarSystemSummaryResponse' text/json: schema: $ref: '#/components/schemas/SonarSystemSummaryResponse' security: - OrcaAuth: - applicationId - roles - {} - {} operationId: getHardwareSonarOverviewSystemSummary x-operation-id-source: derived /Hardware/Sonar/Overview/TotalAlarms: get: tags: - Sonar summary: Gets the overview of alarms parameters: - name: technologyTypes in: query schema: type: array items: $ref: '#/components/schemas/HardwareType' - name: DivisionId in: query schema: type: integer format: int32 - name: PlantId in: query schema: type: integer format: int32 - name: Region in: query schema: type: string - name: Country in: query schema: type: string - name: State in: query schema: type: string - name: City in: query schema: type: string - name: SystemId in: query schema: type: string responses: '200': description: OK content: text/plain: schema: $ref: '#/components/schemas/SonarTotalAlarmsResponse' application/json: schema: $ref: '#/components/schemas/SonarTotalAlarmsResponse' text/json: schema: $ref: '#/components/schemas/SonarTotalAlarmsResponse' security: - OrcaAuth: - applicationId - roles - {} - {} operationId: getHardwareSonarOverviewTotalAlarms x-operation-id-source: derived /Hardware/Sonar/Overview/AlarmsBreakdown: get: tags: - Sonar summary: Get Alarms breakdown parameters: - name: technologyTypes in: query description: Technology types schema: type: array items: $ref: '#/components/schemas/HardwareType' - name: DivisionId in: query schema: type: integer format: int32 - name: PlantId in: query schema: type: integer format: int32 - name: Region in: query schema: type: string - name: Country in: query schema: type: string - name: State in: query schema: type: string - name: City in: query schema: type: string - name: SystemId in: query schema: type: string responses: '200': description: OK content: text/plain: schema: type: array items: $ref: '#/components/schemas/SonarAlarmBreakdownResponse' application/json: schema: type: array items: $ref: '#/components/schemas/SonarAlarmBreakdownResponse' text/json: schema: type: array items: $ref: '#/components/schemas/SonarAlarmBreakdownResponse' security: - OrcaAuth: - applicationId - roles - {} - {} operationId: getHardwareSonarOverviewAlarmsBreakdown x-operation-id-source: derived /Hardware/Sonar/Overview/SystemUpTimeVsDownTime: get: tags: - Sonar summary: System up time vs down time parameters: - name: technologyTypes in: query description: Technology types schema: type: array items: $ref: '#/components/schemas/HardwareType' - name: DivisionId in: query schema: type: integer format: int32 - name: PlantId in: query schema: type: integer format: int32 - name: Region in: query schema: type: string - name: Country in: query schema: type: string - name: State in: query schema: type: string - name: City in: query schema: type: string - name: SystemId in: query schema: type: string responses: '200': description: OK content: text/plain: schema: type: array items: $ref: '#/components/schemas/SonarUptimeVsDowntimeResponse' application/json: schema: type: array items: $ref: '#/components/schemas/SonarUptimeVsDowntimeResponse' text/json: schema: type: array items: $ref: '#/components/schemas/SonarUptimeVsDowntimeResponse' security: - OrcaAuth: - applicationId - roles - {} - {} operationId: getHardwareSonarOverviewSystemUpTimeVsDownTime x-operation-id-source: derived /Hardware/Sonar/DownSystems/TimeRanges: get: tags: - Sonar summary: Get a list of down time ranges for down systems parameters: - name: technologyTypes in: query description: Technology types to include. schema: type: array items: $ref: '#/components/schemas/HardwareType' responses: '200': description: OK content: text/plain: schema: type: array items: $ref: '#/components/schemas/SonarSystemDownTimeRange' application/json: schema: type: array items: $ref: '#/components/schemas/SonarSystemDownTimeRange' text/json: schema: type: array items: $ref: '#/components/schemas/SonarSystemDownTimeRange' security: - OrcaAuth: - applicationId - roles - {} - {} operationId: getHardwareSonarDownSystemsTimeRanges x-operation-id-source: derived /Hardware/Sonar/Alarms/FilterData: get: tags: - Sonar summary: Get data necessary for the alarms system's view filter parameters: - name: technology in: query description: Technology types to include. schema: type: array items: $ref: '#/components/schemas/HardwareType' - name: alarmSeverity in: query description: Severity of the alarm to include. schema: $ref: '#/components/schemas/AlarmSeverity' responses: '200': description: OK content: text/plain: schema: type: array items: $ref: '#/components/schemas/SonarAlarmType' application/json: schema: type: array items: $ref: '#/components/schemas/SonarAlarmType' text/json: schema: type: array items: $ref: '#/components/schemas/SonarAlarmType' security: - OrcaAuth: - applicationId - roles - {} - {} operationId: getHardwareSonarAlarmsFilterData x-operation-id-source: derived /Hardware/Sonar/Alarms/Table: get: tags: - Sonar summary: Gets the alarm table data parameters: - name: technologyTypes in: query description: Technology types to include. schema: type: array items: $ref: '#/components/schemas/HardwareType' - name: StartTimestamp in: query schema: type: string format: date-time deprecated: true - name: EndTimestamp in: query schema: type: string format: date-time deprecated: true - name: StartDate in: query schema: type: string format: date - name: EndDate in: query schema: type: string format: date - name: AlarmSeverity in: query schema: $ref: '#/components/schemas/AlarmSeverity' - name: AlarmCode in: query schema: type: integer format: int32 - name: DivisionId in: query schema: type: integer format: int32 - name: PlantId in: query schema: type: integer format: int32 - name: Region in: query schema: type: string - name: Country in: query schema: type: string - name: State in: query schema: type: string - name: City in: query schema: type: string - name: SystemId in: query schema: type: string - name: Limit in: query description: Limit number of responses. Used for pagination. schema: type: integer format: int32 - name: Offset in: query description: Skip this many rows in the query. Used for pagination. schema: type: integer format: int32 - name: SortColumn in: query description: The name of the column to sort by. schema: type: string - name: SortOrder in: query description: The order with which to sort the table by the sort column. schema: $ref: '#/components/schemas/SortOrder' - name: shouldShowSnoozed in: query description: Optional parameter include snoozed alarms schema: type: boolean default: false - name: shouldShowActive in: query description: Parameter to include active alarms. True by default. schema: type: boolean default: true responses: '200': description: OK content: text/plain: schema: $ref: '#/components/schemas/SonarAlarmsTableTableResults' application/json: schema: $ref: '#/components/schemas/SonarAlarmsTableTableResults' text/json: schema: $ref: '#/components/schemas/SonarAlarmsTableTableResults' security: - OrcaAuth: - applicationId - roles - {} - {} operationId: getHardwareSonarAlarmsTable x-operation-id-source: derived /Hardware/Sonar/SnoozeAlarm/{alarmId}: post: tags: - Sonar summary: Create an alarm snooze. parameters: - name: alarmId in: path description: Id of the alarm to snooze. required: true schema: type: integer format: int32 - name: systemType in: query description: Type of system the alarm belongs to. Defaults to Mixer. schema: $ref: '#/components/schemas/SonarSystemType' requestBody: description: Parameters for the snooze. content: application/json: schema: $ref: '#/components/schemas/SonarAlarmSnoozeArgs' text/json: schema: $ref: '#/components/schemas/SonarAlarmSnoozeArgs' application/*+json: schema: $ref: '#/components/schemas/SonarAlarmSnoozeArgs' responses: '200': description: OK security: - OrcaAuth: - applicationId - roles - {} - {} operationId: postHardwareSonarSnoozeAlarmByAlarmId x-operation-id-source: derived /Hardware/Sonar/SnoozeSystem: post: tags: - Sonar summary: Creates a system snooze description: Only one system type can be snoozed at a time. parameters: - name: remoteUnitId in: query description: "ID of a mixer system to snooze.\n Refers to the ReadyMixUnitId, but the frontend requires this outdated name." schema: type: integer format: int32 - name: reclaimedWaterUnitId in: query description: ID of a reclaimed water system to snooze. schema: type: integer format: int32 requestBody: description: Parameters for the snooze. content: application/json: schema: $ref: '#/components/schemas/SonarSystemSnoozeArgs' text/json: schema: $ref: '#/components/schemas/SonarSystemSnoozeArgs' application/*+json: schema: $ref: '#/components/schemas/SonarSystemSnoozeArgs' responses: '200': description: OK security: - OrcaAuth: - applicationId - roles - {} - {} operationId: postHardwareSonarSnoozeSystem x-operation-id-source: derived /Hardware/Sonar/Snooze/{snoozeId}: get: tags: - Sonar summary: Gets the information of a given snooze parameters: - name: snoozeId in: path description: Id of the snooze. required: true schema: type: integer format: int32 responses: '200': description: OK content: text/plain: schema: $ref: '#/components/schemas/SonarSnoozeResponse' application/json: schema: $ref: '#/components/schemas/SonarSnoozeResponse' text/json: schema: $ref: '#/components/schemas/SonarSnoozeResponse' security: - OrcaAuth: - applicationId - roles - {} - {} operationId: getHardwareSonarSnoozeBySnoozeId x-operation-id-source: derived /Hardware/Sonar/Snooze/Resolve/{snoozeId}: put: tags: - Sonar summary: Resolves a snooze parameters: - name: snoozeId in: path description: Id of the snooze. required: true schema: type: integer format: int32 responses: '200': description: OK security: - OrcaAuth: - applicationId - roles - {} - {} operationId: putHardwareSonarSnoozeResolveBySnoozeId x-operation-id-source: derived /Hardware/Sonar/SnoozeAlarm/{snoozeId}: put: tags: - Sonar summary: Updates an alarm snooze parameters: - name: snoozeId in: path description: Id of the alarm snooze. required: true schema: type: integer format: int32 requestBody: description: Snooze information to update. content: application/json: schema: $ref: '#/components/schemas/SonarAlarmSnoozeArgs' text/json: schema: $ref: '#/components/schemas/SonarAlarmSnoozeArgs' application/*+json: schema: $ref: '#/components/schemas/SonarAlarmSnoozeArgs' responses: '200': description: OK security: - OrcaAuth: - applicationId - roles - {} - {} operationId: putHardwareSonarSnoozeAlarmBySnoozeId x-operation-id-source: derived /Hardware/Sonar/SnoozeSystem/{snoozeId}: put: tags: - Sonar summary: Updates a system snooze parameters: - name: snoozeId in: path description: Id of the system snooze. required: true schema: type: integer format: int32 requestBody: description: Snooze information to update. content: application/json: schema: $ref: '#/components/schemas/SonarSystemSnoozeArgs' text/json: schema: $ref: '#/components/schemas/SonarSystemSnoozeArgs' application/*+json: schema: $ref: '#/components/schemas/SonarSystemSnoozeArgs' responses: '200': description: OK security: - OrcaAuth: - applicationId - roles - {} - {} operationId: putHardwareSonarSnoozeSystemBySnoozeId x-operation-id-source: derived /Hardware/Sonar/DownSystems/Table: get: tags: - Sonar summary: Get system down table parameters: - name: Limit in: query description: Limit number of responses. Used for pagination. schema: type: integer format: int32 - name: Offset in: query description: Skip this many rows in the query. Used for pagination. schema: type: integer format: int32 - name: SortColumn in: query description: The name of the column to sort by. schema: type: string - name: SortOrder in: query description: The order with which to sort the table by the sort column. schema: $ref: '#/components/schemas/SortOrder' - name: DivisionId in: query schema: type: integer format: int32 - name: PlantId in: query schema: type: integer format: int32 - name: SystemId in: query schema: type: string - name: StartLastSeenTimestamp in: query schema: type: string format: date-time deprecated: true - name: EndLastSeenTimestamp in: query schema: type: string format: date-time deprecated: true - name: StartLastSeenDate in: query schema: type: string format: date - name: EndLastSeenDate in: query schema: type: string format: date - name: Region in: query schema: type: string - name: Country in: query schema: type: string - name: State in: query schema: type: string - name: City in: query schema: type: string - name: TechnologyTypes in: query schema: type: array items: $ref: '#/components/schemas/HardwareType' - name: ShouldShowSnoozed in: query schema: type: boolean - name: ShouldShowUnsnoozed in: query schema: type: boolean responses: '200': description: OK content: text/plain: schema: $ref: '#/components/schemas/SonarDownSystemTableTableResults' application/json: schema: $ref: '#/components/schemas/SonarDownSystemTableTableResults' text/json: schema: $ref: '#/components/schemas/SonarDownSystemTableTableResults' security: - OrcaAuth: - applicationId - roles - {} - {} operationId: getHardwareSonarDownSystemsTable x-operation-id-source: derived components: schemas: SonarAlarmsTable: type: object properties: timestamp: type: string format: date-time remoteUnitId: type: - integer - 'null' format: int32 reclaimedWaterUnitId: type: - integer - 'null' format: int32 systemId: type: - string - 'null' alarmId: type: integer format: int64 technology: $ref: '#/components/schemas/HardwareType' divisionName: type: - string - 'null' divisionId: type: integer format: int32 plantId: type: integer format: int32 plantName: type: - string - 'null' location: type: - string - 'null' alarmSeverity: $ref: '#/components/schemas/AlarmSeverity' alarmCode: type: integer format: int32 description: type: - string - 'null' snoozeId: type: - integer - 'null' format: int32 snoozedUntilTimestamp: type: - string - 'null' format: date-time snoozeReason: $ref: '#/components/schemas/SonarAlarmSnoozeReason' snoozeDetails: type: - string - 'null' snoozeLastUpdated: type: - string - 'null' format: date-time snoozeCreatedByUserId: type: - integer - 'null' format: int32 snoozeCreatedByUserFullName: type: - string - 'null' snoozeLastUpdatedByUserId: type: - integer - 'null' format: int32 snoozeLastUpdatedByUserFullName: type: - string - 'null' snoozeCreationTimestamp: type: - string - 'null' format: date-time snoozeStartTimestamp: type: - string - 'null' format: date-time snoozeEndTimestamp: type: - string - 'null' format: date-time additionalProperties: false SonarAlarmSnoozeArgs: type: object properties: reasonDetail: type: - string - 'null' snoozeUntilTimestamp: type: - string - 'null' format: date-time alarmReason: $ref: '#/components/schemas/SonarAlarmSnoozeReason' additionalProperties: false SonarSystemSnoozeReason: enum: - Seasonal - MaintenanceProducer - MaintenanceCarbonCure - MaintenanceCO2Tank - Churned - Inactive - Other type: string SonarPlant: type: object properties: plantId: type: integer format: int32 name: type: - string - 'null' additionalProperties: false SonarAlarmType: type: object properties: alarmCode: type: integer format: int32 description: type: - string - 'null' systemType: $ref: '#/components/schemas/SonarSystemType' additionalProperties: false SonarCustomerFilter: type: object properties: producers: type: - array - 'null' items: $ref: '#/components/schemas/SonarProducer' plants: type: - array - 'null' items: $ref: '#/components/schemas/SonarPlant' systems: type: - array - 'null' items: $ref: '#/components/schemas/SonarSystem' regions: type: - array - 'null' items: type: string countries: type: - array - 'null' items: type: string states: type: - array - 'null' items: type: string cities: type: - array - 'null' items: type: string additionalProperties: false SonarAlarmBreakdownResponse: type: object properties: alarmCode: type: integer format: int32 alarmName: type: - string - 'null' percentage: type: number format: double count: type: integer format: int32 additionalProperties: false SonarTotalAlarmsResponse: type: object properties: newAlarmsLast24HoursCount: type: integer format: int32 lastMonthDailyAverage: type: number format: double lastMonthDailyAverageChangePercent: type: - number - 'null' format: double lastQuarterDailyAverage: type: number format: double lastQuarterDailyAverageChangePercent: type: - number - 'null' format: double additionalProperties: false SonarSystemSnoozeArgs: type: object properties: reasonDetail: type: - string - 'null' snoozeUntilTimestamp: type: - string - 'null' format: date-time systemReason: $ref: '#/components/schemas/SonarSystemSnoozeReason' additionalProperties: false SonarSystemDownTimeRange: enum: - GreaterThan180Days - Between30And180Days - Between10And30Days - LessThan10Days type: string SonarAlarmSnoozeReason: enum: - MaintenanceProducer - MaintenanceCarbonCure - PartInShipment - Other type: string SonarSystemType: enum: - Mixer - ReclaimedWater type: string SonarSystem: type: object properties: remoteUnitId: type: - integer - 'null' format: int32 reclaimedWaterUnitId: type: - integer - 'null' format: int32 systemId: type: - string - 'null' workflowName: type: - string - 'null' isDecommissioned: type: boolean additionalProperties: false SonarSnoozeResponse: type: object properties: snoozeId: type: integer format: int32 remoteUnitId: type: - integer - 'null' format: int32 reclaimedWaterUnitId: type: - integer - 'null' format: int32 creationTimestamp: type: string format: date-time createdByUserId: type: integer format: int32 createdByUserFirstAndLastName: type: - string - 'null' startTimestamp: type: string format: date-time endTimestamp: type: string format: date-time snoozeReasonDetails: type: - string - 'null' resolvedTimestamp: type: - string - 'null' format: date-time lastUpdatedTimestamp: type: string format: date-time lastUpdatedByUserId: type: integer format: int32 lastUpdatedByUserFirstAndLastName: type: - string - 'null' isResolved: type: boolean readOnly: true alarmCode: type: - integer - 'null' format: int32 isAlarmSnooze: type: boolean readOnly: true alarmSnoozeReason: $ref: '#/components/schemas/SonarAlarmSnoozeReason' systemSnoozeReason: $ref: '#/components/schemas/SonarSystemSnoozeReason' serviceCaseId: type: - integer - 'null' format: int32 additionalProperties: false HardwareType: enum: - Plc - ReclaimedWater type: string SonarAlarmsTableTableResults: type: object properties: count: type: integer format: int32 results: type: - array - 'null' items: $ref: '#/components/schemas/SonarAlarmsTable' additionalProperties: false SortOrder: enum: - Ascending - Descending type: string SonarSystemSummaryResponse: type: object properties: operationalPercent: type: number format: double operationalCount: type: integer format: int32 downPercent: type: number format: double downCount: type: integer format: int32 snoozedPercent: type: number format: double snoozedCount: type: integer format: int32 additionalProperties: false SonarDownSystemTableTableResults: type: object properties: count: type: integer format: int32 results: type: - array - 'null' items: $ref: '#/components/schemas/SonarDownSystemTable' additionalProperties: false SonarDownSystemTable: type: object properties: lastSeenTimestamp: type: string format: date-time systemId: type: - string - 'null' remoteUnitId: type: - integer - 'null' format: int32 reclaimedWaterUnitId: type: - integer - 'null' format: int32 technologyType: $ref: '#/components/schemas/HardwareType' divisionId: type: integer format: int32 divisionName: type: - string - 'null' plantId: type: integer format: int32 plantName: type: - string - 'null' location: type: - string - 'null' snoozeId: type: - integer - 'null' format: int32 snoozeReason: $ref: '#/components/schemas/SonarSystemSnoozeReason' snoozeReasonDetails: type: - string - 'null' snoozeStartTimestamp: type: - string - 'null' format: date-time snoozeEndTimestamp: type: - string - 'null' format: date-time snoozeCreationTimestamp: type: - string - 'null' format: date-time snoozeCreatedByUserId: type: - integer - 'null' format: int32 snoozeCreatedByUserFirstAndLastName: type: - string - 'null' snoozeLastUpdatedTimestamp: type: - string - 'null' format: date-time snoozeLastUpdatedByUserId: type: - integer - 'null' format: int32 snoozeLastUpdatedByUserFirstAndLastName: type: - string - 'null' serviceCaseId: type: - integer - 'null' format: int32 additionalProperties: false AlarmSeverity: enum: - Low - Medium - High type: string SonarUptimeVsDowntimeResponse: type: object properties: year: type: integer format: int32 month: type: integer format: int32 totalSystemUpDays: type: integer format: int32 totalSystemDownDays: type: integer format: int32 uptimePercentage: type: number format: double downtimePercentage: type: number format: double additionalProperties: false SonarProducer: type: object properties: divisionId: type: integer format: int32 name: type: - string - 'null' additionalProperties: false securitySchemes: OrcaAuth: type: oauth2 flows: authorizationCode: authorizationUrl: https://auth.carboncure.com/oauth2/authorize tokenUrl: https://auth.carboncure.com/oauth2/token scopes: {} MyCCAuth: type: oauth2 flows: authorizationCode: authorizationUrl: https://auth.carboncure.com/oauth2/authorize tokenUrl: https://auth.carboncure.com/oauth2/token scopes: {} M2MAuth: type: oauth2 flows: authorizationCode: authorizationUrl: https://auth.carboncure.com/oauth2/authorize tokenUrl: https://auth.carboncure.com/oauth2/token scopes: {}