openapi: 3.2.0 info: version: '2.0' title: ZENSIE Status API servers: - url: https://api.30mhz.com/api tags: - name: Status paths: /status/backup-healthcheck: get: tags: - Status summary: Lookup in S3 if backups are being made description: Operation reserved to administrators. operationId: backupHealthCheck security: - Bearer: [] responses: '200': description: Backup health check. '403': description: User is not authorized to perform this operation. /status/ingest: get: tags: - Status summary: Retrieves status information of ingest checks for an organization description: Operation reserved to administrators and account managers. operationId: IngestStatus parameters: - name: interval in: query required: false schema: type: string - name: organizationId in: query required: false schema: type: string - name: integrationType in: query required: false schema: type: string security: - Bearer: [] responses: '200': description: Status information of ingest checks. content: application/json: schema: $ref: '#/components/schemas/IngestStatusResponse' '403': description: User is not authorized to perform this operation. /status/compareReadChecksOperations: get: tags: - Status summary: Compare the database check read operations to verify that there was not a huge… description: Operation reserved to administrators. operationId: checksReadOperations parameters: - name: periodLength in: query required: false schema: type: integer format: int32 default: 300 - name: tolerance in: query required: false schema: type: number format: float default: 5.0 - name: interval in: query required: false schema: type: integer format: int32 default: 3600 - name: correction in: query required: false schema: type: integer format: int32 default: 20 security: - Bearer: [] responses: '200': description: Expected and actual read operations throughput. content: application/json: schema: $ref: '#/components/schemas/TwoValuesComparison' '403': description: User is not authorized to perform this operation. /status/compareWriteChecksOperations: get: tags: - Status summary: Compare the database check write operations to verify that there was not a huge… description: Operation reserved to administrators. operationId: checksWriteOperations parameters: - name: periodLength in: query required: false schema: type: integer format: int32 default: 300 - name: tolerance in: query required: false schema: type: number format: float default: 5.0 - name: interval in: query required: false schema: type: integer format: int32 default: 3600 - name: correction in: query required: false schema: type: integer format: int32 default: 20 security: - Bearer: [] responses: '200': description: Expected and actual write operations throughput. content: application/json: schema: $ref: '#/components/schemas/TwoValuesComparison' '403': description: User is not authorized to perform this operation. /status/cloudwatch-alarm/{alarmName}: get: tags: - Status summary: Retrieves specific cloud watch alarm description: Operation reserved to administrators. operationId: cloudWatchAlarm parameters: - name: alarmName in: path required: true schema: type: string - name: awsRegion in: query required: false schema: type: string security: - Bearer: [] responses: '200': description: Cloud watch alarm. '403': description: User is not authorized to perform this operation. /status/cloudwatch-alarm: get: tags: - Status summary: Retrieves cloud watch alarms that have status ALARM description: Operation reserved to administrators. operationId: cloudWatchAlarms parameters: - name: awsRegion in: query description: AWS region required: false schema: type: string security: - Bearer: [] responses: '200': description: Cloud watch alarms. '403': description: User is not authorized to perform this operation. /status/compareThroughput: get: tags: - Status summary: Compare the current throughput from a location, user or global in the system to… description: Operation reserved to administrators. operationId: compareThroughput parameters: - name: periodLength in: query required: false schema: type: integer format: int32 default: 300 - name: tolerance in: query required: false schema: type: number format: float default: 5.0 - name: correction in: query required: false schema: type: integer format: int32 default: 20 - name: location in: query required: false schema: type: string - name: organization in: query required: false schema: type: string security: - Bearer: [] responses: '200': description: Expected and actual throughput, percentage difference. content: application/json: schema: $ref: '#/components/schemas/TwoValuesComparisonTableScan' '403': description: User is not authorized to perform this operation. /status/alarm/throughput/location/{locationName}: post: tags: - Status summary: Create throughput alarms for the given location description: Operation reserved to administrators. operationId: createLocationThroughputAlarms parameters: - name: periodLength in: query required: false schema: type: integer format: int32 default: 600 - name: tolerance in: query required: false schema: type: number format: float default: 5.0 - name: locationName in: path required: true schema: type: string security: - Bearer: [] responses: '200': description: Alarm checks created. '403': description: User is not authorized to perform this operation. /status/alarm/mother/location/{locationName}/device/{deviceId}: post: tags: - Status summary: Creates alarm (web check) for the mother of the location. description: Operation reserved to administrators. operationId: createMotherAlarm parameters: - name: locationName in: path required: true schema: type: string - name: deviceId in: path required: true schema: type: string security: - Bearer: [] responses: '200': description: Alarm (web check) for the mother was created. '403': description: User is not authorized to perform this operation. /status/alarm/throughput/organization/{organization}: post: tags: - Status summary: Create throughput alarms for the given organization description: Operation reserved to administrators. operationId: createOrganizationThroughputAlarms parameters: - name: periodLength in: query required: false schema: type: integer format: int32 default: 3600 - name: tolerance in: query required: false schema: type: number format: float default: 5.0 - name: organization in: path required: true schema: type: string security: - Bearer: [] responses: '200': description: Alarm check created. '403': description: User is not authorized to perform this operation. /status/elasticsearch/nodesstats/{nodesStatsName}/statsName/{statsName}: get: tags: - Status summary: Retrieves node stats for elasticsearch cluster with the specified stats name. description: Operation reserved to administrators. operationId: elasticsearchNodesStats parameters: - name: nodesStatsName in: path required: true schema: type: string - name: statsName in: path required: true schema: type: string security: - Bearer: [] responses: '200': description: Elasticsearch stats alarm. '403': description: User is not authorized to perform this operation. /status/mothers/organization/{organizationId}: get: tags: - Status summary: Checks if all the gateways for an organization are online description: Operation reserved to admins and members of the requested organization. operationId: getOrganizationMothersStatus parameters: - name: organizationId in: path required: true schema: type: string security: - Bearer: [] responses: '200': description: The status of the gateways. isOnline is true when all of the devices are online. content: application/json: schema: $ref: '#/components/schemas/DeviceStatusResponse' application/zensie-v2+json: schema: $ref: '#/components/schemas/DeviceStatusResponse' '403': description: User is not authorized to perform this operation. components: schemas: CalculationSettings: type: object required: - inputParams properties: calculationId: type: string description: Unique identifier for the calculation inputParams: type: object description: A map of the necessary input parameters and their type for performing the calculation additionalProperties: type: object description: Settings used to perform a calculation. TwoValuesComparison: type: object properties: totalFirstPeriod: type: number format: float readOnly: true totalSecondPeriod: type: number format: float readOnly: true difference: type: number format: float readOnly: true acceptable: type: boolean readOnly: true absoluteDifference: type: number format: float readOnly: true percentageDifference: type: number format: float CheckCollection: type: object properties: collectionId: type: string description: Id of the collection name: type: string description: Name of the collection order: type: integer format: int32 description: The position within all the collections CheckSummary: type: object properties: calculationSettings: $ref: '#/components/schemas/CalculationSettings' checkId: type: string collections: type: array items: $ref: '#/components/schemas/CheckCollection' cultivationHierarchyId: type: string decimalsPerField: type: object additionalProperties: type: integer format: int32 enabled: type: boolean locations: type: array uniqueItems: true items: type: string maxDecimals: type: integer format: int32 name: type: string organizationId: type: string rangePerJsonKey: type: object additionalProperties: type: array items: type: number format: double sensorType: type: string timezone: type: string timezoneOffset: type: integer format: int64 units: type: array uniqueItems: true items: type: string description: Summary of a check IngestStatusResponse: type: object properties: checkSummary: $ref: '#/components/schemas/CheckSummary' hits: type: integer format: int64 lastValueTimestamp: type: string DeviceStatusResponse: type: object properties: isOnline: type: boolean description: true when SOME devices are online offlineLocations: type: array uniqueItems: true items: type: string onlineLocations: type: array uniqueItems: true items: type: string description: Online/offline status of mother devices. isOnline is true when any of the devices is online. TwoValuesComparisonTableScan: type: object properties: actualPingsPerSecond: type: number format: double readOnly: true expectedPingsPerSecond: type: number format: double readOnly: true acceptable: type: boolean readOnly: true absoluteDifference: type: number format: double readOnly: true percentageDifference: type: number format: double securitySchemes: Bearer: description: '' type: apiKey name: Authorization in: header