openapi: 3.2.0 info: version: '2.0' title: ZENSIE Robocrops API servers: - url: https://api.30mhz.com/api tags: - name: robocrops paths: /agent/conversation/{conversationId}/message: get: tags: - robocrops summary: Return all messages of the provided conversation description: Authentication required for this operation. operationId: getConversationMessages parameters: - name: conversationId in: path required: true schema: type: string security: - Bearer: [] responses: '200': description: All messages returned. content: application/json: schema: type: array items: $ref: '#/components/schemas/AgentMessage' application/zensie-v2+json: schema: type: array items: $ref: '#/components/schemas/AgentMessage' '403': description: Not enough permissions to perform the operation. /agent/message-stream: post: tags: - robocrops summary: Send a message to the provided conversation and start a run description: Authentication required for this operation. operationId: sendMessageStream security: - Bearer: [] responses: '200': description: Stream with updates to the run. content: text/event-stream: schema: $ref: '#/components/schemas/ChunkedOutput' '403': description: Not enough permissions to perform the operation. requestBody: content: application/json: schema: $ref: '#/components/schemas/AgentMessageNew' /data/sensors: post: tags: - robocrops summary: Retrieves data for a given field of a set of sensors description: '' operationId: getDataForSensors security: - Bearer: [] responses: '200': description: Returns sensors info along with the values per timestamp. content: application/json: schema: $ref: '#/components/schemas/SensorsDataResponse' application/zensie-v2+json: schema: $ref: '#/components/schemas/SensorsDataResponse' '403': description: Unauthorized access to the data '404': description: Sensors not found. requestBody: content: application/json: schema: $ref: '#/components/schemas/SensorsDataRequest' /import-check/{checkId}: get: tags: - robocrops summary: Returns the import check with the specified check id description: Authentication required and user has read access to the organization. operationId: getImportCheck parameters: - name: checkId in: path required: true schema: type: string security: - Bearer: [] responses: '200': description: The import check with the specified id content: application/json: schema: $ref: '#/components/schemas/ImportCheck' application/zensie-v2+json: schema: $ref: '#/components/schemas/ImportCheck' '401': description: Unauthenticated request, cannot perform operation '403': description: User is not authorized to perform this operation. '404': description: An import check with that id does not exist '500': description: Error obtaining the import check persisted data delete: tags: - robocrops summary: Delete an import check description: Authentication required for this operation, authenticated user has admin role or is owner of an organization. operationId: deleteImportCheck parameters: - name: checkId in: path required: true schema: type: string security: - Bearer: [] responses: '200': description: Import check has been removed. '403': description: User is not authorized to perform this operation. Should be admin or organization owner. '404': description: Import check not found. /import-check/organization/{organizationId}: get: tags: - robocrops summary: Return all the import checks of the given organization description: Authentication required and user is at least a follower in the organization, or is an admin in the system. operationId: getAllByOrganizationId parameters: - name: organizationId in: path required: true schema: type: string - name: search in: query description: Search for checks by name, url or check id required: false schema: type: string - name: tags in: query description: Filter checks by tags (separate with comma) required: false schema: type: string - name: tagsoperator in: query description: How should checks by filtered by tags (or / and)? required: false schema: type: string - name: sensortype in: query description: Filter checks by sensortype required: false schema: type: string - name: expandCoordinates in: query description: Include data source coordinates information required: false schema: type: boolean - name: expandCoordinateHistory in: query description: Include coordinate history for each data source (may increase response size) required: false schema: type: boolean security: - Bearer: [] responses: '200': description: List of checks returned content: application/json: schema: type: array items: $ref: '#/components/schemas/ImportCheck' application/zensie-v2+json: schema: type: array items: $ref: '#/components/schemas/ImportCheck' '403': description: User is not authorized to perform this operation. post: tags: - robocrops summary: Create a new import check in the organization description: 'Authentication required for this operation. Preconditions: Authenticated user has to be editor or owner of the organization, or be an admin in the platform. Authenticated user is an owner within the organization or an admin. The check id will be generated and the whole new saved check is returned.' operationId: createImportCheck parameters: - name: organizationId in: path required: true schema: type: string security: - Bearer: [] responses: '201': description: New import check created, including its generated check id content: application/json: schema: $ref: '#/components/schemas/ImportCheck' application/zensie-v2+json: schema: $ref: '#/components/schemas/ImportCheck' '400': description: Name, sensor type is empty or invalid data in one or more of the check properties. '403': description: Not enough permissions to perform the operation requestBody: content: application/json: schema: $ref: '#/components/schemas/ImportCheck' /import-check-update/{checkId}: post: tags: - robocrops 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' /ingest/organization/{organizationId}: post: tags: - robocrops summary: Ingest external sensor data.Supports multiple events (100 max) except for… description: 'Authentication required for this operation. A maximum of 100 events are allowed per call. Event failure codes: 1: Import check does not exist. 2: Import check is currently disabled. The import check must be enabled in order to receive data. 3: Sensor type for import check does not exist. 4: Status field should contain one of the values: "ok" or "fail" . 5: Timestamp field should contain a valid ISO 8601 DateTime format value with an explicitly set timezone value (e.g. 2017-01-17T19:23:02+06:45, 2017-01-17T19:23:02Z). 6: Timestamp must be after 2015-01-01. 8: The import check does not belong to the organization. 9: Sensor type is not external. 10: Sensor fields or the data types of the event are invalid (not matching the ones defined in sensor type table). 11: Event could not be added to database. 12: Event could not be added to notification system (notifications will not run for this event). 14: Imported string value is too long. 15: Sensor field defined in unit override is invalid. 16: Unit defined for a sensor field is invalid. 17: Collection not found 18: Failed to create new manual input event.' operationId: ingestImportChecks parameters: - name: organizationId in: path required: true schema: type: string security: - Bearer: [] responses: '200': description: Import checks events processed. content: application/json: schema: $ref: '#/components/schemas/ImportCheckEventsResponse' application/zensie-v2+json: schema: $ref: '#/components/schemas/ImportCheckEventsResponse' '403': description: Not enough permissions to perform the operation. User must be editor or owner in the organization. '413': description: Too many events sent. A maximum of 100 events are allowed per call requestBody: content: application/json: schema: type: array items: $ref: '#/components/schemas/ImportCheckEvent' application/xml: schema: type: array items: $ref: '#/components/schemas/ImportCheckEvent' /notes: post: tags: - robocrops summary: Create a note description: Authentication required for this operation. operationId: createNote security: - Bearer: [] responses: '201': description: New note created. content: application/json: schema: $ref: '#/components/schemas/Note' application/zensie-v2+json: schema: $ref: '#/components/schemas/Note' '400': description: Invalid data in the note to be created. '403': description: User not authorized. '500': description: Error while creating the note. requestBody: content: application/json: schema: $ref: '#/components/schemas/NoteNew' /notes/{noteId}: get: tags: - robocrops summary: Return the note with the given id description: Authentication required for this operation. operationId: getNoteById parameters: - name: noteId in: path description: Unique identifier of the note required: true schema: type: string security: - Bearer: [] responses: '200': description: Note returned. content: application/json: schema: $ref: '#/components/schemas/Note' application/zensie-v2+json: schema: $ref: '#/components/schemas/Note' '403': description: Not enough permissions to perform the operation. '500': description: Error while retrieving the note. put: tags: - robocrops summary: Patch a note (PUT not supported) description: Authentication required for this operation. operationId: putNote parameters: - name: noteId in: path description: Unique identifier of the note required: true schema: type: string security: - Bearer: [] responses: '200': description: Note patched content: application/json: schema: $ref: '#/components/schemas/Note' application/zensie-v2+json: schema: $ref: '#/components/schemas/Note' '400': description: Invalid data in the properties to be patched. '403': description: User not authorized. '404': description: Note not found. '500': description: Error while patching the note. requestBody: content: application/json: schema: $ref: '#/components/schemas/NoteEditable' delete: tags: - robocrops summary: Delete a note description: Authentication required for this operation. operationId: deleteNote parameters: - name: noteId in: path description: Unique identifier of the note required: true schema: type: string security: - Bearer: [] responses: '204': description: Note has been deleted. '403': description: User not authorized. '404': description: Note not found. '500': description: Error while deleting the note. patch: tags: - robocrops summary: Patch a note description: Authentication required for this operation. operationId: patchNote parameters: - name: noteId in: path description: Unique identifier of the note required: true schema: type: string security: - Bearer: [] responses: '200': description: Note patched content: application/json: schema: $ref: '#/components/schemas/Note' application/zensie-v2+json: schema: $ref: '#/components/schemas/Note' '400': description: Invalid data in the properties to be patched. '403': description: User must be authenticated. '404': description: Note not found. '500': description: Error while patching the note. requestBody: content: application/json: schema: $ref: '#/components/schemas/NoteEditable' /notes/cultivation/{cultivationId}: get: tags: - robocrops summary: Return the notes of the cultivation description: Authentication required for this operation. operationId: getNotesByCultivationId parameters: - name: cultivationId in: path description: Universally unique identifier of a cultivation. required: true schema: type: string security: - Bearer: [] responses: '200': description: Notes returned. content: application/json: schema: $ref: '#/components/schemas/Note' application/zensie-v2+json: schema: $ref: '#/components/schemas/Note' '403': description: Not enough permissions to perform the operation. '500': description: Error while retrieving notes. /sensor-type/{sensorTypeId}: get: tags: - robocrops summary: Returns the sensor type with the specified type id description: Default oauth authentication mechanism required for this operation. operationId: getSensorType parameters: - name: sensorTypeId in: path required: true schema: type: string security: - Bearer: [] responses: '200': description: The sensor type with the specified id content: application/json: schema: $ref: '#/components/schemas/SensorType' application/zensie-v2+json: schema: $ref: '#/components/schemas/SensorType' '401': description: Unauthenticated request, cannot perform operation content: application/json: schema: type: string application/zensie-v2+json: schema: type: string '404': description: A sensor type with that id does not exist content: application/json: schema: type: string application/zensie-v2+json: schema: type: string '500': description: Error obtaining the sensor type persisted data content: application/json: schema: type: string application/zensie-v2+json: schema: type: string /sensor-type: get: tags: - robocrops summary: Returns all the public sensor types description: Default oauth authentication mechanism required for this operation. operationId: getAllPublicSensorTypes security: - Bearer: [] responses: '200': description: The list of all public sensor types content: application/json: schema: type: array items: $ref: '#/components/schemas/SensorType' application/zensie-v2+json: schema: type: array items: $ref: '#/components/schemas/SensorType' '401': description: Unauthenticated request, cannot perform operation content: application/json: schema: type: string application/zensie-v2+json: schema: type: string '500': description: Error obtaining the sensor type persisted data content: application/json: schema: type: string application/zensie-v2+json: schema: type: string /calculation/{calculationId}: get: tags: - robocrops summary: Get a calculation description: '' operationId: getCalculation parameters: - name: calculationId in: path required: true schema: type: string security: - Bearer: [] responses: '200': description: Calculation retrieved content: application/json: schema: $ref: '#/components/schemas/Calculation' application/zensie-v2+json: schema: $ref: '#/components/schemas/Calculation' '403': description: User not allowed to view the calculation '500': description: Sorry, there was a problem getting the calculation. post: tags: - robocrops summary: Perform calculation description: '' operationId: calculate parameters: - name: calculationId in: path required: true schema: type: string - name: lastValueOnly in: query description: Optional - Only return the calculated value corresponding to the latest timestamp. Leave empty or set to false to return all values required: false schema: type: boolean default: false security: - Bearer: [] responses: '200': description: Calculation has been performed. content: application/json: schema: type: object additionalProperties: type: object application/zensie-v2+json: schema: type: object additionalProperties: type: object '403': description: User is not authorized to perform this operation. '404': description: Calculation not found. requestBody: content: application/json: schema: $ref: '#/components/schemas/CalculationSettings' components: schemas: 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 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 ImageWithThumbnails: type: object properties: dataUploadId: type: string imageDimensions: $ref: '#/components/schemas/ImageDimensions' thumbnails: type: array items: $ref: '#/components/schemas/ImageThumbnail' url: type: string SharedByUserDetails: type: object properties: firstName: type: string lastName: type: string NoteFileDocument: type: object properties: filename: type: string description: Original filename of the uploaded document. url: type: string description: Presigned download URL for the document. description: Represents a non-image document attached to a note file. Note: type: object required: - category - createdAt - createdBy - cultivationId - noteId - organizationId properties: category: type: string description: Main category of the note, e.g. general, crop, irrigation, pestcontrol etc. enum: - general - crop - irrigation - pest - production - nutrients description: type: string description: The description added as text to the note files: type: array description: List of files attached to the note, each containing a unique file identifier and MIME type. items: $ref: '#/components/schemas/NoteFile' noteMeasurements: description: Numeric measurements attached to the note $ref: '#/components/schemas/NoteMeasurements' plantGroupId: type: string description: Unique identifier of the plant group. plantId: type: string description: Unique identifier of the plant. subcategory: type: string description: Sub category of the note, e.g. observation, measurement, action etc. enum: - observation - action - measurement - rating timestamp: type: string description: Timestamp of the note createdAt: type: string description: Timestamp of when it was created. createdBy: type: string description: Identifier of the user that created it. cultivationId: type: string description: Universally unique identifier of a cultivation. noteId: type: string description: Unique identifier of the note organizationId: type: string description: Unique identifier for the organization, preferably a readable text such as the domain name of the company. description: Represents a note with its metadata and content. AgentMessageNew: type: object properties: agentId: type: string description: The unique identifier of the AI agent. content: type: string description: Content of the message isSystemGenerated: type: boolean description: Indicates whether it was automatically created by the system or sent by the user. organizationId: type: string description: Unique identifier for the organization, preferably a readable text such as the domain name of the company. requiredToolCall: description: A tool call that the agent must perform for the task. $ref: '#/components/schemas/AgentToolCall' role: type: string description: Role of the message sender (e.g. assistant or user) conversationId: type: string description: The unique identifier of the AI agent conversation. description: Object holding the required properties to create a new AgentMessage. NoteNew: type: object required: - category - cultivationId - description - organizationId - timestamp properties: category: type: string description: Main category of the note, e.g. general, crop, irrigation, pestcontrol etc. enum: - general - crop - irrigation - pest - production - nutrients description: type: string description: The description added as text to the note files: type: array description: List of files attached to the note, each containing a unique file identifier and MIME type. items: $ref: '#/components/schemas/NoteFile' noteMeasurements: description: Numeric measurements attached to the note $ref: '#/components/schemas/NoteMeasurements' plantGroupId: type: string description: Unique identifier of the plant group. plantId: type: string description: Unique identifier of the plant. subcategory: type: string description: Sub category of the note, e.g. observation, measurement, action etc. enum: - observation - action - measurement - rating timestamp: type: string description: Timestamp of the note cultivationId: type: string description: Universally unique identifier of a cultivation. organizationId: type: string description: Unique identifier for the organization, preferably a readable text such as the domain name of the company. description: Object holding the required properties to create a new Note. NoteFile: type: object required: - fileId - mimeType properties: document: description: Document details for non-image files, including presigned download URL and filename. Null for image files. $ref: '#/components/schemas/NoteFileDocument' fileId: type: string description: Unique identifier of the file. imageWithThumbnails: description: Presigned image URL with thumbnails for the file, if available. $ref: '#/components/schemas/ImageWithThumbnails' mimeType: type: string description: MIME type of the file, e.g. image/png. description: Represents a file attached to a note, identified by its unique identifier and MIME type. ImportCheckEventFailure: type: object properties: event: $ref: '#/components/schemas/ImportCheckEvent' errorCode: type: integer format: int32 errorText: type: string 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. AgentMessage: type: object required: - conversationId properties: agentId: type: string description: The unique identifier of the AI agent. content: type: string description: Content of the message isSystemGenerated: type: boolean description: Indicates whether it was automatically created by the system or sent by the user. organizationId: type: string description: Unique identifier for the organization, preferably a readable text such as the domain name of the company. requiredToolCall: description: A tool call that the agent must perform for the task. $ref: '#/components/schemas/AgentToolCall' role: type: string description: Role of the message sender (e.g. assistant or user) conversationId: type: string description: The unique identifier of the AI agent conversation. createdAt: type: integer format: int64 description: Timestamp of when it was created. messageId: type: string description: Unique identifier for the message. runId: type: string description: The unique identifier of the AI agent run. description: A message in the AI Agent conversation. SharedSensorType: type: object properties: createdAt: type: string description: The date and time a sensor type was shared. organizationId: type: string description: ID of the organization to which the shared sensor type belongs organizationName: type: string sensorTypeId: type: string description: Id of the original sensor type sharedByUser: type: string description: User who shared the sensor type sharedByUserDetails: $ref: '#/components/schemas/SharedByUserDetails' sharedSensorTypeId: type: string description: Id of the shared sensor type itself sharedWithGroupId: type: string description: Group which the sensor type has been shared with sharedWithGroupName: type: string sharedWithOrganizationId: type: string description: Organization which the sensor type has been shared with sharedWithOrganizationName: type: string sharedWithUser: type: string description: User who the sensor type has been shared with sharedWithUserDetails: $ref: '#/components/schemas/SharedWithUserDetails' SensorsDataResponse: type: object required: - time properties: aggregations: type: array items: $ref: '#/components/schemas/SensorsDataAggregation' time: $ref: '#/components/schemas/Time' data: type: array items: $ref: '#/components/schemas/SensorsData' SensorType: type: object required: - decimals - description properties: batteryVoltageChargedEnough: type: string batteryVoltageCritical: type: string batteryVoltageWarning: type: string canSleep: type: boolean description: States if this sensor is able to sleep chartColor: type: string color: type: string createdAt: type: string dataTypes: type: array description: The data types of the json keys (long, double, boolean, string items: type: string decimals: type: integer format: int32 description: type: string enums: type: array description: The enums (if any) in the sensor data items: $ref: '#/components/schemas/SensorTypeEnumData' external: type: boolean description: States if the sensor type is external hasVoltageInformation: type: boolean icon: type: string description: Embedded html that displays the sensor type's icon. iconId: type: string description: Identifier of the sensor type's icon asset. isBillable: type: boolean description: States if the sensor type is billable or not. isForManualInput: type: boolean description: States if the sensor type is for manual input jsonKeys: type: array items: type: string jsonLabels: type: array items: type: string metadata: type: string description: Describes sensor metadata metrics: type: array items: type: string name: type: string notificationTemplates: type: array description: Notification templates items: $ref: '#/components/schemas/NotificationTemplate' organizationId: type: string productionStatus: type: string description: Production status of the sensor enum: - ACTIVE - INACTIVE - OBSOLETE - OUTGOING queryParameters: type: object additionalProperties: type: array items: type: string queryParametersRequired: type: boolean description: States if the query parameters are required radioId: type: string description: Radio identifier rangeMax: type: string description: Maximum sensor values rangeMin: type: string description: Minimum sensor values typeId: type: string sharedDetails: $ref: '#/components/schemas/SharedSensorType' description: Authorization entity SharedWithUserDetails: type: object properties: firstName: type: string lastName: 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. Sensor: type: object required: - notificationIds properties: notifications: type: array items: $ref: '#/components/schemas/Notification' checkId: type: string organizationId: type: string siteId: type: string dataSourceCoordinateHistory: type: array items: $ref: '#/components/schemas/DataSourceCoordinates' dataSourceCoordinates: $ref: '#/components/schemas/DataSourceCoordinates' decimalsPerField: type: object additionalProperties: type: integer format: int32 notificationIds: type: array items: type: string name: type: string description: type: string tags: type: array uniqueItems: true items: type: string enabled: type: boolean status: type: string enum: - ACTIVE - DEACTIVATED - PAUSED rangePerJsonKey: type: object additionalProperties: type: array items: type: number format: double sensorType: type: string timezone: type: string zoneId: type: string Time: type: object required: - end - start properties: end: type: string format: date-time description: Time range exclusive end in ISO 8601 format without timezone, e.g., '2023-03-06T00:00:00'. resolution: type: string description: Interval size of the requested data points. Allowed values are [m, 5m, h, d, w, M]. Defaults to d. start: type: string format: date-time description: Time range start in ISO 8601 format without timezone, e.g., '2023-03-06T00:00:00'. timezone: type: string description: Timezone of the provided time range. Defaults to sensors timezone. NoteEditable: type: object required: - category properties: category: type: string description: Main category of the note, e.g. general, crop, irrigation, pestcontrol etc. enum: - general - crop - irrigation - pest - production - nutrients description: type: string description: The description added as text to the note files: type: array description: List of files attached to the note, each containing a unique file identifier and MIME type. items: $ref: '#/components/schemas/NoteFile' noteMeasurements: description: Numeric measurements attached to the note $ref: '#/components/schemas/NoteMeasurements' plantGroupId: type: string description: Unique identifier of the plant group. plantId: type: string description: Unique identifier of the plant. subcategory: type: string description: Sub category of the note, e.g. observation, measurement, action etc. enum: - observation - action - measurement - rating timestamp: type: string description: Timestamp of the note description: Object containing the editable properties of Note. ImageDimensions: type: object properties: height: type: integer format: int32 width: type: integer format: int32 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. ImageThumbnail: type: object properties: height: type: integer format: int32 path: type: string url: type: string width: type: integer format: int32 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. Type: type: object properties: typeName: type: string AgentToolCall: type: object properties: agentToolId: type: string description: The unique identifier of the tool. This is also the name of the tool. arguments: type: object description: A key-value map of the tool arguments. additionalProperties: type: object toolCallId: type: string description: The unique identifier of the AI agents call to a tool. description: An AI agent request to call a tool. SensorTypeEnumDataMapping: type: object properties: color: type: string label: type: string value: type: integer format: int32 SensorTypeEnumData: type: object properties: key: type: string mappings: type: array items: $ref: '#/components/schemas/SensorTypeEnumDataMapping' NoteMeasurements: type: object required: - data - jsonLabels - metrics - units properties: data: type: array description: Ordered numeric values of the note measurements, e.g. [20, 48] items: type: number format: double jsonLabels: type: array description: Ordered labels of the note measurements, e.g. ['Inside Temperature', 'Outside Temperature'] items: type: string metrics: type: array description: Ordered metrics of the note measurements, e.g. ['temperature', 'temperature'] items: type: string units: type: array description: Ordered unitIds of the note measurements, e.g. ['°C', 'F'] items: type: string description: represents measurements added to a note 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 ChunkedOutput: type: object properties: type: $ref: '#/components/schemas/Type' closed: type: boolean SensorsDataAggregation: type: object properties: aggregationType: type: string description: The type of aggregation to apply to the retrieved values. sensorFields: type: array items: $ref: '#/components/schemas/SensorField' sensorIds: type: array description: Ids of the sensors to get data for. They must be of the same type. items: type: string 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. ImportCheckEvent: type: object required: - data - timestamp properties: checkId: type: string description: Id of the check to import an event for. collectionId: type: string description: Optional collection id of the event. data: type: object description: 'Data as a map of sensor fields to their corresponding value, e.g. {''temperature'': 21.5}.' error: type: string description: Optional error for when status is 'fail'. status: type: string description: Optional 'ok' or 'fail' values representing the event success status. timestamp: type: string description: ISO 8601 DateTime format value with an explicitly set timezone value * (e.g. 2017-01-17T19:23:02+06:45, 2017-01-17T19:23:02Z) unitsOverride: type: object description: 'A map that defines unitId used in data values for each sensor field, e.g. { ''radiation'': ''umol_m2_s1'' }. If not defined, value is assumed to be in the metric''s default unit.' additionalProperties: type: string updateData: type: boolean description: Whether to update an existing event at the given timestamp for the given checkId or to create a new one. Default is false, so if not set, a new event will be created. Multiple events for the same checkId at the same timestamp are aggregated when they are retrieved. 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 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 Calculation: type: object properties: calculationId: type: string description: Unique identifier for the calculation description: type: string description: Description for the calculation inputParams: type: object description: A map of the necessary input parameters and their type for performing the calculation additionalProperties: type: string name: type: string description: Displayable name for the calculation outputFields: type: object description: A map of the selected output parameters and their type from the calculation response additionalProperties: type: string description: Calculations allow querying data through operations and aggregations. SensorsDataRequest: type: object required: - time properties: aggregations: type: array items: $ref: '#/components/schemas/SensorsDataAggregation' time: $ref: '#/components/schemas/Time' SensorFieldInfo: 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. symbol: type: string 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 ImportCheckEventsResponse: type: object required: - failedEvents properties: failedEvents: type: array description: List of failed ingests in the batch. uniqueItems: true items: $ref: '#/components/schemas/ImportCheckEventFailure' failedEventsNo: type: integer format: int32 description: Number of failed ingests in the batch. ingestedDocId: type: string description: Id of the created manual input event if any. It is always one single id since multiple events creation is not supported. okEventsNo: type: integer format: int32 description: Number of successful ingests in the batch. NotificationTemplate: type: object properties: condition: type: string frontend: type: string name: type: string SensorsData: type: object properties: sensorFields: type: array items: $ref: '#/components/schemas/SensorFieldInfo' sensorType: $ref: '#/components/schemas/SensorType' sensors: type: array items: $ref: '#/components/schemas/Sensor' values: type: object additionalProperties: type: object securitySchemes: Bearer: description: '' type: apiKey name: Authorization in: header