openapi: 3.2.0 info: version: '2.0' title: ZENSIE Organization API servers: - url: https://api.30mhz.com/api tags: - name: Organization paths: /organization/{organizationId}: get: tags: - Organization summary: Returns the organization description: Authentication required for this operation, authenticated user has admin role or is organization owner. operationId: getOrganization parameters: - name: organizationId in: path required: true schema: type: string security: - Bearer: [] responses: '200': description: The organization. content: application/json: schema: $ref: '#/components/schemas/Organization' application/zensie-v2+json: schema: $ref: '#/components/schemas/Organization' '401': description: User is not authorized to perform this operation. She should be owner within the organization or an admin. '404': description: Organization not found delete: tags: - Organization summary: Remove organization description: Authentication required for this operation, authenticated user have admin role. operationId: deleteOrganization parameters: - name: organizationId in: path required: true schema: type: string security: - Bearer: [] responses: '204': description: Organization has been removed. '403': description: User is not authorized to perform this operation. She should be owner within the organization or an admin. '404': description: Organization not found. '510': description: Error - Organization membership partially deleted. /organization: get: tags: - Organization summary: Returns all organizations description: Authentication required for this operation operationId: obtainAllOrganizations parameters: - name: expandSites in: query description: Optionally expand sites info.Expensive query, will increase loading time required: false schema: type: boolean - name: expandSubscriptions in: query description: Optionally expand subscriptions info.Expensive query, will increase loading time required: false schema: type: boolean security: - Bearer: [] responses: '200': description: List with all the organizations content: application/json: schema: type: array items: $ref: '#/components/schemas/Organization' application/zensie-v2+json: schema: type: array items: $ref: '#/components/schemas/Organization' '500': description: Server error obtaining the organizations post: tags: - Organization summary: Create a new organization description: Authentication required for this operation, authenticated user have admin role. operationId: createOrganization security: - Bearer: [] responses: '201': description: New organization created content: application/json: schema: $ref: '#/components/schemas/Organization' application/zensie-v2+json: schema: $ref: '#/components/schemas/Organization' '400': description: Organization data missing or incomplete. '403': description: User is not authorized to perform this operation. Should be admin. '404': description: Dashboard theme not found. '409': description: An organization with the given id already exists. '422': description: Missing or incomplete organization data. requestBody: content: application/json: schema: $ref: '#/components/schemas/OrganizationNew' /organization/{organizationId}/site/{siteId}: get: tags: - Organization summary: Return the site description: '' operationId: getSite parameters: - name: organizationId in: path required: true schema: type: string - name: siteId in: path required: true schema: type: string security: - Bearer: [] responses: '200': description: Return the site with the given id content: application/json: schema: $ref: '#/components/schemas/Site' application/zensie-v2+json: schema: $ref: '#/components/schemas/Site' '403': description: Unauthorized to perform operation, not enough permissions. '404': description: There is no site with the given id '500': description: Internal server error patch: tags: - Organization summary: Update a site description: 'Authentication required for this operation. Preconditions: Authenticated user has to be owner in the organization.' operationId: updateSite_1 parameters: - name: organizationId in: path required: true schema: type: string - name: siteId in: path required: true schema: type: string security: - Bearer: [] responses: '200': description: Site updated content: application/json: schema: $ref: '#/components/schemas/Site' application/zensie-v2+json: schema: $ref: '#/components/schemas/Site' '403': description: Not enough permissions to perform the operation '404': description: A site with that id doesn't exist '500': description: Internal server error requestBody: content: application/json: schema: $ref: '#/components/schemas/SiteEditable' /organization/{organizationId}/location/{locationId}/activate: post: tags: - Organization summary: Updates if necessary and then activates a site description: 'Authentication required for this operation. Preconditions: Authenticated user has to be account manager.' operationId: activateLocation parameters: - name: organizationId in: path required: true schema: type: string - name: locationId in: path required: true schema: type: string security: - Bearer: [] deprecated: true responses: '200': description: Location activated content: application/json: schema: $ref: '#/components/schemas/Site' application/zensie-v2+json: schema: $ref: '#/components/schemas/Site' '403': description: User is not authorized to perform this operation. '404': description: Location not found. '409': description: Location is already active. requestBody: content: application/json: schema: $ref: '#/components/schemas/SiteEditable' /organization/{organizationId}/site/{siteId}/activate: post: tags: - Organization summary: Updates if necessary and then activates a site description: 'Authentication required for this operation. Preconditions: Authenticated user has to be license administrator.' operationId: activateSite parameters: - name: organizationId in: path required: true schema: type: string - name: siteId in: path required: true schema: type: string security: - Bearer: [] responses: '200': description: Site activated content: application/json: schema: $ref: '#/components/schemas/Site' application/zensie-v2+json: schema: $ref: '#/components/schemas/Site' '403': description: User is not authorized to perform this operation. '404': description: Site not found. '409': description: Site is already active. requestBody: content: application/json: schema: $ref: '#/components/schemas/SiteEditable' /organization/{organizationId}/user/{email}: post: tags: - Organization summary: Add a user to an organization description: Authentication required for this operation, authenticated user should be an owner in the organizationor should have admin role in the system. operationId: addMember parameters: - name: organizationId in: path required: true schema: type: string - name: email in: path required: true schema: type: string - name: licenseId in: query required: false schema: type: string security: - Bearer: [] responses: '200': description: User has been added to the organization. '400': description: Organization id or email don't match, or invalid role '403': description: User is not authorized to perform this operation. She should be owner within the organization or an admin. '404': description: User or organization not found '409': description: The user is already a member of the organization. To modify her membership, use @PUT requestBody: content: application/json: schema: $ref: '#/components/schemas/OrganizationMembership' put: tags: - Organization summary: Modify user organization membership description: Authentication required for this operation, authenticated user have admin role. operationId: modifyOrganizationMembership parameters: - name: organizationId in: path required: true schema: type: string - name: email in: path required: true schema: type: string security: - Bearer: [] responses: '200': description: Organization membership has been modified. content: application/json: schema: $ref: '#/components/schemas/Organization' application/zensie-v2+json: schema: $ref: '#/components/schemas/Organization' '400': description: Organization id or email don't match, or invalid role '403': description: User is not authorized to perform this operation. She should be owner within the organization or an admin. '404': description: Organization membership not found. requestBody: content: application/json: schema: $ref: '#/components/schemas/OrganizationMembership' application/xml: schema: $ref: '#/components/schemas/OrganizationMembership' delete: tags: - Organization summary: Remove user organization membership description: Authentication required for this operation, authenticated user have admin role. operationId: deleteOrganizationMembership parameters: - name: organizationId in: path required: true schema: type: string - name: email in: path required: true schema: type: string security: - Bearer: [] responses: '200': description: Organization membership has been removed. '403': description: User is not authorized to perform this operation. She should be owner within the organization or an admin. '404': description: Organization membership not found. '510': description: Error - Organization membership partially deleted. /organization/{organizationId}/location/{locationId}/deactivate: post: tags: - Organization summary: Deactivates a site description: Only account managers can deactivate locations. operationId: deactivateLocation parameters: - name: organizationId in: path required: true schema: type: string - name: locationId in: path required: true schema: type: string security: - Bearer: [] deprecated: true responses: '200': description: Location deactivated content: application/json: schema: $ref: '#/components/schemas/Site' application/zensie-v2+json: schema: $ref: '#/components/schemas/Site' '403': description: User is not authorized to perform this operation. '404': description: Locations not found requestBody: content: application/json: schema: type: object /organization/{organizationId}/site/{siteId}/deactivate: post: tags: - Organization summary: Deactivates a site description: Only system administrators can deactivate site. operationId: deactivateSite parameters: - name: organizationId in: path required: true schema: type: string - name: siteId in: path required: true schema: type: string security: - Bearer: [] responses: '200': description: Site deactivated content: application/json: schema: $ref: '#/components/schemas/Site' application/zensie-v2+json: schema: $ref: '#/components/schemas/Site' '403': description: User is not authorized to perform this operation. '404': description: Site not found requestBody: content: application/json: schema: type: object /organization/{organizationId}/location/{locationId}: delete: tags: - Organization summary: Delete site description: '' operationId: deleteSubscriptionLocation parameters: - name: organizationId in: path required: true schema: type: string - name: locationId in: path required: true schema: type: string - name: permanently in: query description: Optional bool to specify the permanent deletion of the subscription location. required: false schema: type: boolean security: - Bearer: [] responses: '204': description: Subscription site has been deleted. '403': description: User is not authorized to perform this operation.. '404': description: Location not found. x-admin-only: true /organization/user/{notUsed}: get: tags: - Organization summary: Returns all the organizations that the user belongs to description: Authentication required for this operation. operationId: getOrganizationForCurrentUserLegacy parameters: - name: notUsed in: path required: true schema: type: string security: - Bearer: [] deprecated: true responses: '200': description: All the organizations including the roles for the current user in each of them. content: application/json: schema: type: array items: $ref: '#/components/schemas/OrganizationWithUserRole' application/zensie-v2+json: schema: type: array items: $ref: '#/components/schemas/OrganizationWithUserRole' '401': description: User is not authorized to perform this operation. She should be owner within the organization or an admin. '404': description: User or organization not found /organization/user/email/{email}: get: tags: - Organization summary: Returns all the organizations that the user with the given email belongs to description: Authentication required for this operation. operationId: getOrganizations parameters: - name: email in: path required: true schema: type: string security: - Bearer: [] responses: '200': description: All the organizations for the user. content: application/json: schema: type: array items: $ref: '#/components/schemas/Organization' application/zensie-v2+json: schema: type: array items: $ref: '#/components/schemas/Organization' '400': description: Invalid role '401': description: User is not authorized to perform this operation. '404': description: User or organization not found /organization/user: get: tags: - Organization summary: Returns all the organizations that the user belongs to description: Authentication required for this operation, authenticated user should be the same as user in the URI, or should have admin role in the system. operationId: getOrganizations_1 security: - Bearer: [] responses: '200': description: All the organizations for the current user. content: application/json: schema: type: array items: $ref: '#/components/schemas/Organization' application/zensie-v2+json: schema: type: array items: $ref: '#/components/schemas/Organization' '400': description: Organization id or email don't match, or invalid role '401': description: User is not authorized to perform this operation. She should be owner within the organization or an admin. '404': description: User or organization not found /organization/billable: get: tags: - Organization summary: Returns all billable organizations description: '' operationId: obtainAllBillableOrganizations parameters: - name: expandSites in: query description: Include sites information required: false schema: type: boolean security: - Bearer: [] responses: '200': description: List all billable organizations with optional sites details content: application/json: schema: type: array items: $ref: '#/components/schemas/Organization' application/zensie-v2+json: schema: type: array items: $ref: '#/components/schemas/Organization' '403': description: User is not authorized to perform this operation. '500': description: Server error /organization/{organizationId}/location: post: tags: - Organization summary: Request a new site description: Only organization owners can request locations. operationId: requestLocation parameters: - name: organizationId in: path required: true schema: type: string security: - Bearer: [] deprecated: true responses: '201': description: New site requested content: application/json: schema: $ref: '#/components/schemas/Site' application/zensie-v2+json: schema: $ref: '#/components/schemas/Site' '400': description: Location data missing or incomplete. '403': description: User is not authorized to perform this operation. '409': description: A site with the given name already exists '422': description: Unprocessable request. requestBody: content: application/json: schema: $ref: '#/components/schemas/NewSite' /organization/{organizationId}/site: post: tags: - Organization summary: Request a new site description: Only organization owners can request sites. operationId: requestSite parameters: - name: organizationId in: path required: true schema: type: string security: - Bearer: [] responses: '201': description: New site requested content: application/json: schema: $ref: '#/components/schemas/Site' application/zensie-v2+json: schema: $ref: '#/components/schemas/Site' '400': description: Site data missing or incomplete. '403': description: User is not authorized to perform this operation. '409': description: A site with the given name already exists '422': description: Unprocessable request. requestBody: content: application/json: schema: $ref: '#/components/schemas/NewSite' components: schemas: 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 Address: type: object properties: city: type: string description: Human settlement of notable size. country: type: string description: A nation, a body of land with one government. countryCode: type: string description: Short alphanumeric identification code for countries and dependent areas, e.g. NL number: type: string description: The number on a street of a particular address. postalCode: type: string description: A series of letters and/or digits for the purpose of sorting mail, e.g. '3011 GK'. street: type: string description: A public road in a city. description: The particulars of the place where this object is located. 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. Organization: type: object required: - isBillable - sites - subscriptions properties: alarmsChecks: type: array description: The alarms checks ids of the organization. uniqueItems: true items: type: string billedPerLocation: type: boolean description: States if the organization is billed per location. companyDetailsId: type: string description: The id of the company details. countryCode: type: string description: The 2 letter ISO code of the country of the organization currency: type: string description: Preferred currency for invoices etc dashboardThemeId: type: string description: The dashboard theme id description: type: string description: A description about the organization. Optional. hideBilling: type: boolean description: States if we should hide the billing page. hubspotId: type: string description: Unique identifier in Hubspot. isActive: type: boolean description: Whether it is active or deactivated. isBillable: type: boolean description: States if the organization is billable or not. latitude: type: number format: double description: Organization’s geolocation latitude. minimum: -90 maximum: 90 longitude: type: number format: double description: Organization’s geolocation longitude. minimum: -180 maximum: 180 name: type: string description: Displayable name of the organization. prepaid: type: boolean description: States if the organization uses prepaid payments. prepaidFrom: type: string description: States from which date the organization uses prepaid payments. prepaidUntil: type: string description: States until which date the organization uses prepaid payments. serviceModel: type: boolean description: States if the organization has a service model or not. tags: type: array description: The tags associated with the sensor check. uniqueItems: true items: type: string apps: type: array description: The apps an organization has permissions for. uniqueItems: true items: type: string companyDetails: description: Details of the company $ref: '#/components/schemas/CompanyDetails' createdAt: type: integer format: int64 description: Timestamp of when the organization was created. organizationId: type: string description: Unique identifier for the organization, preferably a readable text such as the domain name of the company. activatedAt: type: string description: UTC ISO 8601 timestamp of activation, e.g. e.g 2023-12-12T15:00:00Z. activatedBy: type: string description: Identifier of the user that activated it. availableApps: type: array description: Available apps to the organization. items: $ref: '#/components/schemas/App' cultivationPhases: type: array description: Cultivation phase definitions available to the organization, ordered alphabetically by name. items: $ref: '#/components/schemas/CultivationPhaseDefinition' dashboardTheme: description: The look and feel customization of a dashboard. $ref: '#/components/schemas/DashboardTheme' deactivatedAt: type: string description: UTC ISO 8601 timestamp of deactivation, e.g. e.g 2023-12-12T15:00:00Z. deactivatedBy: type: string description: Identifier of the user that deactivated it. extensions: description: Extensions context in the organization. $ref: '#/components/schemas/OrganizationExtensions' installedApps: type: array description: Installed apps of the organization. items: $ref: '#/components/schemas/App' locations: type: array description: Subscription locations in the organization. items: $ref: '#/components/schemas/Site' sites: type: array description: Sites in the organization. items: $ref: '#/components/schemas/Site' subscriptions: type: array description: Subscriptions of the organization. items: $ref: '#/components/schemas/Subscription' billable: type: boolean noteMeasurementsByCategory: type: object description: Measurements defined for the notes of the organization, by note category and subcategory. additionalProperties: type: object additionalProperties: type: array items: $ref: '#/components/schemas/NoteMeasurementDefinition' description: An organization is an entity that encompasses a set of checks, private locations and users. CultivationPhaseDefinition: type: object required: - name - uuid properties: color: type: string description: Display color of the phase as a hex string, e.g. '#FAEEDA'. pattern: ^#[A-Fa-f0-9]{6}$ name: type: string description: Name of the cultivation phase, from its organization-wide definition. Sent along a uuid it renames that definition, so the phase is renamed on every cultivation using it; sent without one it defines the phase. minLength: 0 maxLength: 64 uuid: type: string description: Universally unique identifier. description: Organization-wide definition of a cultivation phase. 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. DashboardThemeCSS: type: object properties: backgroundColor: type: string pattern: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ buttonBackgroundColor: type: string pattern: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ buttonTextColor: type: string pattern: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ headerBarBackgroundColor: type: string pattern: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ headerBarShadow: type: boolean headerBarTextColor: type: string pattern: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ localMenuActiveBackgroundColor: type: string pattern: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ localMenuActiveBackgroundColorMobile: type: string pattern: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ localMenuActiveTextColor: type: string pattern: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ localMenuActiveTextColorMobile: type: string pattern: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ localMenuBackgroundColor: type: string pattern: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ localMenuBackgroundColorMobile: type: string pattern: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ localMenuTextColor: type: string pattern: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ localMenuTextColorMobile: type: string pattern: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ menuActiveBackgroundColor: type: string pattern: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ menuActiveTextColor: type: string pattern: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ menuBackgroundColor: type: string pattern: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ menuTextColor: type: string pattern: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ App: type: object required: - appId properties: dashboards: type: array description: App's dashboards. items: type: object additionalProperties: type: object defaultDynamicConfigurations: type: object description: The default dynamic configuration of the installable additionalProperties: type: object description: type: string description: Description of the installable. logoDataId: type: string description: Id of the logo image data. logoUrl: type: string description: Application's logo URL. maxInstallationsPerOrg: type: integer format: int32 description: Maximum number of installations allowed for any given organization name: type: string description: Name of the installable ownerName: type: string description: Installable's owner name. packageDataId: type: string description: Id of the code package data. primaryColor: type: string description: App's primary color. requiredManualInputForms: type: array description: List of manual input forms required by the extension. items: $ref: '#/components/schemas/RequiredSensor' sections: type: object description: App's sections, with sections id as keys and definitions as values. additionalProperties: type: object additionalProperties: type: object settings: type: object description: Custom settings common to all extension's installations additionalProperties: type: object supportUrl: type: string description: Extension's support web page URL. url: type: string description: Application's URL. widgets: type: array description: Widgets that belong to the installable. items: type: object publishedAt: type: string description: UTC ISO 8601 timestamp of publication, e.g., 2025-02-21T15:00:00Z. publishedBy: type: string description: The email of the user that published this app. submittedAt: type: string description: 'The ISO601 UTC date the app was submitted. e.g.: 2021-03-21T00:00:00Z' submittedBy: type: string description: The email of the user that submitted this app. appId: type: string description: Id of the application organizationId: type: string description: Id of the organization that owns the installable. state: type: string description: Status of the installable. type: type: string description: Type of the application. ImageDimensions: type: object properties: height: type: integer format: int32 width: type: integer format: int32 ImageThumbnail: type: object properties: height: type: integer format: int32 path: type: string url: type: string width: type: integer format: int32 NewSite: type: object required: - address - id - name - subscriptionId properties: address: description: The particulars of the place where this object is located. $ref: '#/components/schemas/Address' billableSince: type: string description: Date since the site is billable in UTC, e.g. 2020-12-24T18:51:31Z pattern: \d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z) contractLength: type: integer format: int32 description: Number of months from the start date through which the contract is effective. latitude: type: number format: double description: Angular distance north or south of the equator. minimum: -90 maximum: 90 longitude: type: number format: double description: Angular distance east or west of the prime meridian. minimum: -180 maximum: 180 name: type: string description: Site's name subscriptionId: type: string description: Unique identifier for the subscription. timezone: type: string description: An area which observes a uniform standard time. aerialImageDataUploadId: type: string description: Id of the aerial image data upload. aerialImagePresignedUrl: type: string description: Presigned URL of the aerial image. deactivatedAt: type: string description: UTC ISO 8601 timestamp of deactivation, e.g. e.g 2023-12-12T15:00:00Z. externalSensors: type: array description: External sensors in the location. items: $ref: '#/components/schemas/ImportCheck' gateways: type: array description: The gateways in this site. items: $ref: '#/components/schemas/Gateway' id: type: string description: Identifier of the site it belongs to, together with the organizationId this is unique. internalSensors: type: array description: Internal sensors in the location. items: $ref: '#/components/schemas/Check' organizationId: type: string description: Unique identifier for the organization, preferably a readable text such as the domain name of the company. status: type: string description: Current status of the site. enum: - ACTIVE - DELETED - INACTIVE - PENDING urlPathIdentifier: type: string description: URL friendly identifier of the site based on the name of the site. uuid: type: string description: Universally unique identifier. zones: type: array description: Zones in the site. items: $ref: '#/components/schemas/Zone' description: A customer's physical location where data (sensors, devices and integrations) belong. Crop: type: object required: - category - cropId - maxAllowableDepletion properties: category: type: string description: Category of the crop. maxAllowableDepletion: type: number format: double description: Suggested theoretical Maximum Allowable Depletion (MAD) of the crop. minimum: 0 maximum: 100 name: type: string description: Name of the crop. createdAt: type: integer format: int64 description: The date and time the crop was created. cropId: type: string description: Id of the crop. organizationId: type: string description: The organization the crop belongs to. Site: type: object required: - address - id - name - subscriptionId properties: address: description: The particulars of the place where this object is located. $ref: '#/components/schemas/Address' billableSince: type: string description: Date since the site is billable in UTC, e.g. 2020-12-24T18:51:31Z pattern: \d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z) contractLength: type: integer format: int32 description: Number of months from the start date through which the contract is effective. latitude: type: number format: double description: Angular distance north or south of the equator. minimum: -90 maximum: 90 longitude: type: number format: double description: Angular distance east or west of the prime meridian. minimum: -180 maximum: 180 name: type: string description: Set of words by which a site is known. subscriptionId: type: string description: Unique identifier for the subscription. timezone: type: string description: An area which observes a uniform standard time. aerialImageDataUploadId: type: string description: Id of the aerial image data upload. aerialImagePresignedUrl: type: string description: Presigned URL of the aerial image. deactivatedAt: type: string description: UTC ISO 8601 timestamp of deactivation, e.g. e.g 2023-12-12T15:00:00Z. externalSensors: type: array description: External sensors in the location. items: $ref: '#/components/schemas/ImportCheck' gateways: type: array description: The gateways in this site. items: $ref: '#/components/schemas/Gateway' id: type: string description: Identifier of the site it belongs to, together with the organizationId this is unique. internalSensors: type: array description: Internal sensors in the location. items: $ref: '#/components/schemas/Check' organizationId: type: string description: Unique identifier for the organization, preferably a readable text such as the domain name of the company. status: type: string description: Current status of the site. enum: - ACTIVE - DELETED - INACTIVE - PENDING urlPathIdentifier: type: string description: URL friendly identifier of the site based on the name of the site. uuid: type: string description: Universally unique identifier. zones: type: array description: Zones in the site. items: $ref: '#/components/schemas/Zone' isActive: type: boolean description: Whether it is active or deactivated. description: A customer's physical location where data (sensors, devices and integrations) belong. Subscription: type: object properties: actions: type: array description: The actions permitted by the license subscription. items: type: string name: type: string description: Displayable name. createdAt: type: string description: Timestamp of when it was created. createdBy: type: string description: Identifier of the user that created it. licenseId: type: string description: Unique identifier for the license. subscriptionId: type: string description: Unique identifier for the subscription. description: Object holding the editable properties of a subscription Check: type: object required: - checkId - enabled - frequency - hasNotifications - healthyThreshold - locationThreshold - maxReminders - method - name - notificationIds - notifications - organizationId - recentlyDownAt - remindEvery - state - statusCodes - timeout - unhealthyThreshold - url properties: allowRedirects: type: boolean description: Whether to follow redirects when a page returns HTTP code 302. Default is false. calculationId: type: string description: The id of the calculation called by the webcheck collectJson: type: boolean description: If the recollection of the JSON object has to be effectuated or not conditional: type: string description: A javascript expression that is applied to the json result and has to evaluate to true for the data source to be UP. contains: type: string description: Verify that the page returned contains this text, otherwise the data source will be reported as DOWN. containsNot: type: string description: Verify that the page returned does NOT contain this text, if it does, the data source will be reported as DOWN. cookies: type: string description: Send these cookies in each request when pinging the data source. You can use this, for example, for adding authentication data. cron: type: string description: Only run this data source in the given schedule. This is written in Unix-like notation. For example, to run it only weekdays 8 to 17, write '* * 8-17 ? * MON-FRI' data: type: string description: Payload to send, usually for POST or PUT methods 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 email: type: string description: Email address. enabled: type: boolean description: Whether the data source is enabled. frequency: type: integer format: int32 description: The frequency with which the data source is pinged, in seconds. gatewayId: type: string description: Identifier of the gateway the data source belongs to. headers: type: string description: Send these HTTP headers in each request when pinging the data source. You can use this, for example, for adding authentication data. healthyThreshold: type: integer format: int32 description: How many consecutive successful responses indicate that the data source is up. locationThreshold: type: integer format: int64 description: How many locations indicate the data source is up/down. locations: type: array description: From which locations to ping the data source from. uniqueItems: true items: type: string maxDecimals: type: integer format: int32 description: Max decimals for fields of the data source. maxReminders: type: integer format: int32 description: The maximum number of times you want to be notified if DOWN. method: type: string description: HTTP method (get/post/put/delete) to user for pinging the data source name: type: string description: Displayable name. organizationId: type: string description: Identifier of the organization this data source belongs to. params: type: string description: Send these HTTP parameters in each request when pinging the data source. remindEvery: type: integer format: int32 description: Every how many seconds to send another notification if data source is still DOWN. (See also Number of reminders). sensorType: type: string description: The sensor type. siteId: type: string description: Identifier of the site it belongs to, together with the organizationId this is unique. status: type: string description: The status of the data source, e.g. ACTIVE, DEACTIVATED or PAUSED. enum: - ACTIVE - DEACTIVATED - PAUSED statusCodes: type: array description: What HTTP status code are expected when pinging the data source. If the received HTTP status is not in this list, the data source will be reported as DOWN. uniqueItems: true items: type: integer format: int32 maxItems: 2147483647 minItems: 1 stream: type: boolean description: Whether the stream is enabled for the response validation tags: type: array description: The tags associated with the data source. uniqueItems: true items: type: string timeout: type: integer format: int32 description: How long we wait for the data source to respond before we consider it down. timezone: type: string description: An area which observes a uniform standard time. unhealthyThreshold: type: integer format: int32 description: How many consecutive failed responses indicate that the data source is down. units: type: array description: The units associated with the sensor data source. uniqueItems: true items: type: string url: type: string description: The URL of the data source. verify: type: boolean description: Whether SSL verification is enabled. zoneId: type: string description: Identifier of the zone within a site where the data source belongs. rangePerJsonKey: type: object description: Min/max ranges for each json key of the data source. additionalProperties: type: array items: type: number format: double timezoneOffset: type: integer format: int64 description: Offset of the timezone in minutes. batteryStatus: type: string description: The battery status warnings or errors associated with this data source. Expected values are OK, WARNING and CRITICAL. checkId: type: string description: Identifier of the data source createdAt: type: string description: Timestamp of when it was created. dataSourceCoordinateHistory: type: array description: A collection of all positions of this data source. items: $ref: '#/components/schemas/DataSourceCoordinates' dataSourceCoordinates: description: A set of numbers that represent the current position of a data source $ref: '#/components/schemas/DataSourceCoordinates' hasNotifications: type: boolean description: Does the data source have any notifications associated with it 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' recentlyDownAt: type: number format: double description: Last moment when the data source was DOWN, as a Unix Timestamp state: type: string description: 'The current state of the data source: UP or DOWN.' owner: type: string description: Email address. description: A check OrganizationWithUserRole: type: object properties: organization: $ref: '#/components/schemas/Organization' role: type: string Soil: type: object required: - category - permanentWiltingPoint - soilId - totalAvailableWater properties: category: type: string description: Category of the soil. fieldCapacity: type: number format: double description: Field capacity of the soil. minimum: 0 maximum: 100 name: type: string description: Name of the soil. permanentWiltingPoint: type: number format: double description: Permanent wilting point of the soil. minimum: 0 maximum: 100 createdAt: type: integer format: int64 description: The epoch millis of the creation time. organizationId: type: string description: The organization the soil belongs to. soilId: type: string description: Id of the soil. totalAvailableWater: type: number format: double description: Total available water of the soil. readOnly: true 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 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 OrganizationMembership: type: object required: - email properties: email: type: string description: User's email. firstName: type: string description: User's first name lastName: type: string description: User's last name organizationId: type: string description: Identifier for the organization. purpose: type: string description: Optional purpose of invitation role: type: string description: Role of the user within the organization. It determines the user's permissions. description: A user being a member of an organization with a given role. Zone: type: object required: - id - name - organizationId - siteId properties: color: type: string description: Color of the zone in the map cropId: type: string description: Zone's crop type. floorArea: type: number format: double description: Zone's floor area in m2. name: type: string description: Name of the zone soilId: type: string description: Zone's soil type id. crop: description: The crop being grown in this zone. $ref: '#/components/schemas/Crop' geoJson: type: object description: GeoJson definition. additionalProperties: type: object id: type: string description: Identifier of the zone within the site organizationId: type: string description: Unique identifier for the organization, preferably a readable text such as the domain name of the company. siteId: type: string description: Identifier of the site it belongs to, together with the organizationId this is unique. soil: description: The soil this zone uses. $ref: '#/components/schemas/Soil' uuid: type: string description: Universally unique identifier. description: A Zone is a physical subsection in a site. RequiredSensor: type: object required: - sensorTypeId properties: configurationKeypathToCheckId: type: string description: Optional keypath in dynamic configurations where check id is stored name: type: string description: Name of the sensor sensorTypeId: type: string description: Id of the sensor type of the required sensor OrganizationExtensions: type: object properties: developed: type: array items: $ref: '#/components/schemas/App' OrganizationNew: type: object required: - currency - name - organizationId properties: alarmsChecks: type: array description: The alarms checks ids of the organization. uniqueItems: true items: type: string billedPerLocation: type: boolean description: States if the organization is billed per location. companyDetailsId: type: string description: The id of the company details. countryCode: type: string description: The 2 letter ISO code of the country of the organization currency: type: string description: Preferred currency for invoices etc dashboardThemeId: type: string description: The dashboard theme id description: type: string description: A description about the organization. Optional. hideBilling: type: boolean description: States if we should hide the billing page. hubspotId: type: string description: Unique identifier in Hubspot. isActive: type: boolean description: Whether it is active or deactivated. isBillable: type: boolean description: States if the organization is billable or not. latitude: type: number format: double description: Organization’s geolocation latitude. minimum: -90 maximum: 90 longitude: type: number format: double description: Organization’s geolocation longitude. minimum: -180 maximum: 180 name: type: string description: Displayable name of the organization. prepaid: type: boolean description: States if the organization uses prepaid payments. prepaidFrom: type: string description: States from which date the organization uses prepaid payments. prepaidUntil: type: string description: States until which date the organization uses prepaid payments. serviceModel: type: boolean description: States if the organization has a service model or not. tags: type: array description: The tags associated with the sensor check. uniqueItems: true items: type: string organizationId: type: string description: Unique identifier for the organization, preferably a readable text such as the domain name of the company. 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 CompanyDetails: type: object required: - active properties: accountManager: type: string description: CompanyDetails's account manager. active: type: boolean description: The state of the company detail address: type: string description: The address of the company details city: type: string description: The city of the company details companyDetailsId: type: string description: Company details id companyName: type: string description: The company name of the company details country: type: string description: The country of the company details countryCode: type: string description: The code of the country of the company details debtorId: type: integer format: int32 description: The debtor id of the company details invoiceEmail: type: string description: CompanyDetails's invoice email. organizationId: type: string description: The organization id of the company details postalCode: type: string description: The postal code of the company details telephoneNumber: type: string description: The address of the company details vatNumber: type: string description: The vat number of the company details SiteEditable: type: object properties: address: description: The particulars of the place where this object is located. $ref: '#/components/schemas/Address' billableSince: type: string description: Date since the site is billable in UTC, e.g. 2020-12-24T18:51:31Z pattern: \d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z) contractLength: type: integer format: int32 description: Number of months from the start date through which the contract is effective. latitude: type: number format: double description: Angular distance north or south of the equator. minimum: -90 maximum: 90 longitude: type: number format: double description: Angular distance east or west of the prime meridian. minimum: -180 maximum: 180 name: type: string description: Set of words by which a site is known. subscriptionId: type: string description: Unique identifier for the subscription. timezone: type: string description: An area which observes a uniform standard time. description: Object that contains the editable properties of a Site Gateway: type: object properties: alarmsChecks: type: array description: The alarms checks ids of the gateway. uniqueItems: true items: type: string fleetManagerDeviceId: type: string description: The fleet manager id. gatewayClusterId: type: string description: The gateway cluster id. gatewayInfoCheckId: type: string description: Id of the gateway info check. isBillable: type: boolean description: States if the gateway is billable or not. name: type: string description: Gateway name organizationId: type: string description: The organization of the gateway. remarks: type: string description: The remarks for the gateway. siteId: type: string description: The site of the gateway. state: type: string description: The state of the gateway. templateId: type: string description: Gateway's template id. gatewayId: type: string description: Gateway Id. macAddress: type: string description: The mac address of the gateway. monitoringCheckId: type: string description: Id of the gateway monitoring check. xbeeAddress: type: string description: The address of the xbee. createdAt: type: string description: The date and time a gateway was created. deletedAt: type: string description: The date and time a gateway was deleted. deletedBy: type: string description: User that deleted the gateway. deployedAt: type: string description: The date and time a gateway was deployed. jsonEnvironmentVariableOnDevice: type: boolean description: Indicates if the json environment variable was successfully set on the actual device via the resin api call when creating a gateway updatedAt: type: string description: The date and time a gateway was last updated. NoteMeasurementDefinition: type: object required: - category - key - label - metric - subcategory properties: category: type: string description: Note category the measurement is offered under. enum: - general - crop - irrigation - pest - production - nutrients key: type: string description: Stable identifier of the measurement, also the json key its values are ingested under. label: type: string description: Display name of the measurement, e.g. 'Drain Volume'. minLength: 0 maxLength: 64 metric: type: string description: Identifier of the metric the measurement is expressed in, e.g. 'irrigation'. subcategory: type: string description: Note sub category the measurement is offered under. enum: - observation - action - measurement - rating unitId: type: string description: Conversion unit the measurement is recorded in. Empty means the metric default unit. description: Organization-wide definition of a measurement a note can carry. DashboardTheme: type: object properties: createdByEmail: type: string description: Created by css: description: Dashboard theme css $ref: '#/components/schemas/DashboardThemeCSS' dashboardThemeId: type: string description: Dashboard theme id groupIds: type: array uniqueItems: true items: type: string logo: description: Dashboard logo $ref: '#/components/schemas/ImageWithThumbnails' logoDataUploadId: type: string description: Dashboard logo data upload id name: type: string description: Dashboard theme name organizationIds: type: array uniqueItems: true items: type: string 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 securitySchemes: Bearer: description: '' type: apiKey name: Authorization in: header