openapi: 3.2.0 info: version: '2.0' title: ZENSIE Import Check Update API servers: - url: https://api.30mhz.com/api tags: - name: import-check-update paths: /import-check-update/{checkId}/collection/{collectionId}: post: tags: - import-check-update summary: Update a collection description: Authentication required for this operation. operationId: updateCollection parameters: - name: checkId in: path required: true schema: type: string - name: collectionId in: path required: true schema: type: string security: - Bearer: [] responses: '200': description: Collection updated content: application/json: schema: $ref: '#/components/schemas/CheckCollection' application/zensie-v2+json: schema: $ref: '#/components/schemas/CheckCollection' '400': description: Invalid data in the properties '403': description: Not enough permissions to perform the operation '404': description: A collection with that id doesn't exist requestBody: content: application/json: schema: $ref: '#/components/schemas/NewCheckCollection' /import-check-update/{checkId}/collection/reorder: post: tags: - import-check-update summary: Reorder the collection order description: Authentication required for this operation. operationId: updateCollectionOrder parameters: - name: checkId in: path required: true schema: type: string security: - Bearer: [] responses: '200': description: Collection order updated content: application/json: schema: $ref: '#/components/schemas/ImportCheck' application/zensie-v2+json: schema: $ref: '#/components/schemas/ImportCheck' '400': description: Invalid data in the properties '403': description: Not enough permissions to perform the operation '404': description: A check with that id does not exist requestBody: content: application/json: schema: type: array items: type: string /import-check-update/date-entry/{dateEntryId}: post: tags: - import-check-update summary: Update a date entry description: Authentication required for this operation. operationId: updateDateEntry parameters: - name: checkId in: path required: true schema: type: string - name: dateEntryId in: path required: true schema: type: string security: - Bearer: [] responses: '200': description: Date entry updated content: application/json: schema: $ref: '#/components/schemas/CheckDateEntry' application/zensie-v2+json: schema: $ref: '#/components/schemas/CheckDateEntry' '400': description: Invalid data in the properties '403': description: Not enough permissions to perform the operation '404': description: A date entry with that id does not exist requestBody: content: application/json: schema: $ref: '#/components/schemas/CheckDateEntryUpdate' /import-check-update/{checkId}: post: tags: - import-check-update summary: Update an import check description: Authentication required for this operation. operationId: updateImportCheck parameters: - name: checkId in: path required: true schema: type: string security: - Bearer: [] responses: '200': description: Import check updated content: application/json: schema: $ref: '#/components/schemas/ImportCheck' application/zensie-v2+json: schema: $ref: '#/components/schemas/ImportCheck' '400': description: Invalid data in the properties to be updated '403': description: Not enough permissions to perform the operation '404': description: An import check with that id doesn't exist requestBody: content: application/json: schema: $ref: '#/components/schemas/ExternalSensorEditable' 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. ExternalSensorEditable: type: object properties: calculationSettings: description: The calculation settings if this is a calculation data source. $ref: '#/components/schemas/CalculationSettings' dataSourceCoordinatesEditable: description: A set of numbers that represent the current position of a data source $ref: '#/components/schemas/DataSourceCoordinatesEditable' decimalsPerField: type: object description: The number of decimals used for each field of the data source. additionalProperties: type: integer format: int32 description: type: string description: Brief description that elaborates on the name enabled: type: boolean description: Whether the data source is enabled. ingestedForIndices: type: object description: The data source's indexes for ingested values additionalProperties: type: array items: type: string integrationType: type: string description: Integration type. locationId: type: string description: Identifier of the site it belongs to, together with the organizationId this is unique. name: type: string description: Displayable name. notificationRelevance: type: integer format: int32 description: The notification relevance for import check hits. minimum: 300 rangePerJsonKey: type: object description: Min/max ranges for each json key of the data source. additionalProperties: type: array items: type: number format: double sensorType: type: string description: The sensor type. sourceId: type: string description: Optional source id. status: type: string description: The status of the data source, e.g. ACTIVE, DEACTIVATED or PAUSED. enum: - ACTIVE - DEACTIVATED - PAUSED tags: type: array description: The tags associated with the data source. uniqueItems: true items: type: string timezone: type: string description: An area which observes a uniform standard time. unitPerField: type: object description: Identifier of the preferred unit conversion for each field. additionalProperties: type: string useCollectionsAsRows: type: boolean description: Whether collections should be displayed as rows. zoneId: type: string description: Identifier of the zone within a site where the data source belongs. siteId: type: string description: Identifier of the site it belongs to, together with the organizationId this is unique. EventHook: type: object required: - method - url properties: headers: type: object description: Headers of the HTTP request additionalProperties: type: object method: type: string description: Method of the HTTP request payload: type: object description: Payload of the HTTP request additionalProperties: type: object url: type: string description: Url of the HTTP request CheckDateEntry: type: object properties: checkId: type: string description: Id of the check it belongs to date: type: string description: Date of the entry dateEntryId: type: string description: Id of the date entry name: type: string description: The name of the date entry deletedAt: type: string SensorField: type: object properties: checkId: type: string description: The id of the check this field belongs to. id: type: string description: Which field of the sensor to retrieve data for. unit: type: string description: The unit in which to retrieved the values. Defaults to system unit. 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 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 CheckDateEntryUpdate: type: object properties: name: type: string description: The name of the date entry DataSourceCoordinates: type: object required: - dataSourceId - sinceDate properties: coordinateX: type: number format: double description: X coordinate in space coordinateY: type: number format: double description: Y coordinate in space sinceDate: type: string description: UTC ISO 8601 timestamp since when, e.g 2024-11-12T15:00:00Z. dataSourceId: type: string description: Identifier of the data source geoJson: type: object description: GeoJson definition. additionalProperties: type: object zoneName: type: string description: Name of the zone zoneUuid: type: string description: Unique identifier of the zone description: Coordinates of a data source since a given timestamp. StructuredConditional: type: object properties: aggregationType: type: string description: The type of aggregation. checkFields: type: array description: List of fields represented by the check id and field name items: $ref: '#/components/schemas/SensorField' interval: type: string description: The time interval to aggregate over. key: type: string description: Key of the structured conditional operator: type: string description: Operator of the conditional operatorType: type: string description: Operator type of the conditional enum: - COMPARISON - LOGICAL value: type: string description: Value of the key given the operator Notification: type: object required: - notificationId properties: action: type: string description: Description of the action to take when the notification is triggered. calculationSettings: description: The calculation configuration $ref: '#/components/schemas/CalculationSettings' checkId: type: string description: Identifier of the check. condition: type: string description: Conditional that defines the trigger of this notification description: type: string description: Description of the notification eventHook: description: Event hook of the notification $ref: '#/components/schemas/EventHook' matchAfter: type: integer format: int32 description: Match after attribute minimum: 0 throttleFor: type: integer format: int64 description: The amount of time in milliseconds to throttle notifications minimum: 0 check: description: Summary of the check that is linked to this notification $ref: '#/components/schemas/CheckSummary' createdBy: type: string description: Identifier of the user that created this notification creationTimestamp: type: integer format: int64 description: Timestamp of when the notification was created matched: type: boolean description: Matched attribute matchedFor: type: integer format: int32 description: Matched for attribute matchedLastNotifiedAt: type: integer format: int64 description: When the last matched notification was sent notificationId: type: string description: Identifier of this notification object. nrMatched: type: integer format: int32 description: Number of matches attribute organizationId: type: string description: Identifier of the organization for which this notification is created resolvedLastNotifiedAt: type: integer format: int64 description: When the last resolved notification was sent structuredConditional: type: array description: List of structured conditionals that defines the trigger event of this notification. items: $ref: '#/components/schemas/StructuredConditional' widgetIds: type: array description: List of structured conditionals that defines the trigger event of this notification. uniqueItems: true items: type: string description: Holds the editable properties of a Notification NewCheckCollection: type: object properties: name: type: string description: Name of the collection ImportCheck: type: object required: - name - notificationIds - notificationRelevance - notifications - sensorType - timezone properties: calculationSettings: description: The calculation settings if this is a calculation data source. $ref: '#/components/schemas/CalculationSettings' decimalsPerField: type: object description: The number of decimals used for each field of the data source. additionalProperties: type: integer format: int32 description: type: string description: Brief description that elaborates on the name enabled: type: boolean description: Whether the data source is enabled. ingestedForIndices: type: object description: The data source's indexes for ingested values additionalProperties: type: array items: type: string integrationType: type: string description: Integration type. locationId: type: string description: Identifier of the site it belongs to, together with the organizationId this is unique. name: type: string description: Displayable name. notificationRelevance: type: integer format: int32 description: The notification relevance for import check hits. minimum: 300 rangePerJsonKey: type: object description: Min/max ranges for each json key of the data source. additionalProperties: type: array items: type: number format: double sensorType: type: string description: The sensor type. sourceId: type: string description: Optional source id. status: type: string description: The status of the data source, e.g. ACTIVE, DEACTIVATED or PAUSED. enum: - ACTIVE - DEACTIVATED - PAUSED tags: type: array description: The tags associated with the data source. uniqueItems: true items: type: string timezone: type: string description: An area which observes a uniform standard time. unitPerField: type: object description: Identifier of the preferred unit conversion for each field. additionalProperties: type: string useCollectionsAsRows: type: boolean description: Whether collections should be displayed as rows. zoneId: type: string description: Identifier of the zone within a site where the data source belongs. createdAt: type: string description: Timestamp of when it was created. cultivationHierarchyId: type: string description: 'Cultivation composite identifier of format: ###' dataSourceCoordinateHistory: type: array items: $ref: '#/components/schemas/DataSourceCoordinates' dataSourceCoordinates: $ref: '#/components/schemas/DataSourceCoordinates' notificationIds: type: array description: Ids of the notifications for this check items: type: string notifications: type: array description: The notifications set for this sensor. items: $ref: '#/components/schemas/Notification' organizationId: type: string description: Identifier of the organization this data source belongs to. state: type: string description: 'The current state of the data source: UP or DOWN.' checkId: type: string description: Identifier of the data source collections: type: array description: Optional collections within data source data items: $ref: '#/components/schemas/CheckCollection' hasNotifications: type: boolean description: Does the data source have any notifications associated with it maxDecimals: type: integer format: int32 description: Max decimals for fields of the data source. siteId: type: string description: Identifier of the site it belongs to, together with the organizationId this is unique. description: Import check properties DataSourceCoordinatesEditable: type: object properties: coordinateX: type: number format: double description: X coordinate in space coordinateY: type: number format: double description: Y coordinate in space sinceDate: type: string description: UTC ISO 8601 timestamp since when, e.g 2024-11-12T15:00:00Z. description: Object containing the editable properties of DataSourceCoordinates. securitySchemes: Bearer: description: '' type: apiKey name: Authorization in: header