{ "swagger" : "2.0", "info" : { "version" : "2.0", "title" : "ZENSIE API" }, "host" : "api.30mhz.com", "basePath" : "/api", "tags" : [ { "name" : "admin" }, { "name" : "agent" }, { "name" : "integrate" }, { "name" : "robocrops" }, { "name" : "assembly" }, { "name" : "assembly-update" }, { "name" : "authorization" }, { "name" : "billing-history-details" }, { "name" : "billing-history-details-update" }, { "name" : "billing-history" }, { "name" : "billing-history-update" }, { "name" : "chart" }, { "name" : "check" }, { "name" : "check-update" }, { "name" : "comment" }, { "name" : "comment-update" }, { "name" : "company-details" }, { "name" : "company-details-update" }, { "name" : "crop" }, { "name" : "currency-rates" }, { "name" : "currency" }, { "name" : "customer-registration" }, { "name" : "dashboard" }, { "name" : "dashboard-theme" }, { "name" : "dashboard-theme-update" }, { "name" : "dashboard-update" }, { "name" : "data-export" }, { "name" : "data" }, { "name" : "data-source-coordinates" }, { "name" : "data-source" }, { "name" : "data-upload" }, { "name" : "device" }, { "name" : "export-partner-job" }, { "name" : "export-partner-job-update" }, { "name" : "export-partner" }, { "name" : "export-partner-update" }, { "name" : "gateway-cluster" }, { "name" : "gateway" }, { "name" : "gateway-update" }, { "name" : "util" }, { "name" : "group" }, { "name" : "group-update" }, { "name" : "health" }, { "name" : "highlight" }, { "name" : "import-check" }, { "name" : "import-check-update" }, { "name" : "ingest" }, { "name" : "ingest-update" }, { "name" : "integration" }, { "name" : "integrity-check" }, { "name" : "license" }, { "name" : "location" }, { "name" : "location-update" }, { "name" : "map" }, { "name" : "metric" }, { "name" : "metric-update" }, { "name" : "mother" }, { "name" : "mother-template" }, { "name" : "mother-template-update" }, { "name" : "mother-update" }, { "name" : "news" }, { "name" : "notes" }, { "name" : "notification-follow" }, { "name" : "notification-follow-update" }, { "name" : "notification" }, { "name" : "notification-settings" }, { "name" : "notification-settings-update" }, { "name" : "notification-topic-follow" }, { "name" : "notification-topic-follow-update" }, { "name" : "notification-topic" }, { "name" : "notification-topic-update" }, { "name" : "notification-update" }, { "name" : "offer" }, { "name" : "organization" }, { "name" : "organization-update" }, { "name" : "partner" }, { "name" : "pricing" }, { "name" : "pricing-update" }, { "name" : "product" }, { "name" : "product-update" }, { "name" : "sensor" }, { "name" : "sensor-type" }, { "name" : "sensor-type-update" }, { "name" : "shared-check" }, { "name" : "shared-dashboard" }, { "name" : "shared-dashboard-update" }, { "name" : "share-sensor-type" }, { "name" : "site" }, { "name" : "soil" }, { "name" : "subscription-assignment" }, { "name" : "subscription" }, { "name" : "swagger" }, { "name" : "timezone" }, { "name" : "userconfig" }, { "name" : "user" }, { "name" : "user-update" }, { "name" : "widget" }, { "name" : "widget-update" }, { "name" : "zone" }, { "name" : "app-installation" }, { "name" : "app-installation-update" }, { "name" : "app" }, { "name" : "app-update" }, { "name" : "calculation" }, { "name" : "calculation-update" }, { "name" : "app-cultiwatch" }, { "name" : "app-irrigation" }, { "name" : "customer-request-item" }, { "name" : "customer-request-item-update" }, { "name" : "customer-request" }, { "name" : "customer-request-update" }, { "name" : "dealer" }, { "name" : "dealer-update" }, { "name" : "invoice" }, { "name" : "invoice-update" }, { "name" : "order" }, { "name" : "order-update" }, { "name" : "quote" }, { "name" : "quote-update" }, { "name" : "cultivation" }, { "name" : "cultivation-target" }, { "name" : "downtime" }, { "name" : "stats" }, { "name" : "uptime" }, { "name" : "status" }, { "name" : "xbee-factory" }, { "name" : "xbee-factory-update" } ], "schemes" : [ "https" ], "paths" : { "/admin/health/api-build-version" : { "get" : { "tags" : [ "admin" ], "summary" : "Returns the API build version.", "description" : "The authenticated user must be an administrator.", "operationId" : "getApiBuildVersion", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Returns the API build version.", "schema" : { "$ref" : "#/definitions/Result" } }, "403" : { "description" : "Unauthorized to perform the operation. User has to be admin." } }, "x-admin-only" : true } }, "/admin/health/auth0" : { "get" : { "tags" : [ "admin" ], "summary" : "Returns the Auth0 health.", "description" : "The authenticated user must be an administrator.", "operationId" : "getAuth0Health", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Return the health of Auth0", "schema" : { "$ref" : "#/definitions/Result" } }, "403" : { "description" : "Unauthorized to perform the operation. User has to be admin." } }, "x-admin-only" : true } }, "/admin/health/dynamodb" : { "get" : { "tags" : [ "admin" ], "summary" : "Returns the DynamoDB health.", "description" : "The authenticated user must be an administrator.", "operationId" : "getDynamoDbHealth", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Return the list of sales statistics", "schema" : { "$ref" : "#/definitions/Result" } }, "403" : { "description" : "Unauthorized to perform the operation. User has to be admin." } }, "x-admin-only" : true } }, "/admin/health/elasticsearch" : { "get" : { "tags" : [ "admin" ], "summary" : "Returns the Elasticsearch health.", "description" : "The authenticated user must be an administrator.", "operationId" : "getElasticsearchHealth", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Returns the Elasticsearch health.", "schema" : { "$ref" : "#/definitions/Result" } }, "403" : { "description" : "Unauthorized to perform the operation." } }, "x-admin-only" : true } }, "/admin/health/scheduler" : { "get" : { "tags" : [ "admin" ], "summary" : "Returns the Scheduler health.", "description" : "The authenticated user must be an administrator.", "operationId" : "getSchedulerHealth", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "", "schema" : { "$ref" : "#/definitions/Result" } }, "403" : { "description" : "Unauthorized to perform the operation. User has to be admin." } }, "x-admin-only" : true } }, "/admin/notification-follow/user/{email}" : { "delete" : { "tags" : [ "admin" ], "summary" : "Delete all notification follows of a user (i.e. Follow, NotificationFollow and NotificationTopicFollow objects).", "description" : "", "operationId" : "deleteAllNotificationFollowsOfUser", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "email", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Notifications have been deleted" }, "403" : { "description" : "User not allowed to perform the operation" } }, "x-admin-only" : true } }, "/agent/conversation/{conversationId}/message" : { "get" : { "tags" : [ "agent", "integrate", "robocrops" ], "summary" : "Return all messages of the provided conversation.", "description" : "Authentication required for this operation.", "operationId" : "getConversationMessages", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "conversationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "All messages returned.", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/AgentMessage" } } }, "403" : { "description" : "Not enough permissions to perform the operation." } } } }, "/agent/message-stream" : { "post" : { "tags" : [ "agent", "integrate", "robocrops" ], "summary" : "Send a message to the provided conversation and start a run.", "description" : "Authentication required for this operation.", "operationId" : "sendMessageStream", "consumes" : [ "application/json" ], "produces" : [ "text/event-stream" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/AgentMessageNew" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Stream with updates to the run.", "schema" : { "$ref" : "#/definitions/ChunkedOutput" } }, "403" : { "description" : "Not enough permissions to perform the operation." } } } }, "/assembly" : { "post" : { "tags" : [ "assembly" ], "summary" : "Create a new assembly.", "description" : "Authentication required for this operation, authenticated user must have admin role.", "operationId" : "createAssembly", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/NewAssembly" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "New assembly created", "schema" : { "$ref" : "#/definitions/Assembly" } }, "400" : { "description" : "Invalid data in the properties." }, "403" : { "description" : "User must be an admin." }, "500" : { "description" : "There was a problem creating the assembly." } }, "x-admin-only" : true } }, "/assembly/{serialNumber}" : { "get" : { "tags" : [ "assembly" ], "summary" : "Get an assembly by its serial number.", "description" : "Authentication required for this operation, authenticated user must have admin role.", "operationId" : "getAssembly", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "serialNumber", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Assembly returned successfully", "schema" : { "$ref" : "#/definitions/Assembly" } }, "400" : { "description" : "There was a problem getting the assembly." }, "403" : { "description" : "User must be an admin." }, "404" : { "description" : "Assembly not found." }, "500" : { "description" : "There was a problem getting the assembly." } }, "x-admin-only" : true }, "delete" : { "tags" : [ "assembly" ], "summary" : "Delete an assembly.", "description" : "Authentication required for this operation, authenticated user must have admin role.", "operationId" : "deleteAssembly", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "serialNumber", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "204" : { "description" : "Assembly deleted successfully" }, "403" : { "description" : "User must be an admin." }, "404" : { "description" : "Assembly not found." }, "500" : { "description" : "There was a problem deleting the assembly." } }, "x-admin-only" : true } }, "/assembly/xbee/{xbee}" : { "get" : { "tags" : [ "assembly" ], "summary" : "Get an assembly by its xbee.", "description" : "Authentication required for this operation, authenticated user must have admin role.", "operationId" : "getAssemblyByXbee", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "xbee", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Assembly returned successfully", "schema" : { "$ref" : "#/definitions/Assembly" } }, "400" : { "description" : "There was a problem getting the assembly." }, "403" : { "description" : "User must be an admin." }, "404" : { "description" : "Assembly not found." }, "500" : { "description" : "There was a problem getting the assembly." } }, "x-admin-only" : true } }, "/assembly/{serialNumber}/history" : { "get" : { "tags" : [ "assembly" ], "summary" : "Get the update history of an assembly as a map, where keys denote the date of change and values denote the changed assembly.", "description" : "Authentication required for this operation, authenticated user must have admin role.", "operationId" : "getAssemblyHistory", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "serialNumber", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Assembly history returned successfully", "schema" : { "type" : "object", "additionalProperties" : { "type" : "array", "items" : { "$ref" : "#/definitions/Assembly" } } } }, "403" : { "description" : "User must be an admin." }, "404" : { "description" : "Assembly not found." }, "500" : { "description" : "There was a problem getting the assembly." } }, "x-admin-only" : true } }, "/assembly/xbee/{xbee}/history" : { "get" : { "tags" : [ "assembly" ], "summary" : "Get the update history of an assembly as a map, by its xbee, where keys denote the date of change and values denote the changed assembly.", "description" : "Authentication required for this operation, authenticated user must have admin role.", "operationId" : "getAssemblyHistoryByXbee", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "xbee", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Assembly history returned successfully", "schema" : { "type" : "object", "additionalProperties" : { "type" : "array", "items" : { "$ref" : "#/definitions/Assembly" } } } }, "403" : { "description" : "User must be an admin." }, "404" : { "description" : "Assembly not found." }, "500" : { "description" : "There was a problem getting the assembly." } }, "x-admin-only" : true } }, "/assembly-update/{serialNumber}" : { "post" : { "tags" : [ "assembly-update" ], "summary" : "Update an assembly.", "description" : "Authentication required for this operation, authenticated user must have admin role.", "operationId" : "updateAssembly", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "serialNumber", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/AssemblyEditable" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Assembly updated successfully", "schema" : { "$ref" : "#/definitions/Assembly" } }, "400" : { "description" : "Invalid data in the properties to be updated" }, "403" : { "description" : "User must be an admin." }, "404" : { "description" : "Assembly not found." }, "500" : { "description" : "There was a problem updating the assembly." } } } }, "/authorization/device/jwks" : { "get" : { "tags" : [ "authorization" ], "summary" : "Get public key for a device access token validation.", "description" : "", "operationId" : "getDevicePublicKey", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json", "application/jwk-set+json; charset=UTF-8" ], "parameters" : [ ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Device access token public key", "schema" : { "type" : "object", "additionalProperties" : { "type" : "object" } } }, "401" : { "description" : "Unauthenticated request" }, "500" : { "description" : "Error when retrieving device access token public key" } } } }, "/authorization/license/oauth/token" : { "post" : { "tags" : [ "authorization" ], "summary" : "Provides an access token for a license service", "description" : "", "operationId" : "getAccessToken", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/LicenseAccessTokenRequest" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Returns the access token", "schema" : { "$ref" : "#/definitions/AccessToken" } }, "401" : { "description" : "Unauthenticated request" }, "500" : { "description" : "Failed to assign the role" } } } }, "/authorization/role-assignment/assignee/{assignee}/role/{role}/license/{licenseId}" : { "post" : { "tags" : [ "authorization" ], "summary" : "Assign a role on a license to a user, if the role already exists it will be a no-op", "description" : "", "operationId" : "assignRoleOnLicense", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "assignee", "in" : "path", "required" : true, "type" : "string" }, { "name" : "role", "in" : "path", "required" : true, "type" : "string" }, { "name" : "licenseId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "type" : "object" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Created role assignment", "schema" : { "$ref" : "#/definitions/Assignment of a role on a resource for a user" } }, "401" : { "description" : "Unauthenticated request" }, "500" : { "description" : "Failed to assign the role" } } }, "delete" : { "tags" : [ "authorization" ], "summary" : "Unassign a role on an license from a user.", "description" : "", "operationId" : "unassignRoleOnLicense", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "assignee", "in" : "path", "required" : true, "type" : "string" }, { "name" : "role", "in" : "path", "required" : true, "type" : "string" }, { "name" : "licenseId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "type" : "object" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "204" : { "description" : "Deleted role assignment" }, "401" : { "description" : "Unauthenticated request" }, "500" : { "description" : "Failed to unassign the role" } } } }, "/authorization/role-assignment/assignee/{assignee}/role/{role}/organization/{organizationId}" : { "post" : { "tags" : [ "authorization" ], "summary" : "Assign a role on an organization to a user, if the role already exists it will be a no-op", "description" : "", "operationId" : "assignRoleOnOrganization", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "assignee", "in" : "path", "required" : true, "type" : "string" }, { "name" : "role", "in" : "path", "required" : true, "type" : "string" }, { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "type" : "object" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Created role assignment", "schema" : { "$ref" : "#/definitions/Assignment of a role on a resource for a user" } }, "401" : { "description" : "Unauthenticated request" }, "500" : { "description" : "Failed to assign the role" } } }, "delete" : { "tags" : [ "authorization" ], "summary" : "Unassign a role on an organization from a user.", "description" : "", "operationId" : "unassignRoleOnOrganization", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "assignee", "in" : "path", "required" : true, "type" : "string" }, { "name" : "role", "in" : "path", "required" : true, "type" : "string" }, { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "type" : "object" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "204" : { "description" : "Deleted role assignment" }, "401" : { "description" : "Unauthenticated request" }, "500" : { "description" : "Failed to unassign the role" } } } }, "/authorization/role-assignment/assignee/{assignee}/role/{role}/device/{deviceId}" : { "post" : { "tags" : [ "authorization" ], "summary" : "Assign a role on a device to a user, if the role already exists it will be a no-op", "description" : "", "operationId" : "assignRoleOnDevice", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "assignee", "in" : "path", "required" : true, "type" : "string" }, { "name" : "role", "in" : "path", "required" : true, "type" : "string" }, { "name" : "deviceId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "type" : "object" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Created role assignment", "schema" : { "$ref" : "#/definitions/Assignment of a role on a resource for a user" } }, "401" : { "description" : "Unauthenticated request" }, "500" : { "description" : "Failed to assign the role" } } }, "delete" : { "tags" : [ "authorization" ], "summary" : "Unassign a role on a device from a user.", "description" : "", "operationId" : "unassignRoleOnDevice", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "assignee", "in" : "path", "required" : true, "type" : "string" }, { "name" : "role", "in" : "path", "required" : true, "type" : "string" }, { "name" : "deviceId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "type" : "object" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "204" : { "description" : "Deleted role assignment" }, "401" : { "description" : "Unauthenticated request" }, "500" : { "description" : "Failed to unassign the role" } } } }, "/authorization/role-assignment/assignee/{assignee}/role/{role}/organization/{organizationId}/site/{siteId}" : { "post" : { "tags" : [ "authorization" ], "summary" : "Assign a role on a site to a user, if the role already exists it will be a no-op", "description" : "", "operationId" : "assignRoleOnSite", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "assignee", "in" : "path", "required" : true, "type" : "string" }, { "name" : "role", "in" : "path", "required" : true, "type" : "string" }, { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "siteId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "type" : "object" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Created role assignment", "schema" : { "$ref" : "#/definitions/Assignment of a role on a resource for a user" } }, "401" : { "description" : "Unauthenticated request" }, "500" : { "description" : "Failed to assign the role" } } }, "delete" : { "tags" : [ "authorization" ], "summary" : "Unassign a role on a site from a user.", "description" : "", "operationId" : "unassignRoleOnSite", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "assignee", "in" : "path", "required" : true, "type" : "string" }, { "name" : "role", "in" : "path", "required" : true, "type" : "string" }, { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "siteId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "type" : "object" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "204" : { "description" : "Deleted role assignment" }, "401" : { "description" : "Unauthenticated request" }, "500" : { "description" : "Failed to unassign the role" } } } }, "/authorization/check/device/{deviceId}" : { "get" : { "tags" : [ "authorization" ], "summary" : "Check whether the user is authorized to perform a certain action on a device.", "description" : "", "operationId" : "checkUserAuthorizationOnDevice", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "deviceId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "action", "in" : "query", "required" : false, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "True if the user is authorized, otherwise false", "schema" : { "type" : "boolean" } }, "401" : { "description" : "Unauthenticated request" }, "500" : { "description" : "Error when verifying the users permissions" } } } }, "/authorization/check/organization/{organizationId}" : { "get" : { "tags" : [ "authorization" ], "summary" : "Check whether the user is authorized to perform a certain action on an organization.", "description" : "", "operationId" : "checkUserAuthorizationOnOrganization", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "action", "in" : "query", "required" : false, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "True if the user is authorized, otherwise false", "schema" : { "type" : "boolean" } }, "401" : { "description" : "Unauthenticated request" }, "500" : { "description" : "Error when verifying the users permissions" } } } }, "/authorization/check/organization/{organizationId}/site/{siteId}" : { "get" : { "tags" : [ "authorization" ], "summary" : "Check whether the user is authorized to perform a certain action on a site.", "description" : "", "operationId" : "checkUserAuthorizationOnSite", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "siteId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "action", "in" : "query", "required" : false, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "True if the user is authorized, otherwise false", "schema" : { "type" : "boolean" } }, "401" : { "description" : "Unauthenticated request" }, "500" : { "description" : "Error when verifying the users permissions" } } } }, "/authorization/device/{deviceId}/access-token" : { "get" : { "tags" : [ "authorization" ], "summary" : "Get access token for a specific device.", "description" : "", "operationId" : "getDeviceAccessToken", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json", "application/jwt" ], "parameters" : [ { "name" : "deviceId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "expirationDuration", "in" : "query", "required" : false, "type" : "integer", "default" : 604800, "maximum" : 2678400, "minimum" : 0, "format" : "int32" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Device access token", "schema" : { "$ref" : "#/definitions/AccessToken" } }, "401" : { "description" : "Unauthenticated request" }, "500" : { "description" : "Error when retrieving device access token" } } } }, "/authorization/role-assignment" : { "get" : { "tags" : [ "authorization" ], "summary" : "Get all the role assignments of the current user", "description" : "", "operationId" : "getRoleAssignments", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "List of role assignments", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/Assignment of a role on a resource for a user" } } }, "401" : { "description" : "Unauthenticated request" }, "500" : { "description" : "Error when reading the role assignments" } } } }, "/authorization/role-assignment/assignee/{assignee}/organization/{organizationId}" : { "get" : { "tags" : [ "authorization" ], "summary" : "Get role assignments of a user on an organization.", "description" : "", "operationId" : "getRoleAssignmentsOfUserOnOrganization", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "assignee", "in" : "path", "required" : true, "type" : "string" }, { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "List of role assignments", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/Assignment of a role on a resource for a user" } } }, "401" : { "description" : "Unauthenticated request" }, "403" : { "description" : "Forbidden to read role assignments on this organization" }, "500" : { "description" : "Error when reading the role assignments" } } } }, "/authorization/role-assignment/assignee/{assignee}/license/{licenseId}" : { "get" : { "tags" : [ "authorization" ], "summary" : "Get role assignments of a user under a license.", "description" : "", "operationId" : "getRoleAssignmentsOfUserUnderLicense", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "assignee", "in" : "path", "required" : true, "type" : "string" }, { "name" : "licenseId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "List of role assignments", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/Assignment of a role on a resource for a user" } } }, "401" : { "description" : "Unauthenticated request" }, "403" : { "description" : "Forbidden to read role assignments under this license" }, "500" : { "description" : "Error when reading the role assignments" } } } }, "/authorization/role-assignment/organization/{organizationId}" : { "get" : { "tags" : [ "authorization" ], "summary" : "Get role assignments on an organization.", "description" : "", "operationId" : "getRoleAssignmentsOnOrganization", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "List of role assignments", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/Assignment of a role on a resource for a user" } } }, "401" : { "description" : "Unauthenticated request" }, "403" : { "description" : "Forbidden to read role assignments on this organization" }, "500" : { "description" : "Error when reading the role assignments" } } } }, "/authorization/scopes" : { "get" : { "tags" : [ "authorization" ], "summary" : "Get scopes for a specific user.", "description" : "", "operationId" : "getScopesAndClaims", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "userEmail", "in" : "query", "required" : true, "type" : "string" }, { "name" : "requiredScopes", "in" : "query", "required" : false, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "List of scopes for the user", "schema" : { "$ref" : "#/definitions/ScopesAndClaims" } }, "401" : { "description" : "Unauthenticated request" }, "500" : { "description" : "Error when retrieving user scopes" } } } }, "/billing-history-details/{billingHistoryDetailsId}" : { "get" : { "tags" : [ "billing-history-details" ], "summary" : "Return billing history detail", "description" : "Authentication required for this operation.", "operationId" : "getBillingHistoryDetailsById", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "billingHistoryDetailsId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Billing history detail record returned", "schema" : { "$ref" : "#/definitions/BillingHistoryDetailsResponse" } }, "403" : { "description" : "Not enough permissions to perform the operation" } } } }, "/billing-history-details/organization/{organizationId}/year/{year}/month/{month}" : { "get" : { "tags" : [ "billing-history-details" ], "summary" : "Return billing history details", "description" : "Authentication required for this operation.", "operationId" : "getBillingHistoryDetailsByOrganizationIdAndMonth", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "year", "in" : "path", "required" : true, "type" : "string" }, { "name" : "month", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Billing history details record returned" }, "403" : { "description" : "Not enough permissions to perform the operation" } } } }, "/billing-history-details/organization/{organizationId}/year/{year}/month/{month}/json/{jsonCheck}" : { "get" : { "tags" : [ "billing-history-details" ], "summary" : "Return billing history details json / regular checks summary", "description" : "Authentication required for this operation.", "operationId" : "getBillingHistoryDetailsChecksJson", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "year", "in" : "path", "required" : true, "type" : "string" }, { "name" : "month", "in" : "path", "required" : true, "type" : "string" }, { "name" : "jsonCheck", "in" : "path", "required" : true, "type" : "boolean" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Billing history details json / regular checks summary record returned" }, "403" : { "description" : "Not enough permissions to perform the operation" } } } }, "/billing-history-details/organization/{organizationId}/year/{year}/month/{month}/mother" : { "get" : { "tags" : [ "billing-history-details" ], "summary" : "Return billing history details mother summary", "description" : "Authentication required for this operation.", "operationId" : "getBillingHistoryDetailsMothersByOrgIdAndMonth", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "year", "in" : "path", "required" : true, "type" : "string" }, { "name" : "month", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Billing history details mother summary record returned" }, "403" : { "description" : "Not enough permissions to perform the operation" } } } }, "/billing-history-details-update/organization/{organizationId}/year/{year}/month/{month}/mother/{motherId}" : { "post" : { "tags" : [ "billing-history-details-update" ], "summary" : "Update a billing history details record for a given organization, mother, and a specific date", "description" : "Authentication required for this operation.
Preconditions:
Authenticated user has to be an admin in the platform.", "operationId" : "updateBillingHistoryByMother", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "year", "in" : "path", "required" : true, "type" : "string" }, { "name" : "month", "in" : "path", "required" : true, "type" : "string" }, { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "motherId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/BillingHistoryDetailsUpdate" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Billing history details record updated", "schema" : { "$ref" : "#/definitions/BillingHistoryDetails" } }, "400" : { "description" : "Invalid data in the properties to be updated" }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "A billing history details record for that id doesn't exist" } } } }, "/billing-history-details-update/{billingHistoryDetailsId}" : { "post" : { "tags" : [ "billing-history-details-update" ], "summary" : "Update a billing history details record for a given organization and a specific date", "description" : "Authentication required for this operation.
Preconditions:
Authenticated user has to be an admin in the platform.", "operationId" : "updateBillingHistoryDetails", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "billingHistoryDetailsId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/BillingHistoryDetailsUpdate" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Billing history details record updated", "schema" : { "$ref" : "#/definitions/BillingHistoryDetails" } }, "400" : { "description" : "Invalid data in the properties to be updated" }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "A billing history details record for that id doesn't exist" } } } }, "/billing-history/organization/{organizationId}/year/{year}/month/{month}" : { "get" : { "tags" : [ "billing-history" ], "summary" : "Return billing history", "description" : "Authentication required for this operation.", "operationId" : "getBillingHistoryByOrganizationIdAndMonth", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "year", "in" : "path", "required" : true, "type" : "string" }, { "name" : "month", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Billing history record returned" }, "403" : { "description" : "Not enough permissions to perform the operation" } }, "x-admin-only" : true }, "delete" : { "tags" : [ "billing-history" ], "summary" : "Remove billing history for a specific organization and month, including the billing history details.", "description" : "Operation reserved to administrators.", "operationId" : "deleteBillingHistoryByOrganizationAndMonth", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "year", "in" : "path", "required" : true, "type" : "string" }, { "name" : "month", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Billing history records removed" }, "403" : { "description" : "User not allowed to perform this operation. Should be admin." }, "404" : { "description" : "No billing history for the organization in that month." } }, "x-admin-only" : true } }, "/billing-history/organization/{organizationId}" : { "get" : { "tags" : [ "billing-history" ], "summary" : "Return billing history", "description" : "Authentication required for this operation.", "operationId" : "getBillingHistoryByOrganizationId", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "List of billing history records returned" }, "403" : { "description" : "Not enough permissions to perform the operation" } }, "x-admin-only" : true } }, "/billing-history/organization/{organizationId}/forecast" : { "post" : { "tags" : [ "billing-history" ], "summary" : "Return billing history forecast for current month", "description" : "Authentication required for this operation.", "operationId" : "getBillingHistoryForecastForCurrentMonth", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/BillingHistoryForecastRequest" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Billing history record returned" }, "403" : { "description" : "Not enough permissions to perform the operation" } }, "x-admin-only" : true } }, "/billing-history/all-organizations/year/{year}/month/{month}" : { "get" : { "tags" : [ "billing-history" ], "summary" : "Return billing history for a specific month for all organisations that are billable", "description" : "Operation reserved to administrators.", "operationId" : "getBillingHistoryOrganisationsByMonth", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "year", "in" : "path", "required" : true, "type" : "string" }, { "name" : "month", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Billing history records returned" }, "403" : { "description" : "Not enough permissions to perform the operation" } } } }, "/billing-history/all-organizations" : { "get" : { "tags" : [ "billing-history" ], "summary" : "Return billing history for all organisations that are billable", "description" : "Operation reserved to administrators.", "operationId" : "getBillingHistoryOrganisationsCurrentMonth", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Billing history records returned" }, "403" : { "description" : "Not enough permissions to perform the operation" } } }, "post" : { "tags" : [ "billing-history" ], "summary" : "Generate billing history records for every billable organization for the past month (current - 1).", "description" : "Authentication required for this operation.", "operationId" : "createSqsBillingHistoryRequest", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "type" : "object" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Billing History requests created for all the billable organizations." }, "403" : { "description" : "Not enough permissions to perform the operation. User must be admin." } }, "x-admin-only" : true } }, "/billing-history" : { "post" : { "tags" : [ "billing-history" ], "summary" : "Create billing history entry for an organization", "description" : "Authentication required for this operation.", "operationId" : "createSqsBillingHistoryRequestForOrganization", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/BillingHistoryRequest" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Billing History request created" }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "Organization does not exist" }, "400" : { "description" : "The organization is not billable" } } } }, "/billing-history-update/organization/{organizationId}/year/{year}/month/{month}" : { "post" : { "tags" : [ "billing-history-update" ], "summary" : "Update a billing history record for a given organization and a specific date", "description" : "Authentication required for this operation.
Preconditions:
Authenticated user has to be an admin in the platform.", "operationId" : "updateBillingHistory", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "year", "in" : "path", "required" : true, "type" : "string" }, { "name" : "month", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/BillingHistoryUpdate" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Billing history record updated", "schema" : { "$ref" : "#/definitions/BillingHistory" } }, "400" : { "description" : "Invalid data in the properties to be updated" }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "A billing history record for that organization doesn't exist" } } } }, "/chart/scatterplot" : { "post" : { "tags" : [ "chart" ], "summary" : "Get a series data", "description" : "", "operationId" : "getScatterplot", "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/ScatterplotRequest" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Returns series data.", "schema" : { "$ref" : "#/definitions/Chart" } }, "400" : { "description" : "The provided date must be a valid date: ISO 8601 date. E.g.: '2016-03-03T00:00:00Z'" }, "403" : { "description" : "Unauthorized access to the check id." }, "404" : { "description" : "CheckId is not found." } } } }, "/chart/cultivation-target" : { "post" : { "tags" : [ "chart" ], "summary" : "Return the cultivation target setpoints with given date range and interval.", "description" : "Authentication required for this operation.", "operationId" : "getCultivationTargetSeriesById", "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "cultivationTargetId", "in" : "path", "description" : "Universally unique identifier of a cultivation target.", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/CultivationTargetSeriesRequest" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Cultivation target series returned.", "schema" : { "$ref" : "#/definitions/CultivationTargetSeriesResponse" } }, "403" : { "description" : "Not enough permissions to perform the operation." }, "500" : { "description" : "Error while retrieving the cultivation targets." } } } }, "/check/{checkId}" : { "get" : { "tags" : [ "check" ], "summary" : "Returns the check with given check id", "description" : "Authentication required.
The authenticated user has to be a user in the organization of the given check
or have role admin within the system.
", "operationId" : "getCheck", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "checkId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Check returned successfully", "schema" : { "$ref" : "#/definitions/Check" } }, "403" : { "description" : "Authenticated user is not allowed to access this check" }, "404" : { "description" : "Check with given id doesn't exist" } } }, "delete" : { "tags" : [ "check" ], "summary" : "Removes the persisted check data, and the authorization information associated to this (followers and the notification settings).", "description" : "", "operationId" : "removeCheck", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "checkId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "204" : { "description" : "Check removed" }, "403" : { "description" : "Unauthorized access to the check id" }, "500" : { "description" : "Error DELETING the follows related to the check" } } } }, "/check/sensor/default" : { "get" : { "tags" : [ "check" ], "summary" : "Returns a sensor check with default values for most fields", "description" : "Authentication required.", "operationId" : "getDefaultSensorCheck", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Defaults for sensor check returned successfully", "schema" : { "$ref" : "#/definitions/CheckProperties" } } } } }, "/check/organization/{organizationId}/clone/check/{checkId}" : { "post" : { "tags" : [ "check" ], "summary" : "Clone a check in the organization given, based on another existing check", "description" : "Authentication required and user is at least an editor in the organization, or is an admin in the system.
.
", "operationId" : "cloneCheck", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "checkId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "Check created", "schema" : { "$ref" : "#/definitions/Check" } }, "403" : { "description" : "User is not authorized to perform this operation." } } } }, "/check/organization/{organizationId}" : { "get" : { "tags" : [ "check" ], "summary" : "Return all the 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.
If not empty, the call filters the list of checks to return only those with checkName in their name.
", "operationId" : "getOrganizationChecks", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "search", "in" : "query", "description" : "Search for checks by name, url or check id", "required" : false, "type" : "string" }, { "name" : "tags", "in" : "query", "description" : "Filter checks by tags (separate with comma)", "required" : false, "type" : "string" }, { "name" : "tagsoperator", "in" : "query", "description" : "How should checks by filtered by tags (or / and)?", "required" : false, "type" : "string" }, { "name" : "sensortype", "in" : "query", "description" : "Filter checks by sensortype", "required" : false, "type" : "string" }, { "name" : "expandCoordinates", "in" : "query", "description" : "Include data source coordinates information", "required" : false, "type" : "boolean" }, { "name" : "expandCoordinateHistory", "in" : "query", "description" : "Include coordinate history for each data source (may increase response size)", "required" : false, "type" : "boolean" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "List of checks returned", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/Check" } } }, "403" : { "description" : "User is not authorized to perform this operation." } } }, "post" : { "tags" : [ "check" ], "summary" : "Create a new web check in the organization", "description" : "Authentication required for this operation.
Preconditions:", "operationId" : "createWebcheck", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/CheckProperties" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "New check web created, including its generated check id", "schema" : { "$ref" : "#/definitions/Check" } }, "400" : { "description" : "URL, name or locations is empty or invalid data in one or more of the check properties." }, "403" : { "description" : "Not enough permissions to perform the operation" } } } }, "/check/gateway-cluster/{gatewayClusterId}" : { "get" : { "tags" : [ "check" ], "summary" : "Return all the sensors of the given gateway cluster", "description" : "Admin access only", "operationId" : "getGatewayClusterSensors", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "gatewayClusterId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "List of sensors returned", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/Check" } } }, "403" : { "description" : "User is not authorized to perform this operation." } } } }, "/check/gateway/{gatewayId}" : { "get" : { "tags" : [ "check" ], "summary" : "Return all the sensors of the given gateway", "description" : "Admin access only", "operationId" : "getGatewaySensors", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "gatewayId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "List of sensors returned", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/Check" } } }, "403" : { "description" : "User is not authorized to perform this operation." } }, "x-admin-only" : true } }, "/check/delete-batch" : { "post" : { "tags" : [ "check" ], "summary" : "Removes the persisted check data, and the authorization information associated to this (followers and the notification settings) for a set of check ids.", "description" : "", "operationId" : "removeChecks", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "type" : "array", "items" : { "type" : "string" } } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "204" : { "description" : "Checks removed" }, "403" : { "description" : "Unauthorized access to the check id" }, "500" : { "description" : "Error DELETING the follows related to the check" } } } }, "/check/default" : { "get" : { "tags" : [ "check" ], "summary" : "Returns a check with default values for most fields", "description" : "Authentication required.", "operationId" : "getDefaultCheck", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Defaults returned successfully", "schema" : { "$ref" : "#/definitions/CheckProperties" } } } } }, "/check-update/{checkId}/new-organization/{newOrganizationId}" : { "post" : { "tags" : [ "check-update" ], "summary" : "Transfer the check to another organization.
", "description" : "Authentication required for this operation.
If the check belongs to private locations, these should also be changed.
Note also that the notification settings will be lost.Preconditions:
Authenticated user has to be owner in the current and new organizations, or be an admin in the platform.
The check shouldn't be used in any dashboard.", "operationId" : "transferCheckOrganization", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "checkId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "newOrganizationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "forceTransfer", "in" : "query", "description" : "If forceTransfer is true, when there are a widgets referencing this sensor they will be removed. Otherwise the transfer will be cancelled.", "required" : false, "type" : "boolean", "default" : false }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "type" : "array", "items" : { "type" : "string" } } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Check transferred to new organization", "schema" : { "$ref" : "#/definitions/Check" } }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "Check with given id doesn't exist" } } } }, "/check-update/{checkId}/new-owner/{newOwner}" : { "post" : { "tags" : [ "check-update" ], "summary" : "Transfer the check to another user", "description" : "Authentication required for this operation.
Preconditions:
Authenticated user has to be owner in the organization, or be an admin in the platform.", "operationId" : "transferCheckOwnership", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "checkId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "newOwner", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "type" : "object" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Check transferred to new owner", "schema" : { "$ref" : "#/definitions/Check" } }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "Check with given id doesn't exist" } } } }, "/check-update/transfer" : { "post" : { "tags" : [ "check-update" ], "summary" : "Transfers one or more checks to a target gateway", "description" : "", "operationId" : "transferChecks", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/TransferChecksDTO" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "All checks transferred", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/Sensor" } } }, "400" : { "description" : "Invalid data in the properties to be updated" }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "A check or gateway with given id doesn't exist" } } } }, "/check-update/{checkId}" : { "post" : { "tags" : [ "check-update" ], "summary" : "Update a check", "description" : "Authentication required for this operation.
Preconditions:
Authenticated user has to be editor or owner in the organization, or be an admin in the platform.", "operationId" : "updateCheck", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "checkId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/CheckProperties" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Check updated", "schema" : { "$ref" : "#/definitions/Check" } }, "400" : { "description" : "Invalid data in the properties to be updated" }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "Check with given id doesn't exist" } } } }, "/check-update" : { "post" : { "tags" : [ "check-update" ], "summary" : "Update a set checks", "description" : "Authentication required for this operation.
Preconditions:
Authenticated user has to be editor or owner in the organization, or be an admin in the platform.", "operationId" : "updateChecks", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/MultipleCheckUpdate" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Checks updated", "schema" : { "$ref" : "#/definitions/Check" } }, "400" : { "description" : "Invalid data in the properties to be updated" }, "403" : { "description" : "Not enough permissions to perform the operation" } } } }, "/comment/{commentId}" : { "get" : { "tags" : [ "comment" ], "summary" : "Get a comment", "description" : "", "operationId" : "getComment", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "commentId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Comment", "schema" : { "$ref" : "#/definitions/Comment" } } } }, "delete" : { "tags" : [ "comment" ], "summary" : "Delete a comment", "description" : "Authentication required for this operation, authenticated user have admin role or be owner of the comment.", "operationId" : "deleteComment", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "commentId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "403" : { "description" : "User is not authorized to perform this operation, they must be comment owner or an admin." }, "404" : { "description" : "Comment not found." } } } }, "/comment" : { "post" : { "tags" : [ "comment" ], "summary" : "Create a new comment.", "description" : "Authentication required for this operation.", "operationId" : "createComment", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "timezoneOffset", "in" : "query", "description" : "The timezone offset, in hours, for which to return the data. For example, 2 for Europe/Amsterdam. -3 for America/Argentina/Buenos_Aires. If empty, then UTC/GMT time is assumed, but it's probably not what you want. See list of timezones: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones", "required" : false, "type" : "integer", "format" : "int32" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/NewComment" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "New comment created", "schema" : { "$ref" : "#/definitions/Comment" } }, "403" : { "description" : "User must be an admin or an organization or group editor/owner." }, "500" : { "description" : "Sorry, there was a problem creating the comment." } } } }, "/comment/reply/{commentId}" : { "post" : { "tags" : [ "comment" ], "summary" : "Create a new reply.", "description" : "Authentication required for this operation.", "operationId" : "createReply", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "commentId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/NewCommentReply" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "New reply created", "schema" : { "$ref" : "#/definitions/Comment" } }, "403" : { "description" : "User must be an admin or an organization or group editor/owner." }, "500" : { "description" : "Sorry, there was a problem creating the reply." } } } }, "/comment/interval" : { "get" : { "tags" : [ "comment" ], "summary" : "Get comments by interval", "description" : "Authentication required. User should be part of the organization or group.", "operationId" : "getCommentsByInterval", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "interval", "in" : "query", "required" : false, "type" : "string" }, { "name" : "timezoneOffset", "in" : "query", "description" : "The timezone offset, in hours, for which to return the data. For example, 2 for Europe/Amsterdam. -3 for America/Argentina/Buenos_Aires. If empty, then UTC/GMT time is assumed, but it's probably not what you want. See list of timezones: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones", "required" : false, "type" : "integer", "format" : "int32" }, { "name" : "checkIds", "in" : "query", "required" : false, "type" : "array", "items" : { "type" : "string" }, "collectionFormat" : "multi" }, { "name" : "groupId", "in" : "query", "required" : false, "type" : "string" }, { "name" : "organizationId", "in" : "query", "required" : false, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Comments", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/Comment" } } } } } }, "/comment/timeinterval" : { "get" : { "tags" : [ "comment" ], "summary" : "Get comments within an interval", "description" : "Authentication required. User should be part of the organization or group.", "operationId" : "getCommentsByTimeInterval", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "startDate", "in" : "query", "description" : "Initial date string. ISO 8601 date. E.g.: '2016-03-03T00:00:00Z'", "required" : true, "type" : "string" }, { "name" : "endDate", "in" : "query", "description" : "Final date string. ISO 8601 date. E.g.: '2016-03-03T00:00:00Z'", "required" : true, "type" : "string" }, { "name" : "checkIds", "in" : "query", "required" : false, "type" : "array", "items" : { "type" : "string" }, "collectionFormat" : "multi" }, { "name" : "groupId", "in" : "query", "required" : false, "type" : "string" }, { "name" : "organizationId", "in" : "query", "required" : false, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Comments", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/Comment" } } } } } }, "/comment/feed/group/{groupId}" : { "get" : { "tags" : [ "comment" ], "summary" : "Deprecated. Please use /paginated-feed/group/{groupId}.", "description" : "", "operationId" : "getCommentsFeedForGroup", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "groupId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "deprecated" : true, "responses" : { "200" : { "description" : "Comment", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/Comment" } } } } } }, "/comment/feed/organization/{organizationId}" : { "get" : { "tags" : [ "comment" ], "summary" : "Deprecated. Please use /paginated-feed/organization/{organizationId}.", "description" : "", "operationId" : "getCommentsFeedForOrganization", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "deprecated" : true, "responses" : { "200" : { "description" : "Comment", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/Comment" } } } } } }, "/comment/interval/{interval}" : { "post" : { "tags" : [ "comment" ], "summary" : "Get comments for interval", "description" : "Authentication required. User should be part of the organization or group.", "operationId" : "getCommentsForInterval", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "interval", "in" : "path", "required" : true, "type" : "string" }, { "name" : "timezoneOffset", "in" : "query", "description" : "The timezone offset, in hours, for which to return the data. For example, 2 for Europe/Amsterdam. -3 for America/Argentina/Buenos_Aires. If empty, then UTC/GMT time is assumed, but it's probably not what you want. See list of timezones: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones", "required" : false, "type" : "integer", "format" : "int32" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/CommentRequest" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Comments", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/Comment" } } } } } }, "/comment/from/{startDate}/until/{endDate}" : { "post" : { "tags" : [ "comment" ], "summary" : "Get comments within an interval", "description" : "Authentication required. User should be part of the organization or group.", "operationId" : "getCommentsForTimeInterval", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "startDate", "in" : "path", "description" : "Initial date string. ISO 8601 date. E.g.: '2016-03-03T00:00:00Z'", "required" : true, "type" : "string" }, { "name" : "endDate", "in" : "path", "description" : "Final date string. ISO 8601 date. E.g.: '2016-03-03T00:00:00Z'", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/CommentRequest" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Comments", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/Comment" } } } } } }, "/comment/paginated-feed/group/{groupId}" : { "get" : { "tags" : [ "comment" ], "summary" : "Get the paginated comments feed for a group", "description" : "", "operationId" : "getPaginatedCommentsFeedForGroup", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "groupId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "size", "in" : "query", "description" : "Size of the page.", "required" : false, "type" : "integer", "default" : 100, "format" : "int32" }, { "name" : "page", "in" : "query", "description" : "Page to retrieve.", "required" : false, "type" : "integer", "default" : 0, "format" : "int32" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Comment", "schema" : { "$ref" : "#/definitions/PaginatedComments" } } } } }, "/comment/paginated-feed/organization/{organizationId}" : { "get" : { "tags" : [ "comment" ], "summary" : "Get the paginated comments feed for an organization", "description" : "", "operationId" : "getPaginatedCommentsFeedForOrganization", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "size", "in" : "query", "description" : "Size of the page.", "required" : false, "type" : "integer", "default" : 100, "format" : "int32" }, { "name" : "page", "in" : "query", "description" : "Page to retrieve.", "required" : false, "type" : "integer", "default" : 0, "format" : "int32" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Comment", "schema" : { "$ref" : "#/definitions/PaginatedComments" } } } } }, "/comment/search" : { "post" : { "tags" : [ "comment" ], "summary" : "Search for comments", "description" : "Authentication required. User should be part of the organization or group.", "operationId" : "searchForComments", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/CommentRequest" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Comments", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/Comment" } } } } } }, "/comment-update/{commentId}" : { "post" : { "tags" : [ "comment-update" ], "summary" : "Update an existing comment.", "description" : "Authentication required for this operation.", "operationId" : "updateComment", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "commentId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/CommentUpdate" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Comment updated", "schema" : { "$ref" : "#/definitions/Comment" } }, "403" : { "description" : "User must be an admin or an organization or group editor/owner." }, "500" : { "description" : "Sorry, there was a problem updating the comment." } } } }, "/comment-update/reply/{commentId}" : { "post" : { "tags" : [ "comment-update" ], "summary" : "Update an existing reply.", "description" : "Authentication required for this operation.", "operationId" : "commentReplyUpdate", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "commentId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/NewCommentReply" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Reply updated", "schema" : { "$ref" : "#/definitions/Comment" } }, "403" : { "description" : "User must be an admin or an organization or group editor/owner." }, "500" : { "description" : "Sorry, there was a problem updating the comment." } } } }, "/company-details/{companyDetailsId}" : { "delete" : { "tags" : [ "company-details" ], "summary" : "Delete company details with the given id.", "description" : "Only members of the organization or administrators of ZENSIE are authorised to call this operation. ", "operationId" : "deleteCompanyDetails", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "companyDetailsId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Company details deleted", "schema" : { "$ref" : "#/definitions/CompanyDetails" } }, "403" : { "description" : "User not allowed to perform the operation" } } } }, "/company-details/organization/{organizationId}" : { "get" : { "tags" : [ "company-details" ], "summary" : "Returns a list of company details linked to an organization", "description" : "Authentication required for this operation.", "operationId" : "getCompanyDetailsByOrganizationId", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "The company details belonging to the organization.", "schema" : { "$ref" : "#/definitions/CompanyDetails" } }, "403" : { "description" : "Not enough permissions to perform the operation" } } }, "post" : { "tags" : [ "company-details" ], "summary" : "Create new company details.", "description" : "Default oauth authentication mechanism required for this operation.
Currently only admin users or owners of the organization are authorised to call this operation. ", "operationId" : "createCompanyDetails", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/NewCompanyDetails" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "New company details created", "schema" : { "$ref" : "#/definitions/CompanyDetails" } }, "400" : { "description" : "Bad request - missing details or bad syntax in details data" }, "403" : { "description" : "User not allowed to perform the operation" } } } }, "/company-details-update/{companyDetailsId}" : { "post" : { "tags" : [ "company-details-update" ], "summary" : "Update company details", "description" : "Only organization owners and administrators of ZENSIE are authorised to call this operation. ", "operationId" : "updateCompanyDetails", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "companyDetailsId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/CompanyDetailsUpdate" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "Company details updated", "schema" : { "$ref" : "#/definitions/CompanyDetails" } }, "403" : { "description" : "User not allowed to perform the operation" } } } }, "/crop" : { "get" : { "tags" : [ "crop" ], "summary" : "Return all crops.", "description" : "Authentication required for this operation.", "operationId" : "getPublicCrops", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Returns all crops.", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/Crop" } } }, "403" : { "description" : "Not enough permissions to perform the operation." } } }, "post" : { "tags" : [ "crop" ], "summary" : "Create a new crop.", "description" : "Authentication required for this operation.", "operationId" : "createCrop", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/NewCrop" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "New crop created.", "schema" : { "$ref" : "#/definitions/Crop" } }, "403" : { "description" : "User not authorized." } } } }, "/crop/{cropId}" : { "get" : { "tags" : [ "crop" ], "summary" : "Return the crop with the given id.", "description" : "Authentication required for this operation.", "operationId" : "getCropById", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "cropId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "The crop.", "schema" : { "$ref" : "#/definitions/Crop" } }, "403" : { "description" : "Not enough permissions to perform the operation." } } }, "put" : { "tags" : [ "crop" ], "summary" : "Update a crop.", "description" : "Authentication required for this operation.", "operationId" : "putCrop", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "cropId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/CropEditable" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Crop updated", "schema" : { "$ref" : "#/definitions/Crop" } }, "400" : { "description" : "Invalid data in the properties to be updated." }, "403" : { "description" : "User not authorized." }, "500" : { "description" : "Error while updating the crop." } } }, "delete" : { "tags" : [ "crop" ], "summary" : "Delete a crop.", "description" : "Authentication required for this operation.", "operationId" : "deleteCrop", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "cropId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "204" : { "description" : "Crop has been deleted." }, "403" : { "description" : "User not authorized." }, "404" : { "description" : "Crop not found." } } }, "patch" : { "tags" : [ "crop" ], "summary" : "Patch a crop.", "description" : "Authentication required for this operation.", "operationId" : "patchCrop", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "cropId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/CropEditable" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Crop patched", "schema" : { "$ref" : "#/definitions/Crop" } }, "400" : { "description" : "Invalid data in the properties to be patched." }, "403" : { "description" : "User must be authenticated." }, "500" : { "description" : "Error while patching the crop." } } } }, "/crop/organization/{organizationId}" : { "get" : { "tags" : [ "crop" ], "summary" : "Returns crops available to the organization, i.e public crops and the organization's custom crops.", "description" : "Authentication required for this operation.", "operationId" : "getCropsForOrganization", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Returns crops available to the organization.", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/Crop" } } }, "403" : { "description" : "Not enough permissions to perform the operation." } } } }, "/currency-rates" : { "post" : { "tags" : [ "currency-rates" ], "summary" : "Add currency rates.", "description" : "Authentication required for this operation.", "operationId" : "addCurrencyRates", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/CurrencyRatesMapper" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Currency rates added", "schema" : { "$ref" : "#/definitions/CurrencyRates" } }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "User does not exist" } } } }, "/currency" : { "get" : { "tags" : [ "currency" ], "summary" : "Get list of supported currencies.", "description" : "Authentication required for this operation, authenticated user have admin role", "operationId" : "getCurrencies", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "currencyId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "List of supported currencies", "schema" : { "$ref" : "#/definitions/Currency" } } } }, "post" : { "tags" : [ "currency" ], "summary" : "Create a new currency.", "description" : "Authentication required for this operation, authenticated user have admin role.", "operationId" : "createCurrency", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/NewCurrency" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "New currency created", "schema" : { "$ref" : "#/definitions/Currency" } }, "403" : { "description" : "User must be an admin or an organization owner in order to create a currency." }, "500" : { "description" : "Sorry, there was a problem creating the currency." } }, "x-admin-only" : true } }, "/currency/{currencyId}" : { "delete" : { "tags" : [ "currency" ], "summary" : "Remove currency.", "description" : "Authentication required for this operation, authenticated user have admin role", "operationId" : "deleteCurrency", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "currencyId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "204" : { "description" : "Currency has been removed." }, "403" : { "description" : "User is not authorized to perform this operation, they must be an admin." }, "404" : { "description" : "Currency not found." } }, "x-admin-only" : true } }, "/registration/{registrationId}/activate" : { "get" : { "tags" : [ "customer-registration" ], "summary" : "Activate a new pending registration.", "description" : "", "operationId" : "activateRegistration", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "registrationId", "in" : "path", "required" : true, "type" : "string" } ], "responses" : { "200" : { "description" : "New registration activated.", "schema" : { "$ref" : "#/definitions/CustomerRegistration" } } } } }, "/registration/{registrationId}" : { "delete" : { "tags" : [ "customer-registration" ], "summary" : "Remove a customer registration.", "description" : "Authentication required for this operation, authenticated user must have admin role.", "operationId" : "removeRegistration", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "registrationId", "in" : "path", "required" : true, "type" : "string" } ], "responses" : { "200" : { "description" : "Customer registration has been removed." }, "403" : { "description" : "User must be an admin." }, "404" : { "description" : "Customer registration not found." } } } }, "/registration" : { "post" : { "tags" : [ "customer-registration" ], "summary" : "Create a new pending registration.", "description" : "", "operationId" : "createRegistration", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/NewCustomerRegistration" } } ], "responses" : { "201" : { "description" : "New registration created.", "schema" : { "$ref" : "#/definitions/CustomerRegistration" } } } } }, "/dashboard/organization/{organizationId}" : { "get" : { "tags" : [ "dashboard" ], "summary" : "Return the dashboards of the organization given.", "description" : "Only members of the organization or administrators of ZENSIE are authorised to call this operation. ", "operationId" : "getDashboards", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Returns the list of dashboards", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/Dashboard" } } }, "403" : { "description" : "User not allowed to perform the operation" } } }, "post" : { "tags" : [ "dashboard" ], "summary" : "Create a new dashboard in the organization given.", "description" : "Only organization owners, editors and administrators of ZENSIE are authorised to call this operation. ", "operationId" : "createDashboard", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/DashboardNew" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "New dashboard created", "schema" : { "$ref" : "#/definitions/Dashboard" } }, "403" : { "description" : "User not allowed to perform the operation" } } } }, "/dashboard/clone/{dashboardId}/group/{groupId}" : { "post" : { "tags" : [ "dashboard" ], "summary" : "Copy an organization dashboard to a group. Sensors will be shared with group and dashboard will be cloned.", "description" : "Only organization owners and administrators of ZENSIE are authorized to call this operation.", "operationId" : "cloneDashboardToGroup", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "dashboardId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "groupId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "type" : "object" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "Dashboard successfully cloned to group", "schema" : { "$ref" : "#/definitions/Dashboard" } }, "403" : { "description" : "User not allowed to perform the operation" } } } }, "/dashboard/organization/{organizationId}/diagnostics" : { "post" : { "tags" : [ "dashboard" ], "summary" : "Creates a dashboard for diagnostics purposes, showing the different existing sensors of the organization, their values, battery voltages, etc.", "description" : "The authenticated user must be an administrator.", "operationId" : "createDiagnosticsDashboard", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "type" : "object" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "Dashboard created", "schema" : { "$ref" : "#/definitions/Dashboard" } }, "403" : { "description" : "Unauthorized to perform the operation. User has to be admin." } } } }, "/dashboard/group/{groupId}" : { "get" : { "tags" : [ "dashboard" ], "summary" : "Get dashboards in the group given.", "description" : "Only group members with write access and administrators of ZENSIE are authorised to call this operation. ", "operationId" : "getDashboardsInGroup", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "groupId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "New dashboard created", "schema" : { "$ref" : "#/definitions/Dashboard" } }, "403" : { "description" : "User not allowed to perform the operation" } } }, "post" : { "tags" : [ "dashboard" ], "summary" : "Create a new dashboard in the group given.", "description" : "Only organization owners and administrators of ZENSIE are authorised to call this operation. ", "operationId" : "createGroupDashboard", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "groupId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/DashboardNew" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "New dashboard created", "schema" : { "$ref" : "#/definitions/Dashboard" } }, "403" : { "description" : "User not allowed to perform the operation" } } } }, "/dashboard/{dashboardId}" : { "get" : { "tags" : [ "dashboard" ], "summary" : "Return a single dashboard with the given id.", "description" : "Only members of the organization or administrators of ZENSIE are authorised to call this operation. ", "operationId" : "getDashboardById", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "dashboardId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Returns a dashboard", "schema" : { "$ref" : "#/definitions/Dashboard" } }, "403" : { "description" : "User not allowed to perform the operation" } } }, "delete" : { "tags" : [ "dashboard" ], "summary" : "Delete the dashboard with given id.", "description" : "Only owners and editors of the organization containing the dashboard or ZENSIE administrators are authorized to call this operation.", "operationId" : "removeDashboard", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "dashboardId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Dashboard removed" }, "403" : { "description" : "User not allowed to perform the operation" } } } }, "/dashboard-theme/{dashboardThemeId}/group/{groupId}" : { "post" : { "tags" : [ "dashboard-theme" ], "summary" : "Assign a theme to an group.", "description" : "Authentication required for this operation", "operationId" : "assignDashboardThemeToGroup", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "dashboardThemeId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "groupId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "Dashboard theme", "schema" : { "$ref" : "#/definitions/DashboardTheme" } }, "403" : { "description" : "User must be a authenticated." }, "500" : { "description" : "Sorry, there was a problem assigning the dashboard theme." } } }, "delete" : { "tags" : [ "dashboard-theme" ], "summary" : "Remove a theme from an group.", "description" : "Authentication required for this operation", "operationId" : "removeDashboardThemeFromGroup", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "dashboardThemeId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "groupId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "204" : { "description" : "Dashboard theme removed from group" }, "403" : { "description" : "User must be a authenticated." }, "500" : { "description" : "Sorry, there was a problem removing the dashboard theme." } } } }, "/dashboard-theme/{dashboardThemeId}/organization/{organizationId}" : { "post" : { "tags" : [ "dashboard-theme" ], "summary" : "Assign a theme to an organization.", "description" : "Authentication required for this operation", "operationId" : "assignDashboardThemeToOrganization", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "dashboardThemeId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "Dashboard theme", "schema" : { "$ref" : "#/definitions/DashboardTheme" } }, "403" : { "description" : "User must be a authenticated." }, "500" : { "description" : "Sorry, there was a problem assigning the dashboard theme." } } }, "delete" : { "tags" : [ "dashboard-theme" ], "summary" : "Remove a theme from an organization.", "description" : "Authentication required for this operation", "operationId" : "removeDashboardThemeFromOrganization", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "dashboardThemeId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "204" : { "description" : "Dashboard theme removed" }, "403" : { "description" : "User must be a authenticated." }, "500" : { "description" : "Sorry, there was a problem removing the dashboard theme." } } } }, "/dashboard-theme" : { "post" : { "tags" : [ "dashboard-theme" ], "summary" : "Create a new dashboard theme.", "description" : "Authentication required for this operation", "operationId" : "createDashboardTheme", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/NewDashboardTheme" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "New dashboard theme created", "schema" : { "$ref" : "#/definitions/DashboardTheme" } }, "403" : { "description" : "User must be a authenticated." }, "500" : { "description" : "Sorry, there was a problem creating the dashboard theme." } } } }, "/dashboard-theme/{dashboardThemeId}" : { "get" : { "tags" : [ "dashboard-theme" ], "summary" : "Get dashboard theme with the given id.", "description" : "Authentication required for this operation", "operationId" : "getDashboardTheme", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "dashboardThemeId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "Dashboard theme", "schema" : { "$ref" : "#/definitions/DashboardTheme" } }, "403" : { "description" : "User must be a authenticated." }, "500" : { "description" : "Sorry, there was a problem getting the dashboard theme." } } }, "delete" : { "tags" : [ "dashboard-theme" ], "summary" : "Remove dashboard theme.", "description" : "Authentication required for this operation, authenticated user must have admin role or be must owner of the theme.", "operationId" : "deleteDashboardTheme", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "dashboardThemeId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "204" : { "description" : "Dashboard theme has been removed." }, "403" : { "description" : "User is not authorized to perform this operation, they must be theme owner or an admin." }, "404" : { "description" : "Dashboard theme not found." }, "510" : { "description" : "Error - dashboard theme not deleted." } } } }, "/dashboard-theme/user/{email}" : { "get" : { "tags" : [ "dashboard-theme" ], "summary" : "Get all dashboard themes of a user.", "description" : "Authentication required for this operation", "operationId" : "getDashboardThemesForUser", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "email", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "Dashboard themes for user", "schema" : { "$ref" : "#/definitions/DashboardTheme" } }, "403" : { "description" : "User must be a authenticated." }, "500" : { "description" : "Sorry, there was a problem getting the dashboard themes." } } } }, "/dashboard-theme-update/{dashboardThemeId}" : { "post" : { "tags" : [ "dashboard-theme-update" ], "summary" : "Updates a dashboard theme.", "description" : "Authentication required for this operation", "operationId" : "updateDashboardTheme", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "dashboardThemeId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/DashboardThemeUpdate" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "Dashboard theme updated", "schema" : { "$ref" : "#/definitions/DashboardTheme" } }, "403" : { "description" : "User must be a authenticated." }, "500" : { "description" : "Sorry, there was a problem creating the dashboard theme." } } } }, "/dashboard-update/organization/{organizationId}/dashboard/{dashboardId}" : { "post" : { "tags" : [ "dashboard-update" ], "summary" : "Apply an update to the given dashboard.", "description" : "Only organization owners, editors and administrators of ZENSIE are authorised to call this operation. ", "operationId" : "updateDashboard", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "dashboardId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/DashboardEditable" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Dashboard updated", "schema" : { "$ref" : "#/definitions/Dashboard" } }, "403" : { "description" : "User not allowed to perform the operation" } } } }, "/dashboard-update/organization/{organizationId}/dashboard/{dashboardId}/reorder" : { "post" : { "tags" : [ "dashboard-update" ], "summary" : "Re-order the widgets in the dashboard.", "description" : "Only organization owners, editors and administrators of ZENSIE are authorised to call this operation. ", "operationId" : "reorderWidgetsInDashboard", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "dashboardId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "description" : "The list of ids of the widgets in the new order requested.", "required" : false, "schema" : { "type" : "array", "items" : { "type" : "string" } } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Dashboard updated", "schema" : { "$ref" : "#/definitions/Dashboard" } }, "403" : { "description" : "User not allowed to perform the operation" } } } }, "/dashboard-update/group/{groupId}/dashboard/{dashboardId}/reorder" : { "post" : { "tags" : [ "dashboard-update" ], "summary" : "Re-order the widgets in the dashboard.", "description" : "Only groupId owners and administrators of ZENSIE are authorised to call this operation. ", "operationId" : "reorderWidgetsInGroupDashboard", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "groupId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "dashboardId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "description" : "The list of ids of the widgets in the new order requested.", "required" : false, "schema" : { "type" : "array", "items" : { "type" : "string" } } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Dashboard updated", "schema" : { "$ref" : "#/definitions/Dashboard" } }, "403" : { "description" : "User not allowed to perform the operation" } } } }, "/dashboard-update/group/{groupId}/dashboard/{dashboardId}" : { "post" : { "tags" : [ "dashboard-update" ], "summary" : "Apply an update to the given dashboard.", "description" : "Only group owners, editors and administrators of ZENSIE are authorised to call this operation. ", "operationId" : "updateGroupDashboard", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "groupId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "dashboardId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/DashboardEditable" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Dashboard updated", "schema" : { "$ref" : "#/definitions/Dashboard" } }, "403" : { "description" : "User not allowed to perform the operation" } } } }, "/data-export" : { "post" : { "tags" : [ "data-export" ], "summary" : "Data export", "description" : "Authentication required for this operation.", "operationId" : "createDataExport", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/DataExportRequest" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Created data export", "schema" : { "$ref" : "#/definitions/DataExportBackgroundRequest" } }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "Location does not belong to the organization" } } } }, "/data-export/{dataExportId}/organization/{organizationId}" : { "get" : { "tags" : [ "data-export" ], "summary" : "Get a data export entry from dynamodb", "description" : "Authentication required", "operationId" : "getDataExport", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "dataExportId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Data export", "schema" : { "$ref" : "#/definitions/DataExportResponse" } }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "Data export does not exist" } } }, "delete" : { "tags" : [ "data-export" ], "summary" : "Delete a data export", "description" : "Authentication required", "operationId" : "deleteDataExport", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "dataExportId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Data export deleted successfully" }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "Data export does not exist" } } } }, "/data-export/organization/{organizationId}" : { "get" : { "tags" : [ "data-export" ], "summary" : "Get data exports of the organization", "description" : "Authentication required for this operation.", "operationId" : "getDataExportForOrganization", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "List of data exports", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/DataExportResponse" } } }, "403" : { "description" : "Not enough permissions to perform the operation" } } } }, "/data-export/count" : { "post" : { "tags" : [ "data-export" ], "summary" : "Number of results the data export will return", "description" : "Authentication required for this operation.", "operationId" : "getDataExportRowsCount", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/DataExportRequest" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Data export request count", "schema" : { "$ref" : "#/definitions/DataExportCountResponse" } }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "Location does not belong to the organization" } } } }, "/data/sensors" : { "post" : { "tags" : [ "data", "integrate", "robocrops" ], "summary" : "Retrieves data for a given field of a set of sensors.", "description" : "", "operationId" : "getDataForSensors", "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/SensorsDataRequest" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Returns sensors info along with the values per timestamp.", "schema" : { "$ref" : "#/definitions/SensorsDataResponse" } }, "403" : { "description" : "Unauthorized access to the data" }, "404" : { "description" : "Sensors not found." } } } }, "/data-source-coordinates" : { "post" : { "tags" : [ "data-source-coordinates" ], "summary" : "Create new data source coordinates.", "description" : "Authentication required for this operation.", "operationId" : "createDataSourceCoordinates", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/DataSourceCoordinates" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "New data source coordinates created.", "schema" : { "$ref" : "#/definitions/DataSourceCoordinates" } }, "403" : { "description" : "User not authorized." } } } }, "/data-source-coordinates/{dataSourceId}/timestamp/{timestamp}" : { "get" : { "tags" : [ "data-source-coordinates" ], "summary" : "Return the data source coordinates for a data source id and a UTC ISO 8601 timestamp", "description" : "Authentication required for this operation.", "operationId" : "getCoordinatesForDataSourceIdAtDate", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "dataSourceId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "timestamp", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Returns data source coordinates.", "schema" : { "$ref" : "#/definitions/DataSourceCoordinates" } }, "403" : { "description" : "Not enough permissions to perform the operation." } } }, "put" : { "tags" : [ "data-source-coordinates" ], "summary" : "Put data source coordinates for a data source id and a UTC ISO 8601 timestamp. (PUT not supported)", "description" : "Authentication required for this operation.", "operationId" : "putDataSourceCoordinates", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "dataSourceId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "timestamp", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/DataSourceCoordinatesEditable" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Data source coordinates updated", "schema" : { "$ref" : "#/definitions/DataSourceCoordinates" } }, "400" : { "description" : "Invalid data in the properties to be updated." }, "403" : { "description" : "User not authorized." }, "500" : { "description" : "Error while updating the ${RESOURCE_NAME.toLowerCase()}." } } }, "delete" : { "tags" : [ "data-source-coordinates" ], "summary" : "Delete data source coordinates at a given timestamp", "description" : "Authentication required for this operation.", "operationId" : "deleteDataSourceCoordinates", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "dataSourceId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "timestamp", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "204" : { "description" : "Data source coordinates have been deleted." }, "403" : { "description" : "User not authorized." }, "404" : { "description" : "Data source coordinates not found." } } }, "patch" : { "tags" : [ "data-source-coordinates" ], "summary" : "Patch data source coordinates for a data source id and a UTC ISO 8601 timestamp.", "description" : "Authentication required for this operation.", "operationId" : "patchDataSourceCoordinates", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "dataSourceId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "timestamp", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/DataSourceCoordinatesEditable" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Data source coordinates patched", "schema" : { "$ref" : "#/definitions/DataSourceCoordinates" } }, "400" : { "description" : "Invalid data in the properties to be patched." }, "403" : { "description" : "User must be authenticated." }, "500" : { "description" : "Error while patching the data source coordinates." } } } }, "/data-source-coordinates/{dataSourceId}" : { "get" : { "tags" : [ "data-source-coordinates" ], "summary" : "Return all data source coordinates for a data source id.", "description" : "Authentication required for this operation.", "operationId" : "getCoordinatesByDataSourceId", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "dataSourceId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Returns all data source coordinates.", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/DataSourceCoordinates" } } }, "403" : { "description" : "Not enough permissions to perform the operation." } } } }, "/data-source/bulk-edit" : { "patch" : { "tags" : [ "data-source" ], "summary" : "Bulk edit multiple data sources.", "description" : "Authentication required for this operation.", "operationId" : "bulkEditDataSources", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/DataSourceBulkEdit" } } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "204" : { "description" : "Data sources have been updated" }, "400" : { "description" : "Invalid data in the properties to be patched." }, "403" : { "description" : "User must be authenticated." }, "404" : { "description" : "Data source not found." }, "500" : { "description" : "Error while updating the data sources." }, "501" : { "description" : "Not yet implemented feature of the bulk edit." } } } }, "/data-upload/{dataUploadId}" : { "get" : { "tags" : [ "data-upload" ], "summary" : "Return the data upload with the given id.", "description" : "Authentication required for this operation.", "operationId" : "getDataUploadById", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "dataUploadId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Returns the data upload.", "schema" : { "$ref" : "#/definitions/DataUpload" } }, "403" : { "description" : "Not enough permissions to perform the operation." }, "404" : { "description" : "Data upload does not exist" } } }, "delete" : { "tags" : [ "data-upload" ], "summary" : "Delete data upload", "description" : "Authentication required for this operation.
", "operationId" : "deleteData", "consumes" : [ "multipart/form-data" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "dataUploadId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "204" : { "description" : "Data upload deleted" }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "Data upload does not exist" } } } }, "/data-upload/organization/{organizationId}" : { "post" : { "tags" : [ "data-upload" ], "summary" : "Data upload", "description" : "Organization owners and editors are allowed to upload.", "operationId" : "uploadData", "consumes" : [ "multipart/form-data" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "content-length", "in" : "header", "required" : false, "type" : "integer", "format" : "int64" }, { "name" : "file", "in" : "formData", "required" : false, "type" : "file" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Data upload request created", "schema" : { "$ref" : "#/definitions/DataUpload" } }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "Organization does not exist" } } } }, "/data-upload/group/{groupId}" : { "post" : { "tags" : [ "data-upload" ], "summary" : "Data upload", "description" : "Authentication required for this operation.", "operationId" : "uploadDataToGroup", "consumes" : [ "multipart/form-data" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "groupId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "content-length", "in" : "header", "required" : false, "type" : "integer", "format" : "int64" }, { "name" : "file", "in" : "formData", "required" : false, "type" : "file" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Data upload request created", "schema" : { "$ref" : "#/definitions/DataUpload" } }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "Organization does not exist" } } } }, "/device/{deviceId}" : { "get" : { "tags" : [ "device" ], "summary" : "Return the device with the given id.", "description" : "Authentication required for this operation.", "operationId" : "getDeviceById", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "deviceId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "The device.", "schema" : { "$ref" : "#/definitions/Device" } }, "403" : { "description" : "Not enough permissions to perform the operation." }, "404" : { "description" : "Device not found." }, "500" : { "description" : "Error while retrieving the device." } } }, "put" : { "tags" : [ "device" ], "summary" : "Update a device.", "description" : "Authentication required for this operation.", "operationId" : "putDevice", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "deviceId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/DeviceEditable" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Device updated", "schema" : { "$ref" : "#/definitions/Device" } }, "400" : { "description" : "Invalid data in the properties to be updated." }, "403" : { "description" : "User not authorized." }, "500" : { "description" : "Error while updating the device." } } }, "delete" : { "tags" : [ "device" ], "summary" : "Delete a device.", "description" : "Authentication required for this operation.", "operationId" : "deleteDevice", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "deviceId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "204" : { "description" : "Device has been deleted." }, "403" : { "description" : "User not authorized." }, "404" : { "description" : "Device not found." } } }, "patch" : { "tags" : [ "device" ], "summary" : "Patch a device.", "description" : "Authentication required for this operation.", "operationId" : "patchDevice", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "deviceId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/DeviceEditable" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Device patched", "schema" : { "$ref" : "#/definitions/Device" } }, "400" : { "description" : "Invalid data in the properties to be patched." }, "403" : { "description" : "User must be authenticated." }, "500" : { "description" : "Error while patching the device." } } } }, "/device" : { "get" : { "tags" : [ "device" ], "summary" : "Return all devices.", "description" : "Authentication required for this operation.", "operationId" : "getAllDevices", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "query", "required" : false, "type" : "string" }, { "name" : "siteId", "in" : "query", "required" : false, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Returns all devices.", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/Device" } } }, "400" : { "description" : "Invalid query parameters." }, "403" : { "description" : "Not enough permissions to perform the operation." }, "500" : { "description" : "Error while retrieving devices." } } }, "post" : { "tags" : [ "device" ], "summary" : "Create a new device.", "description" : "Authentication required for this operation.", "operationId" : "createDevice", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/DeviceNew" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "New device created.", "schema" : { "$ref" : "#/definitions/Device" } }, "403" : { "description" : "User not authorized." } } } }, "/device/organization/{organizationId}" : { "get" : { "tags" : [ "device" ], "summary" : "Returns the devices associated with the given organization id.", "description" : "Authentication required for this operation.", "operationId" : "getDevicesByOrganizationId", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Return all devices associated with organization.", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/Device" } } }, "403" : { "description" : "Not enough permissions to perform the operation." }, "500" : { "description" : "Error while retrieving devices." } } } }, "/device/organization/{organizationId}/site/{siteId}" : { "get" : { "tags" : [ "device" ], "summary" : "Returns devices associated with the given site.", "description" : "Authentication required for this operation.", "operationId" : "getDevicesBySiteId", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "siteId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Return all devices associated with site.", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/Device" } } }, "403" : { "description" : "Not enough permissions to perform the operation." }, "500" : { "description" : "Error while retrieving devices." } } } }, "/device/site/{siteUuid}" : { "get" : { "tags" : [ "device" ], "summary" : "Returns devices associated with the given site.", "description" : "Authentication required for this operation.", "operationId" : "getDevicesBySiteUuid", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "siteUuid", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Return all devices associated with site.", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/Device" } } }, "403" : { "description" : "Not enough permissions to perform the operation." }, "500" : { "description" : "Error while retrieving devices." } } } }, "/export-partner-job" : { "post" : { "tags" : [ "export-partner-job" ], "summary" : "Create new export partner job record", "description" : "Authentication required for this operation.
Preconditions:", "operationId" : "createExportPartnerJob", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/NewExportPartnerJob" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "New export partner job record created" }, "400" : { "description" : "The export partner does not exist for this organization" }, "403" : { "description" : "Not enough permissions to perform this operation" }, "404" : { "description" : "Organization with that id doesn't exist" } }, "x-admin-only" : true } }, "/export-partner-job/{jobId}/organization/{organizationId}" : { "get" : { "tags" : [ "export-partner-job" ], "summary" : "Retrieves new export partner job record", "description" : "Authentication required for this operation.
", "operationId" : "getExportPartnerJob", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "jobId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "The export partner job with the given id." }, "403" : { "description" : "Not enough permissions to perform this operation" } }, "x-admin-only" : true }, "delete" : { "tags" : [ "export-partner-job" ], "summary" : "Removes new export partner job record", "description" : "Authentication required for this operation.
", "operationId" : "removeExportPartnerJob", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "jobId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "The export partner job with the given id" }, "403" : { "description" : "Not enough permissions to perform this operation" } }, "x-admin-only" : true } }, "/export-partner-job/organization/{organizationId}" : { "get" : { "tags" : [ "export-partner-job" ], "summary" : "Retrieves export partner jobs for the organization", "description" : "Authentication required for this operation.
", "operationId" : "getExportPartnerJobsForOrganization", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "The export partner jobs for the specified organization" }, "403" : { "description" : "Not enough permissions to perform this operation" } }, "x-admin-only" : true }, "post" : { "tags" : [ "export-partner-job" ], "summary" : "Retrieves jobs for the given organization, export partner, frequency, and active", "description" : "Authentication required for this operation.
", "operationId" : "getJobsForOrganizationIdExportPartnerIdFrequencyAndActive", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/ExportPartnerGetJobRequest" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "The jobs for the specified organization, export partner, frequency, and active" }, "403" : { "description" : "Not enough permissions to perform this operation" } } } }, "/export-partner-job-update/{jobId}/organization/{organizationId}" : { "post" : { "tags" : [ "export-partner-job-update" ], "summary" : "Update export partner job", "description" : "", "operationId" : "updateExportPartnerJob", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "jobId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/ExportPartnerJobUpdate" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "New export partner job record updated", "schema" : { "$ref" : "#/definitions/ExportPartnerJob" } }, "403" : { "description" : "Not enough permissions to perform this operation" }, "404" : { "description" : "The export partner job record does not exist." } } } }, "/export-partner/organization/{organizationId}" : { "get" : { "tags" : [ "export-partner" ], "summary" : "Retrieves export partners records for the organization", "description" : "Authentication required for this operation.
", "operationId" : "getExportPartners", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "successful operation", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/ExportPartner" } } }, "201" : { "description" : "The export partners for the specified organization" }, "403" : { "description" : "Not enough permissions to perform this operation" } }, "x-admin-only" : true }, "post" : { "tags" : [ "export-partner" ], "summary" : "Create new export partners record", "description" : "Authentication required for this operation.
Preconditions:", "operationId" : "createExportPartner", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/NewExportPartner" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "New export partner record created" }, "400" : { "description" : "Export partner already exists for this organization" }, "403" : { "description" : "Not enough permissions to perform this operation" }, "404" : { "description" : "Organization with that id doesn't exist" } }, "x-admin-only" : true } }, "/export-partner/{exportPartnerId}/organization/{organizationId}" : { "get" : { "tags" : [ "export-partner" ], "summary" : "Retrieves new export partners record", "description" : "Authentication required for this operation.
", "operationId" : "getExportPartner", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "exportPartnerId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "The export partner with the given id for the specified organization", "schema" : { "$ref" : "#/definitions/ExportPartner" } }, "403" : { "description" : "Not enough permissions to perform this operation" } }, "x-admin-only" : true }, "delete" : { "tags" : [ "export-partner" ], "summary" : "Removes new export partners record", "description" : "Authentication required for this operation.
", "operationId" : "removeExportPartner", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "exportPartnerId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "The export partner with the given id for the specified organization" }, "403" : { "description" : "Not enough permissions to perform this operation" } }, "x-admin-only" : true } }, "/export-partner-update/{exportPartnerId}/organization/{organizationId}" : { "post" : { "tags" : [ "export-partner-update" ], "summary" : "Update export partner record", "description" : "Authentication required for this operation.
Preconditions:", "operationId" : "updateExportPartner", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "exportPartnerId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/ExportPartnerUpdate" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "New export partner record updated", "schema" : { "$ref" : "#/definitions/ExportPartner" } }, "403" : { "description" : "Not enough permissions to perform this operation" }, "404" : { "description" : "Organization with that id doesn't exist or the export partner record does not exist." } } } }, "/gateway-cluster/{gatewayClusterId}/migrate/{gatewayId}" : { "post" : { "tags" : [ "gateway-cluster" ], "summary" : "Assigns all sensors in given gateway cluster to the given gateway.", "description" : "Authentication required for this operation, authenticated user must have admin role.", "operationId" : "assignSensorsOfClusterToGateway", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "gatewayClusterId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "gatewayId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Sensors assigned to gateway", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/Check" } } }, "403" : { "description" : "User is not authorized to perform this operation." }, "404" : { "description" : "Gateway cluster or gateway does not exist." } }, "x-admin-only" : true } }, "/gateway-cluster" : { "post" : { "tags" : [ "gateway-cluster" ], "summary" : "Create a new gateway cluster.", "description" : "Authentication required for this operation, authenticated user have admin role.", "operationId" : "createGatewayCluster", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/NewGatewayCluster" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "New gateway cluster created", "schema" : { "$ref" : "#/definitions/GatewayCluster" } }, "403" : { "description" : "User must be an admin." } } } }, "/gateway-cluster/{gatewayClusterId}" : { "get" : { "tags" : [ "gateway-cluster" ], "summary" : "Return gateway cluster by id.", "description" : "Authentication required for this operation.", "operationId" : "getGatewayClusterById", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "gatewayClusterId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Returns the gateway cluster.", "schema" : { "$ref" : "#/definitions/GatewayCluster" } }, "403" : { "description" : "Not enough permissions to perform the operation." } } }, "delete" : { "tags" : [ "gateway-cluster" ], "summary" : "Remove a Gateway Cluster", "description" : "Authentication required for this operation, authenticated user must have admin role.", "operationId" : "removeGatewayCluster", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "gatewayClusterId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "permanently", "in" : "query", "description" : "Optional bool to specify the permanent deletion of the gateway cluster.", "required" : false, "type" : "boolean" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "204" : { "description" : "Removal succeeded." }, "403" : { "description" : "User is not authorized to perform operation, must be an admin." }, "404" : { "description" : "GatewayCluster not found." }, "500" : { "description" : "Error - Gateway cluster not removed." } } } }, "/gateway-cluster/organization/{organizationId}" : { "get" : { "tags" : [ "gateway-cluster" ], "summary" : "Return gateway clusters for the organization.", "description" : "Authentication required for this operation.", "operationId" : "getGatewayClusterByOrganization", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "includeSoftDeleted", "in" : "query", "required" : false, "type" : "boolean" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Returns all the gateway clusters of the organization.", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/GatewayCluster" } } }, "403" : { "description" : "Not enough permissions to perform the operation." } } } }, "/gateway-cluster/with-secrets/{gatewayClusterId}" : { "get" : { "tags" : [ "gateway-cluster" ], "summary" : "Return gateway cluster with secrets by id.", "description" : "Authentication required for this operation.", "operationId" : "getGatewayClusterWithSecretsById", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "gatewayClusterId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Returns the gateway cluster with secrets by id.", "schema" : { "$ref" : "#/definitions/GatewayClusterWithSecrets" } }, "403" : { "description" : "User must be an admin." } }, "x-admin-only" : true } }, "/gateway" : { "post" : { "tags" : [ "gateway" ], "summary" : "Create a new gateway.", "description" : "Authentication required for this operation, authenticated user must have admin role.", "operationId" : "createGateway", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/NewGateway" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "New gateway created", "schema" : { "$ref" : "#/definitions/Gateway" } }, "403" : { "description" : "User must be an admin." } }, "x-admin-only" : true } }, "/gateway/{gatewayId}" : { "get" : { "tags" : [ "gateway" ], "summary" : "Return gateway.", "description" : "Authentication required for this operation.", "operationId" : "getGatewayById", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "gatewayId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Returns gateway.", "schema" : { "$ref" : "#/definitions/Gateway" } }, "403" : { "description" : "Not enough permissions to perform the operation." }, "404" : { "description" : "Gateway does not exist." } }, "x-admin-only" : true }, "delete" : { "tags" : [ "gateway" ], "summary" : "Remove gateway.", "description" : "Authentication required for this operation, authenticated user must have admin role.", "operationId" : "removeGateway", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "gatewayId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Gateway has been removed." }, "403" : { "description" : "User must be an admin." }, "404" : { "description" : "Gateway not found." } }, "x-admin-only" : true } }, "/gateway/status/{gatewayIds}" : { "get" : { "tags" : [ "gateway" ], "summary" : "Return status of gateways.", "description" : "Authentication required for this operation.", "operationId" : "getStatusForGateways", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "gatewayIds", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Returns status of gateways.", "schema" : { "type" : "object", "additionalProperties" : { "type" : "object" } } }, "403" : { "description" : "Not enough permissions to perform the operation." }, "404" : { "description" : "Gateway does not exist." } } } }, "/gateway-update/{gatewayId}" : { "post" : { "tags" : [ "gateway-update" ], "summary" : "Update a gateway.", "description" : "Authentication required for this operation", "operationId" : "updateGateway", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "gatewayId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/GatewayEditable" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "Gateway updated", "schema" : { "$ref" : "#/definitions/Gateway" } }, "400" : { "description" : "Invalid data in the properties to be updated." }, "403" : { "description" : "User must be authenticated." }, "500" : { "description" : "Error while updating the gateway." } } } }, "/util/contact" : { "post" : { "tags" : [ "util" ], "summary" : "Sends a message to the ZENSIE staff", "description" : "", "operationId" : "sendContactMessage", "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "description" : "Valid user's message information", "required" : true, "schema" : { "$ref" : "#/definitions/ContactMessage" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Message sent", "schema" : { "type" : "string" } }, "500" : { "description" : "Message was not sent, please try again later" } } } }, "/util/countries" : { "get" : { "tags" : [ "util" ], "summary" : "Obtains the countries codes supported by ZENSIE", "description" : "", "operationId" : "obtainCountries", "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "", "schema" : { "type" : "string" } } } } }, "/util/whitelist-ips" : { "get" : { "tags" : [ "util" ], "summary" : "Obtains the whitelisted ranges of IPs needed by ZENSIE", "description" : "", "operationId" : "obtainWhiteListAWSIPs", "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "", "schema" : { "type" : "string" } } } } }, "/group-member/group/{groupId}" : { "get" : { "tags" : [ "group" ], "summary" : "List the members in a group", "description" : "Authentication required for this operation, authenticated user have admin role or be member of the group.", "operationId" : "listUsersInGroup", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "groupId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "List of members", "schema" : { "$ref" : "#/definitions/GroupMember" } }, "403" : { "description" : "User is not authorized to perform this operation, they must be group member or an admin." }, "404" : { "description" : "Group not found." } } } }, "/group-member/{email}/group/{groupId}" : { "post" : { "tags" : [ "group" ], "summary" : "Add a user to a group", "description" : "Authentication required for this operation, authenticated user have admin role or be owner of the group.", "operationId" : "addUserToGroup", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "groupId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "email", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/NewGroupMember" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Member has been added", "schema" : { "$ref" : "#/definitions/GroupMember" } }, "403" : { "description" : "User is not authorized to perform this operation, they must be group owner or an admin." }, "404" : { "description" : "Group not found." } } }, "delete" : { "tags" : [ "group" ], "summary" : "Remove a user from a group", "description" : "Authentication required for this operation, authenticated user have admin role or be owner of the group.", "operationId" : "removeUserFromGroup", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "groupId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "email", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "204" : { "description" : "Member has been deleted" }, "403" : { "description" : "User is not authorized to perform this operation, they must be group owner or an admin." }, "404" : { "description" : "Group not found." } } } }, "/group-member-update/{email}/group/{groupId}" : { "post" : { "tags" : [ "group" ], "summary" : "Update a user in a group", "description" : "Authentication required for this operation, authenticated user have admin role or be owner of the group.", "operationId" : "updateUserInAGroup", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "groupId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "email", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/NewGroupMember" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Member has been updated", "schema" : { "$ref" : "#/definitions/GroupMember" } }, "403" : { "description" : "User is not authorized to update a group member, they must be group owner or an admin." }, "404" : { "description" : "Group not found." }, "409" : { "description" : "Group does not exist. You cannot update a user in a group that doesn't exist." } } } }, "/group" : { "post" : { "tags" : [ "group" ], "summary" : "Create a new group.", "description" : "Authentication required for this operation, authenticated user have admin role.", "operationId" : "createGroup", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/NewGroup" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "New group created", "schema" : { "$ref" : "#/definitions/Group" } }, "403" : { "description" : "User must be an admin or an organization owner in order to create a group." }, "500" : { "description" : "Sorry, there was a problem creating the group." } } } }, "/group/{groupId}" : { "get" : { "tags" : [ "group" ], "summary" : "Get a group", "description" : "", "operationId" : "getGroup", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "groupId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "New group created", "schema" : { "$ref" : "#/definitions/Group" } }, "403" : { "description" : "User not allowed to view the group" }, "500" : { "description" : "Sorry, there was a problem getting the group." } } }, "delete" : { "tags" : [ "group" ], "summary" : "Remove group.", "description" : "Authentication required for this operation, authenticated user have admin role or be owner of the group.", "operationId" : "deleteGroup", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "groupId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "204" : { "description" : "Group has been removed." }, "403" : { "description" : "User is not authorized to perform this operation, they must be group owner or an admin." }, "404" : { "description" : "Group not found." }, "510" : { "description" : "Error - Organization membership partially deleted." } } } }, "/group/member/{email}" : { "get" : { "tags" : [ "group" ], "summary" : "View groups a user belongs too", "description" : "", "operationId" : "viewUsersGroups", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "email", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "List of groups", "schema" : { "$ref" : "#/definitions/Group" } }, "403" : { "description" : "User is not authorized to perform this operation, they must be the actual user or an admin." }, "500" : { "description" : "Sorry, there was a problem retrieving the groups." } } } }, "/group-update/{groupId}" : { "post" : { "tags" : [ "group-update" ], "summary" : "Edit a group", "description" : "", "operationId" : "updateGroup", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "groupId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/NewGroup" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Group updated", "schema" : { "$ref" : "#/definitions/Group" } }, "403" : { "description" : "User must be an admin or an organization owner in order to edit a group." }, "404" : { "description" : "Group not found" }, "500" : { "description" : "Sorry, there was a problem creating the group." } } } }, "/health" : { "get" : { "tags" : [ "health" ], "summary" : "Deep readiness probe reporting the health of all backing services.", "description" : "", "operationId" : "health", "produces" : [ "application/json" ], "parameters" : [ ], "responses" : { "200" : { "description" : "All gating backing services are healthy; the instance is ready.", "schema" : { "$ref" : "#/definitions/HealthResponse" } }, "503" : { "description" : "One or more backing services are unavailable; the instance is not ready to serve traffic.", "schema" : { "$ref" : "#/definitions/HealthResponse" } } } } }, "/highlight" : { "get" : { "tags" : [ "highlight" ], "summary" : "Return all highlights.", "description" : "Authentication required for this operation.", "operationId" : "getAllHighlights", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "All highlights returned.", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/Highlight" } } }, "403" : { "description" : "Not enough permissions to perform the operation." } } }, "post" : { "tags" : [ "highlight" ], "summary" : "Create a highlight.", "description" : "Authentication required for this operation.", "operationId" : "createHighlight", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/HighlightNew" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "New highlight created.", "schema" : { "$ref" : "#/definitions/Highlight" } }, "403" : { "description" : "User not authorized." } } } }, "/highlight/{publishedAt}" : { "get" : { "tags" : [ "highlight" ], "summary" : "Return the highlight with the given publication date.", "description" : "Authentication required for this operation.", "operationId" : "getHighlightByPublishedAt", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "publishedAt", "in" : "path", "required" : true, "type" : "string" }, { "name" : "language", "in" : "query", "description" : "IETF language tag, e.g. en-US", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "The highlight.", "schema" : { "$ref" : "#/definitions/Highlight" } }, "403" : { "description" : "Not enough permissions to perform the operation." } } }, "put" : { "tags" : [ "highlight" ], "summary" : "Patch a highlight (PUT not supported).", "description" : "Authentication required for this operation.", "operationId" : "putHighlight", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "publishedAt", "in" : "path", "required" : true, "type" : "string" }, { "name" : "language", "in" : "query", "description" : "IETF language tag, e.g. en-US", "required" : false, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/HighlightEditable" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Highlight patched", "schema" : { "$ref" : "#/definitions/Highlight" } }, "400" : { "description" : "Invalid data in the properties to be patched." }, "403" : { "description" : "User not authorized." }, "404" : { "description" : "Highlight not found." }, "500" : { "description" : "Error while patching the highlight." } } }, "delete" : { "tags" : [ "highlight" ], "summary" : "Delete a highlight.", "description" : "Authentication required for this operation.", "operationId" : "deleteHighlight", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "publishedAt", "in" : "path", "required" : true, "type" : "string" }, { "name" : "language", "in" : "query", "description" : "IETF language tag, e.g. en-US", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "204" : { "description" : "Highlight has been deleted." }, "403" : { "description" : "User not authorized." }, "404" : { "description" : "Highlight not found." } } }, "patch" : { "tags" : [ "highlight" ], "summary" : "Patch a highlight.", "description" : "Authentication required for this operation.", "operationId" : "patchHighlight", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "publishedAt", "in" : "path", "required" : true, "type" : "string" }, { "name" : "language", "in" : "query", "description" : "IETF language tag, e.g. en-US", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/HighlightEditable" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Highlight patched", "schema" : { "$ref" : "#/definitions/Highlight" } }, "400" : { "description" : "Invalid data in the properties to be patched." }, "403" : { "description" : "User must be authenticated." }, "404" : { "description" : "Highlight not found." }, "500" : { "description" : "Error while patching the highlight." } } } }, "/highlight/last" : { "get" : { "tags" : [ "highlight" ], "summary" : "Return the last highlight.", "description" : "Authentication required for this operation.", "operationId" : "getLastHighlight", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "language", "in" : "query", "description" : "IETF language tag, e.g. en-US", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "The highlight.", "schema" : { "$ref" : "#/definitions/Highlight" } }, "403" : { "description" : "Not enough permissions to perform the operation." } } } }, "/import-check/date-entry/{dateEntryId}" : { "delete" : { "tags" : [ "import-check" ], "summary" : "Delete a date entry", "description" : "Authentication required for this operation, authenticated user has admin role or is owner/editor of an organization.", "operationId" : "deleteCheckDateEntry", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "dateEntryId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Date entry deleted" }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "Date entry not found" } } } }, "/import-check/{checkId}" : { "get" : { "tags" : [ "import-check", "integrate", "robocrops" ], "summary" : "Returns the import check with the specified check id.", "description" : "Authentication required and user has read access to the organization.", "operationId" : "getImportCheck", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "checkId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "The import check with the specified id", "schema" : { "$ref" : "#/definitions/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" : [ "import-check", "integrate", "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", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "checkId", "in" : "path", "required" : true, "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/{checkId}/collection/{collectionId}" : { "delete" : { "tags" : [ "import-check" ], "summary" : "Delete a collection from an import check", "description" : "Authentication required for this operation, authenticated user has admin role or is owner/editor of an organization.", "operationId" : "deleteImportCheckCollection", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "checkId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "collectionId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "Collection deleted from to the import check", "schema" : { "$ref" : "#/definitions/ImportCheck" } }, "400" : { "description" : "Invalid properties" }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "An import check with that id doesn't exist" } } } }, "/import-check/{checkId}/manual-input-data/{rowId}" : { "delete" : { "tags" : [ "import-check" ], "summary" : "Delete manual input data row.", "description" : "Authentication required for this operation.", "operationId" : "deleteManualInputRowById", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "checkId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "rowId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "202" : { "description" : "Manual input data row is deleted." }, "400" : { "description" : "Bad request while deleting row" }, "403" : { "description" : "Not enough permissions to perform the operation." } } } }, "/import-check/organization/{organizationId}" : { "get" : { "tags" : [ "import-check", "integrate", "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", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "search", "in" : "query", "description" : "Search for checks by name, url or check id", "required" : false, "type" : "string" }, { "name" : "tags", "in" : "query", "description" : "Filter checks by tags (separate with comma)", "required" : false, "type" : "string" }, { "name" : "tagsoperator", "in" : "query", "description" : "How should checks by filtered by tags (or / and)?", "required" : false, "type" : "string" }, { "name" : "sensortype", "in" : "query", "description" : "Filter checks by sensortype", "required" : false, "type" : "string" }, { "name" : "expandCoordinates", "in" : "query", "description" : "Include data source coordinates information", "required" : false, "type" : "boolean" }, { "name" : "expandCoordinateHistory", "in" : "query", "description" : "Include coordinate history for each data source (may increase response size)", "required" : false, "type" : "boolean" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "List of checks returned", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/ImportCheck" } } }, "403" : { "description" : "User is not authorized to perform this operation." } } }, "post" : { "tags" : [ "import-check", "integrate", "robocrops" ], "summary" : "Create a new import check in the organization", "description" : "Authentication required for this operation.
Preconditions:", "operationId" : "createImportCheck", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/ImportCheck" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "New import check created, including its generated check id", "schema" : { "$ref" : "#/definitions/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" } } } }, "/import-check/{checkId}/date-entry" : { "get" : { "tags" : [ "import-check" ], "summary" : "Get all date entries that belong to an import check", "description" : "Authentication required for this operation, authenticated user has admin role or is a member of the organization.", "operationId" : "getDateEntriesForImportCheck", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "checkId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "Retrieved data entries for import check", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/CheckDateEntry" } } }, "400" : { "description" : "Invalid date entry properties." }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "An import check with that id doesn't exist" } } }, "post" : { "tags" : [ "import-check" ], "summary" : "Create a new date entry that belongs to an import check", "description" : "Authentication required for this operation, authenticated user has admin role or is owner/editor of an organization.", "operationId" : "addImportCheckDateEntry", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "checkId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/NewCheckDateEntry" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "New date entry created", "schema" : { "$ref" : "#/definitions/CheckDateEntry" } }, "400" : { "description" : "Invalid date entry properties." }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "An import check with that id doesn't exist" } } } }, "/import-check/{checkId}/collection/{collectionId}/stats" : { "get" : { "tags" : [ "import-check" ], "summary" : "Get values for a given collection in a check.", "description" : "Authentication required for this operation, authenticated user has admin role or is owner/editor of an organization.", "operationId" : "getImportCheckCollectionValues", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "checkId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "collectionId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Collection values", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/ManualImportCheckStatsResponse" } } }, "400" : { "description" : "Invalid properties" }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "An import check with that id doesn't exist" } } } }, "/import-check/date-entry/{dateEntryId}/stats" : { "get" : { "tags" : [ "import-check" ], "summary" : "Get values for a date entry", "description" : "Authentication required for this operation, authenticated user has admin role or is owner/editor of an organization.", "operationId" : "getImportCheckDateEntryValues", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "dateEntryId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Date entry values", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/ManualImportCheckStatsResponse" } } }, "400" : { "description" : "Invalid properties" }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "A date entry with that id doesn't exist" } } } }, "/import-check/{check-id}/manual-input-data" : { "get" : { "tags" : [ "import-check" ], "summary" : "Get data for a manual input check", "description" : "Authentication required for this operation", "operationId" : "getManualInputDataForCheck", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "check-id", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Manual input data", "schema" : { "$ref" : "#/definitions/PaginatedManualInputRows" } }, "400" : { "description" : "Invalid properties" }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "A check with that id doesn't exist" } } } }, "/import-check/{checkId}/date-entries" : { "post" : { "tags" : [ "import-check" ], "summary" : "Add new date entries to an import check", "description" : "Authentication required for this operation, authenticated user has admin role or is owner/editor of an organization.", "operationId" : "addDateEntries", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "checkId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/CheckDateEntry" } } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "New date entries created", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/CheckDateEntry" } } }, "400" : { "description" : "Invalid date entry properties." }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "An import check with that id doesn't exist" } } } }, "/import-check/{checkId}/collection" : { "post" : { "tags" : [ "import-check" ], "summary" : "Add collections to an import check", "description" : "Authentication required for this operation, authenticated user has admin role or is owner/editor of an organization.", "operationId" : "addImportCheckCollections", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "checkId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/NewCheckCollection" } } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "New collections added to the import check", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/CheckCollection" } } }, "400" : { "description" : "Invalid collection properties." }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "An import check with that id doesn't exist" } } } }, "/import-check/copy/{checkId}/organization/{destinationOrganizationId}" : { "post" : { "tags" : [ "import-check" ], "summary" : "Copy an external sensor into the organization. The new sensor properties can be overridden with 'sensorOverrides'. If 'sensorTypeOverrides' is null, the sensor type will be shared with the org, otherwise the sensor type will also be copied using those overrides.", "description" : "Authentication required for this operation.
Preconditions:", "operationId" : "copyImportCheckIntoOrganization", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "checkId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "destinationOrganizationId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/SensorCopyOverrides" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "New import check created, including its generated check id", "schema" : { "$ref" : "#/definitions/ImportCheck" } }, "400" : { "description" : "Attempting to share or copy a public sensor type." }, "403" : { "description" : "Not enough permissions to perform the operation" } } } }, "/import-check-update/{checkId}/collection/{collectionId}" : { "post" : { "tags" : [ "import-check-update" ], "summary" : "Update a collection", "description" : "Authentication required for this operation.", "operationId" : "updateCollection", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "checkId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "collectionId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/NewCheckCollection" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Collection updated", "schema" : { "$ref" : "#/definitions/CheckCollection" } }, "400" : { "description" : "Invalid data in the properties" }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "A collection with that id doesn't exist" } } } }, "/import-check-update/{checkId}/collection/reorder" : { "post" : { "tags" : [ "import-check-update" ], "summary" : "Reorder the collection order", "description" : "Authentication required for this operation.", "operationId" : "updateCollectionOrder", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "checkId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "type" : "array", "items" : { "type" : "string" } } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Collection order updated", "schema" : { "$ref" : "#/definitions/ImportCheck" } }, "400" : { "description" : "Invalid data in the properties" }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "A check with that id does not exist" } } } }, "/import-check-update/date-entry/{dateEntryId}" : { "post" : { "tags" : [ "import-check-update" ], "summary" : "Update a date entry", "description" : "Authentication required for this operation.", "operationId" : "updateDateEntry", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "checkId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "dateEntryId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/CheckDateEntryUpdate" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Date entry updated", "schema" : { "$ref" : "#/definitions/CheckDateEntry" } }, "400" : { "description" : "Invalid data in the properties" }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "A date entry with that id does not exist" } } } }, "/import-check-update/{checkId}" : { "post" : { "tags" : [ "import-check-update", "integrate", "robocrops" ], "summary" : "Update an import check", "description" : "Authentication required for this operation.", "operationId" : "updateImportCheck", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/ExternalSensorEditable" } }, { "name" : "checkId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Import check updated", "schema" : { "$ref" : "#/definitions/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" } } } }, "/ingest/manual-input-delete" : { "post" : { "tags" : [ "ingest" ], "summary" : "Delete manual import check data based on keys", "description" : "Authentication required for this operation.", "operationId" : "deleteDataManualImportChecks", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/ManualImportCheckEventDelete" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Import checks event deleted.", "schema" : { "$ref" : "#/definitions/ManualImportCheckStatsResponse" } }, "400" : { "description" : "Bad request while deleting manual data" }, "403" : { "description" : "Not enough permissions to perform the operation. User must be editor or owner in the organization." } } } }, "/ingest/organization/{organizationId}/import-check/{importCheckId}/example-call" : { "get" : { "tags" : [ "ingest" ], "summary" : "Import check event template.", "description" : "Authentication required for this operation.", "operationId" : "getIngestImportCheckTemplate", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "importCheckId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Import check event template." }, "403" : { "description" : "Not enough permissions to perform the operation. User must be editor or owner in the organization." } } } }, "/ingest/organization/{organizationId}" : { "post" : { "tags" : [ "ingest", "integrate", "robocrops" ], "summary" : "Ingest external sensor data.Supports multiple events (100 max) except for manual input event creation.", "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", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/ImportCheckEvent" } } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Import checks events processed.", "schema" : { "$ref" : "#/definitions/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" } } } }, "/ingest/manual-input-update" : { "post" : { "tags" : [ "ingest" ], "summary" : "Update manual data.", "description" : "Authentication required for this operation.", "operationId" : "updateManualImportChecks", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/ManualImportCheckEventUpdate" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "Import check event processed.", "schema" : { "$ref" : "#/definitions/ManualImportCheckEventUpdateResponse" } }, "400" : { "description" : "Bad request while ingesting manual data" }, "403" : { "description" : "Not enough permissions to perform the operation. User must be editor or owner in the organization." }, "404" : { "description" : "Event not found" } } } }, "/ingest/manual-input-update/{id}" : { "post" : { "tags" : [ "ingest" ], "summary" : "Update manual data by event id.", "description" : "Authentication required for this operation.", "operationId" : "updateManualImportChecksWithId", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "id", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/ManualImportCheckEventUpdate" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "Import check event processed.", "schema" : { "$ref" : "#/definitions/ManualImportCheckEventUpdateResponse" } }, "400" : { "description" : "Bad request while ingesting manual data" }, "403" : { "description" : "Not enough permissions to perform the operation. User must be editor or owner in the organization." } } } }, "/ingest-update/import-check/{importCheckId}/timestamp/{timestamp}" : { "post" : { "tags" : [ "ingest-update" ], "summary" : "Update ingested external sensor data.", "description" : "", "operationId" : "updateImportCheckEvent", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "importCheckId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "timestamp", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/ImportCheckEventUpdateRequest" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Import check event processed." }, "403" : { "description" : "Not enough permissions to perform the operation. User must be editor or owner in the organization." } } } }, "/integration/activate/{integrationId}" : { "post" : { "tags" : [ "integration" ], "operationId" : "activateIntegration", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "integrationId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "type" : "object" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "default" : { "description" : "successful operation" } } } }, "/integration/deactivate/{integrationId}/installation/{installationId}" : { "post" : { "tags" : [ "integration" ], "operationId" : "deactivateIntegration", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "integrationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "installationId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "type" : "object" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "default" : { "description" : "successful operation" } } } }, "/integrity-check/unique-mother-assignment" : { "get" : { "tags" : [ "integrity-check" ], "summary" : "The mothers in the mothers table are referenced in ONE (not less, not more) location of the locations table.", "description" : "Authentication required for this operation.", "operationId" : "uniqueMother", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "The mothers in the mothers table are referenced in ONE (not less, not more) location of the locations table." }, "403" : { "description" : "Not enough permissions to perform the operation. User must be admin." } } } }, "/integrity-check/location-mothers-exist" : { "get" : { "tags" : [ "integrity-check" ], "summary" : "The mother ids mentioned in the locations table exist in the mothers table.", "description" : "Authentication required for this operation.", "operationId" : "motherIdsInLocationsExist", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "The mother ids mentioned in the locations table exist in the mothers table." }, "403" : { "description" : "Not enough permissions to perform the operation. User must be admin." } } } }, "/integrity-check/sensor-location-mother" : { "get" : { "tags" : [ "integrity-check" ], "summary" : "Checks if a location has sensor checks but no mother assigned to it.", "description" : "Authentication required for this operation.", "operationId" : "sensorLocationHasMother", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "There are no locations with sensor checks which do not have a mother assigned." }, "403" : { "description" : "Not enough permissions to perform the operation. User must be admin." } } } }, "/license/{licenseId}/{organizationId}" : { "post" : { "tags" : [ "license" ], "summary" : "Assign a license to an existing organization.", "description" : "Admin credentials required for this operation.", "operationId" : "createOrganizationLicense", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "licenseId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "type" : "object" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "License assigned to organization.", "schema" : { "$ref" : "#/definitions/OrganizationLicense" } }, "403" : { "description" : "User not authorized." } } }, "delete" : { "tags" : [ "license" ], "summary" : "Remove license from an organization.", "description" : "Admin credentials required for this operation.", "operationId" : "deleteOrganizationLicense", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "licenseId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "204" : { "description" : "License has been removed from organization." }, "403" : { "description" : "User not authorized." }, "404" : { "description" : "License not found." } } } }, "/license/{licenseId}" : { "get" : { "tags" : [ "license" ], "summary" : "Return the license with the given id.", "description" : "Authentication required for this operation.", "operationId" : "getLicenseById", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "licenseId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "The license.", "schema" : { "$ref" : "#/definitions/License" } }, "403" : { "description" : "Not enough permissions to perform the operation." } } }, "put" : { "tags" : [ "license" ], "summary" : "Update a license.", "description" : "Authentication required for this operation.", "operationId" : "putLicense", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "licenseId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/LicenseEditable" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "License updated", "schema" : { "$ref" : "#/definitions/License" } }, "400" : { "description" : "Invalid data in the properties to be updated." }, "403" : { "description" : "User not authorized." }, "500" : { "description" : "Error while updating the license." } } }, "delete" : { "tags" : [ "license" ], "summary" : "Delete a license.", "description" : "Authentication required for this operation.", "operationId" : "deleteLicense", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "licenseId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "204" : { "description" : "License has been deleted." }, "403" : { "description" : "User not authorized." }, "404" : { "description" : "License not found." } } }, "patch" : { "tags" : [ "license" ], "summary" : "Patch a license.", "description" : "Authentication required for this operation.", "operationId" : "patchLicense", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "licenseId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/LicenseEditable" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "License patched", "schema" : { "$ref" : "#/definitions/License" } }, "400" : { "description" : "Invalid data in the properties to be patched." }, "403" : { "description" : "User must be authenticated." }, "500" : { "description" : "Error while patching the license." } } } }, "/license" : { "get" : { "tags" : [ "license" ], "summary" : "Return all licenses.", "description" : "Authentication required for this operation.", "operationId" : "getAllLicenses", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Returns all licenses.", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/License" } } }, "403" : { "description" : "User not authorized." } } }, "post" : { "tags" : [ "license" ], "summary" : "Create a new license.", "description" : "Authentication required for this operation.", "operationId" : "createLicense", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/License" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "New license created.", "schema" : { "$ref" : "#/definitions/License" } }, "403" : { "description" : "User not authorized." } } } }, "/license/{licenseId}/organizations" : { "get" : { "tags" : [ "license" ], "summary" : "Return the list of organizations with the given license.", "description" : "Authentication required for this operation.", "operationId" : "getOrganizationsByLicenseId", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "licenseId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "The list of organizations.", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/Organization" } } }, "403" : { "description" : "Not enough permissions to perform the operation." } } } }, "/location/{locationName}" : { "get" : { "tags" : [ "location" ], "summary" : "Return the location with the given location name.", "description" : "Default oauth authentication mechanism required for this operation. ", "operationId" : "getLocation", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "locationName", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "deprecated" : true, "responses" : { "200" : { "description" : "Return the location with the given name", "schema" : { "$ref" : "#/definitions/Location" } }, "403" : { "description" : "Unauthorized to perform operation, not enough permissions." }, "404" : { "description" : "There is no location with the given name" } } }, "delete" : { "tags" : [ "location" ], "summary" : "Removes the location, the queue associated to it, and IAM user.", "description" : "", "operationId" : "deleteLocation", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "locationName", "in" : "path", "required" : true, "type" : "string" }, { "name" : "removeChecks", "in" : "query", "description" : "True if you want to remove the checks that use this location (and no other locations)", "required" : false, "type" : "boolean", "default" : true } ], "security" : [ { "Bearer" : [ ] } ], "deprecated" : true, "responses" : { "204" : { "description" : "Location removed" }, "403" : { "description" : "Unauthorized to perform this operation." }, "510" : { "description" : "Error - location partially deleted." } } } }, "/location" : { "post" : { "tags" : [ "location" ], "summary" : "Create a new location.", "description" : "Default oauth authentication mechanism required for this operation.
Currently only admin users or owners of the organization are authorised to call this operation. ", "operationId" : "createLocation", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/Location" } } ], "security" : [ { "Bearer" : [ ] } ], "deprecated" : true, "responses" : { "201" : { "description" : "New location created", "schema" : { "$ref" : "#/definitions/Location" } }, "400" : { "description" : "Bad request - missing location or bad syntax in location data" }, "403" : { "description" : "User not allowed to perform the operation" } } } }, "/location/private" : { "get" : { "tags" : [ "location" ], "summary" : "Returns all the available private locations in the system. ", "description" : "Default oauth authentication mechanism required for this operation, as a user with admin role.
NOTE That this call is for v2 of the API.", "operationId" : "getAllPrivateLocations", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ ], "security" : [ { "Bearer" : [ ] } ], "deprecated" : true, "responses" : { "200" : { "description" : "Return the list of private locations", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/Location" } } }, "403" : { "description" : "Unauthorized to perform the operation. User has to be admin.", "schema" : { "type" : "string" } } } } }, "/location/organization/{organizationId}" : { "get" : { "tags" : [ "location" ], "summary" : "Returns all the available private locations for that organization. ", "description" : "Default oauth authentication mechanism required for this operation.
The authenticated user must be an administrator or member of the organization.", "operationId" : "getPrivateLocationsForOrganization", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "deprecated" : true, "responses" : { "200" : { "description" : "Return the list of private locations associated with an organization", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/Location" } } }, "403" : { "description" : "Unauthorized to perform the operation. User has to be admin or needs to have the role of owner or editor within the organization." }, "404" : { "description" : "An organization with that id doesn't exist" } } } }, "/location/public" : { "get" : { "tags" : [ "location" ], "summary" : "Returns all the public locations", "description" : "Default oauth authentication mechanism required for this operation for security reasons", "operationId" : "getPublicLocations", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ ], "security" : [ { "Bearer" : [ ] } ], "deprecated" : true, "responses" : { "200" : { "description" : "Returns all the public locations", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/Location" }, "uniqueItems" : true } } } } }, "/location-update/organization/{organizationId}/location/{locationId}" : { "post" : { "tags" : [ "location-update" ], "summary" : "Update a site", "description" : "Authentication required for this operation.
Preconditions:
Authenticated user has to be owner in the organization.", "operationId" : "updateSite", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "locationId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/SiteEditable" } } ], "security" : [ { "Bearer" : [ ] } ], "deprecated" : true, "responses" : { "200" : { "description" : "Site updated", "schema" : { "$ref" : "#/definitions/Site" } }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "A site with that id doesn't exist" } } } }, "/location-update/{locationName}" : { "post" : { "tags" : [ "location-update" ], "summary" : "Update a location", "description" : "Authentication required for this operation.
Preconditions:
Authenticated user has to be owner in the organization, or be an admin in the platform.", "operationId" : "updateLocation", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "locationName", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/LocationEditable" } } ], "security" : [ { "Bearer" : [ ] } ], "deprecated" : true, "responses" : { "200" : { "description" : "Location updated", "schema" : { "$ref" : "#/definitions/Location" } }, "400" : { "description" : "Invalid data in the properties to be updated" }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "A location with that name doesn't exist" } } } }, "/map" : { "put" : { "tags" : [ "map" ], "summary" : "Bulk edit zones and data source coordinates on the map for a site within an organization.", "description" : "Authentication required for this operation.", "operationId" : "putMap", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/MapEditable" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "204" : { "description" : "Map has been updated" }, "400" : { "description" : "Invalid data in the properties to be patched." }, "403" : { "description" : "User must be authenticated." }, "404" : { "description" : "Data source not found." }, "500" : { "description" : "Error while updating the map." }, "501" : { "description" : "Not yet implemented feature of the bulk edit." } } }, "patch" : { "tags" : [ "map" ], "summary" : "Bulk edit zones and data source coordinates on the map for a site within an organization.", "description" : "Authentication required for this operation.", "operationId" : "patchMap", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/MapEditable" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "204" : { "description" : "Map has been updated" }, "400" : { "description" : "Invalid data in the properties to be patched." }, "403" : { "description" : "User must be authenticated." }, "404" : { "description" : "Data source not found." }, "500" : { "description" : "Error while updating the map." }, "501" : { "description" : "Not yet implemented feature of the bulk edit." } } } }, "/metric/{metricId}" : { "get" : { "tags" : [ "metric" ], "summary" : "Returns the metric with the specified type id.", "description" : "Default oauth authentication mechanism required for this operation.", "operationId" : "getMetric", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "metricId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "The metric with the specified id", "schema" : { "$ref" : "#/definitions/Metric" } }, "401" : { "description" : "Unauthenticated request, cannot perform operation", "schema" : { "type" : "string" } }, "404" : { "description" : "A metric with that id does not exist", "schema" : { "type" : "string" } }, "500" : { "description" : "Error obtaining the metric persisted data", "schema" : { "type" : "string" } } } }, "delete" : { "tags" : [ "metric" ], "summary" : "Remove metric.", "description" : "Authentication required for this operation, authenticated user have admin role.", "operationId" : "deleteMetric", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "metricId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "204" : { "description" : "Metric has been deleted." }, "400" : { "description" : "The metric is currently used by existing sensor types and cannot be removed." }, "403" : { "description" : "User is not authorized to perform this operation. Should be admin." }, "404" : { "description" : "Metric not found." } } } }, "/metric" : { "get" : { "tags" : [ "metric" ], "summary" : "Returns all the metrics.", "description" : "Default oauth authentication mechanism required for this operation.", "operationId" : "getAllMetrics", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "The list of all metrics", "schema" : { "$ref" : "#/definitions/Metric" } }, "401" : { "description" : "Unauthenticated request, cannot perform operation", "schema" : { "type" : "string" } }, "500" : { "description" : "Error obtaining the metric persisted data", "schema" : { "type" : "string" } } } }, "post" : { "tags" : [ "metric" ], "summary" : "Creates new metric.", "description" : "Authentication required for this operation, authenticated user have admin role.", "operationId" : "createMetric", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/Metric" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "New metric created", "schema" : { "$ref" : "#/definitions/Metric" } }, "400" : { "description" : "Metric data missing or incomplete." }, "403" : { "description" : "User is not authorized to perform this operation. Should be admin." }, "409" : { "description" : "A metric with the given id already exists" } } } }, "/metric/conversions" : { "get" : { "tags" : [ "metric" ], "summary" : "Returns the metrics that have possible conversions.", "description" : "Default oauth authentication mechanism required for this operation.", "operationId" : "getConversions", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "The metrics with possible conversions", "schema" : { "$ref" : "#/definitions/Metric" } }, "401" : { "description" : "Unauthenticated request, cannot perform operation", "schema" : { "type" : "string" } }, "404" : { "description" : "A metric with that id does not exist", "schema" : { "type" : "string" } }, "500" : { "description" : "Error obtaining the metric persisted data", "schema" : { "type" : "string" } } } } }, "/metric-update/{metricId}" : { "post" : { "tags" : [ "metric-update" ], "summary" : "Update a metric", "description" : "Authentication required for this operation.", "operationId" : "updateMetric", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/MetricUpdate" } }, { "name" : "metricId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Metric updated", "schema" : { "$ref" : "#/definitions/Metric" } }, "400" : { "description" : "Invalid data in the properties to be updated" }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "A metric with that id doesn't exist" } } } }, "/mother" : { "get" : { "tags" : [ "mother" ], "summary" : "Returns all the mothers.", "description" : "Authentication required for this operation.", "operationId" : "getAllMothers", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Mothers returned.", "schema" : { "$ref" : "#/definitions/Mother" } }, "403" : { "description" : "Not enough permissions to perform the operation. User must be admin." } } }, "post" : { "tags" : [ "mother" ], "summary" : "Add a new mother.", "description" : "Authentication required for this operation.", "operationId" : "addMother", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/NewMother" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Mother added", "schema" : { "$ref" : "#/definitions/Mother" } }, "400" : { "description" : "Invalid MAC Address" }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "Location does not exist" }, "409" : { "description" : "The location of the gateway does not belong to the organization" } } } }, "/mother/{motherId}/organization/{organizationId}/admin" : { "get" : { "tags" : [ "mother" ], "summary" : "Returns the mother with the specified id - containing extra details.", "description" : "Authentication required for this operation.", "operationId" : "getMotherAdminById", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "motherId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "The mother with the given id.", "schema" : { "$ref" : "#/definitions/Mother" } }, "403" : { "description" : "Not enough permissions to perform the operation" } } } }, "/mother/{motherId}/organization/{organizationId}" : { "get" : { "tags" : [ "mother" ], "summary" : "Returns the mother with the specified id.", "description" : "Authentication required for this operation.", "operationId" : "getMotherById", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "motherId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "The mother with the given id.", "schema" : { "$ref" : "#/definitions/LimitedScopeMother" } }, "403" : { "description" : "Not enough permissions to perform the operation" } } } }, "/mother/{motherId}/json" : { "get" : { "tags" : [ "mother" ], "summary" : "Returns the json variable for the mother.", "description" : "Authentication required for this operation.", "operationId" : "getMotherJsonVariable", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "motherId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "The json variable for the mother returned." }, "403" : { "description" : "Not enough permissions to perform the operation. User must be admin." } } } }, "/mother/{motherId}/organization/{organizationId}/status" : { "get" : { "tags" : [ "mother" ], "summary" : "Returns the status for mother with the specified id.", "description" : "Authentication required for this operation.", "operationId" : "getMotherStatusById", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "motherId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "The returns the status for mother with the given id.", "schema" : { "$ref" : "#/definitions/MotherStatusResponse" } }, "403" : { "description" : "Not enough permissions to perform the operation" } } } }, "/mother/organization/{organizationId}" : { "get" : { "tags" : [ "mother" ], "summary" : "Returns the mothers for the given organization", "description" : "Authentication required for this operation.", "operationId" : "getMothersByOrganizationId", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "The mothers for the specified organization.", "schema" : { "$ref" : "#/definitions/Mother" } }, "403" : { "description" : "Not enough permissions to perform the operation" } } } }, "/mother/{motherId}" : { "delete" : { "tags" : [ "mother" ], "summary" : "Remove mother.", "description" : "Operation reserved to administrators.", "operationId" : "removeMother", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "motherId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Mother has been removed.", "schema" : { "$ref" : "#/definitions/Mother" } }, "400" : { "description" : "The mother is associated to a location and cannot be removed" }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "Organization not found." } } } }, "/mother-template" : { "get" : { "tags" : [ "mother-template" ], "summary" : "Returns all the mother templates.", "description" : "Authentication required for this operation.", "operationId" : "getAllMotherTemplates", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Mother templates returned.", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/MotherTemplate" } } }, "403" : { "description" : "Not enough permissions to perform the operation. User must be admin." } } }, "post" : { "tags" : [ "mother-template" ], "summary" : "Add a new mother template.", "description" : "Authentication required for this operation.", "operationId" : "addMotherTemplate", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/NewMotherTemplate" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Mother template added", "schema" : { "$ref" : "#/definitions/MotherTemplate" } }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "User does not exist" } } } }, "/mother-template/{templateId}" : { "get" : { "tags" : [ "mother-template" ], "summary" : "Returns the mother template with the specified id.", "description" : "Authentication required for this operation.", "operationId" : "getMotherTemplateById", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "templateId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "The mother template with the given id.", "schema" : { "$ref" : "#/definitions/MotherTemplate" } }, "403" : { "description" : "Not enough permissions to perform the operation" } } }, "delete" : { "tags" : [ "mother-template" ], "summary" : "Remove mother template.", "description" : "Operation reserved to administrators.", "operationId" : "removeMotherTemplate", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "templateId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Mother template has been removed.", "schema" : { "$ref" : "#/definitions/Mother" } }, "400" : { "description" : "The mother template is associated to one or multiple mothers and cannot be removed" }, "403" : { "description" : "Not enough permissions to perform the operation" } } } }, "/mother-template-update/{templateId}" : { "post" : { "tags" : [ "mother-template-update" ], "summary" : "Updates a mother template", "description" : "Authentication required for this operation.", "operationId" : "updateMotherTemplate", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/MotherTemplateUpdate" } }, { "name" : "templateId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Mother template updated", "schema" : { "$ref" : "#/definitions/MotherTemplate" } }, "400" : { "description" : "Invalid data in the properties to be updated" }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "A mother template with that id doesn't exist" } } } }, "/mother-update/{motherId}" : { "post" : { "tags" : [ "mother-update" ], "summary" : "Updates a mother", "description" : "Authentication required for this operation.", "operationId" : "updateMother", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/MotherUpdate" } }, { "name" : "motherId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Mother updated", "schema" : { "$ref" : "#/definitions/Mother" } }, "400" : { "description" : "Invalid data in the properties to be updated" }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "A mother with that id doesn't exist" } } } }, "/news" : { "get" : { "tags" : [ "news" ], "summary" : "Return last news articles.", "description" : "Authentication required for this operation.", "operationId" : "getLastNewsArticles", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "language", "in" : "query", "required" : false, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "News articles returned.", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/NewsArticle" } } } } } }, "/notes" : { "post" : { "tags" : [ "notes", "integrate", "robocrops" ], "summary" : "Create a note.", "description" : "Authentication required for this operation.", "operationId" : "createNote", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/NoteNew" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "New note created.", "schema" : { "$ref" : "#/definitions/Note" } }, "400" : { "description" : "Invalid data in the note to be created." }, "403" : { "description" : "User not authorized." }, "500" : { "description" : "Error while creating the note." } } } }, "/notes/{noteId}" : { "get" : { "tags" : [ "notes", "integrate", "robocrops" ], "summary" : "Return the note with the given id.", "description" : "Authentication required for this operation.", "operationId" : "getNoteById", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "noteId", "in" : "path", "description" : "Unique identifier of the note", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Note returned.", "schema" : { "$ref" : "#/definitions/Note" } }, "403" : { "description" : "Not enough permissions to perform the operation." }, "500" : { "description" : "Error while retrieving the note." } } }, "put" : { "tags" : [ "notes", "integrate", "robocrops" ], "summary" : "Patch a note (PUT not supported).", "description" : "Authentication required for this operation.", "operationId" : "putNote", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "noteId", "in" : "path", "description" : "Unique identifier of the note", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/NoteEditable" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Note patched", "schema" : { "$ref" : "#/definitions/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." } } }, "delete" : { "tags" : [ "notes", "integrate", "robocrops" ], "summary" : "Delete a note.", "description" : "Authentication required for this operation.", "operationId" : "deleteNote", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "noteId", "in" : "path", "description" : "Unique identifier of the note", "required" : true, "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" : [ "notes", "integrate", "robocrops" ], "summary" : "Patch a note.", "description" : "Authentication required for this operation.", "operationId" : "patchNote", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "noteId", "in" : "path", "description" : "Unique identifier of the note", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/NoteEditable" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Note patched", "schema" : { "$ref" : "#/definitions/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." } } } }, "/notes/cultivation/{cultivationId}" : { "get" : { "tags" : [ "notes", "integrate", "robocrops" ], "summary" : "Return the notes of the cultivation.", "description" : "Authentication required for this operation.", "operationId" : "getNotesByCultivationId", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "cultivationId", "in" : "path", "description" : "Universally unique identifier of a cultivation.", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Notes returned.", "schema" : { "$ref" : "#/definitions/Note" } }, "403" : { "description" : "Not enough permissions to perform the operation." }, "500" : { "description" : "Error while retrieving notes." } } } }, "/notification-follow/{notificationId}/user/{email}" : { "post" : { "tags" : [ "notification-follow" ], "summary" : "Adds a follow to a notification.", "description" : "Only organization members and administrators of ZENSIE are authorised to call this operation. ", "operationId" : "createNotificationFollow", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/NotificationMethods" } }, { "name" : "notificationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "email", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "New notification follow created", "schema" : { "$ref" : "#/definitions/Notification follow" } }, "403" : { "description" : "User not allowed to perform the operation" } } }, "delete" : { "tags" : [ "notification-follow" ], "summary" : "Delete a notification follow with the given id.", "description" : "Only members of the organization or administrators of ZENSIE are authorised to call this operation. ", "operationId" : "deleteNotificationOfUser", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "notificationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "email", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Notification deleted", "schema" : { "$ref" : "#/definitions/Notification follow" } }, "403" : { "description" : "User not allowed to perform the operation" } } } }, "/notification-follow/organization/{organizationId}/user/{email}" : { "get" : { "tags" : [ "notification-follow" ], "summary" : "Retrieves all notification follows for a user within an organization.", "description" : "Only organization members and administrators of ZENSIE are authorised to call this operation. ", "operationId" : "getNotificationFollow", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "email", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "The list of notification follows for a user within an organization", "schema" : { "$ref" : "#/definitions/Notification follow" } }, "403" : { "description" : "User not allowed to perform the operation" } } } }, "/notification-follow/organization/{organizationId}/count" : { "post" : { "tags" : [ "notification-follow" ], "summary" : "Retrieves the followers counts of notifications", "description" : "Only organization members and administrators of ZENSIE are authorised to call this operation. ", "operationId" : "getNotificationFollowCount", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "type" : "array", "items" : { "type" : "string" } } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "The list of notification follows for a user within an organization", "schema" : { "$ref" : "#/definitions/NotificationFollowCount" } }, "403" : { "description" : "User not allowed to perform the operation" } } } }, "/notification-follow/{notificationId}" : { "get" : { "tags" : [ "notification-follow" ], "summary" : "Retrieves all followers of a notification", "description" : "Only organization members and administrators of ZENSIE are authorised to call this operation. ", "operationId" : "getNotificationFollowers", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "notificationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "The list of users that follow a notification", "schema" : { "$ref" : "#/definitions/Notification follow" } }, "403" : { "description" : "User not allowed to perform the operation" } } } }, "/notification-follow-update/{notificationId}/user/{email}" : { "post" : { "tags" : [ "notification-follow-update" ], "summary" : "Update an existing notification.", "description" : "Only organization members and administrators of ZENSIE are authorised to call this operation. ", "operationId" : "updateNotificationFollow", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/NotificationMethods" } }, { "name" : "notificationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "email", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "Notification follow update", "schema" : { "$ref" : "#/definitions/Notification follow" } }, "403" : { "description" : "User not allowed to perform the operation" } } } }, "/notification" : { "post" : { "tags" : [ "notification" ], "summary" : "Create a new notification.", "description" : "Only owners and editors of the organization are authorised.", "operationId" : "createNotification", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/NotificationNew" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "New notification created", "schema" : { "$ref" : "#/definitions/Notification" } }, "403" : { "description" : "User not allowed to perform the operation" } } } }, "/notification/{notificationId}" : { "get" : { "tags" : [ "notification" ], "summary" : "Retrieve a notification with the given id.", "description" : "Only members of the organization are authorised.", "operationId" : "getNotification", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "notificationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Notification", "schema" : { "$ref" : "#/definitions/Notification" } }, "403" : { "description" : "User not allowed to perform the operation" } } }, "put" : { "tags" : [ "notification" ], "summary" : "Update a notification.", "description" : "Authentication required for this operation.", "operationId" : "putNotification", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "notificationId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/NotificationEditable" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Notification updated", "schema" : { "$ref" : "#/definitions/Notification" } }, "400" : { "description" : "Invalid data in the properties to be updated." }, "403" : { "description" : "User must be authenticated." }, "500" : { "description" : "Error while updating the notification." } } }, "delete" : { "tags" : [ "notification" ], "summary" : "Delete the notification with the given id.", "description" : "Only owners and editors of the organization are authorised.", "operationId" : "deleteNotification", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "notificationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "204" : { "description" : "Notification deleted" }, "403" : { "description" : "User not allowed to perform the operation" } } }, "patch" : { "tags" : [ "notification" ], "summary" : "Patch a notification.", "description" : "Authentication required for this operation.", "operationId" : "patchNotification", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "notificationId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/NotificationEditable" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Notification patched", "schema" : { "$ref" : "#/definitions/Notification" } }, "400" : { "description" : "Invalid data in the properties to be patched." }, "403" : { "description" : "User must be authenticated." }, "500" : { "description" : "Error while patching the notification." } } } }, "/notification/organization/{organizationId}" : { "get" : { "tags" : [ "notification" ], "summary" : "Return the notifications of the organization given.", "description" : "Only members of the organization are authorised.", "operationId" : "getNotificationsInOrganization", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Returns the list of notifications", "schema" : { "$ref" : "#/definitions/Notification" } }, "403" : { "description" : "User not allowed to perform the operation" } } }, "post" : { "tags" : [ "notification" ], "summary" : "Create a new notification in the organization given.", "description" : "Only owners and editors of the organization are authorised.", "operationId" : "createNotificationInOrganization", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/NotificationNew" } } ], "security" : [ { "Bearer" : [ ] } ], "deprecated" : true, "responses" : { "201" : { "description" : "New notification created", "schema" : { "$ref" : "#/definitions/Notification" } }, "403" : { "description" : "User not allowed to perform the operation" } } } }, "/notification/check/{checkId}" : { "get" : { "tags" : [ "notification" ], "summary" : "Retrieve all notifications for a check.", "description" : "Only members of the organization are authorised.", "operationId" : "getCheckNotifications", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "checkId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Notification", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/Notification" } } }, "403" : { "description" : "User not allowed to perform the operation" } } } }, "/notification-settings/check/{checkId}/user/{email}" : { "post" : { "tags" : [ "notification-settings" ], "summary" : "Adds a notification setting to a check.", "description" : "Default oauth authentication mechanism required for this operation.
The owner (organization) is the only allowed to edit the permissions for all the users which can access a check.
A person different than the owner (organization) with access to the check can edit just his/her own notification settings. ", "operationId" : "addNotificationSetting", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/NotificationMethods" } }, { "name" : "checkId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "email", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Existing Check: check updated with the new notification setting information", "schema" : { "$ref" : "#/definitions/NotificationSetting" } }, "401" : { "description" : "Unauthenticated request, cannot perform operation", "schema" : { "type" : "string" } }, "403" : { "description" : "Error accessing the check: not enough permissions to perform operation", "schema" : { "type" : "string" } } } }, "delete" : { "tags" : [ "notification-settings" ], "summary" : "Removes the given notification setting from the check. ", "description" : "Default oauth authentication mechanism required for this operation.
This operation requires a valid follow object.
The operation is only authorized to the owner of the check.", "operationId" : "deleteNotificationSetting", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "checkId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "email", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Notification setting removed", "schema" : { "type" : "string" } }, "400" : { "description" : "Bad request: the owner of the check always remains a follower" }, "401" : { "description" : "Unauthorized access to the check, only the owner (organization) can remove a notification setting", "schema" : { "type" : "string" } }, "404" : { "description" : "The notification setting requested to be removed, was not found", "schema" : { "type" : "string" } }, "500" : { "description" : "Error DELETING the check's notification setting persisted data", "schema" : { "type" : "string" } } } } }, "/notification-settings/check/{checkId}" : { "get" : { "tags" : [ "notification-settings" ], "summary" : "Returns the notification settings associated with the check.", "description" : "Default oauth authentication mechanism required for this operation.", "operationId" : "obtainAllNotificationSettingsForACheck", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "checkId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "The list of notification settings that are related to the check", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/Follow" } } }, "401" : { "description" : "Unauthenticated request, cannot perform operation", "schema" : { "type" : "string" } }, "500" : { "description" : "Error obtaining the notification settings persisted data", "schema" : { "type" : "string" } } } } }, "/notification-settings/organization/{organizationId}/user/{email}" : { "get" : { "tags" : [ "notification-settings" ], "summary" : "Return all the checks of the given organization and the notifications associated with the user", "description" : "Authentication required and user is at least a follower in the organization, or is an admin in the system.", "operationId" : "obtainAllNotificationSettingsForOrganizationAndUser", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "email", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "The list of notification settings that are related to the check", "schema" : { "type" : "string" } }, "401" : { "description" : "Unauthenticated request, cannot perform operation", "schema" : { "type" : "string" } }, "500" : { "description" : "Error obtaining the notification settings persisted data", "schema" : { "type" : "string" } } } } }, "/notification-settings-update/check/{checkId}/user/{email}" : { "post" : { "tags" : [ "notification-settings-update" ], "summary" : "Update a notification setting", "description" : "Authentication required for this operation.", "operationId" : "updateNotificationSetting", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/NotificationSettingUpdate" } }, { "name" : "checkId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "email", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Notification setting updated", "schema" : { "$ref" : "#/definitions/NotificationSetting" } }, "400" : { "description" : "Invalid data in the properties to be updated" }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "A notification setting with that id doesn't exist" }, "406" : { "description" : "The notification setting method cannot be empty" } } } }, "/notification-topic-follow/{notificationTopicId}/user/{email}/organization/{organizationId}" : { "post" : { "tags" : [ "notification-topic-follow" ], "summary" : "Adds a follow to a notification topic.", "description" : "Only organization members and administrators of ZENSIE are authorised to call this operation. ", "operationId" : "createNotificationTopicFollow", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/NotificationMethods" } }, { "name" : "notificationTopicId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "email", "in" : "path", "required" : true, "type" : "string" }, { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "New notification topic follow created", "schema" : { "$ref" : "#/definitions/NotificationTopicFollow" } }, "403" : { "description" : "User not allowed to perform the operation" } } }, "delete" : { "tags" : [ "notification-topic-follow" ], "summary" : "Delete a notification topic follow with the given id, email and organization id.", "description" : "Only members of the organization or administrators of ZENSIE are authorised to call this operation. ", "operationId" : "deleteNotificationTopicFollow", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "notificationTopicId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "email", "in" : "path", "required" : true, "type" : "string" }, { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Notification deleted", "schema" : { "$ref" : "#/definitions/NotificationTopicFollow" } }, "403" : { "description" : "User not allowed to perform the operation" } } } }, "/notification-topic-follow/organization/{organizationId}/user/{email}" : { "get" : { "tags" : [ "notification-topic-follow" ], "summary" : "Retrieves all notification topic follows for a user within an organization.", "description" : "Only organization members and administrators of ZENSIE are authorised to call this operation. ", "operationId" : "getNotificationTopicFollow", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "email", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "The list of notification topic follows for a user within an organization", "schema" : { "$ref" : "#/definitions/NotificationTopicFollow" } }, "403" : { "description" : "User not allowed to perform the operation" } } } }, "/notification-topic-follow/organization/{organizationId}/count" : { "post" : { "tags" : [ "notification-topic-follow" ], "summary" : "Retrieves the followers counts of notification topics", "description" : "Only organization members and administrators of ZENSIE are authorised to call this operation. ", "operationId" : "getNotificationTopicFollowCount", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "type" : "array", "items" : { "type" : "string" } } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "The list of notification topic follow counts within an organization", "schema" : { "$ref" : "#/definitions/NotificationTopicFollowCount" } }, "403" : { "description" : "User not allowed to perform the operation" } } } }, "/notification-topic-follow/{notificationTopicId}/organization/{organizationId}" : { "get" : { "tags" : [ "notification-topic-follow" ], "summary" : "Retrieves all followers of a notification topic within an organization", "description" : "Only organization members and administrators of ZENSIE are authorised to call this operation. ", "operationId" : "getNotificationTopicFollowers", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "notificationTopicId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "The list of users that follow a notification topic within an organization", "schema" : { "$ref" : "#/definitions/NotificationTopicFollow" } }, "403" : { "description" : "User not allowed to perform the operation" } } } }, "/notification-topic-follow-update/{notificationTopicId}/user/{email}/organization/{organizationId}" : { "post" : { "tags" : [ "notification-topic-follow-update" ], "summary" : "Update an existing notification topic follow.", "description" : "Only organization members and administrators of ZENSIE are authorised to call this operation. ", "operationId" : "updateNotificationTopicFollow", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/NotificationMethods" } }, { "name" : "notificationTopicId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "email", "in" : "path", "required" : true, "type" : "string" }, { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "Notification topic follow update", "schema" : { "$ref" : "#/definitions/NotificationTopicFollow" } }, "403" : { "description" : "User not allowed to perform the operation" } } } }, "/notification-topic" : { "get" : { "tags" : [ "notification-topic" ], "summary" : "Return all the notifications topics.", "description" : "Default oauth authentication mechanism required for this operation.", "operationId" : "getNotificationTopics", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Returns the list of notification topics", "schema" : { "$ref" : "#/definitions/NotificationTopic" } }, "401" : { "description" : "Unauthenticated request, cannot perform operation", "schema" : { "type" : "string" } }, "403" : { "description" : "User not allowed to perform the operation" } } }, "post" : { "tags" : [ "notification-topic" ], "summary" : "Create a new notification topic ", "description" : "Only administrators of ZENSIE are authorised to call this operation. ", "operationId" : "createNotificationTopic", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/NewNotificationTopic" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "New notification topic created", "schema" : { "$ref" : "#/definitions/NotificationTopic" } }, "401" : { "description" : "Unauthenticated request, cannot perform operation", "schema" : { "type" : "string" } }, "403" : { "description" : "User not allowed to perform the operation" }, "409" : { "description" : "A notification topic with the given id already exists" } } } }, "/notification-topic/{notificationTopicId}" : { "get" : { "tags" : [ "notification-topic" ], "summary" : "Retrieve a notification topic with the given id.", "description" : "Default oauth authentication mechanism required for this operation.", "operationId" : "getNotificationTopic", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "notificationTopicId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Notification topic", "schema" : { "$ref" : "#/definitions/NotificationTopic" } }, "401" : { "description" : "Unauthenticated request, cannot perform operation", "schema" : { "type" : "string" } }, "403" : { "description" : "User not allowed to perform the operation" } } }, "delete" : { "tags" : [ "notification-topic" ], "summary" : "Delete a notification topic with the given id.", "description" : "Only administrators of ZENSIE are authorised to call this operation. ", "operationId" : "deleteNotificationTopic", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "notificationTopicId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Notification deleted", "schema" : { "$ref" : "#/definitions/NotificationTopic" } }, "401" : { "description" : "Unauthenticated request, cannot perform operation", "schema" : { "type" : "string" } }, "403" : { "description" : "User not allowed to perform the operation" } } } }, "/notification-topic-update/{notificationTopicId}" : { "post" : { "tags" : [ "notification-topic-update" ], "summary" : "Update a notification in the notification id.", "description" : "Only administrators of ZENSIE are authorised to call this operation. ", "operationId" : "updateNotificationTopic", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "notificationTopicId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/NotificationTopicUpdate" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "Notification updated", "schema" : { "$ref" : "#/definitions/NotificationTopic" } }, "401" : { "description" : "Unauthenticated request, cannot perform operation", "schema" : { "type" : "string" } }, "403" : { "description" : "User not allowed to perform the operation" } } } }, "/notification-update/{notificationId}" : { "post" : { "tags" : [ "notification-update" ], "summary" : "Update a notification in the notification id.", "description" : "Only organization owners, editors and administrators of ZENSIE are authorised to call this operation. ", "operationId" : "updateNotification", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "notificationId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/NotificationEditable" } } ], "security" : [ { "Bearer" : [ ] } ], "deprecated" : true, "responses" : { "201" : { "description" : "Notification updated", "schema" : { "$ref" : "#/definitions/Notification" } }, "403" : { "description" : "User not allowed to perform the operation" } } } }, "/offer/{offerId}" : { "put" : { "tags" : [ "offer" ], "summary" : "Update an offer.", "description" : "Authentication required for this operation.", "operationId" : "putOffer", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "offerId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/OfferEditable" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Offer updated", "schema" : { "$ref" : "#/definitions/Offer" } }, "400" : { "description" : "Invalid data in the properties to be updated." }, "403" : { "description" : "User not authorized." }, "500" : { "description" : "Error while updating the offer." } } }, "delete" : { "tags" : [ "offer" ], "summary" : "Delete an offer.", "description" : "Authentication required for this operation.", "operationId" : "deleteOffer", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "offerId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "204" : { "description" : "Offer has been deleted." }, "403" : { "description" : "User not authorized." }, "404" : { "description" : "Offer not found." } } }, "patch" : { "tags" : [ "offer" ], "summary" : "Patch an offer.", "description" : "Authentication required for this operation.", "operationId" : "patchOffer", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "offerId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/OfferEditable" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Offer patched", "schema" : { "$ref" : "#/definitions/Offer" } }, "400" : { "description" : "Invalid data in the properties to be patched." }, "403" : { "description" : "User not authorized." }, "500" : { "description" : "Error while patching the offer." } } } }, "/offer" : { "post" : { "tags" : [ "offer" ], "summary" : "Create a new offer.", "description" : "Authentication required for this operation.", "operationId" : "postOffer", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/NewOffer" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "New offer created.", "schema" : { "$ref" : "#/definitions/Offer" } }, "403" : { "description" : "User not authorized." } } } }, "/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", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "The organization.", "schema" : { "$ref" : "#/definitions/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", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "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", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "expandSites", "in" : "query", "description" : "Optionally expand sites info.Expensive query, will increase loading time", "required" : false, "type" : "boolean" }, { "name" : "expandSubscriptions", "in" : "query", "description" : "Optionally expand subscriptions info.Expensive query, will increase loading time", "required" : false, "type" : "boolean" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "List with all the organizations", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/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", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/OrganizationNew" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "New organization created", "schema" : { "$ref" : "#/definitions/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." } } } }, "/organization/{organizationId}/site/{siteId}" : { "get" : { "tags" : [ "organization" ], "summary" : "Return the site.", "description" : "", "operationId" : "getSite", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "siteId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Return the site with the given id", "schema" : { "$ref" : "#/definitions/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", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "siteId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/SiteEditable" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Site updated", "schema" : { "$ref" : "#/definitions/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" } } } }, "/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", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "locationId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/SiteEditable" } } ], "security" : [ { "Bearer" : [ ] } ], "deprecated" : true, "responses" : { "200" : { "description" : "Location activated", "schema" : { "$ref" : "#/definitions/Site" } }, "403" : { "description" : "User is not authorized to perform this operation." }, "404" : { "description" : "Location not found." }, "409" : { "description" : "Location is already active." } } } }, "/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", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "siteId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/SiteEditable" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Site activated", "schema" : { "$ref" : "#/definitions/Site" } }, "403" : { "description" : "User is not authorized to perform this operation." }, "404" : { "description" : "Site not found." }, "409" : { "description" : "Site is already active." } } } }, "/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", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "email", "in" : "path", "required" : true, "type" : "string" }, { "name" : "licenseId", "in" : "query", "required" : false, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/OrganizationMembership" } } ], "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" } } }, "put" : { "tags" : [ "organization" ], "summary" : "Modify user organization membership.", "description" : "Authentication required for this operation, authenticated user have admin role.", "operationId" : "modifyOrganizationMembership", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "email", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/OrganizationMembership" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Organization membership has been modified.", "schema" : { "$ref" : "#/definitions/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." } } }, "delete" : { "tags" : [ "organization" ], "summary" : "Remove user organization membership.", "description" : "Authentication required for this operation, authenticated user have admin role.", "operationId" : "deleteOrganizationMembership", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "email", "in" : "path", "required" : true, "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", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "locationId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "type" : "object" } } ], "security" : [ { "Bearer" : [ ] } ], "deprecated" : true, "responses" : { "200" : { "description" : "Location deactivated", "schema" : { "$ref" : "#/definitions/Site" } }, "403" : { "description" : "User is not authorized to perform this operation." }, "404" : { "description" : "Locations not found" } } } }, "/organization/{organizationId}/site/{siteId}/deactivate" : { "post" : { "tags" : [ "organization" ], "summary" : "Deactivates a site.", "description" : "Only system administrators can deactivate site.", "operationId" : "deactivateSite", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "siteId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "type" : "object" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Site deactivated", "schema" : { "$ref" : "#/definitions/Site" } }, "403" : { "description" : "User is not authorized to perform this operation." }, "404" : { "description" : "Site not found" } } } }, "/organization/{organizationId}/location/{locationId}" : { "delete" : { "tags" : [ "organization" ], "summary" : "Delete site.", "description" : "", "operationId" : "deleteSubscriptionLocation", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "locationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "permanently", "in" : "query", "description" : "Optional bool to specify the permanent deletion of the subscription location.", "required" : false, "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", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "notUsed", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "deprecated" : true, "responses" : { "200" : { "description" : "All the organizations including the roles for the current user in each of them.", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/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", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "email", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "All the organizations for the user.", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/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", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "All the organizations for the current user.", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/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", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "expandSites", "in" : "query", "description" : "Include sites information", "required" : false, "type" : "boolean" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "List all billable organizations with optional sites details", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/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", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/NewSite" } } ], "security" : [ { "Bearer" : [ ] } ], "deprecated" : true, "responses" : { "201" : { "description" : "New site requested", "schema" : { "$ref" : "#/definitions/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." } } } }, "/organization/{organizationId}/site" : { "post" : { "tags" : [ "organization" ], "summary" : "Request a new site.", "description" : "Only organization owners can request sites.", "operationId" : "requestSite", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/NewSite" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "New site requested", "schema" : { "$ref" : "#/definitions/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." } } } }, "/organization-update/{organizationId}" : { "post" : { "tags" : [ "organization-update" ], "summary" : "Update an organization", "description" : "Authentication required for this operation.Preconditions:Authenticated user has to be owner of the organization, or be an admin in the platform.", "operationId" : "updateOrganization", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/OrganizationEditable" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Organization updated", "schema" : { "$ref" : "#/definitions/Organization" } }, "400" : { "description" : "Invalid data in the properties to be updated" }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "An organization with that id doesn't exist" } } } }, "/organization-update/{organizationId}/user/{email}" : { "post" : { "tags" : [ "organization-update" ], "summary" : "Modify user organization membership.", "description" : "Use the PUT /organization/{organizationId}/user/{email} endpoint instead. \n\nAuthentication required for this operation, authenticated user have admin role.", "operationId" : "updateOrganizationMembership", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "email", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/OrganizationMembershipUpdate" } } ], "security" : [ { "Bearer" : [ ] } ], "deprecated" : true, "responses" : { "200" : { "description" : "Organization membership has been modified.", "schema" : { "$ref" : "#/definitions/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." } } } }, "/partner" : { "post" : { "tags" : [ "partner" ], "summary" : "Create a new partner.", "description" : "Authentication required for this operation, authenticated user must have admin role.", "operationId" : "createPartner", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/NewPartner" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "New partner created.", "schema" : { "$ref" : "#/definitions/Partner" } }, "403" : { "description" : "User must be an admin." } } } }, "/partner/{partnerId}" : { "put" : { "tags" : [ "partner" ], "summary" : "Update a partner.", "description" : "Authentication required for this operation, authenticated user must have admin role.", "operationId" : "updatePartner", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "partnerId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/PartnerEditable" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Partner updated", "schema" : { "$ref" : "#/definitions/Partner" } }, "400" : { "description" : "Invalid data in the properties to be updated." }, "403" : { "description" : "User must be authenticated." }, "500" : { "description" : "Error while updating the partner." } } }, "delete" : { "tags" : [ "partner" ], "summary" : "Remove a partner.", "description" : "Authentication required for this operation, authenticated user must have admin role.", "operationId" : "removePartner", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "partnerId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Partner has been removed." }, "403" : { "description" : "User must be an admin." }, "404" : { "description" : "Partner not found." } } } }, "/pricing/default/{currencyId}" : { "post" : { "tags" : [ "pricing" ], "summary" : "Pricing", "description" : "Authentication required for this operation.", "operationId" : "addDefaultPricingForCurrency", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "currencyId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/Pricing" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Pricing entry created" }, "403" : { "description" : "Not enough permissions to perform the operation" }, "400" : { "description" : "The pricing record already exists" } } } }, "/pricing" : { "post" : { "tags" : [ "pricing" ], "summary" : "Pricing", "description" : "Authentication required for this operation.", "operationId" : "addPricingToOrganization", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/Pricing" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Pricing entry created" }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "Organization does not exist" }, "400" : { "description" : "The pricing record already exists" } } } }, "/pricing/organization/{organizationId}" : { "get" : { "tags" : [ "pricing" ], "summary" : "Return pricing for organization", "description" : "Authentication required for this operation.", "operationId" : "getPricingByOrganizationId", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Pricing for the organization" }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "Pricing does not exist for the organization" } } } }, "/pricing/organization/{organizationId}/year/{year}/month/{month}" : { "get" : { "tags" : [ "pricing" ], "summary" : "Return pricing for organization for the given year and month. Prior to September 2018 pricing for all organizations was in EUR. ", "description" : "Authentication required for this operation.", "operationId" : "getPricingByOrganizationIdByYearAndMonth", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "year", "in" : "path", "required" : true, "type" : "string" }, { "name" : "month", "in" : "path", "required" : true, "type" : "string" }, { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Pricing for the organization" }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "Pricing does not exist for the organization" } } } }, "/pricing-update/organization/{organizationId}" : { "post" : { "tags" : [ "pricing-update" ], "summary" : "Update a pricing record for an organization", "description" : "Authentication required for this operation.
Preconditions:
Authenticated user has to be an admin in the platform.", "operationId" : "updatePricing", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/PricingUpdate" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Pricing record updated", "schema" : { "$ref" : "#/definitions/Pricing" } }, "400" : { "description" : "Invalid data in the properties to be updated" }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "A pricing record for that organization doesn't exist" } } } }, "/product" : { "get" : { "tags" : [ "product" ], "summary" : "Gets all the products.", "description" : "Authentication required for this operation.", "operationId" : "getAllProducts", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "All the products", "schema" : { "$ref" : "#/definitions/Product" } }, "403" : { "description" : "Not enough permissions to perform the operation" } } }, "post" : { "tags" : [ "product" ], "summary" : "Create a new product.", "description" : "Authentication required for this operation.", "operationId" : "createProduct", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/NewProduct" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Product created.", "schema" : { "$ref" : "#/definitions/Product" } }, "400" : { "description" : "Bad request - missing product or bad syntax in product data" }, "403" : { "description" : "Not enough permissions to perform the operation. User must be admin." } }, "x-admin-only" : true } }, "/product/{productId}" : { "get" : { "tags" : [ "product" ], "summary" : "Gets the product with the specified id.", "description" : "Authentication required for this operation.", "operationId" : "getProduct", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "productId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "The product with the specified id", "schema" : { "$ref" : "#/definitions/Product" } }, "403" : { "description" : "Not enough permissions to perform the operation" } } }, "delete" : { "tags" : [ "product" ], "summary" : "Remove product.", "description" : "Authentication required for this operation, authenticated user have admin role.", "operationId" : "deleteProduct", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "productId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Product has been removed.", "schema" : { "$ref" : "#/definitions/Product" } }, "403" : { "description" : "User is not authorized to perform this operation. an admin." }, "404" : { "description" : "Product not found." } }, "x-admin-only" : true } }, "/product-update/{productId}" : { "post" : { "tags" : [ "product-update" ], "summary" : "Update a product with a given product id", "description" : "Authentication required for this operation.
Preconditions:
Authenticated user has to be an admin in the platform.", "operationId" : "updateProduct", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "productId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/ProductUpdate" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Product updated", "schema" : { "$ref" : "#/definitions/Product" } }, "400" : { "description" : "Invalid data in the properties to be updated" }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "A product with the specified id doesn't exist" } } } }, "/sensor/{sensorId}" : { "post" : { "tags" : [ "sensor" ], "summary" : "Create a sensor check", "description" : "Authentication required for this operation.
Preconditions:", "operationId" : "createSensor", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "sensorId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/CheckProperties" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "New sensor check created, including its generated check id", "schema" : { "$ref" : "#/definitions/Check" } }, "400" : { "description" : "Location does not belong to the organization" }, "403" : { "description" : "Not enough permissions to perform the operation" } } } }, "/sensor/organization/{organizationId}/location/{locationName}/{sensorId}" : { "post" : { "tags" : [ "sensor" ], "summary" : "Create a sensor check", "description" : "Authentication required for this operation.
Preconditions:", "operationId" : "createSensorForOrganization", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "locationName", "in" : "path", "required" : true, "type" : "string" }, { "name" : "sensorId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/CheckProperties" } } ], "security" : [ { "Bearer" : [ ] } ], "deprecated" : true, "responses" : { "201" : { "description" : "New sensor check created, including its generated check id", "schema" : { "$ref" : "#/definitions/Check" } }, "400" : { "description" : "Location does not belong to the organization" }, "403" : { "description" : "Not enough permissions to perform the operation" } } } }, "/sensor/{checkId}/voltage" : { "get" : { "tags" : [ "sensor" ], "summary" : "Return the current voltage level of the sensor or null if not available.", "description" : "Authentication required for this operation.
Preconditions:", "operationId" : "getVoltage", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "checkId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Voltage level of the sensor returned", "schema" : { "$ref" : "#/definitions/VoltageResponse" } }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "Sensor with that id doesn't exist" } } } }, "/sensor-type/{sensorTypeId}" : { "get" : { "tags" : [ "sensor-type", "integrate", "robocrops" ], "summary" : "Returns the sensor type with the specified type id.", "description" : "Default oauth authentication mechanism required for this operation.", "operationId" : "getSensorType", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "sensorTypeId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "The sensor type with the specified id", "schema" : { "$ref" : "#/definitions/SensorType" } }, "401" : { "description" : "Unauthenticated request, cannot perform operation", "schema" : { "type" : "string" } }, "404" : { "description" : "A sensor type with that id does not exist", "schema" : { "type" : "string" } }, "500" : { "description" : "Error obtaining the sensor type persisted data", "schema" : { "type" : "string" } } } }, "post" : { "tags" : [ "sensor-type" ], "summary" : "Creates new sensor types.", "description" : "Authentication required for this operation, authenticated user has admin role.", "operationId" : "createSensorType", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/SensorTypeUpdate" } }, { "name" : "sensorTypeId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "New sensor type created", "schema" : { "$ref" : "#/definitions/SensorType" } }, "400" : { "description" : "Sensor type data missing or incomplete." }, "403" : { "description" : "User is not authorized to perform this operation. Should be admin." }, "409" : { "description" : "A sensor type with the given id already exists" } } }, "delete" : { "tags" : [ "sensor-type" ], "summary" : "Remove sensor type.", "description" : "Authentication required for this operation, authenticated user have admin role.", "operationId" : "deleteSensorType", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "sensorTypeId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "204" : { "description" : "Sensor type has been removed." }, "400" : { "description" : "The sensor type is currently used by existing checks and cannot be removed." }, "403" : { "description" : "User is not authorized to perform this operation. Should be admin." }, "404" : { "description" : "Sensor type not found." } } } }, "/sensor-type/external/organization/{organizationId}" : { "get" : { "tags" : [ "sensor-type" ], "summary" : "Returns all the external sensor types for the given organization.", "description" : "Default oauth authentication mechanism required for this operation.", "operationId" : "getAllExternalSensorTypesByOrganization", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "The list of all external sensor types for the given organization", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/SensorType" } } }, "401" : { "description" : "Unauthenticated request, cannot perform operation", "schema" : { "type" : "string" } }, "403" : { "description" : "User not allowed to perform the operation" }, "404" : { "description" : "Organization does not exist" }, "500" : { "description" : "Error obtaining the sensor type persisted data", "schema" : { "type" : "string" } } } } }, "/sensor-type/organization/{organizationId}/location/{locationName}" : { "get" : { "tags" : [ "sensor-type" ], "summary" : "Returns all the sensor types for the given organization and location.", "description" : "Default oauth authentication mechanism required for this operation.", "operationId" : "getAllInternalSensorTypesByOrganizationAndLocation", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "locationName", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "The list of all sensor types for the given organization and location", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/SensorType" } } }, "401" : { "description" : "Unauthenticated request, cannot perform operation", "schema" : { "type" : "string" } }, "403" : { "description" : "User not allowed to perform the operation" }, "404" : { "description" : "Organization and / or location do not exist" }, "500" : { "description" : "Error obtaining the sensor type persisted data", "schema" : { "type" : "string" } } } } }, "/sensor-type/organization/{organizationId}" : { "get" : { "tags" : [ "sensor-type" ], "summary" : "Returns all the private sensor types of an organization.", "description" : "Default oauth authentication mechanism required for this operation.", "operationId" : "getAllPrivateSensorTypes", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "The list of all private sensor types", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/SensorType" } } }, "401" : { "description" : "Unauthenticated request, cannot perform operation", "schema" : { "type" : "string" } }, "500" : { "description" : "Error obtaining the sensor type persisted data", "schema" : { "type" : "string" } } } }, "post" : { "tags" : [ "sensor-type" ], "summary" : "Creates new private sensor type.", "description" : "Authentication required for this operation, authenticated user has admin role or must be an owner/editor of the organization.", "operationId" : "createPrivateSensorType", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/SensorTypeUpdate" } }, { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "New sensor type created", "schema" : { "$ref" : "#/definitions/SensorType" } }, "400" : { "description" : "Sensor type data missing or incomplete." }, "403" : { "description" : "User is not authorized to perform this operation. Should be admin or organization owner/editor." }, "409" : { "description" : "A sensor type with the given id already exists" } } } }, "/sensor-type" : { "get" : { "tags" : [ "sensor-type", "integrate", "robocrops" ], "summary" : "Returns all the public sensor types.", "description" : "Default oauth authentication mechanism required for this operation.", "operationId" : "getAllPublicSensorTypes", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "The list of all public sensor types", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/SensorType" } } }, "401" : { "description" : "Unauthenticated request, cannot perform operation", "schema" : { "type" : "string" } }, "500" : { "description" : "Error obtaining the sensor type persisted data", "schema" : { "type" : "string" } } } } }, "/sensor-type/all" : { "get" : { "tags" : [ "sensor-type" ], "summary" : "Get all sensor types (public and private).", "description" : "Authentication required for this operation, authenticated user has admin role.", "operationId" : "getAllSensorTypes", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "The list of all sensor types (public and private)", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/SensorType" } } }, "401" : { "description" : "User is not authorized to perform this operation. Should be admin." }, "500" : { "description" : "Error obtaining the sensor type persisted data" } } } }, "/sensor-type/user/{email}" : { "get" : { "tags" : [ "sensor-type" ], "summary" : "Returns all the sensor types a user has access to.", "description" : "Default oauth authentication mechanism required for this operation.", "operationId" : "getAllUserHasAccessTo", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "email", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "The list of all the sensor types the user has access to", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/SensorType" } } }, "401" : { "description" : "Unauthenticated request, cannot perform operation", "schema" : { "type" : "string" } }, "500" : { "description" : "Error obtaining the sensor types", "schema" : { "type" : "string" } } } } }, "/sensor-type/external/{sensorTypeId}" : { "get" : { "tags" : [ "sensor-type" ], "summary" : "External sensor data template.", "description" : "Authentication required for this operation.", "operationId" : "getExternalSensorDataTemplate", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "sensorTypeId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "External sensor data template.", "schema" : { "type" : "string" } }, "403" : { "description" : "Not enough permissions to perform the operation. User must be admin." } } } }, "/sensor-type-update/{sensorTypeId}" : { "post" : { "tags" : [ "sensor-type-update" ], "summary" : "Update a sensor type setting", "description" : "Authentication required for this operation.", "operationId" : "updateSensorType", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/SensorTypeUpdate" } }, { "name" : "sensorTypeId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Notification setting updated", "schema" : { "$ref" : "#/definitions/SensorType" } }, "400" : { "description" : "Invalid data in the properties to be updated" }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "A sensor type with that id doesn't exist" } } } }, "/shared-check" : { "post" : { "tags" : [ "shared-check" ], "summary" : "Share one or more checks with one or more users or with a group", "description" : "Only admins and organization owners/editors can share checks.", "operationId" : "createSharedCheck", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/NewSharedCheck" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Check(s) shared successfully", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/SharedCheck" } } }, "400" : { "description" : "Invalid data in one or more of the check properties." }, "403" : { "description" : "Not enough permissions to perform the operation" } } } }, "/shared-check/{sharedCheckId}" : { "get" : { "tags" : [ "shared-check" ], "summary" : "Gets a specific shared check ", "description" : "Admins and shared-with user can get a specific shared check", "operationId" : "getSharedCheck", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "sharedCheckId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Shared check returned" }, "403" : { "description" : "Unauthorized to get this shared check" }, "500" : { "description" : "Server error while getting shared check" } } }, "delete" : { "tags" : [ "shared-check" ], "summary" : "Deletes a specific shared check ", "description" : "Admins, owners and editors can delete a specific shared check", "operationId" : "deleteSharedCheck", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "sharedCheckId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "204" : { "description" : "Shared check deleted" }, "403" : { "description" : "Unauthorized to delete this shared check" }, "500" : { "description" : "Server error while deleting shared check" } } } }, "/shared-check/from/organization/{organizationId}" : { "get" : { "tags" : [ "shared-check" ], "summary" : "Returns all the checks for the given organization that have been shared", "description" : "Only admin users and organization members have permission to get this list of checks.", "operationId" : "getChecksFromOrganizationThatHaveBeenShared", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "List of checks in the organization that have been shared", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/SharedCheck" } } }, "403" : { "description" : "Not enough permissions to perform the operation" } } } }, "/shared-check/by/{by}" : { "get" : { "tags" : [ "shared-check" ], "summary" : "Returns all the checks shared by the given user", "description" : "An admin user will see all checks shared by the requested user; a non-admin user can only request to see checks shared by themselves.", "operationId" : "getChecksSharedByUser", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "by", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "List of checks shared by the given user.", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/SharedCheck" } } }, "400" : { "description" : "Not a valid e-mail address." }, "403" : { "description" : "Not enough permissions to perform the operation." } } } }, "/shared-check/with/{with}" : { "get" : { "tags" : [ "shared-check" ], "summary" : "Returns all the checks shared with the requested user by the current user ", "description" : "An admin user will see all checks shared with the requested user; a non-admin user can only request to see checks shared with themselves.", "operationId" : "getChecksSharedWithUser", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "with", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "List of checks shared with the given user.", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/SharedCheck" } } }, "400" : { "description" : "Not a valid e-mail address." }, "403" : { "description" : "Not enough permissions to perform the operation" } } } }, "/shared-check/check/{checkId}" : { "get" : { "tags" : [ "shared-check" ], "summary" : "Returns the details (shared by who, shared with who etc) of a check that has been shared.", "description" : "An admin user can see details of all checks; non-admin users see can details of checks from within their organisation.", "operationId" : "listSharedCheckDetails", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "checkId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Share details for a given check.", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/SharedCheck" } } }, "400" : { "description" : "Not a valid e-mail address." }, "403" : { "description" : "Not enough permissions to perform the operation" } } }, "delete" : { "tags" : [ "shared-check" ], "summary" : "Turn sharing off for a check", "description" : "Admins,owners and editors can stop sharing a check", "operationId" : "turnSharingOff", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "checkId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "204" : { "description" : "Sharing turned off for this check" }, "403" : { "description" : "Unauthorized to turn sharing off for this check" }, "500" : { "description" : "Server error while turning off sharing for this check" } } } }, "/shared-check/with-group/{groupId}" : { "get" : { "tags" : [ "shared-check" ], "summary" : "Get the sensors belonging a group", "description" : "", "operationId" : "viewSensors", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "groupId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "List of sensors", "schema" : { "$ref" : "#/definitions/SharedCheck" } }, "403" : { "description" : "User is not authorized to perform this operation, user must be admin or belong to the group" }, "500" : { "description" : "Sorry, there was a problem retrieving the sensors." } } } }, "/shared-dashboard" : { "post" : { "tags" : [ "shared-dashboard" ], "summary" : "Share one or more dashboards with one or more users", "description" : "Only admins and organization owners/editors can share dashboards.", "operationId" : "createSharedDashboard", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/NewSharedDashboard" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Dashboard(s) shared successfully", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/SharedDashboard" } } }, "400" : { "description" : "Invalid data in one or more of the dashboard properties." }, "403" : { "description" : "Not enough permissions to perform the operation" } } } }, "/shared-dashboard/{sharedDashboardId}" : { "get" : { "tags" : [ "shared-dashboard" ], "summary" : "Gets a specific shared dashboard ", "description" : "Admins and shared-with user can get a specific shared dashboard", "operationId" : "getSharedDashboard", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "sharedDashboardId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Shared dashboard returned", "schema" : { "$ref" : "#/definitions/SharedDashboard" } }, "403" : { "description" : "Unauthorized to get this shared dashboard" }, "500" : { "description" : "Server error while getting shared dashboard" } } }, "delete" : { "tags" : [ "shared-dashboard" ], "summary" : "Deletes a specific shared dashboard ", "description" : "Admins, owners and editors can delete a specific shared dashboard", "operationId" : "deleteSharedDashboard", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "sharedDashboardId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "204" : { "description" : "Shared dashboard deleted" }, "403" : { "description" : "Unauthorized to delete this shared dashboard" }, "500" : { "description" : "Server error while deleting shared dashboard" } } } }, "/shared-dashboard/from/organization/{organizationId}" : { "get" : { "tags" : [ "shared-dashboard" ], "summary" : "Returns all the dashboards for the given organization that have been shared", "description" : "Only admin users and organization members have permission to get this list of dashboards.", "operationId" : "getDashboardsFromOrganizationThatHaveBeenShared", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "List of dashboards in the organization that have been shared", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/SharedDashboard" } } }, "403" : { "description" : "Not enough permissions to perform the operation" } } } }, "/shared-dashboard/by/{by}" : { "get" : { "tags" : [ "shared-dashboard" ], "summary" : "Returns all the dashboards shared by the given user", "description" : "An admin user will see all dashboards shared by the requested user; a non-admin user can only request to see dashboards shared by themselves.", "operationId" : "getDashboardsSharedByUser", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "by", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "List of dashboards shared by the given user.", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/SharedDashboard" } } }, "400" : { "description" : "Not a valid e-mail address." }, "403" : { "description" : "Not enough permissions to perform the operation." } } } }, "/shared-dashboard/with/{with}" : { "get" : { "tags" : [ "shared-dashboard" ], "summary" : "Returns all the dashboards shared with the requested user by the current user ", "description" : "An admin user will see all dashboards shared with the requested user; a non-admin user can only request to see dashboards shared with themselves.", "operationId" : "getDashboardsSharedWithUser", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "with", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "List of dashboards shared with the given user.", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/SharedDashboard" } } }, "400" : { "description" : "Not a valid e-mail address." }, "403" : { "description" : "Not enough permissions to perform the operation" } } } }, "/shared-dashboard/dashboard/{dashboardId}" : { "get" : { "tags" : [ "shared-dashboard" ], "summary" : "Returns the details (shared by who, shared with who etc) of a dashboard that has been shared.", "description" : "An admin user can see details of all dashboards; non-admin users see can details of dashboards from within their organisation.", "operationId" : "listSharedDashboardDetails", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "dashboardId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "List of dashboards shared with the given user.", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/SharedDashboard" } } }, "400" : { "description" : "Not a valid e-mail address." }, "403" : { "description" : "Not enough permissions to perform the operation" } } }, "delete" : { "tags" : [ "shared-dashboard" ], "summary" : "Turn sharing off for a dashboard", "description" : "Admins,owners and editors can stop sharing a dashboard", "operationId" : "turnSharingOffForDashboard", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "dashboardId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "204" : { "description" : "Sharing turned off for this dashboard" }, "403" : { "description" : "Unauthorized to turn sharing off for this dashboard" }, "500" : { "description" : "Server error while turning off sharing for this dashboard" } } } }, "/shared-dashboard-update/{sharedDashboardId}" : { "post" : { "tags" : [ "shared-dashboard-update" ], "summary" : "Apply an update to the given dashboard.", "description" : "Only admins and the user this shared dashboard belongs to can edit it", "operationId" : "updateSharedDashboard", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "sharedDashboardId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/SharedDashboardUpdate" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Dashboard updated", "schema" : { "$ref" : "#/definitions/SharedDashboard" } }, "403" : { "description" : "User not allowed to perform the operation" } } } }, "/share-sensor-type/shared-by/organization/{organizationId}" : { "get" : { "tags" : [ "share-sensor-type" ], "summary" : "Returns all sensor types shared by an organization.", "description" : "Default oauth authentication mechanism required for this operation.", "operationId" : "getSharedByOrganization", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Shared sensor types", "schema" : { "$ref" : "#/definitions/SharedSensorType" } }, "403" : { "description" : "User must be an admin or an organization editor/owner." } } } }, "/share-sensor-type/{sensorTypeId}/shared-with" : { "get" : { "tags" : [ "share-sensor-type" ], "summary" : "Get shared information about the sensor type.", "description" : "Authentication required for this operation.", "operationId" : "getSharedSensorTypeSharedWith", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "sensorTypeId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Sensor type shared with information", "schema" : { "$ref" : "#/definitions/SensorType" } }, "403" : { "description" : "User must match be admin or owner/editor of the sensor type's organization." }, "500" : { "description" : "Sorry, there was a problem retrieving the shared information." } } } }, "/share-sensor-type/sensor-type/{sensorTypeId}/group/{groupId}" : { "post" : { "tags" : [ "share-sensor-type" ], "summary" : "Share a sensor type with a group.", "description" : "Authentication required for this operation.", "operationId" : "shareSensorTypeWithGroup", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "sensorTypeId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "groupId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "type" : "object" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Sensor type shared", "schema" : { "$ref" : "#/definitions/SharedSensorType" } }, "403" : { "description" : "User must be an admin or an organization editor/owner." }, "500" : { "description" : "Sorry, there was a problem sharing the sensor type." } } } }, "/share-sensor-type/sensor-type/{sensorTypeId}/organization/{organizationId}" : { "post" : { "tags" : [ "share-sensor-type" ], "summary" : "Share a sensor type with an organization.", "description" : "Authentication required for this operation.", "operationId" : "shareSensorTypeWithOrganization", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "sensorTypeId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "type" : "object" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Sensor type shared", "schema" : { "$ref" : "#/definitions/SharedSensorType" } }, "403" : { "description" : "User must be an admin or an organization editor/owner." }, "500" : { "description" : "Sorry, there was a problem sharing the sensor type." } } } }, "/share-sensor-type/sensor-type/{sensorTypeId}/user/{email}" : { "post" : { "tags" : [ "share-sensor-type" ], "summary" : "Share a sensor type with a user.", "description" : "Authentication required for this operation.", "operationId" : "shareSensorTypeWithUser", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "sensorTypeId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "email", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "type" : "object" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Sensor type shared", "schema" : { "$ref" : "#/definitions/SharedSensorType" } }, "403" : { "description" : "User must be an admin or an organization editor/owner." }, "500" : { "description" : "Sorry, there was a problem sharing the sensor type." } } } }, "/share-sensor-type/group/{groupId}" : { "get" : { "tags" : [ "share-sensor-type" ], "summary" : "Get shared sensor types with a group.", "description" : "Authentication required for this operation.", "operationId" : "sharedSensorTypesWithGroup", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "groupId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Shared sensor types", "schema" : { "$ref" : "#/definitions/SensorType" } }, "403" : { "description" : "User must be an admin or a group editor/owner." }, "500" : { "description" : "Sorry, there was a problem retrieving the shared sensor types." } } } }, "/share-sensor-type/organization/{organizationId}" : { "get" : { "tags" : [ "share-sensor-type" ], "summary" : "Get shared sensor types with an organization.", "description" : "Authentication required for this operation.", "operationId" : "sharedSensorTypesWithOrganization", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Shared sensor types", "schema" : { "$ref" : "#/definitions/SensorType" } }, "403" : { "description" : "User must be an admin or an organization editor/owner." }, "500" : { "description" : "Sorry, there was a problem retrieving the shared sensor types." } } } }, "/share-sensor-type/user/{email}" : { "get" : { "tags" : [ "share-sensor-type" ], "summary" : "Get shared sensor types shared with a user.", "description" : "Authentication required for this operation.", "operationId" : "sharedSensorTypesWithUser", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "email", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Shared sensor types", "schema" : { "$ref" : "#/definitions/SensorType" } }, "403" : { "description" : "User must match the email or be admin." }, "500" : { "description" : "Sorry, there was a problem retrieving the shared sensor types." } } } }, "/share-sensor-type/{sharedSensorTypeId}" : { "delete" : { "tags" : [ "share-sensor-type" ], "summary" : "Unshare a sensor type.", "description" : "Authentication required for this operation.", "operationId" : "unshareSensorType", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "sharedSensorTypeId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Sensor type unshared", "schema" : { "$ref" : "#/definitions/SharedSensorType" } }, "403" : { "description" : "User must be an admin or an organization editor/owner." }, "500" : { "description" : "Sorry, there was a problem unsharing the sensor type." } } } }, "/site" : { "get" : { "tags" : [ "site" ], "summary" : "Return all permitted sites for the user.", "description" : "", "operationId" : "getAllPermittedSites", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "query", "required" : false, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Return all permitted sites for the user", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/Site" } } }, "500" : { "description" : "Internal server error" } } } }, "/site/organization/{organizationId}/site/{siteId}/data-sources" : { "get" : { "tags" : [ "site" ], "summary" : "Return data sources in site.", "description" : "", "operationId" : "getDataSourcesBySite", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "siteId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "expandCoordinates", "in" : "query", "description" : "Include coordinates information", "required" : false, "type" : "boolean" }, { "name" : "expandCoordinateHistory", "in" : "query", "description" : "Include coordinate history for each data source (may increase response size)", "required" : false, "type" : "boolean" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Return data sources site with the given uuid", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/Sensor" } } }, "403" : { "description" : "User is not authorized to perform this operation" }, "404" : { "description" : "Site not found" }, "500" : { "description" : "Internal server error" } } } }, "/site/{siteUuid}" : { "get" : { "tags" : [ "site" ], "summary" : "Return site with the given uuid.", "description" : "", "operationId" : "getSiteByUuid", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "siteUuid", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Return site with the given uuid", "schema" : { "$ref" : "#/definitions/Site" } }, "403" : { "description" : "User is not authorized to perform this operation" }, "404" : { "description" : "Site not found" }, "500" : { "description" : "Internal server error" } } } }, "/soil" : { "get" : { "tags" : [ "soil" ], "summary" : "Return all soils.", "description" : "Authentication required for this operation.", "operationId" : "getPublicSoils", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Returns all soils.", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/Soil" } } }, "403" : { "description" : "Not enough permissions to perform the operation." } } }, "post" : { "tags" : [ "soil" ], "summary" : "Create a new soil.", "description" : "Authentication required for this operation.", "operationId" : "createSoil", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/NewSoil" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "New soil created.", "schema" : { "$ref" : "#/definitions/Soil" } }, "403" : { "description" : "User not authorized." }, "409" : { "description" : "Soil already exists" } } } }, "/soil/{soilId}" : { "get" : { "tags" : [ "soil" ], "summary" : "Return the soil with the given id.", "description" : "Authentication required for this operation.", "operationId" : "getSoilById", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "soilId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "The soil.", "schema" : { "$ref" : "#/definitions/Soil" } }, "403" : { "description" : "Not enough permissions to perform the operation." } } }, "put" : { "tags" : [ "soil" ], "summary" : "Update a soil.", "description" : "Authentication required for this operation.", "operationId" : "putSoil", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "soilId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/SoilEditable" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Soil updated", "schema" : { "$ref" : "#/definitions/Soil" } }, "400" : { "description" : "Invalid data in the properties to be updated." }, "403" : { "description" : "User not authorized." }, "500" : { "description" : "Error while updating the soil." } } }, "delete" : { "tags" : [ "soil" ], "summary" : "Delete a soil.", "description" : "Authentication required for this operation.", "operationId" : "deleteSoil", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "soilId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "204" : { "description" : "Soil has been deleted." }, "403" : { "description" : "User not authorized." }, "404" : { "description" : "Soil not found." } } }, "patch" : { "tags" : [ "soil" ], "summary" : "Patch a soil.", "description" : "Authentication required for this operation.", "operationId" : "patchSoil", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "soilId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/SoilEditable" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Soil patched", "schema" : { "$ref" : "#/definitions/Soil" } }, "400" : { "description" : "Invalid data in the properties to be patched." }, "403" : { "description" : "User must be authenticated." }, "500" : { "description" : "Error while patching the soil." } } } }, "/soil/organization/{organizationId}" : { "get" : { "tags" : [ "soil" ], "summary" : "Return soils available to the organization.", "description" : "Authentication required for this operation.", "operationId" : "getSoilsForOrganization", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Return soils available to the organization, i.e public soils and the organization's custom soils.", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/Soil" } } }, "403" : { "description" : "Not enough permissions to perform the operation." } } } }, "/subscription-assignment" : { "get" : { "tags" : [ "subscription-assignment" ], "summary" : "Return all subscription assignments.", "description" : "Authentication required for this operation.", "operationId" : "getAllSubscriptionAssignments", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Returns all subscription assignments.", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/SubscriptionAssignment" } } }, "403" : { "description" : "Not enough permissions to perform the operation." } }, "x-admin-only" : true }, "post" : { "tags" : [ "subscription-assignment" ], "summary" : "Create a new subscription assignment.", "description" : "Authentication required for this operation.", "operationId" : "createSubscriptionAssignment", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/SubscriptionAssignment" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "New subscription assignment created.", "schema" : { "$ref" : "#/definitions/SubscriptionAssignment" } }, "403" : { "description" : "User not authorized." } } } }, "/subscription-assignment/license/{licenseId}/subscription/{subscriptionId}/organization/{organizationId}" : { "delete" : { "tags" : [ "subscription-assignment" ], "summary" : "Delete a subscription assignment.", "description" : "Authentication required for this operation.", "operationId" : "deleteSubscriptionAssignment", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "licenseId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "subscriptionId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "204" : { "description" : "SubscriptionAssignment has been deleted." }, "403" : { "description" : "User not authorized." }, "404" : { "description" : "SubscriptionAssignment not found." } } } }, "/subscription-assignment/organization/{organizationId}" : { "get" : { "tags" : [ "subscription-assignment" ], "summary" : "Return the subscription assignment in the given organization.", "description" : "Authentication required for this operation.", "operationId" : "getSubscriptionAssignmentForOrganization", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "The subscription assignment.", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/SubscriptionAssignment" } } }, "403" : { "description" : "Not enough permissions to perform the operation." } } } }, "/subscription" : { "get" : { "tags" : [ "subscription" ], "summary" : "Return all subscriptions.", "description" : "Authentication required for this operation.", "operationId" : "getAllSubscriptions", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Returns all subscriptions.", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/Subscription" } } }, "403" : { "description" : "Not enough permissions to perform the operation." }, "500" : { "description" : "Error while retrieving subscriptions." } } }, "post" : { "tags" : [ "subscription" ], "summary" : "Create a new subscription.", "description" : "Authentication required for this operation.", "operationId" : "createSubscription", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/SubscriptionNew" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "New subscription created.", "schema" : { "$ref" : "#/definitions/Subscription" } }, "404" : { "description" : "Required resource not found." }, "403" : { "description" : "Not enough permissions to perform the operation." }, "409" : { "description" : "Subscription already exists." }, "500" : { "description" : "Error while creating the subscription." } } } }, "/subscription/{subscriptionId}/license/{licenseId}" : { "get" : { "tags" : [ "subscription" ], "summary" : "Return the subscription with the given id.", "description" : "Authentication required for this operation.", "operationId" : "getSubscriptionById", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "subscriptionId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "licenseId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "The subscription.", "schema" : { "$ref" : "#/definitions/Subscription" } }, "404" : { "description" : "Subscription not found." }, "500" : { "description" : "Error while retrieving the subscription." } } }, "put" : { "tags" : [ "subscription" ], "summary" : "Update a subscription.", "description" : "Authentication required for this operation.", "operationId" : "putSubscription", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "subscriptionId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "licenseId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/SubscriptionEditable" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Subscription updated.", "schema" : { "$ref" : "#/definitions/Subscription" } }, "403" : { "description" : "Not enough permissions to perform the operation." }, "404" : { "description" : "Subscription not found." }, "500" : { "description" : "Error while patching the subscription." } } }, "delete" : { "tags" : [ "subscription" ], "summary" : "Delete a subscription.", "description" : "Authentication required for this operation.", "operationId" : "deleteSubscription", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "subscriptionId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "licenseId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "204" : { "description" : "Subscription has been deleted." }, "400" : { "description" : "Could not perform operation due to wrong input." }, "403" : { "description" : "Not enough permissions to perform the operation." }, "404" : { "description" : "Subscription not found." }, "500" : { "description" : "Error while deleting the subscription." } } }, "patch" : { "tags" : [ "subscription" ], "summary" : "Update the subscription with the given id.", "description" : "Authentication required for this operation.", "operationId" : "patchSubscription", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "subscriptionId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "licenseId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/SubscriptionEditable" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Subscription patched.", "schema" : { "$ref" : "#/definitions/Subscription" } }, "403" : { "description" : "Not enough permissions to perform the operation." }, "404" : { "description" : "Subscription not found." }, "500" : { "description" : "Error while patching the subscription." } } } }, "/subscription/license/{licenseId}" : { "get" : { "tags" : [ "subscription" ], "summary" : "Returns the subscriptions associated with the given license id.", "description" : "Authentication required for this operation.", "operationId" : "getSubscriptionsByLicenseId", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "licenseId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Returns all subscriptions associated with license.", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/Subscription" } } }, "403" : { "description" : "Not enough permissions to perform the operation." }, "404" : { "description" : "License not found." }, "500" : { "description" : "Error while retrieving subscriptions." } } } }, "/swagger/integrate.json" : { "get" : { "tags" : [ "swagger" ], "summary" : "Get the integrate JSON", "description" : "", "operationId" : "getCropSpaceFilteredJson", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ ], "responses" : { "200" : { "description" : "JSON retrieved successfully", "schema" : { "type" : "string" } }, "404" : { "description" : "Resource not found" } } } }, "/swagger/integrate" : { "get" : { "tags" : [ "swagger" ], "summary" : "Get the integrate swagger definition", "description" : "", "operationId" : "getCropSpaceFilteredSwagger", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ ], "responses" : { "200" : { "description" : "Definition retrieved successfully", "schema" : { "type" : "string" } }, "404" : { "description" : "Resource not found" }, "500" : { "description" : "Internal server error" } } } }, "/swagger/robocrops" : { "get" : { "tags" : [ "swagger" ], "summary" : "Get the robocrops swagger definition", "description" : "", "operationId" : "getRobocropsAPIDefinition", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ ], "responses" : { "200" : { "description" : "Definition retrieved successfully", "schema" : { "type" : "string" } }, "404" : { "description" : "Resource not found" }, "500" : { "description" : "Internal server error" } } } }, "/swagger/robocrops.json" : { "get" : { "tags" : [ "swagger" ], "summary" : "Get the robocrops JSON", "description" : "", "operationId" : "getRobocropsAPIJson", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ ], "responses" : { "200" : { "description" : "JSON retrieved successfully", "schema" : { "type" : "string" } }, "404" : { "description" : "Resource not found" } } } }, "/timezone" : { "get" : { "tags" : [ "timezone" ], "summary" : "Get the supported timezones", "description" : "", "operationId" : "getTimezones", "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/TimezoneDetails" }, "uniqueItems" : true } } } } }, "/user/{email}/config" : { "get" : { "tags" : [ "userconfig" ], "summary" : "Return all configs for a user.", "description" : "Authentication required for this operation.", "operationId" : "getAllConfigsForUser", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "email", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Returns all configs for the user.", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/UserConfig" } } }, "403" : { "description" : "Not enough permissions to perform the operation." } } }, "post" : { "tags" : [ "userconfig" ], "summary" : "Create a new config for a user.", "description" : "Authentication required for this operation.", "operationId" : "createUserConfig", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "email", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/UserConfigEditable" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "New user config created.", "schema" : { "$ref" : "#/definitions/UserConfig" } }, "403" : { "description" : "User not authorized." }, "410" : { "description" : "Config already exists." } } } }, "/user/{email}/config/{configKey}" : { "get" : { "tags" : [ "userconfig" ], "summary" : "Return a config for a user.", "description" : "Authentication required for this operation.", "operationId" : "getUserConfigForUser", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "email", "in" : "path", "required" : true, "type" : "string" }, { "name" : "configKey", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "The user config.", "schema" : { "$ref" : "#/definitions/UserConfig" } }, "403" : { "description" : "Not enough permissions to perform the operation." }, "404" : { "description" : "The config key for the user is not found." } } }, "put" : { "tags" : [ "userconfig" ], "summary" : "Update a config for a user.", "description" : "Authentication required for this operation.", "operationId" : "putUserConfig", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "email", "in" : "path", "required" : true, "type" : "string" }, { "name" : "configKey", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/UserConfigEditable" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "UserConfig updated", "schema" : { "$ref" : "#/definitions/UserConfig" } }, "400" : { "description" : "Invalid data in the properties to be updated." }, "403" : { "description" : "User not authorized." }, "500" : { "description" : "Error while updating the userconfig." } } }, "delete" : { "tags" : [ "userconfig" ], "summary" : "Delete a config for a user.", "description" : "Authentication required for this operation.", "operationId" : "deleteUserConfig", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "email", "in" : "path", "required" : true, "type" : "string" }, { "name" : "configKey", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "204" : { "description" : "UserConfig has been deleted." }, "403" : { "description" : "User not authorized." }, "404" : { "description" : "UserConfig not found." } } }, "patch" : { "tags" : [ "userconfig" ], "summary" : "Patch a config for user.", "description" : "Authentication required for this operation.", "operationId" : "patchUserConfig", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "email", "in" : "path", "required" : true, "type" : "string" }, { "name" : "configKey", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/UserConfigEditable" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "UserConfig patched", "schema" : { "$ref" : "#/definitions/UserConfig" } }, "400" : { "description" : "Invalid data in the properties to be patched." }, "403" : { "description" : "User must be authenticated." }, "500" : { "description" : "Error while patching the userconfig." } } } }, "/user" : { "get" : { "tags" : [ "user" ], "summary" : "Returns the stored information associated to the current user", "description" : "Default oauth authentication mechanism required for this operation.", "operationId" : "getUser", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "The user", "schema" : { "$ref" : "#/definitions/User" } }, "401" : { "description" : "Unauthenticated request" }, "404" : { "description" : "User not found" }, "500" : { "description" : "Error obtaining current user data" } } } }, "/user/sign-up" : { "post" : { "tags" : [ "user" ], "summary" : "Sign up.", "description" : "Signs up the requesting user. ", "operationId" : "signUp", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "description" : "The sign up request.", "required" : true, "schema" : { "$ref" : "#/definitions/SignUpRequest" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Signed up user.", "schema" : { "$ref" : "#/definitions/User" } }, "400" : { "description" : "Language is not supported." }, "403" : { "description" : "Invalid or expired authorization code." }, "404" : { "description" : "User not found." }, "500" : { "description" : "Internal server error" } } } }, "/user/change-password/{email}/{authorizationCode}" : { "post" : { "tags" : [ "user" ], "summary" : "Confirms the user's password change", "description" : "You can request an {authorizationCode} for your account at: GET '/user/change-password/{email}' .
This operation uses the {authorizationCode} sent via email by the previous operation: the authorization code for change the password emailed to the owner of the account requesting the change.\"
The {authorizationCode} will expired on 6 hours.The {authorizationCode} will be validated.", "operationId" : "changePassword", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "email", "in" : "path", "required" : true, "type" : "string" }, { "name" : "authorizationCode", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "description" : "Valid User information", "required" : true, "schema" : { "$ref" : "#/definitions/Credential" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Password changed." }, "400" : { "description" : "Password cannot be empty" }, "401" : { "description" : "This {authorizationCode} is not valid for this user." }, "500" : { "description" : "Error occurred when trying to save/obtain the user in the database" } } } }, "/user/all" : { "get" : { "tags" : [ "user" ], "summary" : "Returns all the system users. Operation reserved to system admins.", "description" : "Default oauth authentication mechanism required for this operation.", "operationId" : "getAllUsers", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "The users", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/User" } } }, "401" : { "description" : "Unauthenticated request" }, "500" : { "description" : "Error obtaining the users" } } } }, "/user/register/user/{email}" : { "post" : { "tags" : [ "user" ], "summary" : "Registers a new guest user that does not belong to any organization. Authorization code should be included.", "description" : "The authorization code should be for the given user and signed by ZENSIE.", "operationId" : "registerUser", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "email", "in" : "path", "required" : true, "type" : "string" }, { "name" : "authorizationCode", "in" : "query", "required" : false, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/UserCredentialsAsGuest" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "The user has been registered" } } } }, "/user/activate/user/{email}" : { "post" : { "tags" : [ "user" ], "summary" : "Activates a new user that was added as member of an organization.Authorization code should be included.", "description" : "The authorization code should be for the given user and signed by ZENSIE.", "operationId" : "activateUser", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "email", "in" : "path", "required" : true, "type" : "string" }, { "name" : "authorizationCode", "in" : "query", "required" : false, "type" : "string" }, { "in" : "body", "name" : "body", "description" : "User being activated", "required" : true, "schema" : { "$ref" : "#/definitions/Credential" } } ], "security" : [ { "Bearer" : [ ] } ], "deprecated" : true, "responses" : { "200" : { "description" : "The user has been activated" } } } }, "/user/account-managers" : { "get" : { "tags" : [ "user" ], "summary" : "Returns all the account managers.", "description" : "Default oauth authentication mechanism required for this operation.", "operationId" : "getAllAccountManagers", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "The account managers", "schema" : { "$ref" : "#/definitions/User" } }, "401" : { "description" : "Unauthenticated request" }, "500" : { "description" : "Error obtaining the account managers" } } } }, "/user/organization-member/organization/{organizationId}" : { "get" : { "tags" : [ "user" ], "summary" : "Returns the organization memberships that belong to an organization.", "description" : "Authentication required for this operation, authenticated user needs to be member of the organization.", "operationId" : "getOrganizationMemberships", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "The memberships associated with the organization.", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/OrganizationMembership" } } }, "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" } } } }, "/user/organization/{organizationId}" : { "get" : { "tags" : [ "user" ], "summary" : "Returns the users that belong to an organization.", "description" : "Authentication required for this operation, authenticated user needs to be member of the organization.", "operationId" : "getOrganizationUsers", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "The users associated with the organization.", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/User" }, "uniqueItems" : true } }, "401" : { "description" : "User is not authorized to perform this operation. She should be owner within the organization or an admin." }, "500" : { "description" : "Internal server error" } } } }, "/user/{email}" : { "get" : { "tags" : [ "user" ], "summary" : "Returns the requested User", "description" : "This operation is only for Administrators.
Default oauth authentication mechanism required for this operation.", "operationId" : "getUserByEmail", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "email", "in" : "path", "description" : "Valid user's email", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "The user", "schema" : { "$ref" : "#/definitions/User" } }, "401" : { "description" : "Unauthenticated request" }, "403" : { "description" : "Unauthorized access to an admin only user operation" }, "404" : { "description" : "User not found" } } }, "delete" : { "tags" : [ "user" ], "summary" : "Removes the user, along with all her notification settings of checks (follows). WARNING: Cannot be undone.", "description" : "Authentication required for this operation, admin level required.", "operationId" : "removeUser", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "email", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "The user and related data have been removed" }, "401" : { "description" : "Not authenticated or user is not admin" }, "404" : { "description" : "User not found" } } } }, "/user/has-api-key" : { "get" : { "tags" : [ "user" ], "summary" : "Checks if user has an api key", "description" : "User needs to be authenticated.", "operationId" : "hasAPIKey", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Return the API key" }, "401" : { "description" : "User not authenticated" } } } }, "/user/invite/organization/{organizationId}/role/{role}" : { "post" : { "tags" : [ "user" ], "summary" : "Invites valid users to join Zensie", "description" : "This operation is Admins and account managers only, and this operation depends on the client captcha configuration.
the {organizationId} will be validated ,
The account should be activated; an email with the account confirmation email will be sent, this is required in order to activate the account.
Default oauth authentication mechanism required for this operation, and a valid captcha client.", "operationId" : "invite", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "role", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "description" : "User information", "required" : true, "schema" : { "$ref" : "#/definitions/UserNew" } }, { "name" : "licenseId", "in" : "query", "required" : false, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "successful operation", "schema" : { "$ref" : "#/definitions/User" } }, "201" : { "description" : "The user has been invited", "schema" : { "$ref" : "#/definitions/User" } }, "401" : { "description" : "Unauthenticated request" }, "404" : { "description" : "User not found" }, "409" : { "description" : "User already exists." }, "500" : { "description" : "Error storing current user data and/or sending the activation email." } } } }, "/user/invite" : { "post" : { "tags" : [ "user" ], "summary" : "Invites a user to an organization", "description" : "", "operationId" : "inviteUser", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "description" : "Invite details", "required" : true, "schema" : { "$ref" : "#/definitions/UserInviteRequest" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "successful operation", "schema" : { "$ref" : "#/definitions/User" } }, "201" : { "description" : "The user has been invited", "schema" : { "$ref" : "#/definitions/User" } }, "400" : { "description" : "Malformed request or referenced organization does not exist" }, "401" : { "description" : "Unauthenticated request" }, "403" : { "description" : "Caller lacks permission to invite to this organization" }, "409" : { "description" : "Email is already an active user" }, "500" : { "description" : "Error storing the new user or sending the activation email" } } } }, "/user/api-key/request" : { "post" : { "tags" : [ "user" ], "summary" : "Requests an API key for the authenticated user. If user already had an API key, it is replaced by the new one.", "description" : "", "operationId" : "requestAPIKey", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "API key created", "schema" : { "$ref" : "#/definitions/UserToken" } } } } }, "/user/api-key/request-with-password" : { "post" : { "tags" : [ "user" ], "summary" : "Requests an API key for a user with valid username and password. If user already had an API key, it is replaced by the new one. It is effectively the same as the api-key/request endpoint, the difference being that this endpoint authenticates a user by username/password, whereas apikey/request authenticates via JWT token.", "description" : "", "operationId" : "requestAPIKeyWithUsernameAndPassword", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "description" : "Username and password of user requesting api key", "required" : true, "schema" : { "$ref" : "#/definitions/Credential" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "API key created", "schema" : { "$ref" : "#/definitions/UserToken" } } } } }, "/user/change-password/{email}" : { "get" : { "tags" : [ "user" ], "summary" : "Request to make a password change for the user with given email", "description" : "This operation sends an email to the user with a link to perform the password change.
", "operationId" : "requestChangePassword", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "email", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Successful password change request, please check your email and follow the instructions." }, "400" : { "description" : "A user with that email doesn't exist." }, "500" : { "description" : "Error sending the password change to the email account " } } } }, "/user/api-key" : { "delete" : { "tags" : [ "user" ], "summary" : "Revokes the current API key for the authenticated user", "description" : "User needs to be authenticated.", "operationId" : "revokeAPIKey", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "API key was revoked" }, "401" : { "description" : "Unauthenticated request" } } } }, "/user/{email}/api-key" : { "delete" : { "tags" : [ "user" ], "summary" : "Revokes the current API key for the user with the given email address", "description" : "User needs to be authenticated and an administrator.", "operationId" : "revokeAPIKeyForUser", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "email", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "API key was revoked" }, "401" : { "description" : "Unauthenticated or unauthorized to perform the operation" } } } }, "/user-update/{email}" : { "post" : { "tags" : [ "user-update" ], "summary" : "Update an user", "description" : "Authentication required for this operation.Preconditions:Authenticated user has to request to update himself (herself) or in case of requesting to change other users: to be owner of the organization, or be an admin in the platform.", "operationId" : "updateUser", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "email", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/UserEditable" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "User updated", "schema" : { "$ref" : "#/definitions/User" } }, "400" : { "description" : "Invalid data in the properties to be updated" }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "An user with that email doesn't exist" }, "406" : { "description" : "The user's first name and last name cannot be empty" } } } }, "/user-update/{email}/favoritePage" : { "post" : { "tags" : [ "user-update" ], "summary" : "Add a favorite page to a user", "description" : "Authentication required for this operation.", "operationId" : "addFavoritePage", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "email", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/WebPageReference" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "User updated", "schema" : { "$ref" : "#/definitions/User" } }, "400" : { "description" : "Invalid data in the properties to be updated" }, "403" : { "description" : "User is not authorized to perform this operation." } } }, "delete" : { "tags" : [ "user-update" ], "summary" : "Remove a favorite page for a user", "description" : "Authentication required for this operation.", "operationId" : "removeFavoritePage", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "email", "in" : "path", "required" : true, "type" : "string" }, { "name" : "url", "in" : "query", "required" : false, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "User updated", "schema" : { "$ref" : "#/definitions/User" } }, "400" : { "description" : "Invalid data in the properties to be updated" }, "403" : { "description" : "User is not authorized to perform this operation." } } } }, "/widget/dashboard/{dashboardId}" : { "get" : { "tags" : [ "widget" ], "summary" : "Return all the widgets of the given dashboard.", "description" : "Only organization members or administrators of ZENSIE are authorised to call this operation.", "operationId" : "listWidgets", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "dashboardId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "widgetId", "in" : "query", "description" : "The widget id", "required" : false, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "List of dashboard widgets returned", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/Widget" } } }, "403" : { "description" : "User not allowed to make this call" } } }, "post" : { "tags" : [ "widget" ], "summary" : "Create one or more widgets in the dashboard given.", "description" : "Organization owners, editors and administrators of ZENSIE are authorised to call this operation. ", "operationId" : "createWidgets", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "dashboardId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/NewWidget" } } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "New widgets created", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/Widget" } } }, "403" : { "description" : "User not allowed to perform the operation" } } } }, "/widget/{widgetId}" : { "get" : { "tags" : [ "widget" ], "summary" : "Retrieve a widget", "description" : "", "operationId" : "getWidget", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "widgetId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "The widget", "schema" : { "$ref" : "#/definitions/Widget" } }, "403" : { "description" : "User not allowed to make this call" } } }, "delete" : { "tags" : [ "widget" ], "summary" : "Delete a widget from its dashboard.", "description" : "Organization owners, editors and administrators of ZENSIE are authorised to call this operation. ", "operationId" : "deleteWidget", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "widgetId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Widget deleted" }, "403" : { "description" : "User not allowed to perform the operation" } } } }, "/widget/clone/{widgetId}" : { "post" : { "tags" : [ "widget" ], "summary" : "Clones the widget to an optional target dashboard. If target dashboard is not set, the widget is duplicated in its own dashboard.", "description" : "", "operationId" : "cloneWidgetInDashboard", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "widgetId", "in" : "path", "description" : "ID of the widget to clone.", "required" : true, "type" : "string" }, { "name" : "targetDashboardId", "in" : "query", "description" : "ID of the target dashboard where to clone the widget.", "required" : false, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "Cloned widget created", "schema" : { "$ref" : "#/definitions/Widget" } }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "Some object was not found" } } } }, "/widget/organization/{organizationId}" : { "post" : { "tags" : [ "widget" ], "summary" : "Create one or more widgets in the given organization.", "description" : "", "operationId" : "createOrganizationWidgets", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/NewWidget" } } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "New widgets created", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/Widget" } } }, "403" : { "description" : "User not allowed to perform the operation" } } } }, "/widget-update/{widgetId}" : { "post" : { "tags" : [ "widget-update" ], "summary" : "Updates the widget.", "description" : "Organization owners, editor or administrators of ZENSIE are authorised to call this operation. ", "operationId" : "updateWidget", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "widgetId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/WidgetUpdate" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Widget updated", "schema" : { "$ref" : "#/definitions/Widget" } }, "403" : { "description" : "User not allowed to perform the operation" } } } }, "/zone/organization/{organizationId}/site/{siteId}/zone/{zoneId}" : { "put" : { "tags" : [ "zone" ], "summary" : "Patch a zone (PUT not supported).", "description" : "Authentication required for this operation.", "operationId" : "putZone", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "siteId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "zoneId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/ZoneEditable" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Zone patched", "schema" : { "$ref" : "#/definitions/Zone" } }, "400" : { "description" : "Invalid data in the properties to be patched." }, "403" : { "description" : "User not authorized." }, "404" : { "description" : "Zone not found." }, "500" : { "description" : "Error while patching the zone." } } }, "delete" : { "tags" : [ "zone" ], "summary" : "Delete a zone.", "description" : "Authentication required for this operation.", "operationId" : "deleteZone", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "siteId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "zoneId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "204" : { "description" : "Zone has been deleted." }, "403" : { "description" : "User not authorized." }, "404" : { "description" : "Zone not found." } } }, "patch" : { "tags" : [ "zone" ], "summary" : "Patch a zone.", "description" : "Authentication required for this operation.", "operationId" : "patchZone", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "siteId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "zoneId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/ZoneEditable" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Zone patched", "schema" : { "$ref" : "#/definitions/Zone" } }, "400" : { "description" : "Invalid data in the properties to be patched." }, "403" : { "description" : "User must be authenticated." }, "404" : { "description" : "Zone not found." }, "500" : { "description" : "Error while patching the zone." } } } }, "/zone/organization/{organizationId}/site/{siteId}" : { "post" : { "tags" : [ "zone" ], "summary" : "Create a new zone.", "description" : "Authentication required for this operation.", "operationId" : "createZone", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "siteId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/ZoneNew" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "New zone created.", "schema" : { "$ref" : "#/definitions/Zone" } }, "403" : { "description" : "User not authorized." }, "404" : { "description" : "Zone not found." } } } }, "/app-installation/{installationId}/activate" : { "post" : { "tags" : [ "app-installation" ], "summary" : "Activate app installation", "description" : "Only system administrators can activate app installations.", "operationId" : "activateAppInstallation", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "installationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "App installation activated.", "schema" : { "$ref" : "#/definitions/AppInstallation" } }, "403" : { "description" : "Not enough permissions to perform the operation." }, "404" : { "description" : "App installation does not exist." } } } }, "/app-installation/{installationId}/deactivate" : { "post" : { "tags" : [ "app-installation" ], "summary" : "Deactivate app installation", "description" : "Only system administrators can deactivate app installations.", "operationId" : "deactivateAppInstallation", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "installationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "App installation deactivated.", "schema" : { "$ref" : "#/definitions/AppInstallation" } }, "403" : { "description" : "Not enough permissions to perform the operation." }, "404" : { "description" : "App installation does not exist." } } } }, "/app-installation/{installationId}/configuration/{configKey}" : { "put" : { "tags" : [ "app-installation" ], "summary" : "Put a dynamic configuration.", "description" : "Authentication required for this operation.", "operationId" : "putDynamicConfiguration", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "installationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "configKey", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "type" : "object", "additionalProperties" : { "type" : "object" } } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Returns installation the put configuration belongs to.", "schema" : { "$ref" : "#/definitions/AppInstallation" } }, "403" : { "description" : "User must be authenticated." }, "404" : { "description" : "Configuration not found." }, "510" : { "description" : "Error - configuration not updated." } } }, "delete" : { "tags" : [ "app-installation" ], "summary" : "Delete a dynamic configuration.", "description" : "Authentication required for this operation.", "operationId" : "deleteAppConfiguration", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "installationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "configKey", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Return active dynamic configurations.", "schema" : { "type" : "object", "additionalProperties" : { "type" : "object" } } }, "403" : { "description" : "User must be authenticated." }, "404" : { "description" : "Installation not found." }, "510" : { "description" : "Error - configuration not deleted." } } }, "patch" : { "tags" : [ "app-installation" ], "summary" : "Patch a dynamic configuration, or creates it if does not exist.", "description" : "Authentication required for this operation.", "operationId" : "patchDynamicConfiguration", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "installationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "configKey", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "type" : "object", "additionalProperties" : { "type" : "object" } } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Returns installation the patched configuration belongs to.", "schema" : { "$ref" : "#/definitions/AppInstallation" } }, "403" : { "description" : "User must be authenticated." }, "404" : { "description" : "Installation not found." }, "510" : { "description" : "Error - configuration not updated." } } } }, "/app-installation/{installationId}" : { "get" : { "tags" : [ "app-installation" ], "summary" : "Return app installation", "description" : "Authentication required for this operation.", "operationId" : "getAppInstallation", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "installationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "expandOrganization", "in" : "query", "description" : "Whether to return the organization it belongs to", "required" : false, "type" : "boolean" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Returns app installation.", "schema" : { "$ref" : "#/definitions/AppInstallation" } }, "403" : { "description" : "Not enough permissions to perform the operation." }, "404" : { "description" : "App installation does not exist." } } }, "delete" : { "tags" : [ "app-installation" ], "summary" : "Uninstall a ZENSIE application.", "description" : "Authentication required for this operation, authenticated user must have admin role.", "operationId" : "uninstallApp", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "installationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "permanently", "in" : "query", "required" : false, "type" : "boolean" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "204" : { "description" : "Uninstall succeeded." }, "403" : { "description" : "User is not authorized to perform operation, must be an admin." }, "404" : { "description" : "AppInstallation not found." }, "510" : { "description" : "Error - app not uninstalled." } } } }, "/app-installation/{installationId}/configuration" : { "get" : { "tags" : [ "app-installation" ], "summary" : "Return installation's active configuration.", "description" : "Authentication required for this operation.", "operationId" : "getAppInstallationConfiguration", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "installationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Returns installation's active configuration.", "schema" : { "type" : "object", "additionalProperties" : { "type" : "object" } } }, "403" : { "description" : "Not enough permissions to perform the operation." }, "404" : { "description" : "Installation not found." } } } }, "/app-installation/{installationId}/configuration/{date}" : { "get" : { "tags" : [ "app-installation" ], "summary" : "Return installation's configuration for a specific date.", "description" : "Authentication required for this operation.", "operationId" : "getAppInstallationConfigurationAtDate", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "installationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "date", "in" : "path", "description" : "Date string. ISO 8601 date. E.g.: '2016-03-03T00:00:00Z'", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Returns installation's configuration for a specific date.", "schema" : { "type" : "object", "additionalProperties" : { "type" : "object" } } }, "403" : { "description" : "Not enough permissions to perform the operation." } } } }, "/app-installation/{installationId}/configuration/prefix/{prefix}" : { "get" : { "tags" : [ "app-installation" ], "summary" : "Returns app configurations with a given prefix.", "description" : "Authentication required for this operation.", "operationId" : "getAppInstallationConfigurationWithPrefix", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "installationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "prefix", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Returns app installation configurations with a specific prefix.", "schema" : { "type" : "object", "additionalProperties" : { "type" : "object" } } }, "403" : { "description" : "Not enough permissions to perform the operation." } } } }, "/app-installation/organization/{organizationId}" : { "get" : { "tags" : [ "app-installation" ], "summary" : "Return app installations for the organization.", "description" : "Authentication required for this operation.", "operationId" : "getAppInstallations", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "includeInactive", "in" : "query", "required" : false, "type" : "boolean" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Returns app installations.", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/AppInstallation" } } }, "403" : { "description" : "Not enough permissions to perform the operation." } } } }, "/app-installation/app/{appId}" : { "get" : { "tags" : [ "app-installation" ], "summary" : "Return all active app installations with the given appId.", "description" : "Authentication required for this operation, authenticated user must have admin role.", "operationId" : "getAppInstallationsForApp", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "appId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Returns active app installations.", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/AppInstallation" } } }, "403" : { "description" : "User is not authorized to perform operation, must be an admin." } } } }, "/app-installation/organization/{organizationId}/location/{locationId}/app/{appId}" : { "post" : { "tags" : [ "app-installation" ], "summary" : "Install a ZENSIE application.", "description" : "Authentication required for this operation", "operationId" : "installApp", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "locationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "appId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/NewAppInstallation" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "App installed", "schema" : { "$ref" : "#/definitions/AppInstallation" } }, "400" : { "description" : "Configuration values must be either strings or json objects." }, "403" : { "description" : "User must be authenticated." }, "500" : { "description" : "Error while installing the app." } } } }, "/app-installation-update/{installationId}" : { "post" : { "tags" : [ "app-installation-update" ], "summary" : "Update an application installation.", "description" : "Authentication required for this operation", "operationId" : "updateAppInstallation", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "installationId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/AppInstallationEditable" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "App updated", "schema" : { "$ref" : "#/definitions/AppInstallation" } }, "400" : { "description" : "Configuration values must be either strings or json objects." }, "403" : { "description" : "User must be authenticated." }, "500" : { "description" : "Error while updating the app installation." } } } }, "/app/{appId}" : { "get" : { "tags" : [ "app" ], "summary" : "Return the app with the given id.", "description" : "Authentication required for this operation.", "operationId" : "getAppById", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "appId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "The app.", "schema" : { "$ref" : "#/definitions/App" } }, "404" : { "description" : "App not found." }, "403" : { "description" : "Not enough permissions to perform the operation." } } }, "delete" : { "tags" : [ "app" ], "summary" : "Delete an application.", "description" : "Authentication required for this operation, authenticated user have admin role.", "operationId" : "deleteApp", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "appId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "permanently", "in" : "query", "description" : "Optional bool to specify the permanent deletion of the app.", "required" : false, "type" : "boolean" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "204" : { "description" : "Deletion succeeded." }, "403" : { "description" : "User is not authorized to perform this operation." }, "404" : { "description" : "Application not found" } } } }, "/app" : { "get" : { "tags" : [ "app" ], "summary" : "Return all published extensions.", "description" : "Authentication required for this operation, authenticated user have admin role.", "operationId" : "getPublishedExtensions", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Returns published extensions.", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/App" } } }, "403" : { "description" : "User must be an admin." } }, "x-admin-only" : true }, "post" : { "tags" : [ "app" ], "summary" : "Create a new application.", "description" : "Authentication required for this operation, authenticated user have admin role.", "operationId" : "createApp", "consumes" : [ "multipart/form-data" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "file", "in" : "formData", "required" : false, "type" : "file" }, { "name" : "content-length", "in" : "header", "required" : false, "type" : "integer", "format" : "int64" }, { "name" : "properties", "in" : "formData", "required" : true, "type" : "ref" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "New application created", "schema" : { "$ref" : "#/definitions/App" } }, "403" : { "description" : "User must be an admin." } } } }, "/app/all" : { "get" : { "tags" : [ "app" ], "summary" : "Return all extensions.", "description" : "Authentication required for this operation.", "operationId" : "getAllApps", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Returns all extensions.", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/App" } } }, "403" : { "description" : "Not enough permissions to perform the operation." } }, "x-admin-only" : true } }, "/app/installable" : { "get" : { "tags" : [ "app" ], "summary" : "Return installable extensions.", "description" : "Authentication required for this operation, authenticated user have admin role.", "operationId" : "getInstallableExtensions", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Returns installable extensions.", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/App" } } }, "403" : { "description" : "User must be an admin." } }, "x-admin-only" : true } }, "/app/{appId}/publish" : { "post" : { "tags" : [ "app" ], "summary" : "Publish an application.", "description" : "Authentication required for this operation, authenticated user have admin role.", "operationId" : "publishApp", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "appId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "type" : "object" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Application published", "schema" : { "$ref" : "#/definitions/App" } }, "403" : { "description" : "User is not authorized to perform this operation." }, "404" : { "description" : "Application not found" } } } }, "/app/{appId}/submit" : { "post" : { "tags" : [ "app" ], "summary" : "Submit an application.", "description" : "Authentication required for this operation.", "operationId" : "submitApp", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "appId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "type" : "object" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Application submitted", "schema" : { "$ref" : "#/definitions/App" } }, "403" : { "description" : "User is not authorized to perform this operation." }, "404" : { "description" : "Application not found" } } } }, "/app/{appId}/logo" : { "post" : { "tags" : [ "app" ], "summary" : "Upload a logo for an application.", "description" : "Authentication required for this operation, authenticated user have admin role.", "operationId" : "uploadLogoForApp", "consumes" : [ "multipart/form-data" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "appId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "logo", "in" : "formData", "required" : false, "type" : "file" }, { "name" : "content-length", "in" : "header", "required" : false, "type" : "integer", "format" : "int64" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "Logo uploaded", "schema" : { "$ref" : "#/definitions/DataUpload" } }, "403" : { "description" : "User must be an admin." } } } }, "/app-update/{appId}/logo" : { "post" : { "tags" : [ "app-update" ], "summary" : "Update a logo for an extension.", "description" : "Authentication required for this operation, authenticated user should be organisation owner or admin.", "operationId" : "updateLogoForExtension", "consumes" : [ "multipart/form-data" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "appId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "logo", "in" : "formData", "required" : false, "type" : "file" }, { "name" : "content-length", "in" : "header", "required" : false, "type" : "integer", "format" : "int64" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Logo updated", "schema" : { "$ref" : "#/definitions/DataUpload" } }, "403" : { "description" : "User has no owner rights in organization." } } } }, "/app-update/{appId}/properties" : { "put" : { "tags" : [ "app-update" ], "summary" : "Patch an application's properties.", "description" : "Authentication required for this operation", "operationId" : "updateAppProperties", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "appId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/AppEditable" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "App patched", "schema" : { "$ref" : "#/definitions/App" } }, "400" : { "description" : "Invalid input." }, "403" : { "description" : "User must be authenticated." }, "500" : { "description" : "Error while patching the application." } } } }, "/app-update/{installableId}" : { "post" : { "tags" : [ "app-update" ], "summary" : "Update an installable.", "description" : "Authentication required for this operation", "operationId" : "updateInstallable", "consumes" : [ "multipart/form-data" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "content-length", "in" : "header", "required" : false, "type" : "integer", "format" : "int64" }, { "name" : "file", "in" : "formData", "required" : false, "type" : "file" }, { "name" : "installableId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "properties", "in" : "formData", "required" : true, "type" : "ref" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "App updated", "schema" : { "$ref" : "#/definitions/App" } }, "400" : { "description" : "Configuration values must be either strings or json objects." }, "403" : { "description" : "User must be authenticated." }, "500" : { "description" : "Error while updating the app installation." } } } }, "/calculation/{calculationId}" : { "get" : { "tags" : [ "calculation", "integrate", "robocrops" ], "summary" : "Get a calculation", "description" : "", "operationId" : "getCalculation", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "calculationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Calculation retrieved", "schema" : { "$ref" : "#/definitions/Calculation" } }, "403" : { "description" : "User not allowed to view the calculation" }, "500" : { "description" : "Sorry, there was a problem getting the calculation." } } }, "post" : { "tags" : [ "calculation", "integrate", "robocrops" ], "summary" : "Perform calculation.", "description" : "", "operationId" : "calculate", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "calculationId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/CalculationSettings" } }, { "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, "type" : "boolean", "default" : false } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Calculation has been performed.", "schema" : { "type" : "object", "additionalProperties" : { "type" : "object" } } }, "403" : { "description" : "User is not authorized to perform this operation." }, "404" : { "description" : "Calculation not found." } } }, "delete" : { "tags" : [ "calculation" ], "summary" : "Remove calculation.", "description" : "Authentication required for this operation, authenticated user must have admin role.", "operationId" : "deleteCalculation", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "calculationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "204" : { "description" : "Calculation has been removed." }, "403" : { "description" : "User is not authorized to perform this operation, they must be an admin." }, "404" : { "description" : "Calculation not found." } } } }, "/calculation" : { "post" : { "tags" : [ "calculation" ], "summary" : "Create a new calculation.", "description" : "Authentication required for this operation, authenticated user have admin role.", "operationId" : "createCalculation", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/NewCalculation" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "New calculation created", "schema" : { "$ref" : "#/definitions/Calculation" } }, "403" : { "description" : "User must be an admin." } } } }, "/calculation-update/{calculationId}" : { "post" : { "tags" : [ "calculation-update" ], "summary" : "Update a calculation.", "description" : "Authentication required for this operation", "operationId" : "updateAppConfiguration", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "calculationId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/CalculationEditable" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "Calculation updated", "schema" : { "$ref" : "#/definitions/Calculation" } }, "403" : { "description" : "User must be admin." }, "500" : { "description" : "Error while updating the calculation." } } } }, "/app/cultiwatch/drop" : { "post" : { "tags" : [ "app-cultiwatch" ], "summary" : "Returns the drop calculation. ", "description" : "The authenticated user must have the cultiwatch app within an organization", "operationId" : "getDrop", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/CheckStatsRequest" } }, { "name" : "intervalSize", "in" : "query", "description" : "Size of the time intervals in which to aggregate the data. This parameter is given as a number of minutes, hours, days or weeks, or monthly, e.g. '5m' is five minutes, '1h' is one hour, '5d' is five days, '2w' is two weeks and 'M' is monthly. The optional 'f' prefix is used to retrieve the full interval according to the provided unit, e.g. 'f1w' will retrieve the last full week (Mon to Sun), 'f2d' will retrieve the last two full days (Wed and Thu if it is Fri).", "required" : false, "type" : "string" }, { "name" : "timezoneOffset", "in" : "query", "description" : "The timezone offset, in hours, for which to return the data. For example, 2 for Europe/Amsterdam. -3 for America/Argentina/Buenos_Aires. If empty, then UTC/GMT time is assumed, but it's probably not what you want. See list of timezones: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones", "required" : false, "type" : "integer", "format" : "int32" }, { "name" : "irrigationStartHour", "in" : "query", "description" : "Irrigation start time in hours (e.g. '8' if it starts at 8 in the morning)", "required" : true, "type" : "integer", "format" : "int32" }, { "name" : "irrigationPeriodMargin", "in" : "query", "description" : "Margin that is added to irrigation start and end period in hours. Default is 2 hours", "required" : false, "type" : "integer", "format" : "int32" }, { "name" : "irrigationFrequency", "in" : "query", "description" : "Maximum period between watering cycles during irrigation in seconds. Default is 7200 (2 hours)", "required" : false, "type" : "integer", "format" : "int32" }, { "name" : "minIrrigationSlope", "in" : "query", "description" : "To find out when irrigation starts and stops we calculate the derivative. What should the minimum slope be? (default 0)", "required" : false, "type" : "number", "format" : "double" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Returns the drop calculation", "schema" : { "$ref" : "#/definitions/DropResponse" } }, "403" : { "description" : "Unauthorized to perform the operation. User must have access to cultiwatch app or be an admin." } } } }, "/app/cultiwatch/drop/interval/{interval}" : { "post" : { "tags" : [ "app-cultiwatch" ], "summary" : "Returns multiple drop calculation by interval. ", "description" : "The authenticated user must have the cultiwatch app within an organization", "operationId" : "getDropByInterval", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/CheckStatsRequest" } }, { "name" : "interval", "in" : "path", "description" : "Intervals allowed : c, today, (f)1h, (f)2h, ..., (f)xh, (f)1d, (f)2d, ..., (f)xd, (f)1w, (f)2w, ..., (f)xw, (f)1M, (f)2M, ..., (f)xM. ", "required" : true, "type" : "string" }, { "name" : "intervalSize", "in" : "query", "description" : "Size of the time intervals in which to aggregate the data. This parameter is given as a number of minutes, hours, days or weeks, or monthly, e.g. '5m' is five minutes, '1h' is one hour, '5d' is five days, '2w' is two weeks and 'M' is monthly. The optional 'f' prefix is used to retrieve the full interval according to the provided unit, e.g. 'f1w' will retrieve the last full week (Mon to Sun), 'f2d' will retrieve the last two full days (Wed and Thu if it is Fri).", "required" : false, "type" : "string" }, { "name" : "timezoneOffset", "in" : "query", "description" : "The timezone offset, in hours, for which to return the data. For example, 2 for Europe/Amsterdam. -3 for America/Argentina/Buenos_Aires. If empty, then UTC/GMT time is assumed, but it's probably not what you want. See list of timezones: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones", "required" : false, "type" : "integer", "format" : "int32" }, { "name" : "irrigationStartHour", "in" : "query", "description" : "Irrigation start time in hours (e.g. '8' if it starts at 8 in the morning)", "required" : true, "type" : "integer", "format" : "int32" }, { "name" : "irrigationPeriodMargin", "in" : "query", "description" : "Margin that is added to irrigation start and end period in hours. Default is 2 hours", "required" : false, "type" : "integer", "format" : "int32" }, { "name" : "irrigationFrequency", "in" : "query", "description" : "Maximum period between watering cycles during irrigation in seconds. Default is 7200 (2 hours)", "required" : false, "type" : "integer", "format" : "int32" }, { "name" : "minIrrigationSlope", "in" : "query", "description" : "To find out when irrigation starts and stops we calculate the derivative. What should the minimum slope be? (default 0)", "required" : false, "type" : "number", "format" : "double" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Returns the drop calculations by interval", "schema" : { "$ref" : "#/definitions/DropResponse" } }, "403" : { "description" : "Unauthorized to perform the operation. User must have access to cultiwatch app or be an admin." } } } }, "/app/irrigation/trigger-sensor-aggregation" : { "post" : { "tags" : [ "app-irrigation" ], "summary" : "Trigger an aggregation of irrigation management sensors", "description" : "The authenticated user must be an admin", "operationId" : "triggerSensorAggregation", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "type" : "object" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Successfully aggregated irrigation management sensors." }, "403" : { "description" : "Unauthorized to perform the operation. User must be an admin." } } } }, "/customer-request-item/{customerRequestItemId}" : { "get" : { "tags" : [ "customer-request-item" ], "summary" : "Returns the customer request item with the specified id.", "description" : "The authenticated user must be an administrator.", "operationId" : "getCustomerRequestItemById", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "customerRequestItemId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "The quote item with the given id.", "schema" : { "$ref" : "#/definitions/CustomerRequestItem" } }, "403" : { "description" : "Not enough permissions to perform the operation" } } }, "delete" : { "tags" : [ "customer-request-item" ], "summary" : "Remove customer request item.", "description" : "The authenticated user must be an administrator.", "operationId" : "removeQuote", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "customerRequestItemId", "in" : "path", "required" : true, "type" : "array", "items" : { "type" : "string" }, "collectionFormat" : "csv" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Customer request item has been removed.", "schema" : { "$ref" : "#/definitions/CustomerRequestItem" } }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "The customer request item not found." } } } }, "/customer-request-item" : { "post" : { "tags" : [ "customer-request-item" ], "summary" : "Add a new customer request items.", "description" : "The authenticated user must be an administrator.", "operationId" : "addCustomerRequestItem", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/NewCustomerRequestItem" } } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Customer request items added" }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "Organization does not exist" } } } }, "/customer-request-item-update" : { "post" : { "tags" : [ "customer-request-item-update" ], "summary" : "Updates customer request items", "description" : "The authenticated user must be an administrator.", "operationId" : "updateCustomerRequestItem", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/CustomerRequestItemUpdate" } } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Customer request items updated" }, "400" : { "description" : "Invalid data in the properties to be updated" }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "A customer request item with that id doesn't exist" } } } }, "/customer-request" : { "post" : { "tags" : [ "customer-request" ], "summary" : "Add a customer request.", "description" : "The authenticated user must be an administrator or have an account manager role.", "operationId" : "addCustomerRequest", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/NewCustomerRequest" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Customer request added", "schema" : { "$ref" : "#/definitions/CustomerRequest" } }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "Organization does not exist" } } } }, "/customer-request/{customerRequestId}" : { "get" : { "tags" : [ "customer-request" ], "summary" : "Returns the customer request with the specified id.", "description" : "The authenticated user must be an administrator.", "operationId" : "getCustomerRequestById", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "customerRequestId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "The customer request with the given id.", "schema" : { "$ref" : "#/definitions/CustomerRequest" } }, "403" : { "description" : "Not enough permissions to perform the operation" } } }, "delete" : { "tags" : [ "customer-request" ], "summary" : "Remove a customer request id.", "description" : "Operation reserved to administrators.", "operationId" : "removeCustomerRequest", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "customerRequestId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Customer request has been removed." }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "The customer request was not found." } } } }, "/customer-request/organization/{organizationId}" : { "get" : { "tags" : [ "customer-request" ], "summary" : "Returns the customer requests for the given organization", "description" : "The authenticated user must be an administrator.", "operationId" : "getCustomerRequestsByOrganizationId", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "The customer requests for the specified organization.", "schema" : { "$ref" : "#/definitions/CustomerRequest" } }, "403" : { "description" : "Not enough permissions to perform the operation" } } } }, "/customer-request-update/{customerRequestId}" : { "post" : { "tags" : [ "customer-request-update" ], "summary" : "Updates a customer request", "description" : "The authenticated user must be an administrator.", "operationId" : "updateCustomerRequest", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/CustomerRequestUpdate" } }, { "name" : "customerRequestId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "CustomerRequest updated", "schema" : { "$ref" : "#/definitions/CustomerRequest" } }, "400" : { "description" : "Invalid data in the properties to be updated" }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "A quote with that id doesn't exist" } } } }, "/dealer" : { "get" : { "tags" : [ "dealer" ], "summary" : "Returns all dealers.", "description" : "The authenticated user must be an administrator.", "operationId" : "getDealers", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Dealers", "schema" : { "$ref" : "#/definitions/Dealer" } }, "403" : { "description" : "Not enough permissions to perform the operation" } } }, "post" : { "tags" : [ "dealer" ], "summary" : "Add a dealer.", "description" : "The authenticated user must be an administrator.", "operationId" : "addDealer", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/Dealer" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Dealer added", "schema" : { "$ref" : "#/definitions/Dealer" } }, "403" : { "description" : "Not enough permissions to perform the operation" }, "409" : { "description" : "A dealer with that email already exists" } }, "x-admin-only" : true } }, "/dealer/{email}" : { "get" : { "tags" : [ "dealer" ], "summary" : "Returns a dealer by email.", "description" : "The authenticated user must be an administrator.", "operationId" : "getDealer", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "email", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Dealer", "schema" : { "$ref" : "#/definitions/Dealer" } }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "Dealer not found" } } }, "delete" : { "tags" : [ "dealer" ], "summary" : "Delete a dealer.", "description" : "The authenticated user must be an administrator.", "operationId" : "deleteDealer", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "email", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Dealer deleted", "schema" : { "$ref" : "#/definitions/Dealer" } }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "Dealer with that email not found" } }, "x-admin-only" : true } }, "/dealer-update/{email}" : { "post" : { "tags" : [ "dealer-update" ], "summary" : "Update a dealer.", "description" : "The authenticated user must be an administrator.", "operationId" : "updateDealer", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/DealerUpdate" } }, { "name" : "email", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Dealer update", "schema" : { "$ref" : "#/definitions/Dealer" } }, "403" : { "description" : "Not enough permissions to perform the operation" }, "409" : { "description" : "A dealer with that email already exists" } }, "x-admin-only" : true } }, "/invoice" : { "get" : { "tags" : [ "invoice" ], "summary" : "Returns all the invoices.", "description" : "The authenticated user must be an administrator.", "operationId" : "getAllInvoices", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "All the invoices.", "schema" : { "$ref" : "#/definitions/Invoice" } }, "403" : { "description" : "Not enough permissions to perform the operation" } } }, "post" : { "tags" : [ "invoice" ], "summary" : "Add an invoice.", "description" : "The authenticated user must be an administrator.", "operationId" : "addInvoice", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/NewInvoice" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Invoice added", "schema" : { "$ref" : "#/definitions/Invoice" } }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "Organization does not exist" } }, "x-admin-only" : true } }, "/invoice/{invoiceId}" : { "get" : { "tags" : [ "invoice" ], "summary" : "Returns the invoice with the specified id.", "description" : "The authenticated user must be an administrator.", "operationId" : "getInvoiceById", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "invoiceId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "The invoice with the given id.", "schema" : { "$ref" : "#/definitions/CustomerRequest" } }, "403" : { "description" : "Not enough permissions to perform the operation" } } }, "delete" : { "tags" : [ "invoice" ], "summary" : "Deletes the invoice with the specified id.", "description" : "The authenticated user must be an administrator.", "operationId" : "deleteInvoiceById", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "invoiceId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Invoice removed." }, "403" : { "description" : "Not enough permissions to perform the operation" } }, "x-admin-only" : true } }, "/invoice/customer-request/{customerRequestId}" : { "get" : { "tags" : [ "invoice" ], "summary" : "Returns the invoice with the specified customer request id.", "description" : "The authenticated user must be an administrator.", "operationId" : "getInvoiceByCustomerRequestId", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "customerRequestId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "The invoice with the given customer request id.", "schema" : { "$ref" : "#/definitions/Invoice" } }, "403" : { "description" : "Not enough permissions to perform the operation" } } } }, "/invoice-update/{invoiceId}" : { "post" : { "tags" : [ "invoice-update" ], "summary" : "Updates a invoice", "description" : "The authenticated user must be an administrator.", "operationId" : "updateInvoice", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/InvoiceUpdate" } }, { "name" : "invoiceId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Invoice updated", "schema" : { "$ref" : "#/definitions/Invoice" } }, "400" : { "description" : "Invalid data in the properties to be updated" }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "A invoice with that id doesn't exist" } }, "x-admin-only" : true } }, "/order/{orderId}/invoice" : { "post" : { "tags" : [ "order" ], "summary" : "Creates an invoice from an order.", "description" : "The authenticated user must be an administrator or have an account manager role.", "operationId" : "createInvoiceFromOrder", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "orderId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "type" : "object" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Invoice created from order", "schema" : { "$ref" : "#/definitions/Invoice" } }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "Order does not exist" } } } }, "/order" : { "get" : { "tags" : [ "order" ], "summary" : "Returns all the orders.", "description" : "The authenticated user must be an administrator or have finance or account manager role.", "operationId" : "getAllOrders", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "All the orders.", "schema" : { "$ref" : "#/definitions/Order" } }, "403" : { "description" : "Not enough permissions to perform the operation" } } }, "post" : { "tags" : [ "order" ], "summary" : "Add an order.", "description" : "The authenticated user must be an administrator or account manager.", "operationId" : "addOrder", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/NewOrder" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Order added", "schema" : { "$ref" : "#/definitions/Order" } }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "Organization does not exist" } } } }, "/order/{orderId}" : { "get" : { "tags" : [ "order" ], "summary" : "Returns the order with the specified id.", "description" : "The authenticated user must be an administrator or have a finance or account manager role.", "operationId" : "getOrderById", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "orderId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "The order with the given id.", "schema" : { "$ref" : "#/definitions/Order" } }, "403" : { "description" : "Not enough permissions to perform the operation" } } }, "delete" : { "tags" : [ "order" ], "summary" : "Deletes the order with the specified id.", "description" : "The authenticated user must be an administrator or have an account manager role.", "operationId" : "deleteOrderById", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "orderId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Order removed." }, "403" : { "description" : "Not enough permissions to perform the operation" } } } }, "/order/customer-request/{customerRequestId}" : { "get" : { "tags" : [ "order" ], "summary" : "Returns the order with the specified customer request id.", "description" : "The authenticated user must be an administrator or have an account manager role.", "operationId" : "getOrderByCustomerRequestId", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "customerRequestId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "The order with the given customer request id.", "schema" : { "$ref" : "#/definitions/Order" } }, "403" : { "description" : "Not enough permissions to perform the operation" } } } }, "/order-update/{orderId}" : { "post" : { "tags" : [ "order-update" ], "summary" : "Updates a order", "description" : "The authenticated user must be an administrator.", "operationId" : "updateOrder", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/OrderUpdate" } }, { "name" : "orderId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Order updated", "schema" : { "$ref" : "#/definitions/Order" } }, "400" : { "description" : "Invalid data in the properties to be updated" }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "A order with that id doesn't exist" } } } }, "/quote" : { "get" : { "tags" : [ "quote" ], "summary" : "Returns all the quotes.", "description" : "The authenticated user must be an administrator.", "operationId" : "getAllQuotes", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "All the quotes.", "schema" : { "$ref" : "#/definitions/Quote" } }, "403" : { "description" : "Not enough permissions to perform the operation" } } }, "post" : { "tags" : [ "quote" ], "summary" : "Add a quote.", "description" : "The authenticated user must be an administrator.", "operationId" : "addQuote", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/NewQuote" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Quote added", "schema" : { "$ref" : "#/definitions/Quote" } }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "Organization does not exist" } } } }, "/quote/{quoteId}/order" : { "post" : { "tags" : [ "quote" ], "summary" : "Creates an order from a quote.", "description" : "The authenticated user must be an administrator.", "operationId" : "createOrderFromQuote", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "quoteId", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "type" : "object" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Order created from quote", "schema" : { "$ref" : "#/definitions/Order" } }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "Quote does not exist" } } } }, "/quote/{quoteId}" : { "get" : { "tags" : [ "quote" ], "summary" : "Returns the quote with the specified id.", "description" : "The authenticated user must be an administrator.", "operationId" : "getQuoteById", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "quoteId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "The quote with the given id.", "schema" : { "$ref" : "#/definitions/Quote" } }, "403" : { "description" : "Not enough permissions to perform the operation" } } }, "delete" : { "tags" : [ "quote" ], "summary" : "Deletes the quote with the specified id.", "description" : "The authenticated user must be an administrator.", "operationId" : "deleteQuoteById", "consumes" : [ "application/json", "application/xml" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "quoteId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Quote removed." }, "403" : { "description" : "Not enough permissions to perform the operation" } } } }, "/quote-update/{quoteId}" : { "post" : { "tags" : [ "quote-update" ], "summary" : "Updates a quote", "description" : "The authenticated user must be an administrator.", "operationId" : "updateQuote", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/Quote" } }, { "name" : "quoteId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Quote updated", "schema" : { "$ref" : "#/definitions/Quote" } }, "400" : { "description" : "Invalid data in the properties to be updated" }, "403" : { "description" : "Not enough permissions to perform the operation" }, "404" : { "description" : "A quote with that id doesn't exist" } } } }, "/cultivation" : { "get" : { "tags" : [ "cultivation" ], "summary" : "Return all cultivations.", "description" : "Authentication required for this operation.", "operationId" : "getAllCultivations", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "All cultivations returned.", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/Cultivation" } } }, "403" : { "description" : "Not enough permissions to perform the operation." }, "500" : { "description" : "Error while retrieving the cultivations." } } }, "post" : { "tags" : [ "cultivation" ], "summary" : "Create a cultivation.", "description" : "Authentication required for this operation.", "operationId" : "createCultivation", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/CultivationNew" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "New cultivation created.", "schema" : { "$ref" : "#/definitions/Cultivation" } }, "403" : { "description" : "User not authorized." }, "409" : { "description" : "A cultivation with the given ID already exists" }, "500" : { "description" : "Error while creating the cultivation." } } } }, "/cultivation/organization/{organizationId}/cultivation/{cultivationId}" : { "get" : { "tags" : [ "cultivation" ], "summary" : "Return the cultivation with the given id.", "description" : "Authentication required for this operation.", "operationId" : "getCultivationById", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "description" : "The unique identifier of the organization it belongs to.", "required" : true, "type" : "string" }, { "name" : "cultivationId", "in" : "path", "description" : "Universally unique identifier of a cultivation.", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Cultivation returned.", "schema" : { "$ref" : "#/definitions/Cultivation" } }, "403" : { "description" : "Not enough permissions to perform the operation." }, "500" : { "description" : "Error while retrieving the cultivations." } } }, "put" : { "tags" : [ "cultivation" ], "summary" : "Patch a cultivation (PUT not supported).", "description" : "Authentication required for this operation.", "operationId" : "putCultivation", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "description" : "The unique identifier of the organization it belongs to.", "required" : true, "type" : "string" }, { "name" : "cultivationId", "in" : "path", "description" : "Universally unique identifier of a cultivation.", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/CultivationEditable" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Cultivation patched", "schema" : { "$ref" : "#/definitions/Cultivation" } }, "400" : { "description" : "Invalid data in the properties to be patched." }, "403" : { "description" : "User not authorized." }, "404" : { "description" : "Cultivation not found." }, "500" : { "description" : "Error while patching the cultivation." } } }, "delete" : { "tags" : [ "cultivation" ], "summary" : "Delete a cultivation.", "description" : "Authentication required for this operation.", "operationId" : "deleteCultivation", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "description" : "The unique identifier of the organization it belongs to.", "required" : true, "type" : "string" }, { "name" : "cultivationId", "in" : "path", "description" : "Universally unique identifier of a cultivation.", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "204" : { "description" : "Cultivation has been deleted." }, "403" : { "description" : "User not authorized." }, "404" : { "description" : "Cultivation not found." }, "500" : { "description" : "Error while deleting the cultivation." } } }, "patch" : { "tags" : [ "cultivation" ], "summary" : "Patch a cultivation.", "description" : "Authentication required for this operation.", "operationId" : "patchCultivation", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "description" : "The unique identifier of the organization it belongs to.", "required" : true, "type" : "string" }, { "name" : "cultivationId", "in" : "path", "description" : "Universally unique identifier of a cultivation.", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/CultivationEditable" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Cultivation patched", "schema" : { "$ref" : "#/definitions/Cultivation" } }, "400" : { "description" : "Invalid data in the properties to be patched." }, "403" : { "description" : "User must be authenticated." }, "404" : { "description" : "Cultivation not found." }, "500" : { "description" : "Error while patching the cultivation." } } } }, "/cultivation/organization/{organizationId}" : { "get" : { "tags" : [ "cultivation" ], "summary" : "Return cultivations of the organization.", "description" : "Authentication required for this operation.", "operationId" : "getCultivationsByOrganization", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "description" : "The unique identifier of the organization it belongs to.", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Cultivations returned.", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/Cultivation" } } }, "403" : { "description" : "Not enough permissions to perform the operation." }, "500" : { "description" : "Error while retrieving the cultivations." } } } }, "/cultivation/organization/{organizationId}/cultivation/{cultivationId}/passport-image" : { "post" : { "tags" : [ "cultivation" ], "summary" : "Upload a file for a cultivation", "description" : "Authentication required for this operation", "operationId" : "uploadCultivationFile", "consumes" : [ "multipart/form-data" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "cultivationId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "file", "in" : "formData", "required" : false, "type" : "file" }, { "name" : "content-length", "in" : "header", "required" : false, "type" : "integer", "format" : "int64" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "File uploaded", "schema" : { "$ref" : "#/definitions/DataUpload" } }, "403" : { "description" : "User not authorized." }, "404" : { "description" : "Cultivation not found." } } } }, "/cultivation-target/organization/{organizationId}/cultivation/{cultivationId}" : { "get" : { "tags" : [ "cultivation-target" ], "summary" : "Return the targets for a cultivation.", "description" : "Authentication required for this operation.", "operationId" : "getTargetsForCultivation", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "description" : "The unique identifier of the organization it belongs to.", "required" : true, "type" : "string" }, { "name" : "cultivationId", "in" : "path", "description" : "Universally unique identifier of a cultivation.", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Cultivation targets returned.", "schema" : { "$ref" : "#/definitions/CultivationTarget" } }, "403" : { "description" : "Not enough permissions to perform the operation." }, "500" : { "description" : "Error while retrieving the cultivation targets." } } } }, "/cultivation-target/organization/{organizationId}/cultivation/{cultivationId}/target/{cultivationTargetId}" : { "get" : { "tags" : [ "cultivation-target" ], "summary" : "Return the cultivation target with the given id.", "description" : "Authentication required for this operation.", "operationId" : "getCultivationTargetById", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "description" : "The unique identifier of the organization it belongs to.", "required" : true, "type" : "string" }, { "name" : "cultivationId", "in" : "path", "description" : "Universally unique identifier of a cultivation.", "required" : true, "type" : "string" }, { "name" : "cultivationTargetId", "in" : "path", "description" : "Universally unique identifier of a cultivation target.", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Cultivation target returned.", "schema" : { "$ref" : "#/definitions/CultivationTarget" } }, "403" : { "description" : "Not enough permissions to perform the operation." }, "500" : { "description" : "Error while retrieving the cultivation targets." } } }, "put" : { "tags" : [ "cultivation-target" ], "summary" : "Patch a cultivation target (PUT not supported).", "description" : "Authentication required for this operation.", "operationId" : "putCultivationTarget", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "description" : "The unique identifier of the organization it belongs to.", "required" : true, "type" : "string" }, { "name" : "cultivationId", "in" : "path", "description" : "Universally unique identifier of a cultivation.", "required" : true, "type" : "string" }, { "name" : "cultivationTargetId", "in" : "path", "description" : "Universally unique identifier of a cultivation target.", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/CultivationTargetEditable" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Cultivation target patched", "schema" : { "$ref" : "#/definitions/CultivationTarget" } }, "400" : { "description" : "Invalid data in the properties to be patched." }, "403" : { "description" : "User not authorized." }, "404" : { "description" : "Cultivation target not found." }, "500" : { "description" : "Error while patching the cultivation target." } } }, "delete" : { "tags" : [ "cultivation-target" ], "summary" : "Delete a cultivation target.", "description" : "Authentication required for this operation.", "operationId" : "deleteCultivationTarget", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "description" : "The unique identifier of the organization it belongs to.", "required" : true, "type" : "string" }, { "name" : "cultivationId", "in" : "path", "description" : "Universally unique identifier of a cultivation.", "required" : true, "type" : "string" }, { "name" : "cultivationTargetId", "in" : "path", "description" : "Universally unique identifier of a cultivation target.", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "204" : { "description" : "Cultivation target has been deleted." }, "403" : { "description" : "User not authorized." }, "404" : { "description" : "Cultivation target not found." }, "500" : { "description" : "Error while deleting the cultivation target." } } }, "patch" : { "tags" : [ "cultivation-target" ], "summary" : "Patch a cultivation target.", "description" : "Authentication required for this operation.", "operationId" : "patchCultivationTarget", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "description" : "The unique identifier of the organization it belongs to.", "required" : true, "type" : "string" }, { "name" : "cultivationId", "in" : "path", "description" : "Universally unique identifier of a cultivation.", "required" : true, "type" : "string" }, { "name" : "cultivationTargetId", "in" : "path", "description" : "Universally unique identifier of a cultivation target.", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/CultivationTargetEditable" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Cultivation target patched", "schema" : { "$ref" : "#/definitions/CultivationTarget" } }, "400" : { "description" : "Invalid data in the properties to be patched." }, "403" : { "description" : "User must be authenticated." }, "404" : { "description" : "Cultivation target not found." }, "500" : { "description" : "Error while patching the cultivation target." } } } }, "/cultivation-target" : { "get" : { "tags" : [ "cultivation-target" ], "summary" : "Return all cultivation targets.", "description" : "Authentication required for this operation.", "operationId" : "getAllCultivationTargets", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "All cultivation targets returned.", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/CultivationTarget" } } }, "403" : { "description" : "Not enough permissions to perform the operation." }, "500" : { "description" : "Error while retrieving the cultivation targets." } } }, "post" : { "tags" : [ "cultivation-target" ], "summary" : "Create a cultivation target.", "description" : "Authentication required for this operation.", "operationId" : "createCultivationTarget", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/CultivationTargetNew" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "New cultivation target created.", "schema" : { "$ref" : "#/definitions/CultivationTarget" } }, "403" : { "description" : "User not authorized." }, "409" : { "description" : "A cultivation target with the given ID already exists" }, "500" : { "description" : "Error while creating the cultivation target." } } } }, "/downtime/{checkId}/interval/{interval}" : { "get" : { "tags" : [ "downtime" ], "summary" : "Returns the date histogram aggregations recorded downtimes of the check at the request interval", "description" : "Default oauth authentication mechanism required for this operation.
The current user should be authorized to the check.
When there is no location specified at the query parameter all the locations associated to that check id will be queried.
The periodic data response is by default (when not specified) 200 times sliced.", "operationId" : "getCheckCurrentDowntime", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "checkId", "in" : "path", "description" : "The check id", "required" : true, "type" : "string" }, { "name" : "interval", "in" : "path", "description" : "Intervals allowed : c, today, (f)1h, (f)2h, ..., (f)xh, (f)1d, (f)2d, ..., (f)xd, (f)1w, (f)2w, ..., (f)xw, (f)1M, (f)2M, ..., (f)xM. ", "required" : true, "type" : "string" }, { "name" : "intervalSize", "in" : "query", "description" : "Size of the time intervals in which to aggregate the data. This parameter is given as a number of minutes, hours, days or weeks, or monthly, e.g. '5m' is five minutes, '1h' is one hour, '5d' is five days, '2w' is two weeks and 'M' is monthly. The optional 'f' prefix is used to retrieve the full interval according to the provided unit, e.g. 'f1w' will retrieve the last full week (Mon to Sun), 'f2d' will retrieve the last two full days (Wed and Thu if it is Fri).", "required" : false, "type" : "string" }, { "name" : "location", "in" : "query", "description" : "Optionally filter only the data from one location. Leave empty or set to 'all' to get all locations", "required" : true, "type" : "string", "default" : "all" }, { "name" : "timezoneOffset", "in" : "query", "description" : "The timezone offset, in hours, for which to return the data. For example, 2 for Europe/Amsterdam. -3 for America/Argentina/Buenos_Aires. If empty, then UTC/GMT time is assumed, but it's probably not what you want. See list of timezones: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones", "required" : false, "type" : "integer", "format" : "int32" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Parsed downtime aggregations of the check at the requested interval", "schema" : { "$ref" : "#/definitions/ResponseEntry" } }, "400" : { "description" : "must be one of valid allowed Intervals" }, "401" : { "description" : "Unauthenticated request" }, "403" : { "description" : "Unauthorized access to the check id" }, "404" : { "description" : "No downtime statistics found for the check" } } } }, "/downtime/{checkId}/{period}" : { "get" : { "tags" : [ "downtime" ], "summary" : "FOR BACKWARD COMPATIBILITY ONLY: Returns the date histogram aggregations recorded downtimes of the check at the request period interval", "description" : "Default oauth authentication mechanism required for this operation.
The current user should be authorized to the check.
When there is no location specified at the query parameter all the locations associated to that check id will be queried.
The periodic data response is by default (when not specified) 200 times sliced.", "operationId" : "getCheckCurrentDowntimeInfo", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "checkId", "in" : "path", "description" : "The check id", "required" : true, "type" : "string" }, { "name" : "period", "in" : "path", "description" : "Periods allowed : hour, day, current (same as 'day'), month, week, all. ", "required" : true, "type" : "string" }, { "name" : "intervalSize", "in" : "query", "description" : "Size of the time intervals in which to aggregate the data. This parameter is given as a number of minutes, hours, days or weeks, or monthly, e.g. '5m' is five minutes, '1h' is one hour, '5d' is five days, '2w' is two weeks and 'M' is monthly. The optional 'f' prefix is used to retrieve the full interval according to the provided unit, e.g. 'f1w' will retrieve the last full week (Mon to Sun), 'f2d' will retrieve the last two full days (Wed and Thu if it is Fri).", "required" : false, "type" : "string" }, { "name" : "location", "in" : "query", "description" : "Optionally filter only the data from one location. Leave empty or set to 'all' to get all locations", "required" : true, "type" : "string", "default" : "all" }, { "name" : "timezoneOffset", "in" : "query", "description" : "The timezone offset, in hours, for which to return the data. For example, 2 for Europe/Amsterdam. -3 for America/Argentina/Buenos_Aires. If empty, then UTC/GMT time is assumed, but it's probably not what you want. See list of timezones: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones", "required" : false, "type" : "integer", "format" : "int32" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Parsed downtime aggregations of the check at the requested period", "schema" : { "$ref" : "#/definitions/ResponseEntry" } }, "400" : { "description" : "must be one of valid allowed Periods" }, "401" : { "description" : "Unauthenticated request" }, "403" : { "description" : "Unauthorized access to the check id" }, "404" : { "description" : "No downtime statistics found for the check" } } } }, "/downtime/{checkId}/from/{startDate}/until/{endDate}" : { "get" : { "tags" : [ "downtime" ], "summary" : "Returns the date histogram aggregations related to the recorded downtimes of the sensor at the requested from/until period interval", "description" : "Default oauth authentication mechanism required for this operation.
The current user should be authorized to the check.
When there is no location specified at the query parameter all the locations associated to that sensor will be queried.
The date validation process will include the precedence validation, so if endDate is previous to startDate the dates will be switched.
The periodic data response is by default (when not specified) 200 times sliced.", "operationId" : "getDowntimeInfoByPeriod", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "checkId", "in" : "path", "description" : "The check id", "required" : true, "type" : "string" }, { "name" : "startDate", "in" : "path", "description" : "Initial date string.ISO 8601 date. E.g.: '2016-03-03T00:00:00Z'", "required" : true, "type" : "string" }, { "name" : "endDate", "in" : "path", "description" : "Final date string.ISO 8601 date. E.g.: '2016-03-03T00:00:00Z'", "required" : true, "type" : "string" }, { "name" : "intervalSize", "in" : "query", "description" : "Size of the time intervals in which to aggregate the data. This parameter is given as a number of minutes, hours, days or weeks, or monthly, e.g. '5m' is five minutes, '1h' is one hour, '5d' is five days, '2w' is two weeks and 'M' is monthly. The optional 'f' prefix is used to retrieve the full interval according to the provided unit, e.g. 'f1w' will retrieve the last full week (Mon to Sun), 'f2d' will retrieve the last two full days (Wed and Thu if it is Fri).", "required" : false, "type" : "string" }, { "name" : "location", "in" : "query", "description" : "Optionally filter only the data from one location. Leave empty or set to 'all' to get all locations", "required" : true, "type" : "string", "default" : "all" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Parsed downtime aggregations of the check at the requested period", "schema" : { "$ref" : "#/definitions/ResponseEntry" } }, "400" : { "description" : "The provided date must be a valid date: ISO 8601 date. E.g.: '2016-03-03T00:00:00Z'" }, "401" : { "description" : "Unauthenticated request" }, "403" : { "description" : "Unauthorized access to the check id" }, "404" : { "description" : "No downtime statistics found for the check" }, "500" : { "description" : "Error parsing the provided dates" } } } }, "/stats/aggregate" : { "post" : { "tags" : [ "stats" ], "summary" : "Returns aggregated data (averaged, max, min) over an interval of time for a set of sensors.", "description" : "The sensors should all be of the same (sensor) type (or all web checks).", "operationId" : "aggregate", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "location", "in" : "query", "description" : "Optionally filter only the data from one location. Leave empty or set to 'all' to get all locations", "required" : false, "type" : "string" }, { "name" : "timezoneOffset", "in" : "query", "description" : "The timezone offset, in hours, for which to return the data. For example, 2 for Europe/Amsterdam. -3 for America/Argentina/Buenos_Aires. If empty, then UTC/GMT time is assumed, but it's probably not what you want. See list of timezones: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones", "required" : false, "type" : "integer", "format" : "int32" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/StatisticsInfoRequest" } }, { "name" : "fields", "in" : "query", "description" : "Optional - list of json fields for which the values should be returned. Separated by comma (,).", "required" : false, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Checks statistic", "schema" : { "type" : "object", "additionalProperties" : { "type" : "object" } } }, "400" : { "description" : "Bad request, e.g. sensors of different types requested" }, "401" : { "description" : "Unauthenticated request" }, "403" : { "description" : "Unauthorized access to the check id" }, "404" : { "description" : "Check not found" } } } }, "/stats/condition/{checkId}" : { "get" : { "tags" : [ "stats" ], "summary" : "Returns if the check's last recorded stat meets the condition", "description" : "Authentication required.
The authenticated user has to be a user in the organization of the given check
or have role admin within the system.
", "operationId" : "getCheckCondition", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "checkId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Check condition validation returned successfully", "schema" : { "$ref" : "#/definitions/CheckLastRecordedStatInfo" } }, "403" : { "description" : "Authenticated user is not allowed to access this check" }, "404" : { "description" : "Check with given id doesn't exist" } } } }, "/stats/events/check/{checkId}/interval/{interval}" : { "get" : { "tags" : [ "stats" ], "summary" : "Returns event count for the sensor or web check with given check id, for the time range indicated.", "description" : "Authentication required. User should be admin, account manager or member of the check's organization.", "operationId" : "getCheckEventsCountForTimeInterval", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "checkId", "in" : "path", "description" : "The check id of the sensor", "required" : true, "type" : "string" }, { "name" : "interval", "in" : "path", "description" : "Intervals allowed : c, today, (f)1h, (f)2h, ..., (f)xh, (f)1d, (f)2d, ..., (f)xd, (f)1w, (f)2w, ..., (f)xw, (f)1M, (f)2M, ..., (f)xM. ", "required" : true, "type" : "string" }, { "name" : "timezoneOffset", "in" : "query", "description" : "The timezone offset, in hours, for which to return the data. For example, 2 for Europe/Amsterdam. -3 for America/Argentina/Buenos_Aires. If empty, then UTC/GMT time is assumed, but it's probably not what you want. See list of timezones: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones", "required" : false, "type" : "integer", "format" : "int32" }, { "name" : "intervalSize", "in" : "query", "description" : "Size of the time intervals in which to aggregate the data. This parameter is given as a number of minutes, hours, days or weeks, or monthly, e.g. '5m' is five minutes, '1h' is one hour, '5d' is five days, '2w' is two weeks and 'M' is monthly. The optional 'f' prefix is used to retrieve the full interval according to the provided unit, e.g. 'f1w' will retrieve the last full week (Mon to Sun), 'f2d' will retrieve the last two full days (Wed and Thu if it is Fri).", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Events count for the check at the requested time period", "schema" : { "type" : "object", "additionalProperties" : { "$ref" : "#/definitions/EventsCount" } } }, "403" : { "description" : "Unauthorized access to the check id" }, "404" : { "description" : "Check not found" } } } }, "/stats/events/check/{checkId}/from/{startDate}/until/{endDate}" : { "get" : { "tags" : [ "stats" ], "summary" : "Returns event count for the sensor or web check with given check id, for the time range indicated.", "description" : "Authentication required. User should be admin, account manager or member of the check's organization.", "operationId" : "getCheckEventsForTimeRange", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "checkId", "in" : "path", "description" : "The check id of the sensor", "required" : true, "type" : "string" }, { "name" : "startDate", "in" : "path", "description" : "Initial date string. ISO 8601 date. E.g.: '2016-03-03T00:00:00Z'", "required" : true, "type" : "string" }, { "name" : "endDate", "in" : "path", "description" : "Final date string. ISO 8601 date. E.g.: '2016-03-03T00:00:00Z'", "required" : true, "type" : "string" }, { "name" : "intervalSize", "in" : "query", "description" : "Size of the time intervals in which to aggregate the data. This parameter is given as a number of minutes, hours, days or weeks, or monthly, e.g. '5m' is five minutes, '1h' is one hour, '5d' is five days, '2w' is two weeks and 'M' is monthly. The optional 'f' prefix is used to retrieve the full interval according to the provided unit, e.g. 'f1w' will retrieve the last full week (Mon to Sun), 'f2d' will retrieve the last two full days (Wed and Thu if it is Fri).", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Events count for the check at the requested time period", "schema" : { "type" : "object", "additionalProperties" : { "$ref" : "#/definitions/EventsCount" } } }, "400" : { "description" : "The provided date must be a valid date: ISO 8601 date. E.g.: '2016-03-03T00:00:00Z'" }, "403" : { "description" : "Unauthorized access to the check id" }, "404" : { "description" : "Check not found" } } } }, "/stats/check/{checkId}" : { "get" : { "tags" : [ "stats" ], "summary" : "Returns the last value recorded of the check", "description" : "When no valid recent record found (we check the last 5 * frequency seconds by default), the operation will return a 410 or 412 with the possible causes for this check state. For example: 1000: Check is currently paused
1001: Check is not scheduled to run at this time. Check [cron] property.
1003: There is no recent data for the sensor. Mother might be powered off or not connected to the Internet, or sensor might be out of reach or off.
1004: The check is configured with an invalid schedule/cron.
1005: The data we have for the sensor is old.
1006: Problem communicating with sensor. No data available.
", "operationId" : "getCheckLastRecordedState", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "checkId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "returnIfConditionMet", "in" : "query", "description" : "Set to true if you want to know if condition for the checks are met. False by default.", "required" : false, "type" : "boolean", "default" : false }, { "name" : "maxAge", "in" : "query", "description" : "Maximum age of the record in minutes, by default 5 * frequency", "required" : false, "type" : "integer", "default" : 0, "maximum" : 1440, "minimum" : 0, "format" : "int32" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Last recorded value of sensor", "schema" : { "$ref" : "#/definitions/CheckLastRecordedStatInfo" } }, "204" : { "description" : "No recently recorded value.
" }, "401" : { "description" : "Unauthenticated request" }, "403" : { "description" : "Unauthorized access to the check" }, "404" : { "description" : "Check not found" }, "412" : { "description" : "Sensor state error: Recorded sensor information contains errors" } } } }, "/stats/check/{checkId}/interval/{interval}" : { "get" : { "tags" : [ "stats" ], "summary" : "Returns historical data for the sensor or web check with given check id, for the interval indicated.", "description" : "Authentication required. User should be part of the check's organization.

For example:
/stats/check/9cca5615-b654-4e6e-96d2-f5db89805a83/1d
returns a date histogram with the data for the given sensor for the past day, for example:
", "operationId" : "getCheckStatsByInterval", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "checkId", "in" : "path", "description" : "The check id of the sensor", "required" : true, "type" : "string" }, { "name" : "interval", "in" : "path", "description" : "Intervals allowed : c, today, (f)1h, (f)2h, ..., (f)xh, (f)1d, (f)2d, ..., (f)xd, (f)1w, (f)2w, ..., (f)xw, (f)1M, (f)2M, ..., (f)xM. ", "required" : true, "type" : "string" }, { "name" : "statisticType", "in" : "query", "description" : "Current statistics supported : averages, counts, maxs, mins, sums. ", "required" : true, "type" : "string", "default" : "averages" }, { "name" : "intervalSize", "in" : "query", "description" : "Size of the time intervals in which to aggregate the data. This parameter is given as a number of minutes, hours, days or weeks, or monthly, e.g. '5m' is five minutes, '1h' is one hour, '5d' is five days, '2w' is two weeks and 'M' is monthly. The optional 'f' prefix is used to retrieve the full interval according to the provided unit, e.g. 'f1w' will retrieve the last full week (Mon to Sun), 'f2d' will retrieve the last two full days (Wed and Thu if it is Fri).", "required" : true, "type" : "string" }, { "name" : "cumulative", "in" : "query", "description" : "Optional - accumulate the values.", "required" : false, "type" : "boolean" }, { "name" : "derivative", "in" : "query", "description" : "Optional - derivative of the values.", "required" : false, "type" : "boolean" }, { "name" : "location", "in" : "query", "description" : "Optionally filter only the data from one location. Leave empty or set to 'all' to get all locations", "required" : false, "type" : "string" }, { "name" : "timezoneOffset", "in" : "query", "description" : "The timezone offset, in hours, for which to return the data. For example, 2 for Europe/Amsterdam. -3 for America/Argentina/Buenos_Aires. If empty, then UTC/GMT time is assumed, but it's probably not what you want. See list of timezones: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones", "required" : false, "type" : "integer", "format" : "int32" }, { "name" : "fields", "in" : "query", "description" : "Optional - list of json fields for which the values should be returned. Separated by comma (,).", "required" : false, "type" : "string" }, { "name" : "debug", "in" : "query", "description" : "Send debug info in the response, such as timestamp in a user friendly format.", "required" : false, "type" : "boolean", "default" : false }, { "name" : "partOfDay", "in" : "query", "description" : "Optional - filter by daytime or nighttime.", "required" : false, "type" : "string" }, { "name" : "cultivationId", "in" : "query", "description" : "Optional - filter data by returning datapoints for when the data source is in the cultivation.", "required" : false, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Historical data of the check in the requested interval", "schema" : { "type" : "object", "additionalProperties" : { "type" : "object" } } }, "403" : { "description" : "Unauthorized access to the check id" }, "404" : { "description" : "Check not found" } } } }, "/stats/check/{checkId}/from/{startDate}/until/{endDate}" : { "get" : { "tags" : [ "stats" ], "summary" : "Returns historical data for the sensor or web check with given check id, for the time range indicated.", "description" : "Authentication required. User should be part of the check's organization.

For example:
/stats/check/9cca5615-b654-4e6e-96d2-f5db89805a83/from/2016-03-04T00:00:00Z/until/2016-03-14T00:00:00Z

returns a date histogram with the data for the given sensor from 4 March 2016 to 14 March 2016:

{
\"1457049600000\": {
\"timestamp-as-string\": \"2016-03-04T00:00:00.000Z\",
\"angle.x\": 0.5166666666666667,
\"angle.z\": 92,
\"axis.x\": 0,
\"axis.y\": 0,
\"axis.z\": 1
},
\"1457053200000\": {
\"timestamp-as-string\": \"2016-03-04T01:00:00.000Z\",
\"angle.x\": 0.9,
\"angle.z\": 91.96666666666667,
\"axis.x\": 0,
\"axis.y\": 0,
\"axis.z\": 1
},
...

Note that angle.x, angle.z, axis.x/y/z are fields specific for the kind of sensor requested. Other type of sensors will return other data.", "operationId" : "getCheckStatsByTimeInterval", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "checkId", "in" : "path", "description" : "The id of the sensor", "required" : true, "type" : "string" }, { "name" : "startDate", "in" : "path", "description" : "Initial date string. ISO 8601 date. E.g.: '2016-03-03T00:00:00Z'", "required" : true, "type" : "string" }, { "name" : "endDate", "in" : "path", "description" : "Final date string. ISO 8601 date. E.g.: '2016-03-03T00:00:00Z'", "required" : true, "type" : "string" }, { "name" : "statisticType", "in" : "query", "description" : "Current statistics supported : averages, counts, maxs, mins, sums. ", "required" : true, "type" : "string", "default" : "averages" }, { "name" : "intervalSize", "in" : "query", "description" : "Size of the time intervals in which to aggregate the data. This parameter is given as a number of minutes, hours, days or weeks, or monthly, e.g. '5m' is five minutes, '1h' is one hour, '5d' is five days, '2w' is two weeks and 'M' is monthly. The optional 'f' prefix is used to retrieve the full interval according to the provided unit, e.g. 'f1w' will retrieve the last full week (Mon to Sun), 'f2d' will retrieve the last two full days (Wed and Thu if it is Fri).", "required" : false, "type" : "string" }, { "name" : "location", "in" : "query", "description" : "Optionally filter only the data from one location. Leave empty or set to 'all' to get all locations", "required" : false, "type" : "string" }, { "name" : "fields", "in" : "query", "description" : "Optional - list of json fields for which the values should be returned. Separated by comma (,).", "required" : false, "type" : "string" }, { "name" : "cumulative", "in" : "query", "description" : "Optional - accumulate the values.", "required" : false, "type" : "boolean" }, { "name" : "derivative", "in" : "query", "description" : "Optional - derivative of the values.", "required" : false, "type" : "boolean" }, { "name" : "debug", "in" : "query", "description" : "Send debug info in the response, such as timestamp in a user friendly format.", "required" : false, "type" : "boolean", "default" : false }, { "name" : "partOfDay", "in" : "query", "description" : "Optional - filter by daytime or nighttime.", "required" : false, "type" : "string" }, { "name" : "cultivationId", "in" : "query", "description" : "Optional - filter data by returning datapoints for when the data source is in the cultivation.", "required" : false, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Historical data of the check at the requested period", "schema" : { "type" : "object", "additionalProperties" : { "type" : "object" } } }, "400" : { "description" : "The provided date must be a valid date: ISO 8601 date. E.g.: '2016-03-03T00:00:00Z'" }, "403" : { "description" : "Unauthorized access to the check id" }, "404" : { "description" : "Check not found" } } } }, "/stats" : { "post" : { "tags" : [ "stats" ], "summary" : "Returns the information about the more recent value for one or more sensors.", "description" : "For each sensor, it returns the last recent value, or if none an indication of the possible causes For example: 1000: Check is currently paused
1001: Check is not scheduled to run at this time. Check [cron] property.
1003: There is no recent data for the sensor. Mother might be powered off or not connected to the Internet, or sensor might be out of reach or off.
1004: The check is configured with an invalid schedule/cron.
1005: The data we have for the sensor is old.
1006: Problem communicating with sensor. No data available.
", "operationId" : "getChecksLastRecordedStatInfo", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "in" : "body", "name" : "body", "description" : "An array of check ids", "required" : false, "schema" : { "type" : "array", "items" : { "type" : "string" } } }, { "name" : "fields", "in" : "query", "description" : "Optional - list of json fields for which the values should be returned. Separated by comma (,).", "required" : false, "type" : "string" }, { "name" : "tags", "in" : "query", "description" : "Optional - Set tags to automatically select checks based on their tags (if tags are provided, organization id and sensor type should also be set. Separated by comma (,)", "required" : false, "type" : "string" }, { "name" : "tagsoperator", "in" : "query", "description" : "Optional - Tags boolean operator (and/or)", "required" : false, "type" : "string" }, { "name" : "organizationid", "in" : "query", "description" : "Optional - The id of an organization (when tags are set)", "required" : false, "type" : "string" }, { "name" : "sensortype", "in" : "query", "description" : "Optional - The id of a sensor type (when tags are set)", "required" : false, "type" : "string" }, { "name" : "returnIfConditionMet", "in" : "query", "description" : "Set to true if you want to know if condition for the checks are met. False by default.", "required" : false, "type" : "boolean", "default" : false } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "The most recent values of the sensors, or an indication of their state", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/CheckLastRecordedStatInfo" }, "uniqueItems" : true } }, "401" : { "description" : "Unauthenticated request" }, "403" : { "description" : "Unauthorized" } } } }, "/stats/checks/interval/{interval}" : { "post" : { "tags" : [ "stats" ], "summary" : "Returns historical data for the checks and the interval indicated.", "description" : "Authentication required. User should be part of the check's organization.", "operationId" : "getChecksStatsByInterval", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "interval", "in" : "path", "description" : "Intervals allowed : c, today, (f)1h, (f)2h, ..., (f)xh, (f)1d, (f)2d, ..., (f)xd, (f)1w, (f)2w, ..., (f)xw, (f)1M, (f)2M, ..., (f)xM. ", "required" : true, "type" : "string" }, { "name" : "statisticType", "in" : "query", "description" : "Current statistics supported : averages, counts, maxs, mins, sums. ", "required" : true, "type" : "string", "default" : "averages" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/CheckStatsRequest" } }, { "name" : "intervalSize", "in" : "query", "description" : "Size of the time intervals in which to aggregate the data. This parameter is given as a number of minutes, hours, days or weeks, or monthly, e.g. '5m' is five minutes, '1h' is one hour, '5d' is five days, '2w' is two weeks and 'M' is monthly. The optional 'f' prefix is used to retrieve the full interval according to the provided unit, e.g. 'f1w' will retrieve the last full week (Mon to Sun), 'f2d' will retrieve the last two full days (Wed and Thu if it is Fri).", "required" : true, "type" : "string" }, { "name" : "location", "in" : "query", "description" : "Optionally filter only the data from one location. Leave empty or set to 'all' to get all locations", "required" : false, "type" : "string" }, { "name" : "cumulative", "in" : "query", "description" : "Optional - accumulate the values.", "required" : false, "type" : "boolean" }, { "name" : "derivative", "in" : "query", "description" : "Optional - derivative of the values.", "required" : false, "type" : "boolean" }, { "name" : "timezoneOffset", "in" : "query", "description" : "The timezone offset, in hours, for which to return the data. For example, 2 for Europe/Amsterdam. -3 for America/Argentina/Buenos_Aires. If empty, then UTC/GMT time is assumed, but it's probably not what you want. See list of timezones: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones", "required" : false, "type" : "integer", "format" : "int32" }, { "name" : "fields", "in" : "query", "description" : "Optional - list of json fields for which the values should be returned. Separated by comma (,).", "required" : false, "type" : "string" }, { "name" : "debug", "in" : "query", "description" : "Send debug info in the response, such as timestamp in a user friendly format.", "required" : false, "type" : "boolean", "default" : false }, { "name" : "partOfDay", "in" : "query", "description" : "Optional - filter by daytime or nighttime.", "required" : false, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Historical data of the check in the requested interval", "schema" : { "type" : "object", "additionalProperties" : { "type" : "object" } } }, "403" : { "description" : "Unauthorized access to the check id" }, "404" : { "description" : "Check not found" } } } }, "/stats/from/{startDate}/until/{endDate}" : { "post" : { "tags" : [ "stats" ], "summary" : "Returns historical data for the sensors or web checks with given check ids, for the time range indicated.", "description" : "Authentication required. User should be part of the check's organization.

", "operationId" : "getChecksStatsByTimeInterval", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "startDate", "in" : "path", "description" : "Initial date string. ISO 8601 date. E.g.: '2016-03-03T00:00:00Z'", "required" : true, "type" : "string" }, { "name" : "endDate", "in" : "path", "description" : "Final date string. ISO 8601 date. E.g.: '2016-03-03T00:00:00Z'", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/CheckStatsRequest" } }, { "name" : "statisticType", "in" : "query", "description" : "Current statistics supported : averages, counts, maxs, mins, sums. ", "required" : true, "type" : "string", "default" : "averages" }, { "name" : "intervalSize", "in" : "query", "description" : "Size of the time intervals in which to aggregate the data. This parameter is given as a number of minutes, hours, days or weeks, or monthly, e.g. '5m' is five minutes, '1h' is one hour, '5d' is five days, '2w' is two weeks and 'M' is monthly. The optional 'f' prefix is used to retrieve the full interval according to the provided unit, e.g. 'f1w' will retrieve the last full week (Mon to Sun), 'f2d' will retrieve the last two full days (Wed and Thu if it is Fri).", "required" : false, "type" : "string" }, { "name" : "location", "in" : "query", "description" : "Optionally filter only the data from one location. Leave empty or set to 'all' to get all locations", "required" : false, "type" : "string" }, { "name" : "fields", "in" : "query", "description" : "Optional - list of json fields for which the values should be returned. Separated by comma (,).", "required" : false, "type" : "string" }, { "name" : "cumulative", "in" : "query", "description" : "Optional - accumulate the values.", "required" : false, "type" : "boolean" }, { "name" : "derivative", "in" : "query", "description" : "Optional - derivative of the values.", "required" : false, "type" : "boolean" }, { "name" : "debug", "in" : "query", "description" : "Send debug info in the response, such as timestamp in a user friendly format.", "required" : false, "type" : "boolean", "default" : false }, { "name" : "partOfDay", "in" : "query", "description" : "Optional - filter by daytime or nighttime.", "required" : false, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Historical data of the checks at the requested period", "schema" : { "type" : "object", "additionalProperties" : { "type" : "object" } } }, "400" : { "description" : "The provided date must be a valid date: ISO 8601 date. E.g.: '2016-03-03T00:00:00Z'" }, "403" : { "description" : "Unauthorized access to the check id" }, "404" : { "description" : "Checks not found" } } } }, "/stats/network/organization/{organizationId}" : { "get" : { "tags" : [ "stats" ], "summary" : "Gets the Network (web checks, sensor checks, routers, and mothers) status overview for the given organization.", "description" : "Operation reserved to administrators.", "operationId" : "getNetworkStatusOverview", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Network (web checks, sensor checks, routers, and mothers) status overview.", "schema" : { "$ref" : "#/definitions/NetworkOverviewResponse" } }, "403" : { "description" : "User is not authorized to perform this operation." }, "404" : { "description" : "Organization with given id doesn't exist" } } } }, "/uptime/checks/from/{startDate}/until/{endDate}" : { "post" : { "tags" : [ "uptime" ], "summary" : "Return the uptime of sensors within the given datetime range", "description" : "Only organization members are authorised to call this operation.", "operationId" : "getCheckUptimeBetweenDates", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "startDate", "in" : "path", "description" : "Initial date string. ISO 8601 date. E.g.: '2016-03-03T00:00:00Z'", "required" : true, "type" : "string" }, { "name" : "endDate", "in" : "path", "description" : "Final date string. ISO 8601 date. E.g.: '2016-03-03T00:00:00Z'", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "description" : "Check stats request", "required" : false, "schema" : { "$ref" : "#/definitions/CheckStatsRequest" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Uptime of a sensor", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/CheckUptimeResponse" }, "uniqueItems" : true } }, "403" : { "description" : "User not allowed to make this call" } } } }, "/uptime/check/{checkId}/interval/{interval}" : { "get" : { "tags" : [ "uptime" ], "summary" : "Return the uptime of a sensor within the given interval", "description" : "Only organization members or administrators of ZENSIE are authorised to call this operation.", "operationId" : "getCheckUptimeByInterval", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "checkId", "in" : "path", "required" : true, "type" : "string" }, { "name" : "interval", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Uptime of a sensor", "schema" : { "$ref" : "#/definitions/CheckUptimeResponse" } }, "403" : { "description" : "User not allowed to make this call" } } } }, "/uptime/checks/interval/{interval}" : { "post" : { "tags" : [ "uptime" ], "summary" : "Return the uptime of sensors within the given interval", "description" : "Only organization members or administrators of ZENSIE are authorised to call this operation.", "operationId" : "getChecksUptimeByInterval", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "interval", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "description" : "Check stats request", "required" : false, "schema" : { "$ref" : "#/definitions/CheckStatsRequest" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Uptime of a sensor", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/CheckUptimeResponse" }, "uniqueItems" : true } }, "403" : { "description" : "User not allowed to make this call" } } } }, "/status/backup-healthcheck" : { "get" : { "tags" : [ "status" ], "summary" : "Lookup in S3 if backups are being made.", "description" : "Operation reserved to administrators.", "operationId" : "backupHealthCheck", "consumes" : [ "application/json" ], "produces" : [ "application/json" ], "parameters" : [ ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Backup health check." }, "403" : { "description" : "User is not authorized to perform this operation." } } } }, "/status/ingest" : { "get" : { "tags" : [ "status" ], "summary" : "Retrieves status information of ingest checks for an organization", "description" : "Operation reserved to administrators and account managers.", "operationId" : "IngestStatus", "consumes" : [ "application/json" ], "produces" : [ "application/json" ], "parameters" : [ { "name" : "interval", "in" : "query", "required" : false, "type" : "string" }, { "name" : "organizationId", "in" : "query", "required" : false, "type" : "string" }, { "name" : "integrationType", "in" : "query", "required" : false, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Status information of ingest checks.", "schema" : { "$ref" : "#/definitions/IngestStatusResponse" } }, "403" : { "description" : "User is not authorized to perform this operation." } } } }, "/status/compareReadChecksOperations" : { "get" : { "tags" : [ "status" ], "summary" : "Compare the database check read operations to verify that there was not a huge variation.", "description" : "Operation reserved to administrators.", "operationId" : "checksReadOperations", "consumes" : [ "application/json" ], "produces" : [ "application/json" ], "parameters" : [ { "name" : "periodLength", "in" : "query", "required" : false, "type" : "integer", "default" : 300, "format" : "int32" }, { "name" : "tolerance", "in" : "query", "required" : false, "type" : "number", "default" : 5.0, "format" : "float" }, { "name" : "interval", "in" : "query", "required" : false, "type" : "integer", "default" : 3600, "format" : "int32" }, { "name" : "correction", "in" : "query", "required" : false, "type" : "integer", "default" : 20, "format" : "int32" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Expected and actual read operations throughput.", "schema" : { "$ref" : "#/definitions/TwoValuesComparison" } }, "403" : { "description" : "User is not authorized to perform this operation." } } } }, "/status/compareWriteChecksOperations" : { "get" : { "tags" : [ "status" ], "summary" : "Compare the database check write operations to verify that there was not a huge variation.", "description" : "Operation reserved to administrators.", "operationId" : "checksWriteOperations", "consumes" : [ "application/json" ], "produces" : [ "application/json" ], "parameters" : [ { "name" : "periodLength", "in" : "query", "required" : false, "type" : "integer", "default" : 300, "format" : "int32" }, { "name" : "tolerance", "in" : "query", "required" : false, "type" : "number", "default" : 5.0, "format" : "float" }, { "name" : "interval", "in" : "query", "required" : false, "type" : "integer", "default" : 3600, "format" : "int32" }, { "name" : "correction", "in" : "query", "required" : false, "type" : "integer", "default" : 20, "format" : "int32" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Expected and actual write operations throughput.", "schema" : { "$ref" : "#/definitions/TwoValuesComparison" } }, "403" : { "description" : "User is not authorized to perform this operation." } } } }, "/status/cloudwatch-alarm/{alarmName}" : { "get" : { "tags" : [ "status" ], "summary" : "Retrieves specific cloud watch alarm", "description" : "Operation reserved to administrators.", "operationId" : "cloudWatchAlarm", "consumes" : [ "application/json" ], "produces" : [ "application/json" ], "parameters" : [ { "name" : "alarmName", "in" : "path", "required" : true, "type" : "string" }, { "name" : "awsRegion", "in" : "query", "required" : false, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Cloud watch alarm." }, "403" : { "description" : "User is not authorized to perform this operation." } } } }, "/status/cloudwatch-alarm" : { "get" : { "tags" : [ "status" ], "summary" : "Retrieves cloud watch alarms that have status ALARM", "description" : "Operation reserved to administrators.", "operationId" : "cloudWatchAlarms", "consumes" : [ "application/json" ], "produces" : [ "application/json" ], "parameters" : [ { "name" : "awsRegion", "in" : "query", "description" : "AWS region", "required" : false, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Cloud watch alarms." }, "403" : { "description" : "User is not authorized to perform this operation." } } } }, "/status/compareThroughput" : { "get" : { "tags" : [ "status" ], "summary" : "Compare the current throughput from a location, user or global in the system to verify that it's as expected.", "description" : "Operation reserved to administrators.", "operationId" : "compareThroughput", "consumes" : [ "application/json" ], "produces" : [ "application/json" ], "parameters" : [ { "name" : "periodLength", "in" : "query", "required" : false, "type" : "integer", "default" : 300, "format" : "int32" }, { "name" : "tolerance", "in" : "query", "required" : false, "type" : "number", "default" : 5.0, "format" : "float" }, { "name" : "correction", "in" : "query", "required" : false, "type" : "integer", "default" : 20, "format" : "int32" }, { "name" : "location", "in" : "query", "required" : false, "type" : "string" }, { "name" : "organization", "in" : "query", "required" : false, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Expected and actual throughput, percentage difference.", "schema" : { "$ref" : "#/definitions/TwoValuesComparisonTableScan" } }, "403" : { "description" : "User is not authorized to perform this operation." } } } }, "/status/alarm/throughput/location/{locationName}" : { "post" : { "tags" : [ "status" ], "summary" : "Create throughput alarms for the given location.", "description" : "Operation reserved to administrators.", "operationId" : "createLocationThroughputAlarms", "consumes" : [ "application/json" ], "produces" : [ "application/json" ], "parameters" : [ { "name" : "periodLength", "in" : "query", "required" : false, "type" : "integer", "default" : 600, "format" : "int32" }, { "name" : "tolerance", "in" : "query", "required" : false, "type" : "number", "default" : 5.0, "format" : "float" }, { "name" : "locationName", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Alarm checks created." }, "403" : { "description" : "User is not authorized to perform this operation." } } } }, "/status/alarm/mother/location/{locationName}/device/{deviceId}" : { "post" : { "tags" : [ "status" ], "summary" : "Creates alarm (web check) for the mother of the location. Returns the check id created.", "description" : "Operation reserved to administrators.", "operationId" : "createMotherAlarm", "consumes" : [ "application/json" ], "produces" : [ "application/json" ], "parameters" : [ { "name" : "locationName", "in" : "path", "required" : true, "type" : "string" }, { "name" : "deviceId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Alarm (web check) for the mother was created." }, "403" : { "description" : "User is not authorized to perform this operation." } } } }, "/status/alarm/throughput/organization/{organization}" : { "post" : { "tags" : [ "status" ], "summary" : "Create throughput alarms for the given organization.", "description" : "Operation reserved to administrators.", "operationId" : "createOrganizationThroughputAlarms", "consumes" : [ "application/json" ], "produces" : [ "application/json" ], "parameters" : [ { "name" : "periodLength", "in" : "query", "required" : false, "type" : "integer", "default" : 3600, "format" : "int32" }, { "name" : "tolerance", "in" : "query", "required" : false, "type" : "number", "default" : 5.0, "format" : "float" }, { "name" : "organization", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Alarm check created." }, "403" : { "description" : "User is not authorized to perform this operation." } } } }, "/status/elasticsearch/nodesstats/{nodesStatsName}/statsName/{statsName}" : { "get" : { "tags" : [ "status" ], "summary" : "Retrieves node stats for elasticsearch cluster with the specified stats name.\nThe possible parameters are listed here, for example nodesStatsName='os', statsName='load_average'", "description" : "Operation reserved to administrators.", "operationId" : "elasticsearchNodesStats", "consumes" : [ "application/json" ], "produces" : [ "application/json" ], "parameters" : [ { "name" : "nodesStatsName", "in" : "path", "required" : true, "type" : "string" }, { "name" : "statsName", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Elasticsearch stats alarm." }, "403" : { "description" : "User is not authorized to perform this operation." } } } }, "/status/mothers/organization/{organizationId}" : { "get" : { "tags" : [ "status" ], "summary" : "Checks if all the gateways for an organization are online.", "description" : "Operation reserved to admins and members of the requested organization.", "operationId" : "getOrganizationMothersStatus", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "organizationId", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "The status of the gateways. isOnline is true when all of the devices are online.", "schema" : { "$ref" : "#/definitions/DeviceStatusResponse" } }, "403" : { "description" : "User is not authorized to perform this operation." } } } }, "/xbee-factory/{macAddress}" : { "get" : { "tags" : [ "xbee-factory" ], "summary" : "Return XBee factory configuration", "description" : "Authentication required for this operation.", "operationId" : "getFactory", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "macAddress", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Returns XBee factory configuration.", "schema" : { "$ref" : "#/definitions/XBeeFactory" } }, "403" : { "description" : "User must be an admin." }, "404" : { "description" : "XBee factory configuration does not exist." } } }, "post" : { "tags" : [ "xbee-factory" ], "summary" : "Save an XBee factory configuration.", "description" : "Authentication required for this operation", "operationId" : "saveFactory", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "macAddress", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/XBeeFactoryEditable" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "XBee factory saved", "schema" : { "$ref" : "#/definitions/XBeeFactory" } }, "400" : { "description" : "Configuration values must be either strings or json objects." }, "403" : { "description" : "User must be an admin." }, "500" : { "description" : "Error while installing the app." } } }, "delete" : { "tags" : [ "xbee-factory" ], "summary" : "Remove a XBee factory configuration", "description" : "Authentication required for this operation, authenticated user must have admin role.", "operationId" : "removeFactory", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "macAddress", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "204" : { "description" : "Uninstall succeeded." }, "403" : { "description" : "User is not authorized to perform operation, must be an admin." }, "404" : { "description" : "XBee factory not found." }, "510" : { "description" : "Error - factory not removed." } } } }, "/xbee-factory/history/{macAddress}" : { "get" : { "tags" : [ "xbee-factory" ], "summary" : "Return XBee factory configuration history", "description" : "Authentication required for this operation.", "operationId" : "getFactoryHistory", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "macAddress", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Returns XBee factory configuration history", "schema" : { "type" : "object", "additionalProperties" : { "type" : "array", "items" : { "$ref" : "#/definitions/XBeeConfiguration" } } } }, "403" : { "description" : "User must be an admin." }, "404" : { "description" : "XBee factory configuration does not exist." } } } }, "/xbee-factory/history/test-result/{macAddress}" : { "get" : { "tags" : [ "xbee-factory" ], "summary" : "Return XBee factory test result history", "description" : "Authentication required for this operation.", "operationId" : "getTestResultHistory", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "macAddress", "in" : "path", "required" : true, "type" : "string" } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "200" : { "description" : "Returns XBee factory test result history", "schema" : { "type" : "object", "additionalProperties" : { "type" : "array", "items" : { "$ref" : "#/definitions/XBeeTestResult" } } } }, "403" : { "description" : "User must be an admin." }, "404" : { "description" : "XBee factory does not exist." } } } }, "/xbee-factory-update/{macAddress}" : { "post" : { "tags" : [ "xbee-factory-update" ], "summary" : "Update an XBee factory configuration.", "description" : "Authentication required for this operation", "operationId" : "updateFactoryConfiguration", "consumes" : [ "application/json" ], "produces" : [ "application/json", "application/zensie-v2+json" ], "parameters" : [ { "name" : "macAddress", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "body", "required" : false, "schema" : { "$ref" : "#/definitions/XBeeFactoryEditable" } } ], "security" : [ { "Bearer" : [ ] } ], "responses" : { "201" : { "description" : "XBee factory configuration updated", "schema" : { "$ref" : "#/definitions/XBeeFactory" } }, "400" : { "description" : "Configuration values must be either strings or json objects." }, "403" : { "description" : "User must be an admin." }, "500" : { "description" : "Error while updating the app installation." } } } } }, "securityDefinitions" : { "Bearer" : { "description" : "", "type" : "apiKey", "name" : "Authorization", "in" : "header" } }, "definitions" : { "Result" : { "type" : "object", "properties" : { "healthy" : { "type" : "boolean" }, "message" : { "type" : "string" }, "error" : { "$ref" : "#/definitions/Throwable" }, "details" : { "type" : "object", "additionalProperties" : { "type" : "object" } }, "time" : { "type" : "integer", "format" : "int64" }, "duration" : { "type" : "integer", "format" : "int64" }, "timestamp" : { "type" : "string" } } }, "StackTraceElement" : { "type" : "object", "properties" : { "classLoaderName" : { "type" : "string" }, "moduleName" : { "type" : "string" }, "moduleVersion" : { "type" : "string" }, "methodName" : { "type" : "string" }, "fileName" : { "type" : "string" }, "lineNumber" : { "type" : "integer", "format" : "int32" }, "className" : { "type" : "string" }, "nativeMethod" : { "type" : "boolean" } } }, "Throwable" : { "type" : "object", "properties" : { "cause" : { "$ref" : "#/definitions/Throwable" }, "stackTrace" : { "type" : "array", "items" : { "$ref" : "#/definitions/StackTraceElement" } }, "message" : { "type" : "string" }, "suppressed" : { "type" : "array", "items" : { "$ref" : "#/definitions/Throwable" } }, "localizedMessage" : { "type" : "string" } } }, "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" : "#/definitions/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." }, "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." }, "ChunkedOutput" : { "type" : "object", "properties" : { "type" : { "$ref" : "#/definitions/Type" }, "closed" : { "type" : "boolean" } } }, "Type" : { "type" : "object", "properties" : { "typeName" : { "type" : "string" } } }, "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" : "#/definitions/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." }, "Assembly" : { "type" : "object", "properties" : { "battery1" : { "type" : "string" }, "battery2" : { "type" : "string" }, "pcb1" : { "type" : "string" }, "pcb2" : { "type" : "string" }, "productNumber" : { "type" : "string" }, "remarks" : { "type" : "string" }, "xbee1" : { "type" : "string" }, "xbee2" : { "type" : "string" }, "serialNumber" : { "type" : "string", "description" : "Serial number." }, "changedBy" : { "type" : "string" }, "createdAt" : { "type" : "string" }, "endDate" : { "type" : "string" }, "startDate" : { "type" : "string" } } }, "NewAssembly" : { "type" : "object", "properties" : { "battery1" : { "type" : "string" }, "battery2" : { "type" : "string" }, "pcb1" : { "type" : "string" }, "pcb2" : { "type" : "string" }, "productNumber" : { "type" : "string" }, "remarks" : { "type" : "string" }, "xbee1" : { "type" : "string" }, "xbee2" : { "type" : "string" }, "serialNumber" : { "type" : "string", "description" : "Serial number." }, "changedBy" : { "type" : "string" }, "createdAt" : { "type" : "string" }, "endDate" : { "type" : "string" }, "startDate" : { "type" : "string" } } }, "AssemblyEditable" : { "type" : "object", "properties" : { "battery1" : { "type" : "string" }, "battery2" : { "type" : "string" }, "pcb1" : { "type" : "string" }, "pcb2" : { "type" : "string" }, "productNumber" : { "type" : "string" }, "remarks" : { "type" : "string" }, "xbee1" : { "type" : "string" }, "xbee2" : { "type" : "string" } } }, "AccessToken" : { "type" : "object", "required" : [ "accessToken", "expiresIn", "type" ], "properties" : { "accessToken" : { "type" : "string", "description" : "An access token used to make authorized requests on certain resources" }, "expiresIn" : { "type" : "integer", "format" : "int64", "description" : "Number of seconds in which it expires" }, "type" : { "type" : "string", "description" : "Type of the access token" } }, "description" : "An access token used to grant authorization on certain API operations" }, "LicenseAccessTokenRequest" : { "type" : "object", "required" : [ "audience", "clientSecret", "licenseId" ], "properties" : { "audience" : { "type" : "string", "description" : "The intended consumer of the token, usually this is https://api.cropspace.com/api" }, "clientSecret" : { "type" : "string", "description" : "The client secret of the machine-to-machine service" }, "licenseId" : { "type" : "string", "description" : "Unique identifier for the license." } }, "description" : "Request used by licenses to get an access token for authorization on certain API operations" }, "Assignment of a role on a resource for a user" : { "type" : "object", "properties" : { "assignee" : { "type" : "string", "description" : "Email of the assignee" }, "resourceId" : { "type" : "string", "description" : "Id of the resource on which the role is assigned" }, "resourceType" : { "type" : "string", "description" : "Type of the resource on which the role is assigned" }, "role" : { "type" : "string", "description" : "Assigned role" } } }, "ScopesAndClaims" : { "type" : "object", "properties" : { "claims" : { "type" : "array", "items" : { "type" : "string" } }, "scopes" : { "type" : "array", "items" : { "type" : "string" } } } }, "BillingHistoryDetailsResponse" : { "type" : "object", "properties" : { "active" : { "type" : "boolean" }, "billingHistoryDetailsId" : { "type" : "string" }, "checkEnabled" : { "type" : "boolean" }, "checkId" : { "type" : "string" }, "checkName" : { "type" : "string" }, "checkType" : { "type" : "string" }, "collectJson" : { "type" : "boolean" }, "date" : { "type" : "string" }, "expectedCount" : { "type" : "integer", "format" : "int64" }, "jsonCount" : { "type" : "string" }, "locationDescription" : { "type" : "string" }, "locationName" : { "type" : "string" }, "motherName" : { "type" : "string" }, "organizationName" : { "type" : "string" }, "regularCount" : { "type" : "string" }, "sensorName" : { "type" : "string" }, "sensorType" : { "type" : "string" } } }, "BillingHistoryDetails" : { "type" : "object", "properties" : { "active" : { "type" : "boolean", "description" : "States if the billing history record is active or not." }, "billingHistoryDetailsId" : { "type" : "string", "description" : "Organization id for the billing details record." }, "checkId" : { "type" : "string", "description" : "The check id of the billing details record." }, "collectJson" : { "type" : "boolean", "description" : "The collect json property of the billing details record." }, "date" : { "type" : "string", "description" : "The date of the billing details record." }, "gateway_UUID" : { "type" : "string", "description" : "The UUID for the gateway of the billing details record." }, "ingestedForIndex" : { "type" : "array", "description" : "The ElasticSearch index from which the (external) hits of the billing details record come from.", "uniqueItems" : true, "items" : { "type" : "string" } }, "isExternal" : { "type" : "boolean", "description" : "States if the billing history record is coming from an import check or not." }, "jsonCount" : { "type" : "string", "description" : "The number of json events of the billing details record." }, "location" : { "type" : "string", "description" : "The location of the billing details record." }, "motherMacAddress" : { "type" : "string", "description" : "The mac address for the mother of the billing details record." }, "organizationId" : { "type" : "string", "description" : "The organization of the billing details record." }, "regularCount" : { "type" : "string", "description" : "The number of regular events of the billing details record." }, "sensorType" : { "type" : "string", "description" : "The sensor type of the billing details record." } }, "description" : "BillingHistoryDetails" }, "BillingHistoryDetailsUpdate" : { "type" : "object", "properties" : { "active" : { "type" : "boolean", "description" : "States if the billing history record is active or not." } }, "description" : "BillingHistoryDetailsUpdate" }, "BillingHistoryForecastRequest" : { "type" : "object", "properties" : { "includePausedChecks" : { "type" : "boolean" } } }, "BillingHistoryRequest" : { "type" : "object", "properties" : { "month" : { "type" : "string" }, "organization" : { "type" : "string" }, "year" : { "type" : "string" } } }, "BillingHistory" : { "type" : "object", "properties" : { "checksCount" : { "type" : "string", "description" : "The number of checks of the billing record." }, "checksPrice" : { "type" : "string", "description" : "The price of checks of the billing record." }, "currency" : { "type" : "string", "description" : "The currency of the billing record." }, "date" : { "type" : "string", "description" : "The date of the billing record." }, "discountAmount" : { "type" : "string", "description" : "The discount amount value for the billing record. (this gets subtracted from the total)" }, "discountPercentage" : { "type" : "string", "description" : "The discount percentage value for the billing record." }, "isLocked" : { "type" : "boolean", "description" : "States if the billing history record is locked for change or not." }, "jsonCount" : { "type" : "string", "description" : "The number of json events of the billing record." }, "jsonPrice" : { "type" : "string", "description" : "The price of json events of the billing record." }, "mothersCount" : { "type" : "string", "description" : "The number of mothers of the billing record." }, "mothersPrice" : { "type" : "string", "description" : "The price of mothers of the billing record." }, "organizationId" : { "type" : "string", "description" : "Organization id for the billing record." }, "preferredCurrency" : { "type" : "string" }, "previousTotal" : { "type" : "string" }, "pricing" : { "type" : "string", "description" : "Json string of the pricing object used to calculate the prices" }, "regularCount" : { "type" : "string", "description" : "The number of regular events of the billing record." }, "regularPrice" : { "type" : "string", "description" : "The price of regular events of the billing record." }, "remarks" : { "type" : "string", "description" : "Remarks made by account manager" }, "smsCount" : { "type" : "string", "description" : "The number of SMSs of the billing record." }, "smsPrice" : { "type" : "string", "description" : "The price of SMSs of the billing record." }, "total" : { "type" : "string", "description" : "The total price of the billing record." }, "totalIncludingVat" : { "type" : "string", "description" : "The total amount including the VAT for the billing record." }, "totalsPerMonthPerCurrency" : { "type" : "object", "additionalProperties" : { "$ref" : "#/definitions/BillingHistory" } }, "vatAmount" : { "type" : "string", "description" : "The VAT amount value for the billing record." } }, "description" : "BillingHistory" }, "BillingHistoryUpdate" : { "type" : "object", "properties" : { "checksCount" : { "type" : "string", "description" : "The number of checks of the billing record." }, "isLocked" : { "type" : "boolean", "description" : "States if the billing history record is locked for change or not." }, "jsonCount" : { "type" : "string", "description" : "The number of json events of the billing record." }, "mothersCount" : { "type" : "string", "description" : "The number of mothers of the billing record." }, "regularCount" : { "type" : "string", "description" : "The number of regular events of the billing record." }, "remarks" : { "type" : "string", "description" : "Remarks made by account manager" } }, "description" : "BillingHistoryUpdate" }, "Axes" : { "type" : "object", "required" : [ "x", "y" ], "properties" : { "x" : { "$ref" : "#/definitions/Axis" }, "y" : { "$ref" : "#/definitions/Axis" } } }, "Axis" : { "type" : "object", "properties" : { "max" : { "type" : "number", "format" : "float" }, "metric" : { "type" : "string" }, "min" : { "type" : "number", "format" : "float" }, "unit" : { "type" : "string" } } }, "Chart" : { "type" : "object", "required" : [ "axes", "series" ], "properties" : { "axes" : { "$ref" : "#/definitions/Axes" }, "series" : { "type" : "array", "items" : { "$ref" : "#/definitions/Series" } } } }, "Series" : { "type" : "object", "required" : [ "timestamp" ], "properties" : { "timestamp" : { "type" : "integer", "format" : "int64" }, "x" : { "type" : "number", "format" : "float" }, "y" : { "type" : "number", "format" : "float" } } }, "Aggregation" : { "type" : "object", "properties" : { "conversionUnit" : { "type" : "string" }, "cumulative" : { "type" : "boolean" }, "type" : { "type" : "string" } }, "description" : "Describes the aggregation for a data request." }, "ScatterplotRequest" : { "type" : "object", "required" : [ "time", "x", "y" ], "properties" : { "time" : { "$ref" : "#/definitions/Time" }, "x" : { "$ref" : "#/definitions/Sources" }, "y" : { "$ref" : "#/definitions/Sources" } } }, "Source" : { "type" : "object", "required" : [ "checkId" ], "properties" : { "checkId" : { "type" : "string" }, "sensorField" : { "type" : "string" } } }, "Sources" : { "type" : "object", "required" : [ "aggregation" ], "properties" : { "aggregation" : { "$ref" : "#/definitions/Aggregation" }, "sources" : { "type" : "array", "items" : { "$ref" : "#/definitions/Source" } } } }, "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." } } }, "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." } } }, "Cultivation" : { "type" : "object", "required" : [ "createdAt", "cultivationId", "dateEnd", "dateStart", "name", "organizationId", "siteId", "targetResolution", "targets", "zoneHistoryDetails", "zones", "zonesUuids" ], "properties" : { "batch" : { "type" : "string", "description" : "Identifier of the batch a cultivation belongs to." }, "dateEnd" : { "type" : "string", "description" : "End of the cultivation in UTC as ISO 8601 format e.g. 2025-07-30T00:00:00Z" }, "dateStart" : { "type" : "string", "description" : "Start of the cultivation in UTC as ISO 8601 format e.g. 2025-07-30T00:00:00Z" }, "description" : { "type" : "string", "description" : "Brief description that elaborates on the name" }, "genus" : { "type" : "string", "description" : "A taxonomic rank that groups closely related species." }, "name" : { "type" : "string", "description" : "Displayable name." }, "phases" : { "type" : "array", "description" : "Contiguous phases within the cultivation timeline, ordered chronologically by start day.", "items" : { "$ref" : "#/definitions/CultivationPhase" } }, "plantGroups" : { "type" : "array", "description" : "Plant groups within the cultivation hierarchy.", "items" : { "$ref" : "#/definitions/PlantGroup" } }, "siteId" : { "type" : "string", "description" : "Identifier of the site it belongs to, together with the organizationId this is unique." }, "species" : { "type" : "string", "description" : "A group of organisms that can interbreed naturally to produce fertile offspring." }, "startOfDayInMinutes" : { "type" : "integer", "format" : "int32", "description" : "Start of the day period, expressed as minutes since midnight (0-1439), e.g. 360 for 06:00.", "minimum" : 0, "maximum" : 1439 }, "startOfNightInMinutes" : { "type" : "integer", "format" : "int32", "description" : "Start of the night period, expressed as minutes since midnight (0-1439), e.g. 1200 for 20:00.", "minimum" : 0, "maximum" : 1439 }, "variety" : { "type" : "string", "description" : "A population of plants of a given species with specific characteristics that has been selected and cultivated" }, "zoneHistory" : { "type" : "array", "description" : "The history, from newest to oldest, of the zones the cultivation has been covering since inception", "items" : { "$ref" : "#/definitions/CultivationZonesHistoryItem" } }, "zonesUuids" : { "type" : "array", "description" : "Unique identifiers of the current zones the cultivation covers.", "items" : { "type" : "string" } }, "createdAt" : { "type" : "string", "description" : "Timestamp of when it was created. Identifies the cultivation within the organization." }, "createdBy" : { "type" : "string", "description" : "Identifier of the user that created it." }, "cultivationId" : { "type" : "string", "description" : "Universally unique identifier of a cultivation." }, "organizationId" : { "type" : "string", "description" : "The unique identifier of the organization it belongs to." }, "passportPhotoUrl" : { "type" : "string", "description" : "Presigned url for cultivation passport photo" }, "targetResolution" : { "type" : "string", "description" : "Defines whether the strategy setpoints for this target are specified on a weekly or a daily basis." }, "targets" : { "type" : "array", "description" : "List of metrics targets in the cultivation", "items" : { "$ref" : "#/definitions/CultivationTarget" } }, "zoneHistoryDetails" : { "type" : "array", "description" : "The history details, from newest to oldest, of the zones the cultivation has been covering since inception", "items" : { "$ref" : "#/definitions/CultivationZonesHistoryItemDetails" } }, "zones" : { "type" : "array", "description" : "List of zones the cultivation currently covers", "items" : { "$ref" : "#/definitions/Zone" } } }, "description" : "Cultivation information for a predefined period of time along with metric targets." }, "CultivationPhase" : { "type" : "object", "required" : [ "startDay" ], "properties" : { "color" : { "type" : "string", "description" : "Display color of the phase as a hex string, e.g. '#FAEEDA'.", "readOnly" : true }, "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." }, "startDay" : { "type" : "integer", "format" : "int32", "description" : "Day the phase starts on, counted in whole days from the cultivation start, e.g. 0 for the first day of the cultivation. Phases are contiguous: a phase runs until the start of the next one, or until the end of the cultivation for the last phase." }, "uuid" : { "type" : "string", "description" : "Identifier of the organization-wide phase definition this phase refers to. Leave it empty to add a phase the organization does not define yet, and its name is used to define it." } }, "description" : "Contains information on a phase within the cultivation timeline." }, "CultivationTarget" : { "type" : "object", "required" : [ "createdAt", "cultivationId", "cultivationTargetId", "organizationId" ], "properties" : { "hasNightTarget" : { "type" : "boolean", "description" : "Whether this target defines separate day and night values. Only allowed on a cultivation with DAILY target resolution that has both start-of-day and start-of-night times set." }, "metricId" : { "type" : "string", "description" : "Identifier of the metric" }, "name" : { "type" : "string", "description" : "Displayable name." }, "setpoints" : { "type" : "array", "description" : "The metric target and bandwidth setpoints in the cultivation, sorted by timestamp", "items" : { "$ref" : "#/definitions/CultivationTargetSetpoint" } }, "createdAt" : { "type" : "string", "description" : "Timestamp of when it was created. Identifies the target within the cultivation." }, "createdBy" : { "type" : "string", "description" : "Identifier of the user that created it." }, "cultivationId" : { "type" : "string", "description" : "Universally unique identifier of a cultivation." }, "cultivationTargetId" : { "type" : "string", "description" : "Universally unique identifier of a cultivation target." }, "organizationId" : { "type" : "string", "description" : "The unique identifier of the organization it belongs to." } }, "description" : "Represent a metric target for a cultivation." }, "CultivationTargetSeriesResponse" : { "type" : "object", "required" : [ "cultivation", "cultivationTarget", "setpoints", "time" ], "properties" : { "cultivation" : { "$ref" : "#/definitions/Cultivation" }, "cultivationTarget" : { "$ref" : "#/definitions/CultivationTarget" }, "setpoints" : { "type" : "array", "items" : { "$ref" : "#/definitions/CultivationTargetSeriesSetpoint" } }, "time" : { "$ref" : "#/definitions/Time" } } }, "CultivationTargetSeriesSetpoint" : { "type" : "object", "required" : [ "timestamp" ], "properties" : { "maxValue" : { "type" : "number", "format" : "double", "description" : "Upper limit for the target bandwidth." }, "minValue" : { "type" : "number", "format" : "double", "description" : "Lower limit for the target bandwidth." }, "targetValue" : { "type" : "number", "format" : "double", "description" : "Target value." }, "timestamp" : { "type" : "integer", "format" : "int64", "description" : "Epoch timestamp in milliseconds, required" } }, "description" : "Represents a computed datapoint in a cultivation target line series, where timestamp is expressed in epoch milliseconds" }, "CultivationTargetSetpoint" : { "type" : "object", "required" : [ "timestamp" ], "properties" : { "maxValue" : { "type" : "number", "format" : "double", "description" : "Upper limit for the target bandwidth." }, "minValue" : { "type" : "number", "format" : "double", "description" : "Lower limit for the target bandwidth." }, "targetValue" : { "type" : "number", "format" : "double", "description" : "Target value." }, "timestamp" : { "type" : "integer", "format" : "int64", "description" : "Relative seconds since cultivation start date." } } }, "CultivationZonesHistoryItem" : { "type" : "object", "properties" : { "dateStart" : { "type" : "string", "description" : "Date when the cultivation starts covering a group of zones in UTC as ISO 8601 format e.g. 2025-07-30T00:00:00Z" }, "zoneUuids" : { "type" : "array", "description" : "Unique identifiers of the zones covered by the cultivation", "items" : { "type" : "string" } } }, "description" : "The zones a cultivation covers since a given date" }, "CultivationZonesHistoryItemDetails" : { "type" : "object", "properties" : { "dateStart" : { "type" : "string", "description" : "Date when the cultivation starts covering a group of zones in UTC as ISO 8601 format e.g. 2025-07-30T00:00:00Z" }, "zoneUuids" : { "type" : "array", "description" : "Unique identifiers of the zones covered by the cultivation", "items" : { "type" : "string" } }, "zones" : { "type" : "array", "description" : "List of zones covered by the cultivation", "items" : { "$ref" : "#/definitions/Zone" } } }, "description" : "The details of the zones a cultivation covers since a given date" }, "Plant" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "Unique identifier of the plant." }, "name" : { "type" : "string", "description" : "Name of the plant" } }, "description" : "Information on a plant within the cultivation - plant group hierarchy." }, "PlantGroup" : { "type" : "object", "properties" : { "id" : { "type" : "string", "description" : "Unique identifier of the plant group." }, "name" : { "type" : "string", "description" : "Name of the plant group." }, "plants" : { "type" : "array", "description" : "Plants within this plant group.", "items" : { "$ref" : "#/definitions/Plant" } } }, "description" : "Contains information on a plant group within the cultivation hierarchy." }, "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 } } }, "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" : "#/definitions/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" : "#/definitions/Soil" }, "uuid" : { "type" : "string", "description" : "Universally unique identifier." } }, "description" : "A Zone is a physical subsection in a site." }, "CultivationTargetSeriesRequest" : { "type" : "object", "required" : [ "target", "time" ], "properties" : { "aggregation" : { "description" : "Describes the aggregation for a data request. If not set, the aggregation defaults to average.", "$ref" : "#/definitions/Aggregation" }, "target" : { "$ref" : "#/definitions/CultivationTarget" }, "time" : { "$ref" : "#/definitions/Time" } }, "description" : "Request to retrieve cultivation target series." }, "CheckProperties" : { "type" : "object", "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" }, "dataSourceCoordinatesEditable" : { "description" : "A set of numbers that represent the current position of a data source", "$ref" : "#/definitions/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." }, "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." }, "owner" : { "type" : "string", "description" : "Email address." } } }, "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." }, "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." }, "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" : "#/definitions/DataSourceCoordinates" } }, "dataSourceCoordinates" : { "description" : "A set of numbers that represent the current position of a data source", "$ref" : "#/definitions/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" : "#/definitions/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" }, "CheckCollection" : { "type" : "object", "properties" : { "collectionId" : { "type" : "string", "description" : "Id of the collection" }, "name" : { "type" : "string", "description" : "Name of the collection" }, "order" : { "type" : "integer", "format" : "int32", "description" : "The position within all the collections" } } }, "CheckSummary" : { "type" : "object", "properties" : { "calculationSettings" : { "$ref" : "#/definitions/CalculationSettings" }, "checkId" : { "type" : "string" }, "collections" : { "type" : "array", "items" : { "$ref" : "#/definitions/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" }, "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." }, "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" } } }, "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" : "#/definitions/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" : "#/definitions/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" : "#/definitions/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" : "#/definitions/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" }, "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." } } }, "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" : "#/definitions/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" } } }, "Sensor" : { "type" : "object", "required" : [ "notificationIds" ], "properties" : { "notifications" : { "type" : "array", "items" : { "$ref" : "#/definitions/Notification" } }, "checkId" : { "type" : "string" }, "organizationId" : { "type" : "string" }, "siteId" : { "type" : "string" }, "dataSourceCoordinateHistory" : { "type" : "array", "items" : { "$ref" : "#/definitions/DataSourceCoordinates" } }, "dataSourceCoordinates" : { "$ref" : "#/definitions/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" } } }, "TransferChecksDTO" : { "type" : "object", "properties" : { "checkIds" : { "type" : "array", "description" : "The ids of the checks to transfer", "uniqueItems" : true, "items" : { "type" : "string" } }, "forceTransfer" : { "type" : "boolean", "description" : "A check won't be transferred if belongs to a widget or has notifications unless this is set to true. Setting this to true will remove the check from widgets and remove its notifications." }, "gatewayId" : { "type" : "string", "description" : "The id of the gateway to transfer to" } } }, "MultipleCheckUpdate" : { "type" : "object", "properties" : { "check" : { "$ref" : "#/definitions/CheckProperties" }, "checkIds" : { "type" : "array", "uniqueItems" : true, "items" : { "type" : "string" }, "maxItems" : 2147483647, "minItems" : 1 } }, "description" : "Updating multiple checks" }, "AttachedDocument" : { "type" : "object", "properties" : { "dataUploadId" : { "type" : "string" }, "filename" : { "type" : "string" }, "url" : { "type" : "string" } } }, "Comment" : { "type" : "object", "properties" : { "activityType" : { "type" : "string" }, "appInstallationId" : { "type" : "string" }, "email" : { "type" : "string" }, "groupId" : { "type" : "string" }, "lastUpdatedTimestamp" : { "type" : "string" }, "organizationId" : { "type" : "string" }, "timestamp" : { "type" : "string" }, "attachments" : { "description" : "Comment Attachments", "$ref" : "#/definitions/CommentAttachments" }, "commentId" : { "type" : "string", "description" : "Unique id of the comment." }, "parentCommentId" : { "type" : "string", "description" : "Parent comment id if reply" }, "replies" : { "type" : "array", "description" : "Replies of a comment", "items" : { "$ref" : "#/definitions/Comment" } }, "tags" : { "description" : "Tags of a comment", "$ref" : "#/definitions/CommentTags" }, "text" : { "type" : "string", "description" : "Comment text" } } }, "CommentAttachments" : { "type" : "object", "properties" : { "documents" : { "type" : "array", "uniqueItems" : true, "items" : { "$ref" : "#/definitions/AttachedDocument" } }, "images" : { "type" : "array", "uniqueItems" : true, "items" : { "$ref" : "#/definitions/ImageWithThumbnails" } } } }, "CommentTags" : { "type" : "object", "properties" : { "fields" : { "type" : "object", "description" : "Check fields", "additionalProperties" : { "type" : "array", "uniqueItems" : true, "items" : { "type" : "string" } } }, "checkIds" : { "type" : "array", "description" : "Check ids to which comment belongs to", "uniqueItems" : true, "items" : { "type" : "string" } }, "checkTimestamp" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of the check" }, "collectionId" : { "type" : "string", "description" : "Collection id within a check" }, "dateEntryId" : { "type" : "string", "description" : "Date entry id of a check" }, "emails" : { "type" : "array", "description" : "Users mentioned in the comments", "uniqueItems" : true, "items" : { "type" : "string" } }, "selectedCheckId" : { "type" : "string", "description" : "Selected check for this comment" }, "selectedField" : { "type" : "string", "description" : "Selected field id for this comment" } } }, "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" } } }, "ImageWithThumbnails" : { "type" : "object", "properties" : { "dataUploadId" : { "type" : "string" }, "imageDimensions" : { "$ref" : "#/definitions/ImageDimensions" }, "thumbnails" : { "type" : "array", "items" : { "$ref" : "#/definitions/ImageThumbnail" } }, "url" : { "type" : "string" } } }, "NewComment" : { "type" : "object", "properties" : { "fields" : { "type" : "object", "description" : "Check fields", "additionalProperties" : { "type" : "array", "uniqueItems" : true, "items" : { "type" : "string" } } }, "appInstallationId" : { "type" : "string" }, "checkIds" : { "type" : "array", "description" : "Check ids that serve as content for the comment", "uniqueItems" : true, "items" : { "type" : "string" } }, "checkTimestamp" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of comment" }, "collectionId" : { "type" : "string", "description" : "Collection id within a check" }, "dateEntryId" : { "type" : "string", "description" : "Date entry id of a check" }, "documentIds" : { "type" : "array", "description" : "Data upload ids of the documents attached to this comment", "uniqueItems" : true, "items" : { "type" : "string" } }, "emails" : { "type" : "array", "description" : "Emails of mentioned users", "uniqueItems" : true, "items" : { "type" : "string" } }, "groupId" : { "type" : "string", "description" : "Group id of the comment" }, "imageIds" : { "type" : "array", "uniqueItems" : true, "items" : { "type" : "string" } }, "organizationId" : { "type" : "string", "description" : "Organization id of the comment" }, "selectedCheckId" : { "type" : "string", "description" : "Check id that comment belongs to" }, "selectedField" : { "type" : "string", "description" : "Field that was selected for the comment" }, "text" : { "type" : "string", "description" : "Comment text" } } }, "NewCommentReply" : { "type" : "object", "properties" : { "emails" : { "type" : "array", "description" : "Emails of mentioned users", "uniqueItems" : true, "items" : { "type" : "string" } }, "text" : { "type" : "string", "description" : "Comment text" } } }, "CommentRequest" : { "type" : "object", "properties" : { "fields" : { "type" : "object", "description" : "Check fields", "additionalProperties" : { "type" : "array", "uniqueItems" : true, "items" : { "type" : "string" } } }, "appInstallationId" : { "type" : "string", "description" : "App installation id comments belong to" }, "checkIds" : { "type" : "array", "description" : "Check ids comments belong to", "uniqueItems" : true, "items" : { "type" : "string" } }, "collectionId" : { "type" : "string", "description" : "Collection id within a check" }, "dateEntryId" : { "type" : "string", "description" : "Date entry id of a check" }, "emails" : { "type" : "array", "description" : "Emails comments belong to (comment creators)", "uniqueItems" : true, "items" : { "type" : "string" } }, "groupId" : { "type" : "string", "description" : "Group id comments belong to" }, "mentions" : { "type" : "array", "description" : "Users that are mentioned in the comment", "uniqueItems" : true, "items" : { "type" : "string" } }, "organizationId" : { "type" : "string", "description" : "Organization id comments belong to" }, "text" : { "type" : "string", "description" : "Text that should be in the comment" } } }, "PaginatedComments" : { "type" : "object", "properties" : { "data" : { "type" : "array", "items" : { "$ref" : "#/definitions/Comment" } }, "pagination" : { "$ref" : "#/definitions/Pagination" } } }, "Pagination" : { "type" : "object", "properties" : { "lastPage" : { "type" : "integer", "format" : "int64" }, "page" : { "type" : "integer", "format" : "int32" }, "size" : { "type" : "integer", "format" : "int32" } } }, "CommentUpdate" : { "type" : "object", "properties" : { "fields" : { "type" : "object", "description" : "Check fields", "additionalProperties" : { "type" : "array", "uniqueItems" : true, "items" : { "type" : "string" } } }, "checkIds" : { "type" : "array", "description" : "Check ids to which comment belongs to", "uniqueItems" : true, "items" : { "type" : "string" } }, "checkTimestamp" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of comment" }, "collectionId" : { "type" : "string", "description" : "Collection id within a check" }, "dateEntryId" : { "type" : "string", "description" : "Date entry id of a check" }, "documentIds" : { "type" : "array", "description" : "Data upload ids of the documents attached to this comment", "uniqueItems" : true, "items" : { "type" : "string" } }, "emails" : { "type" : "array", "description" : "Emails of mentioned users", "uniqueItems" : true, "items" : { "type" : "string" } }, "imageIds" : { "type" : "array", "uniqueItems" : true, "items" : { "type" : "string" } }, "selectedCheckId" : { "type" : "string", "description" : "Selected check id for this comment" }, "selectedField" : { "type" : "string", "description" : "Selected field" }, "text" : { "type" : "string", "description" : "Comment text" } } }, "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" } } }, "NewCompanyDetails" : { "type" : "object", "properties" : { "accountManager" : { "type" : "string" }, "address" : { "type" : "string" }, "city" : { "type" : "string" }, "companyName" : { "type" : "string" }, "country" : { "type" : "string" }, "countryCode" : { "type" : "string" }, "invoiceEmail" : { "type" : "string" }, "postalCode" : { "type" : "string" }, "telephoneNumber" : { "type" : "string" }, "vatNumber" : { "type" : "string" } } }, "CompanyDetailsUpdate" : { "type" : "object", "properties" : { "accountManager" : { "type" : "string" }, "address" : { "type" : "string" }, "city" : { "type" : "string" }, "companyName" : { "type" : "string" }, "country" : { "type" : "string" }, "countryCode" : { "type" : "string" }, "debtorId" : { "type" : "integer", "format" : "int32" }, "invoiceEmail" : { "type" : "string" }, "postalCode" : { "type" : "string" }, "telephoneNumber" : { "type" : "string" }, "vatNumber" : { "type" : "string" } } }, "NewCrop" : { "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." } } }, "CropEditable" : { "type" : "object", "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." } } }, "CurrencyRates" : { "type" : "object", "properties" : { "base" : { "type" : "string", "description" : "Currency rates base." }, "date" : { "type" : "string", "description" : "Currency rates date." }, "rates" : { "type" : "object", "description" : "Currency rates.", "additionalProperties" : { "type" : "number", "format" : "double" } } }, "description" : "CurrencyRates" }, "CurrencyRatesMapper" : { "type" : "object", "properties" : { "base" : { "type" : "string" }, "currencyRatesPath" : { "type" : "string" }, "currencyRatesQueryParamKey" : { "type" : "string" }, "currencyRatesQueryParamValue" : { "type" : "string" }, "currencyRatesWebTarget" : { "type" : "string" }, "date" : { "type" : "string" }, "rateSymbol" : { "type" : "string" }, "rateValue" : { "type" : "string" }, "rates" : { "type" : "string" } } }, "Currency" : { "type" : "object", "properties" : { "currencyId" : { "type" : "string", "description" : "Unique identifier for the currency, should be the same as the ISO 4217 code" }, "name" : { "type" : "string", "description" : "Name of the currency" }, "symbol" : { "type" : "string", "description" : "Symbol of the currency" } } }, "NewCurrency" : { "type" : "object", "properties" : { "currencyId" : { "type" : "string" }, "name" : { "type" : "string" }, "symbol" : { "type" : "string" } } }, "CustomerRegistration" : { "type" : "object", "properties" : { "offerId" : { "type" : "string", "description" : "Offer Id." }, "organisationId" : { "type" : "string", "description" : "Organisation Id." }, "registrationId" : { "type" : "string", "description" : "Registration Id." }, "city" : { "type" : "string" }, "country" : { "type" : "string" }, "countryCode" : { "type" : "string" }, "customerEmail" : { "type" : "string", "description" : "Customer email." }, "customerFirstName" : { "type" : "string", "description" : "Customer first name." }, "customerId" : { "type" : "string", "description" : "Customer Id." }, "customerLastName" : { "type" : "string", "description" : "Customer last name." }, "number" : { "type" : "string" }, "organisationName" : { "type" : "string", "description" : "Organisation name." }, "partnerId" : { "type" : "string", "description" : "Partner Id." }, "postalCode" : { "type" : "string" }, "siteName" : { "type" : "string", "description" : "Site name." }, "street" : { "type" : "string" } } }, "NewCustomerRegistration" : { "type" : "object", "properties" : { "offerId" : { "type" : "string", "description" : "Offer Id." }, "organisationId" : { "type" : "string", "description" : "Organisation Id." }, "city" : { "type" : "string" }, "country" : { "type" : "string" }, "countryCode" : { "type" : "string" }, "customerEmail" : { "type" : "string", "description" : "Customer email." }, "customerFirstName" : { "type" : "string", "description" : "Customer first name." }, "customerId" : { "type" : "string", "description" : "Customer Id." }, "customerLastName" : { "type" : "string", "description" : "Customer last name." }, "number" : { "type" : "string" }, "organisationName" : { "type" : "string", "description" : "Organisation name." }, "partnerId" : { "type" : "string", "description" : "Partner Id." }, "postalCode" : { "type" : "string" }, "siteName" : { "type" : "string", "description" : "Site name." }, "street" : { "type" : "string" } } }, "Dashboard" : { "type" : "object", "required" : [ "createdBy", "creationTimestamp", "dashboardId", "name" ], "properties" : { "appId" : { "type" : "string", "description" : "Identifier of the application the dashboard belongs to." }, "description" : { "type" : "string", "description" : "Description of the dashboard." }, "name" : { "type" : "string", "description" : "Name of the dashboard." }, "createdBy" : { "type" : "string", "description" : "User that created the dashboard." }, "creationTimestamp" : { "type" : "integer", "format" : "int64", "description" : "Timestamp of when the dashboard was created." }, "dashboardId" : { "type" : "string", "description" : "Unique identifier of the dashboard." }, "groupId" : { "type" : "string", "description" : "Identifier of the dashboard group." }, "organizationId" : { "type" : "string", "description" : "Identifier of the organization that owns the dashboard." } }, "description" : "Core object in the platform used for grouping widget objects" }, "DashboardNew" : { "type" : "object", "required" : [ "name" ], "properties" : { "appId" : { "type" : "string", "description" : "Identifier of the application the dashboard belongs to." }, "description" : { "type" : "string", "description" : "Description of the dashboard." }, "name" : { "type" : "string", "description" : "Name of the dashboard." } }, "description" : "Object holding the required properties to create a new dashboard" }, "DashboardTheme" : { "type" : "object", "properties" : { "createdByEmail" : { "type" : "string", "description" : "Created by" }, "css" : { "description" : "Dashboard theme css", "$ref" : "#/definitions/DashboardThemeCSS" }, "dashboardThemeId" : { "type" : "string", "description" : "Dashboard theme id" }, "groupIds" : { "type" : "array", "uniqueItems" : true, "items" : { "type" : "string" } }, "logo" : { "description" : "Dashboard logo", "$ref" : "#/definitions/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" } } } }, "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})$" } } }, "NewDashboardTheme" : { "type" : "object", "required" : [ "css" ], "properties" : { "css" : { "$ref" : "#/definitions/DashboardThemeCSS" }, "logoDataUploadId" : { "type" : "string" }, "name" : { "type" : "string" } } }, "DashboardThemeUpdate" : { "type" : "object", "properties" : { "css" : { "$ref" : "#/definitions/DashboardThemeCSS" }, "logoDataUploadId" : { "type" : "string" }, "name" : { "type" : "string" } } }, "DashboardEditable" : { "type" : "object", "properties" : { "appId" : { "type" : "string", "description" : "Identifier of the application the dashboard belongs to." }, "description" : { "type" : "string", "description" : "Description of the dashboard." }, "name" : { "type" : "string", "description" : "Name of the dashboard." } }, "description" : "Object holding the editable properties of a dashboard" }, "DataExportBackgroundRequest" : { "type" : "object", "required" : [ "timeZone" ], "properties" : { "aggregationInterval" : { "type" : "string" }, "aggregationMetric" : { "type" : "string" }, "checkIds" : { "type" : "array", "items" : { "type" : "string" } }, "dataExportId" : { "type" : "string" }, "decimalMark" : { "type" : "string" }, "documentType" : { "type" : "string" }, "email" : { "type" : "string" }, "format" : { "type" : "string" }, "fromDate" : { "type" : "string" }, "location" : { "type" : "string" }, "organization" : { "type" : "string" }, "sensorType" : { "type" : "string" }, "tags" : { "type" : "array", "items" : { "type" : "string" } }, "timeZone" : { "type" : "integer", "format" : "int32" }, "toDate" : { "type" : "string" } }, "description" : "The created request to export data" }, "DataExportRequest" : { "type" : "object", "required" : [ "timezoneOffset" ], "properties" : { "aggregationInterval" : { "type" : "string" }, "aggregationMetric" : { "type" : "string" }, "checkIds" : { "type" : "array", "items" : { "type" : "string" } }, "decimalMark" : { "type" : "string" }, "documentType" : { "type" : "string" }, "email" : { "type" : "string" }, "format" : { "type" : "string" }, "fromDate" : { "type" : "string" }, "location" : { "type" : "string" }, "month" : { "type" : "string" }, "organization" : { "type" : "string" }, "sensorType" : { "type" : "string" }, "tags" : { "type" : "array", "items" : { "type" : "string" } }, "timezoneOffset" : { "type" : "integer", "format" : "int32" }, "toDate" : { "type" : "string" }, "year" : { "type" : "string" } }, "description" : "A request to export data" }, "DataExport" : { "type" : "object", "properties" : { "aggregationInterval" : { "type" : "string", "description" : "The aggregation interval for the data export." }, "aggregationMetric" : { "type" : "string", "description" : "The aggregation metric for the data export." }, "dataExportId" : { "type" : "string", "description" : "Data export id." }, "date" : { "type" : "string", "description" : "The date of the data export." }, "documentType" : { "type" : "string", "description" : "The document type for the data export." }, "duration" : { "type" : "string", "description" : "The duration of the data export." }, "email" : { "type" : "string", "description" : "The email of the data export." }, "filename" : { "type" : "string", "description" : "The filename of the data export." }, "fromDate" : { "type" : "string", "description" : "The start date for the data export." }, "location" : { "type" : "string", "description" : "The location of the data export." }, "month" : { "type" : "string", "description" : "The month parameter of the data export." }, "numberOfRows" : { "type" : "integer", "format" : "int64", "description" : "The resulting number of rows for the data export." }, "organizationId" : { "type" : "string", "description" : "Organization id for the data export." }, "sensorType" : { "type" : "string", "description" : "The sensor type parameter of the data export." }, "status" : { "type" : "string", "description" : "The status of the data export." }, "timeZone" : { "type" : "integer", "format" : "int32", "description" : "The time zone for the requested data export." }, "toDate" : { "type" : "string", "description" : "The end date for the data export." }, "year" : { "type" : "string", "description" : "The year parameter of the data export." } }, "description" : "DataExport" }, "DataExportResponse" : { "type" : "object", "properties" : { "dataExport" : { "$ref" : "#/definitions/DataExport" }, "resourceUrl" : { "type" : "string" } }, "description" : "A wrapper for the data export along with the resulting document url" }, "DataExportCountResponse" : { "type" : "object", "required" : [ "rowsCount" ], "properties" : { "rowsCount" : { "type" : "integer", "format" : "int64" } } }, "NotificationTemplate" : { "type" : "object", "properties" : { "condition" : { "type" : "string" }, "frontend" : { "type" : "string" }, "name" : { "type" : "string" } } }, "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" } } }, "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" : "#/definitions/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" : "#/definitions/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" : "#/definitions/SharedSensorType" } }, "description" : "Authorization entity" }, "SensorTypeEnumData" : { "type" : "object", "properties" : { "key" : { "type" : "string" }, "mappings" : { "type" : "array", "items" : { "$ref" : "#/definitions/SensorTypeEnumDataMapping" } } } }, "SensorTypeEnumDataMapping" : { "type" : "object", "properties" : { "color" : { "type" : "string" }, "label" : { "type" : "string" }, "value" : { "type" : "integer", "format" : "int32" } } }, "SensorsData" : { "type" : "object", "properties" : { "sensorFields" : { "type" : "array", "items" : { "$ref" : "#/definitions/SensorFieldInfo" } }, "sensorType" : { "$ref" : "#/definitions/SensorType" }, "sensors" : { "type" : "array", "items" : { "$ref" : "#/definitions/Sensor" } }, "values" : { "type" : "object", "additionalProperties" : { "type" : "object" } } } }, "SensorsDataAggregation" : { "type" : "object", "properties" : { "aggregationType" : { "type" : "string", "description" : "The type of aggregation to apply to the retrieved values." }, "sensorFields" : { "type" : "array", "items" : { "$ref" : "#/definitions/SensorField" } }, "sensorIds" : { "type" : "array", "description" : "Ids of the sensors to get data for. They must be of the same type.", "items" : { "type" : "string" } } } }, "SensorsDataResponse" : { "type" : "object", "required" : [ "time" ], "properties" : { "aggregations" : { "type" : "array", "items" : { "$ref" : "#/definitions/SensorsDataAggregation" } }, "time" : { "$ref" : "#/definitions/Time" }, "data" : { "type" : "array", "items" : { "$ref" : "#/definitions/SensorsData" } } } }, "SensorsDataRequest" : { "type" : "object", "required" : [ "time" ], "properties" : { "aggregations" : { "type" : "array", "items" : { "$ref" : "#/definitions/SensorsDataAggregation" } }, "time" : { "$ref" : "#/definitions/Time" } } }, "DataSourceBulkEdit" : { "type" : "object", "required" : [ "dataSourceId" ], "properties" : { "dataSourceCoordinatesEditable" : { "description" : "A set of numbers that represent the current position of a data source", "$ref" : "#/definitions/DataSourceCoordinatesEditable" }, "dataSourceId" : { "type" : "string", "description" : "Identifier of the data source" }, "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." }, "name" : { "type" : "string", "description" : "Displayable name." }, "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." }, "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." }, "zoneId" : { "type" : "string", "description" : "Identifier of the zone within a site where the data source belongs." } }, "description" : "Object containing the editable properties of a Data Source used for bulk edit." }, "DataUpload" : { "type" : "object", "properties" : { "creationTimestamp" : { "type" : "integer", "format" : "int64", "description" : "The creation timestamp." }, "dataUploadId" : { "type" : "string", "description" : "Data upload id." }, "filename" : { "type" : "string", "description" : "The name of the uploaded file" }, "groupId" : { "type" : "string", "description" : "Group id for the data upload." }, "imageDimensions" : { "description" : "The image dimensions", "$ref" : "#/definitions/ImageDimensions" }, "imageThumbnails" : { "type" : "array", "items" : { "$ref" : "#/definitions/ImageThumbnail" } }, "organizationId" : { "type" : "string", "description" : "Organization id for the data upload." }, "orientation" : { "type" : "integer", "format" : "int32", "description" : "The orientation of the image" }, "presignedUrl" : { "type" : "string" } }, "description" : "DataUpload" }, "Device" : { "type" : "object", "properties" : { "deviceModel" : { "type" : "string", "description" : "Model of device." }, "deviceType" : { "type" : "string", "description" : "Type of device." }, "name" : { "type" : "string", "description" : "Displayable name." }, "organizationId" : { "type" : "string", "description" : "Identifier of the organization it belongs to." }, "serialNumber" : { "type" : "string", "description" : "Serial number of the device." }, "siteId" : { "type" : "string", "description" : "Identifier of the site it belongs to, together with the organizationId this is unique." }, "createdAt" : { "type" : "string", "description" : "Timestamp of when it was created." }, "createdBy" : { "type" : "string", "description" : "Identifier of the user that created it." }, "deviceId" : { "type" : "string", "description" : "Unique identifier for the device." }, "siteUuid" : { "type" : "string", "description" : "Universally unique identifier." } }, "description" : "A piece of mechanical or electronic equipment." }, "DeviceNew" : { "type" : "object", "required" : [ "deviceType", "name", "organizationId", "siteId" ], "properties" : { "deviceModel" : { "type" : "string", "description" : "Model of device." }, "deviceType" : { "type" : "string", "description" : "Type of device." }, "name" : { "type" : "string", "description" : "Displayable name." }, "organizationId" : { "type" : "string", "description" : "Unique identifier for the organization, preferably a readable text such as the domain name of the company." }, "serialNumber" : { "type" : "string", "description" : "Serial number of the device." }, "siteId" : { "type" : "string", "description" : "Identifier of the site it belongs to, together with the organizationId this is unique." } }, "description" : "Object holding the properties of a new device." }, "DeviceEditable" : { "type" : "object", "properties" : { "deviceModel" : { "type" : "string", "description" : "Model of device." }, "deviceType" : { "type" : "string", "description" : "Type of device." }, "name" : { "type" : "string", "description" : "Displayable name." }, "organizationId" : { "type" : "string", "description" : "Identifier of the organization it belongs to." }, "serialNumber" : { "type" : "string", "description" : "Serial number of the device." }, "siteId" : { "type" : "string", "description" : "Identifier of the site it belongs to, together with the organizationId this is unique." } }, "description" : "Object holding the editable properties of a device." }, "ExportPartnerData" : { "type" : "object", "required" : [ "id" ], "properties" : { "description" : { "type" : "string" }, "id" : { "type" : "integer", "format" : "int32" }, "items" : { "type" : "array", "uniqueItems" : true, "items" : { "$ref" : "#/definitions/ExportPartnerDataItem" } }, "name" : { "type" : "string" } } }, "ExportPartnerDataItem" : { "type" : "object", "required" : [ "id" ], "properties" : { "description" : { "type" : "string" }, "id" : { "type" : "integer", "format" : "int32" }, "name" : { "type" : "string" } } }, "ExportPartnerJobMap" : { "type" : "object", "required" : [ "exportPartnerData" ], "properties" : { "checkId" : { "type" : "string" }, "checkJsonKey" : { "type" : "string" }, "exportPartnerData" : { "$ref" : "#/definitions/ExportPartnerData" } } }, "NewExportPartnerJob" : { "type" : "object", "required" : [ "active", "frequency" ], "properties" : { "active" : { "type" : "boolean" }, "description" : { "type" : "string" }, "exportPartnerId" : { "type" : "string" }, "exportPartnerURL" : { "type" : "string" }, "frequency" : { "type" : "integer", "format" : "int32" }, "organizationId" : { "type" : "string" }, "payload" : { "type" : "array", "items" : { "$ref" : "#/definitions/ExportPartnerJobMap" } } } }, "ExportPartnerGetJobRequest" : { "type" : "object", "required" : [ "active", "frequency" ], "properties" : { "active" : { "type" : "boolean" }, "exportPartnerId" : { "type" : "string" }, "frequency" : { "type" : "integer", "format" : "int32" } } }, "ExportPartnerAccess" : { "type" : "object", "required" : [ "expiresAt", "expiresIn" ], "properties" : { "expires" : { "type" : "string" }, "expiresAt" : { "type" : "integer", "format" : "int32" }, "expiresIn" : { "type" : "integer", "format" : "int32" }, "issued" : { "type" : "string" }, "token" : { "type" : "string" }, "tokenType" : { "type" : "string" } } }, "ExportPartnerJob" : { "type" : "object", "required" : [ "active", "frequency" ], "properties" : { "active" : { "type" : "boolean", "description" : "States if the export partner job is active." }, "createdAt" : { "type" : "string", "description" : "The date and time a export partner job was created." }, "description" : { "type" : "string", "description" : "The description of export partner job." }, "exportPartnerAccess" : { "description" : "The access token of export partner.", "$ref" : "#/definitions/ExportPartnerAccess" }, "exportPartnerId" : { "type" : "string", "description" : "Export partner id." }, "exportPartnerURL" : { "type" : "string", "description" : "The url of export partner." }, "frequency" : { "type" : "integer", "format" : "int32", "description" : "The frequency of export partner job." }, "jobId" : { "type" : "string", "description" : "The id of the export partner job." }, "organizationId" : { "type" : "string", "description" : "Organization of the export partner job" }, "payload" : { "type" : "array", "description" : "The payload of export partner job.", "items" : { "$ref" : "#/definitions/ExportPartnerJobMap" } }, "updatedAt" : { "type" : "string", "description" : "The date and time a export partner job was last updated." } }, "description" : "ExportPartnerJob" }, "ExportPartnerJobUpdate" : { "type" : "object", "properties" : { "active" : { "type" : "boolean", "description" : "States if the export partner job is active." }, "description" : { "type" : "string", "description" : "The description of export partner job." }, "exportPartnerAccess" : { "description" : "The access token of export partner.", "$ref" : "#/definitions/ExportPartnerAccess" }, "frequency" : { "type" : "integer", "format" : "int32", "description" : "The frequency of export partner job." }, "payload" : { "type" : "array", "description" : "The payload of export partner job.", "items" : { "$ref" : "#/definitions/ExportPartnerJobMap" } } }, "description" : "ExportPartnerJobUpdate" }, "NewExportPartner" : { "type" : "object", "properties" : { "data" : { "type" : "array", "items" : { "$ref" : "#/definitions/ExportPartnerData" } }, "description" : { "type" : "string" }, "exportPartnerId" : { "type" : "string" }, "exportPartnerURL" : { "type" : "string" } } }, "ExportPartner" : { "type" : "object", "properties" : { "createdAt" : { "type" : "string", "description" : "The date and time a export partner was created." }, "data" : { "type" : "array", "description" : "The json data of export partner.", "items" : { "$ref" : "#/definitions/ExportPartnerData" } }, "description" : { "type" : "string", "description" : "The description of export partner." }, "exportPartnerId" : { "type" : "string", "description" : "Export partner id." }, "exportPartnerURL" : { "type" : "string", "description" : "The url of export partner." }, "organizationId" : { "type" : "string", "description" : "UUID of the check" }, "updatedAt" : { "type" : "string", "description" : "The date and time a export partner was last updated." } }, "description" : "ExportPartner" }, "ExportPartnerUpdate" : { "type" : "object", "properties" : { "data" : { "type" : "array", "description" : "The json data of export partner.", "items" : { "$ref" : "#/definitions/ExportPartnerData" } }, "description" : { "type" : "string", "description" : "The description of export partner." }, "exportPartnerURL" : { "type" : "string", "description" : "The url of export partner." } }, "description" : "ExportPartnerUpdate" }, "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." } } }, "GatewayCluster" : { "type" : "object", "properties" : { "name" : { "type" : "string", "description" : "Gateway cluster name" }, "siteId" : { "type" : "string", "description" : "The site this gateway cluster belongs to." }, "gateways" : { "type" : "array", "items" : { "$ref" : "#/definitions/Gateway" } }, "clusterId" : { "type" : "string", "description" : "Gateway cluster id." }, "organizationId" : { "type" : "string" }, "locationId" : { "type" : "string", "description" : "The site this gateway cluster belongs to, use siteId instead." } }, "description" : "A cluster of gateways in the same wireless network." }, "NewGatewayCluster" : { "type" : "object", "properties" : { "name" : { "type" : "string", "description" : "Gateway cluster name" }, "panId" : { "type" : "string", "description" : "Gateway cluster's network id. A Personal Area Network (PAN) is uniquely defined with this id, which is common among all devices of the same network." }, "region" : { "type" : "string", "description" : "Gateway cluster's region. Used to indicate that this cluster is based in a different region with a possible different compliance." }, "sc" : { "type" : "string", "description" : "Gateway cluster's security key. Required to let gateways and sensors communicate securely on the network." }, "siteId" : { "type" : "string", "description" : "The site this gateway cluster belongs to, use siteId instead." }, "organizationId" : { "type" : "string" }, "locationId" : { "type" : "string", "description" : "The site this gateway cluster belongs to, use siteId instead." } }, "description" : "Gateway cluster creation properties with its restrictions." }, "GatewayClusterWithSecrets" : { "type" : "object", "properties" : { "name" : { "type" : "string", "description" : "Gateway cluster name" }, "siteId" : { "type" : "string", "description" : "The site this gateway cluster belongs to." }, "gateways" : { "type" : "array", "items" : { "$ref" : "#/definitions/Gateway" } }, "clusterId" : { "type" : "string", "description" : "Gateway cluster id." }, "organizationId" : { "type" : "string" }, "locationId" : { "type" : "string", "description" : "The site this gateway cluster belongs to, use siteId instead." } }, "description" : "A cluster of gateways in the same wireless network." }, "NewGateway" : { "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." } } }, "GatewayEditable" : { "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." }, "greengrassCertificateArn" : { "type" : "string", "description" : "The greengrass certificate arn." }, "greengrassCertificatePem" : { "type" : "string", "description" : "The greengrass certificate pem." }, "greengrassKeyPair" : { "type" : "string", "description" : "The greengrass key pair that is used to securely connect to the greengrass core device." }, "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." } } }, "ContactMessage" : { "type" : "object", "properties" : { "email" : { "type" : "string" }, "message" : { "type" : "string" }, "name" : { "type" : "string" } } }, "GroupMember" : { "type" : "object", "properties" : { "email" : { "type" : "string", "description" : "The email address of the member." }, "firstName" : { "type" : "string", "description" : "The first name of the member" }, "groupId" : { "type" : "string", "description" : "Unique id of the group itself" }, "invitedBy" : { "type" : "string", "description" : "The email of the user who invited this member" }, "lastName" : { "type" : "string", "description" : "The last name of the member" }, "memberSince" : { "type" : "string", "description" : "The date and time since the user is a member" }, "role" : { "type" : "string", "description" : "The role of the member within the group e.g owner", "enum" : [ "OWNER", "EDITOR", "FOLLOWER" ] } } }, "NewGroupMember" : { "type" : "object", "properties" : { "role" : { "type" : "string", "enum" : [ "OWNER", "EDITOR", "FOLLOWER" ] } } }, "Group" : { "type" : "object", "properties" : { "createdAt" : { "type" : "string", "description" : "The date and time the group was created." }, "dashboardTheme" : { "description" : "The dashboard theme", "$ref" : "#/definitions/DashboardTheme" }, "dashboardThemeId" : { "type" : "string", "description" : "The dashboard theme id." }, "description" : { "type" : "string", "description" : "The description of the purpose, goals etc; of the group" }, "groupId" : { "type" : "string", "description" : "Unique id of the group itself" }, "members" : { "type" : "array", "description" : "The members of the group", "uniqueItems" : true, "items" : { "$ref" : "#/definitions/GroupMember" } }, "restrictInviteMembersTo" : { "type" : "array", "description" : "The roles that can invite users to the group. If empty, any role can.", "uniqueItems" : true, "items" : { "type" : "object" } }, "title" : { "type" : "string", "description" : "The title or name of the group" } } }, "NewGroup" : { "type" : "object", "properties" : { "dashboardThemeId" : { "type" : "string" }, "description" : { "type" : "string" }, "restrictInviteMembersTo" : { "type" : "array", "items" : { "type" : "string", "enum" : [ "OWNER", "EDITOR", "FOLLOWER" ] } }, "title" : { "type" : "string" } } }, "HealthResponse" : { "type" : "object", "properties" : { "checks" : { "type" : "object", "description" : "Per-dependency readiness, keyed by an opaque service name.", "additionalProperties" : { "$ref" : "#/definitions/ServiceHealth" } }, "status" : { "type" : "string", "description" : "Overall readiness: 'healthy' when every gating dependency is up, otherwise 'unhealthy'." }, "timestamp" : { "type" : "string", "description" : "UTC ISO 8601 timestamp of when this readiness snapshot was computed." } }, "description" : "Aggregate readiness of the API and its backing services." }, "ServiceHealth" : { "type" : "object", "properties" : { "status" : { "type" : "string", "description" : "Dependency readiness, either 'up' or 'down'." }, "latency_ms" : { "type" : "integer", "format" : "int64", "description" : "Time in milliseconds the dependency's health check took to respond." } }, "description" : "Readiness of a single backing service." }, "Highlight" : { "type" : "object", "properties" : { "buttonTitle" : { "type" : "string", "description" : "The text to display inside the button." }, "imagePaths" : { "type" : "array", "description" : "Ordered paths to images used by the highlight", "items" : { "type" : "string" } }, "links" : { "type" : "array", "description" : "Ordered links used by the highlight", "items" : { "type" : "string" } }, "message" : { "type" : "string", "description" : "Message informed in the highlight." }, "publishedAt" : { "type" : "string", "description" : "UTC ISO 8601 timestamp of publication, e.g., 2025-02-21T15:00:00Z." }, "title" : { "type" : "string", "description" : "Displayable title." }, "language" : { "type" : "string" } }, "description" : "Information for users about platform tips, improvements or features release." }, "HighlightNew" : { "type" : "object", "required" : [ "language", "message", "publishedAt", "title" ], "properties" : { "buttonTitle" : { "type" : "string", "description" : "The text to display inside the button." }, "imagePaths" : { "type" : "array", "description" : "Ordered paths to images used by the highlight", "items" : { "type" : "string" } }, "links" : { "type" : "array", "description" : "Ordered links used by the highlight", "items" : { "type" : "string" } }, "message" : { "type" : "string", "description" : "Message informed in the highlight." }, "publishedAt" : { "type" : "string", "description" : "UTC ISO 8601 timestamp of publication, e.g., 2025-02-21T15:00:00Z." }, "title" : { "type" : "string", "description" : "Displayable title." }, "language" : { "type" : "string", "description" : "IETF language tag, e.g. en-US" } }, "description" : "Object holding the required properties to create a new Highlight." }, "HighlightEditable" : { "type" : "object", "properties" : { "buttonTitle" : { "type" : "string", "description" : "The text to display inside the button." }, "imagePaths" : { "type" : "array", "description" : "Ordered paths to images used by the highlight", "items" : { "type" : "string" } }, "links" : { "type" : "array", "description" : "Ordered links used by the highlight", "items" : { "type" : "string" } }, "message" : { "type" : "string", "description" : "Message informed in the highlight." }, "publishedAt" : { "type" : "string", "description" : "UTC ISO 8601 timestamp of publication, e.g., 2025-02-21T15:00:00Z." }, "title" : { "type" : "string", "description" : "Displayable title." } }, "description" : "Object containing the editable properties of a Highlight." }, "ImportCheck" : { "type" : "object", "required" : [ "name", "notificationIds", "notificationRelevance", "notifications", "sensorType", "timezone" ], "properties" : { "calculationSettings" : { "description" : "The calculation settings if this is a calculation data source.", "$ref" : "#/definitions/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" : "#/definitions/DataSourceCoordinates" } }, "dataSourceCoordinates" : { "$ref" : "#/definitions/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" : "#/definitions/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" : "#/definitions/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" }, "CheckDateEntry" : { "type" : "object", "properties" : { "checkId" : { "type" : "string", "description" : "Id of the check it belongs to" }, "date" : { "type" : "string", "description" : "Date of the entry" }, "dateEntryId" : { "type" : "string", "description" : "Id of the date entry" }, "name" : { "type" : "string", "description" : "The name of the date entry" }, "deletedAt" : { "type" : "string" } } }, "ManualImportCheckStatsResponse" : { "type" : "object", "required" : [ "data" ], "properties" : { "collectionId" : { "type" : "string" }, "data" : { "type" : "object" }, "dateEntryId" : { "type" : "string" }, "id" : { "type" : "string" } } }, "ManualInputRow" : { "type" : "object", "properties" : { "rowId" : { "type" : "string" }, "timestamp" : { "type" : "integer", "format" : "int64" }, "values" : { "type" : "object" } } }, "PaginatedManualInputRows" : { "type" : "object", "properties" : { "data" : { "type" : "array", "items" : { "$ref" : "#/definitions/ManualInputRow" } }, "pagination" : { "$ref" : "#/definitions/Pagination" } } }, "NewCheckCollection" : { "type" : "object", "properties" : { "name" : { "type" : "string", "description" : "Name of the collection" } } }, "NewCheckDateEntry" : { "type" : "object", "properties" : { "checkId" : { "type" : "string", "description" : "Id of the check it belongs to" }, "date" : { "type" : "string", "description" : "Date of the entry" }, "dateEntryId" : { "type" : "string", "description" : "Id of the date entry" }, "name" : { "type" : "string", "description" : "The name of the date entry" }, "deletedAt" : { "type" : "string" } } }, "ExternalSensorEditable" : { "type" : "object", "properties" : { "calculationSettings" : { "description" : "The calculation settings if this is a calculation data source.", "$ref" : "#/definitions/CalculationSettings" }, "dataSourceCoordinatesEditable" : { "description" : "A set of numbers that represent the current position of a data source", "$ref" : "#/definitions/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." } } }, "SensorCopyOverrides" : { "type" : "object", "properties" : { "sensorOverrides" : { "description" : "Sensor properties to override on the copy.", "$ref" : "#/definitions/ExternalSensorEditable" }, "sensorTypeOverrides" : { "description" : "Sensor type properties to override on the copy.", "$ref" : "#/definitions/SensorTypeUpdate" } } }, "SensorTypeUpdate" : { "type" : "object", "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" }, "dataTypes" : { "type" : "array", "items" : { "type" : "string" } }, "decimals" : { "type" : "integer", "format" : "int32", "minimum" : 0 }, "description" : { "type" : "string" }, "enums" : { "type" : "array", "items" : { "$ref" : "#/definitions/SensorTypeEnumData" } }, "external" : { "type" : "boolean" }, "hasVoltageInformation" : { "type" : "boolean" }, "icon" : { "type" : "string" }, "iconId" : { "type" : "string" }, "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", "items" : { "$ref" : "#/definitions/NotificationTemplate" } }, "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" }, "radioId" : { "type" : "string", "description" : "Radio identifier", "minLength" : 0, "maxLength" : 20 }, "rangeMax" : { "type" : "string" }, "rangeMin" : { "type" : "string" } }, "description" : "Updating sensor type properties" }, "CheckDateEntryUpdate" : { "type" : "object", "properties" : { "name" : { "type" : "string", "description" : "The name of the date entry" } } }, "ManualImportCheckEventDelete" : { "type" : "object", "required" : [ "jsonKeys" ], "properties" : { "checkId" : { "type" : "string" }, "dateEntryId" : { "type" : "string" }, "id" : { "type" : "string" }, "jsonKeys" : { "type" : "array", "uniqueItems" : true, "items" : { "type" : "string" } } } }, "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." } } }, "ImportCheckEventFailure" : { "type" : "object", "properties" : { "event" : { "$ref" : "#/definitions/ImportCheckEvent" }, "errorCode" : { "type" : "integer", "format" : "int32" }, "errorText" : { "type" : "string" } } }, "ImportCheckEventsResponse" : { "type" : "object", "required" : [ "failedEvents" ], "properties" : { "failedEvents" : { "type" : "array", "description" : "List of failed ingests in the batch.", "uniqueItems" : true, "items" : { "$ref" : "#/definitions/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." } } }, "ManualImportCheckEventUpdateResponse" : { "type" : "object", "required" : [ "checkId" ], "properties" : { "checkId" : { "type" : "string" }, "collectionId" : { "type" : "string" }, "dateEntryId" : { "type" : "string" }, "id" : { "type" : "string" } } }, "ManualImportCheckEventUpdate" : { "type" : "object", "required" : [ "data" ], "properties" : { "checkId" : { "type" : "string" }, "collectionId" : { "type" : "string" }, "data" : { "type" : "object" }, "dateEntryId" : { "type" : "string" } } }, "ImportCheckEventUpdateRequest" : { "type" : "object", "properties" : { "checkId" : { "type" : "string", "description" : "Id of the import check (must be of the same sensor type as the current check)" }, "collectionId" : { "type" : "string", "description" : "Collection id of the event." }, "data" : { "type" : "object", "description" : "Data as a map of sensor fields to their corresponding value." }, "error" : { "type" : "string", "description" : "Error message when status is 'fail'." }, "status" : { "type" : "string", "description" : "'ok' or 'fail' values representing the event success status." }, "unitsOverride" : { "type" : "object", "description" : "A map that defines units used for each sensor field.", "additionalProperties" : { "type" : "string" } } } }, "OrganizationLicense" : { "type" : "object", "required" : [ "licenseId", "organizationId" ], "properties" : { "licenseId" : { "type" : "string", "description" : "Unique identifier for the license." }, "organizationId" : { "type" : "string", "description" : "Unique identifier for the organization, preferably a readable text such as the domain name of the company." } }, "description" : "A customer's physical location where data (sensors, devices and integrations) belong." }, "License" : { "type" : "object", "required" : [ "licenseId" ], "properties" : { "name" : { "type" : "string", "description" : "Displayable name of the license." }, "createdAt" : { "type" : "string", "description" : "Timestamp of when the license was created." }, "createdBy" : { "type" : "string", "description" : "Identifier of the user that created this license." }, "licenseId" : { "type" : "string", "description" : "Unique identifier for the license." } } }, "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." }, "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" : "#/definitions/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." } } }, "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." }, "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." }, "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" : "#/definitions/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" : "#/definitions/App" } }, "cultivationPhases" : { "type" : "array", "description" : "Cultivation phase definitions available to the organization, ordered alphabetically by name.", "items" : { "$ref" : "#/definitions/CultivationPhaseDefinition" } }, "dashboardTheme" : { "description" : "The look and feel customization of a dashboard.", "$ref" : "#/definitions/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" : "#/definitions/OrganizationExtensions" }, "installedApps" : { "type" : "array", "description" : "Installed apps of the organization.", "items" : { "$ref" : "#/definitions/App" } }, "locations" : { "type" : "array", "description" : "Subscription locations in the organization.", "items" : { "$ref" : "#/definitions/Site" } }, "sites" : { "type" : "array", "description" : "Sites in the organization.", "items" : { "$ref" : "#/definitions/Site" } }, "subscriptions" : { "type" : "array", "description" : "Subscriptions of the organization.", "items" : { "$ref" : "#/definitions/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" : "#/definitions/NoteMeasurementDefinition" } } } } }, "description" : "An organization is an entity that encompasses a set of checks, private locations and users." }, "OrganizationExtensions" : { "type" : "object", "properties" : { "developed" : { "type" : "array", "items" : { "$ref" : "#/definitions/App" } } } }, "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" } } }, "Site" : { "type" : "object", "required" : [ "address", "id", "name", "subscriptionId" ], "properties" : { "address" : { "description" : "The particulars of the place where this object is located.", "$ref" : "#/definitions/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" : "#/definitions/ImportCheck" } }, "gateways" : { "type" : "array", "description" : "The gateways in this site.", "items" : { "$ref" : "#/definitions/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" : "#/definitions/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" : "#/definitions/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" }, "LicenseEditable" : { "type" : "object", "properties" : { "name" : { "type" : "string", "description" : "Displayable name of the license." }, "serviceClientId" : { "type" : "string", "description" : "The client id of the machine-to-machine service" }, "serviceClientSecret" : { "type" : "string", "description" : "The client secret of the machine-to-machine service" } } }, "Location" : { "type" : "object", "properties" : { "alarmsChecks" : { "type" : "array", "description" : "The alarms checks ids of the location.", "uniqueItems" : true, "items" : { "type" : "string" } }, "companyDetailsId" : { "type" : "string", "description" : "The id of the company details." }, "description" : { "type" : "string", "description" : "Location's description." }, "gatewayClusterId" : { "type" : "string", "description" : "Location's gateway cluster id" }, "icon" : { "type" : "string" }, "latitude" : { "type" : "number", "format" : "double", "description" : "Location’s latitude" }, "longitude" : { "type" : "number", "format" : "double", "description" : "Location’s longitude" }, "motherIds" : { "type" : "array", "uniqueItems" : true, "items" : { "type" : "string" }, "maxItems" : 2147483647, "minItems" : 1 }, "owner" : { "type" : "string" }, "timezone" : { "type" : "string", "description" : "Location’s timezone" }, "name" : { "type" : "string", "description" : "Location's name." }, "access" : { "type" : "string" }, "companyDetails" : { "description" : "The company details.", "$ref" : "#/definitions/CompanyDetails" }, "organizationId" : { "type" : "string", "description" : "The organization the location belongs to." }, "panId" : { "type" : "string" }, "region" : { "type" : "string", "description" : "Location's region." }, "sc" : { "type" : "string" } }, "description" : "Monitoring location properties" }, "SiteEditable" : { "type" : "object", "properties" : { "address" : { "description" : "The particulars of the place where this object is located.", "$ref" : "#/definitions/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" }, "LocationEditable" : { "type" : "object", "properties" : { "alarmsChecks" : { "type" : "array", "description" : "The alarms checks ids of the location.", "uniqueItems" : true, "items" : { "type" : "string" } }, "companyDetailsId" : { "type" : "string", "description" : "The id of the company details." }, "description" : { "type" : "string" }, "gatewayClusterId" : { "type" : "string", "description" : "Location's gateway cluster id" }, "icon" : { "type" : "string" }, "latitude" : { "type" : "number", "format" : "double", "description" : "Location’s latitude" }, "longitude" : { "type" : "number", "format" : "double", "description" : "Location’s longitude" }, "motherIds" : { "type" : "array", "uniqueItems" : true, "items" : { "type" : "string" }, "maxItems" : 2147483647, "minItems" : 1 }, "owner" : { "type" : "string" }, "timezone" : { "type" : "string", "description" : "Location’s timezone" } } }, "MapEditable" : { "type" : "object", "required" : [ "dataSourceUpdates", "organizationId", "siteId", "zoneUpdates" ], "properties" : { "dataSourceUpdates" : { "type" : "array", "description" : "List of data source updates", "items" : { "$ref" : "#/definitions/DataSourceBulkEdit" } }, "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." }, "zoneUpdates" : { "type" : "array", "description" : "List of zone updates", "items" : { "$ref" : "#/definitions/ZoneBulkEdit" } } }, "description" : "Object containing the editable properties of the map of a site within an organization." }, "ZoneBulkEdit" : { "type" : "object", "required" : [ "uuid" ], "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" }, "polygon" : { "type" : "array", "description" : "List of coordinates that define the polygon.", "items" : { "type" : "array", "items" : { "type" : "number", "format" : "double" } }, "maxItems" : 2147483647, "minItems" : 4 }, "soilId" : { "type" : "string", "description" : "Zone's soil type id." }, "uuid" : { "type" : "string", "description" : "Unique identifier of the zone" } }, "description" : "Object containing the editable properties of a Zone used for bulk edit." }, "ConversionFormula" : { "type" : "object", "properties" : { "type" : { "type" : "string" }, "value" : { "type" : "number", "format" : "double" } } }, "ConversionUnit" : { "type" : "object", "properties" : { "conversionFormulas" : { "type" : "array", "items" : { "$ref" : "#/definitions/ConversionFormula" } }, "decimals" : { "type" : "integer", "format" : "int32", "minimum" : 0 }, "unit" : { "type" : "string" }, "unitId" : { "type" : "string" }, "unitLabel" : { "type" : "string" } } }, "Metric" : { "type" : "object", "properties" : { "conversionUnits" : { "type" : "array", "items" : { "$ref" : "#/definitions/ConversionUnit" } }, "defaultStatisticTypes" : { "type" : "array", "items" : { "type" : "string" } }, "metricId" : { "type" : "string" }, "name" : { "type" : "string" }, "statisticTypes" : { "type" : "array", "items" : { "type" : "array", "items" : { "type" : "string" } } }, "unit" : { "type" : "string" }, "unitLabel" : { "type" : "string" } }, "description" : "Metrics of sensor types" }, "MetricUpdate" : { "type" : "object", "properties" : { "conversionUnits" : { "type" : "array", "items" : { "$ref" : "#/definitions/ConversionUnit" } }, "defaultStatisticTypes" : { "type" : "array", "items" : { "type" : "string" } }, "name" : { "type" : "string" }, "statisticTypes" : { "type" : "array", "items" : { "type" : "array", "items" : { "type" : "string" } } }, "unit" : { "type" : "string" }, "unitLabel" : { "type" : "string" } }, "description" : "Updating metric properties" }, "Mother" : { "type" : "object", "properties" : { "alarmsChecks" : { "type" : "array", "description" : "The alarms checks ids of the mother.", "uniqueItems" : true, "items" : { "type" : "string" } }, "createdAt" : { "type" : "string", "description" : "The date and time a mother was created." }, "deletedAt" : { "type" : "string", "description" : "The date and time a mother was deleted." }, "deployedAt" : { "type" : "string", "description" : "The date and time a mother was deployed." }, "gatewayInfoCheckId" : { "type" : "string", "description" : "Id of the gateway info check." }, "isBillable" : { "type" : "boolean", "description" : "States if the mother is billable or not." }, "jsonEnvironmentVariable" : { "type" : "string" }, "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" }, "locationName" : { "type" : "string", "description" : "The mother's location." }, "macAddress" : { "type" : "string", "description" : "The mac address of the mother." }, "motherId" : { "type" : "string", "description" : "Mother id." }, "name" : { "type" : "string", "description" : "Mother's name." }, "organizationId" : { "type" : "string", "description" : "The organization of the mother." }, "remarks" : { "type" : "string", "description" : "The remarks for the mother." }, "sqsAccessKey" : { "type" : "string", "description" : "The mother probe sqs access key." }, "sqsSecretKey" : { "type" : "string", "description" : "The mother probe sqs secret key." }, "state" : { "type" : "string", "description" : "The state of the mother." }, "templateId" : { "type" : "string", "description" : "Mother's template id." }, "updatedAt" : { "type" : "string", "description" : "The date and time a mother was last updated." }, "xbeeAddress" : { "type" : "string", "description" : "The address of the xbee." } }, "description" : "Mother" }, "NewMother" : { "type" : "object", "properties" : { "isBillable" : { "type" : "boolean" }, "locationName" : { "type" : "string" }, "macAddress" : { "type" : "string" }, "motherId" : { "type" : "string" }, "name" : { "type" : "string" }, "organizationId" : { "type" : "string" }, "remarks" : { "type" : "string" }, "state" : { "type" : "string" }, "templateId" : { "type" : "string" }, "xbeeAddress" : { "type" : "string" } } }, "LimitedScopeMother" : { "type" : "object", "properties" : { "isBillable" : { "type" : "boolean" }, "locationName" : { "type" : "string" }, "macAddress" : { "type" : "string" }, "motherId" : { "type" : "string" }, "name" : { "type" : "string" }, "organizationId" : { "type" : "string" }, "state" : { "type" : "string" } } }, "MotherStatusResponse" : { "type" : "object", "properties" : { "isMotherOnline" : { "type" : "boolean" } } }, "MotherTemplate" : { "type" : "object", "properties" : { "configurationJson" : { "type" : "string", "description" : "JSON configuration variable for the mother template." }, "createdAt" : { "type" : "string", "description" : "The date and time a mother template was created." }, "description" : { "type" : "string", "description" : "The description for the mother template." }, "name" : { "type" : "string", "description" : "The name for the mother template." }, "templateId" : { "type" : "string", "description" : "Template id for the mother template." }, "updatedAt" : { "type" : "string", "description" : "The date and time a mother template was last updated." } }, "description" : "MotherTemplate" }, "NewMotherTemplate" : { "type" : "object", "properties" : { "configurationJson" : { "type" : "string" }, "description" : { "type" : "string" }, "name" : { "type" : "string" } } }, "MotherTemplateUpdate" : { "type" : "object", "properties" : { "configurationJson" : { "type" : "string", "description" : "JSON configuration variable for the Gateway template." }, "description" : { "type" : "string", "description" : "The description for the mother template." }, "name" : { "type" : "string", "description" : "The name for the mother template." } }, "description" : "MotherTemplateUpdate" }, "MotherUpdate" : { "type" : "object", "properties" : { "alarmsChecks" : { "type" : "array", "description" : "The alarms checks ids of the mother.", "uniqueItems" : true, "items" : { "type" : "string" } }, "deletedAt" : { "type" : "string", "description" : "The date and time a mother was deleted." }, "deployedAt" : { "type" : "string", "description" : "The date and time a mother was deployed." }, "isBillable" : { "type" : "boolean", "description" : "States if the mother is billable or not." }, "locationName" : { "type" : "string", "description" : "The mother's location." }, "name" : { "type" : "string", "description" : "Mother's name." }, "organizationId" : { "type" : "string", "description" : "The organization of the mother." }, "remarks" : { "type" : "string", "description" : "The remarks for the mother." }, "sqsAccessKey" : { "type" : "string", "description" : "The mother probe sqs access key." }, "sqsSecretKey" : { "type" : "string", "description" : "The mother probe sqs secret key." }, "state" : { "type" : "string", "description" : "The state of the mother." }, "templateId" : { "type" : "string", "description" : "Mother's template id." } }, "description" : "Update Mother properties." }, "NewsArticle" : { "type" : "object", "required" : [ "publishedAt", "summary", "title", "url" ], "properties" : { "imagePath" : { "type" : "string", "description" : "Path to an image file." }, "publishedAt" : { "type" : "string", "description" : "Timestamp of when it was created." }, "summary" : { "type" : "string", "description" : "Summary of the article contents." }, "title" : { "type" : "string", "description" : "Displayable title." }, "url" : { "type" : "string", "description" : "URL to the article." } }, "description" : "All properties of a news article." }, "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" : "#/definitions/NoteFile" } }, "noteMeasurements" : { "description" : "Numeric measurements attached to the note", "$ref" : "#/definitions/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." }, "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" : "#/definitions/NoteFileDocument" }, "fileId" : { "type" : "string", "description" : "Unique identifier of the file." }, "imageWithThumbnails" : { "description" : "Presigned image URL with thumbnails for the file, if available.", "$ref" : "#/definitions/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." }, "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." }, "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" }, "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" : "#/definitions/NoteFile" } }, "noteMeasurements" : { "description" : "Numeric measurements attached to the note", "$ref" : "#/definitions/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." }, "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" : "#/definitions/NoteFile" } }, "noteMeasurements" : { "description" : "Numeric measurements attached to the note", "$ref" : "#/definitions/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." }, "Notification follow" : { "type" : "object", "properties" : { "email" : { "type" : "string" }, "methods" : { "type" : "array", "uniqueItems" : true, "items" : { "type" : "string" }, "maxItems" : 2147483647, "minItems" : 1 }, "notificationId" : { "type" : "string" }, "organizationId" : { "type" : "string" } }, "description" : "Notification follow represents a subscription of a user to a given notification with a given method, e.g. email, sms, etc." }, "NotificationFollowCount" : { "type" : "object", "properties" : { "count" : { "type" : "integer", "format" : "int32" }, "notificationId" : { "type" : "string" } } }, "NotificationMethods" : { "type" : "object", "properties" : { "methods" : { "type" : "array", "uniqueItems" : true, "items" : { "type" : "string", "enum" : [ "EMAIL", "SMS", "WHATSAPP" ] } } } }, "NotificationNew" : { "type" : "object", "required" : [ "checkId", "condition", "description" ], "properties" : { "action" : { "type" : "string", "description" : "Description of the action to take when the notification is triggered." }, "calculationSettings" : { "description" : "The calculation configuration", "$ref" : "#/definitions/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" : "#/definitions/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 }, "organizationId" : { "type" : "string", "description" : "Identifier of the organization for which this notification is created" } }, "description" : "Object holding the required properties to create a new notification" }, "NotificationEditable" : { "type" : "object", "properties" : { "action" : { "type" : "string", "description" : "Description of the action to take when the notification is triggered." }, "calculationSettings" : { "description" : "The calculation configuration", "$ref" : "#/definitions/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" : "#/definitions/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 } }, "description" : "Holds the editable properties of a Notification" }, "NotificationSetting" : { "type" : "object", "properties" : { "checkId" : { "type" : "string" }, "email" : { "type" : "string" }, "methods" : { "type" : "array", "uniqueItems" : true, "items" : { "type" : "string" } } }, "description" : "Notification Settings" }, "Follow" : { "type" : "object", "required" : [ "enabled" ], "properties" : { "checkId" : { "type" : "string" }, "email" : { "type" : "string" }, "enabled" : { "type" : "boolean" }, "method" : { "type" : "array", "uniqueItems" : true, "items" : { "type" : "string" }, "maxItems" : 2147483647, "minItems" : 1 }, "owner" : { "type" : "string" }, "role" : { "type" : "string" }, "topic" : { "type" : "string" } }, "description" : "A follow represents a subscription to check's UP/DOWN changes. UP or DOWN reflects succeeded or failed url response according to the check configurations. A follow can eventually be a of a predefined topic that uses a custom notification template for the different methods" }, "NotificationSettingUpdate" : { "type" : "object", "properties" : { "methods" : { "type" : "array", "uniqueItems" : true, "items" : { "type" : "string" } } }, "description" : "Updating notification settings properties" }, "NotificationTopicFollow" : { "type" : "object", "properties" : { "email" : { "type" : "string" }, "methods" : { "type" : "array", "uniqueItems" : true, "items" : { "type" : "string" }, "maxItems" : 2147483647, "minItems" : 1 }, "notificationTopicFollowId" : { "type" : "string" }, "notificationTopicId" : { "type" : "string" }, "organizationId" : { "type" : "string" } }, "description" : "Notification topic follow" }, "NotificationTopicFollowCount" : { "type" : "object", "properties" : { "count" : { "type" : "integer", "format" : "int32" }, "notificationTopicId" : { "type" : "string" } } }, "NotificationTopic" : { "type" : "object", "properties" : { "conditionDescription" : { "type" : "string" }, "description" : { "type" : "string" }, "notificationTopicId" : { "type" : "string" } }, "description" : "Notification topic" }, "NewNotificationTopic" : { "type" : "object", "properties" : { "conditionDescription" : { "type" : "string" }, "description" : { "type" : "string" }, "notificationTopicId" : { "type" : "string" } } }, "NotificationTopicUpdate" : { "type" : "object", "properties" : { "conditionDescription" : { "type" : "string" }, "description" : { "type" : "string" } } }, "Offer" : { "type" : "object", "properties" : { "duration" : { "type" : "string", "description" : "Duration of the offer." }, "requiredExtensionIds" : { "type" : "array", "description" : "Extension ids to install.", "items" : { "type" : "string" } }, "subscriptionTier" : { "type" : "string", "description" : "Subscription tier." }, "offerId" : { "type" : "string", "description" : "Offer id." }, "createdAt" : { "type" : "string", "description" : "The date and time a offer was created." }, "createdBy" : { "type" : "string", "description" : "User that created the offer." }, "partnerId" : { "type" : "string", "description" : "Partner id." } } }, "OfferEditable" : { "type" : "object", "properties" : { "duration" : { "type" : "string", "description" : "Duration of the offer." }, "requiredExtensionIds" : { "type" : "array", "description" : "Extension ids to install.", "items" : { "type" : "string" } }, "subscriptionTier" : { "type" : "string" } } }, "NewOffer" : { "type" : "object", "properties" : { "duration" : { "type" : "string", "description" : "Duration of the offer." }, "requiredExtensionIds" : { "type" : "array", "description" : "Extension ids to install.", "items" : { "type" : "string" } }, "subscriptionTier" : { "type" : "string", "description" : "Subscription tier." }, "offerId" : { "type" : "string", "description" : "Offer id." }, "createdAt" : { "type" : "string", "description" : "The date and time a offer was created." }, "createdBy" : { "type" : "string", "description" : "User that created the offer." }, "partnerId" : { "type" : "string", "description" : "Partner id." } } }, "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." } } }, "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." }, "OrganizationWithUserRole" : { "type" : "object", "properties" : { "organization" : { "$ref" : "#/definitions/Organization" }, "role" : { "type" : "string" } } }, "NewSite" : { "type" : "object", "required" : [ "address", "id", "name", "subscriptionId" ], "properties" : { "address" : { "description" : "The particulars of the place where this object is located.", "$ref" : "#/definitions/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" : "#/definitions/ImportCheck" } }, "gateways" : { "type" : "array", "description" : "The gateways in this site.", "items" : { "$ref" : "#/definitions/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" : "#/definitions/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" : "#/definitions/Zone" } } }, "description" : "A customer's physical location where data (sensors, devices and integrations) belong." }, "OrganizationEditable" : { "type" : "object", "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" } } } }, "OrganizationMembershipUpdate" : { "type" : "object", "properties" : { "role" : { "type" : "string", "description" : "Role of the user within the organization. It determines the user's permissions." } }, "description" : "Update the role of a user within an organization." }, "Partner" : { "type" : "object", "properties" : { "partnerName" : { "type" : "string", "description" : "Partner name." }, "partnerId" : { "type" : "string", "description" : "Partner Id." }, "createdAt" : { "type" : "string", "description" : "The date and time a partner was created." }, "createdBy" : { "type" : "string", "description" : "User that created the partner." } } }, "NewPartner" : { "type" : "object", "properties" : { "partnerName" : { "type" : "string", "description" : "Partner name." }, "partnerId" : { "type" : "string", "description" : "Partner Id." }, "createdAt" : { "type" : "string", "description" : "The date and time a partner was created." }, "createdBy" : { "type" : "string", "description" : "User that created the partner." } } }, "PartnerEditable" : { "type" : "object", "properties" : { "partnerName" : { "type" : "string", "description" : "Partner name." } } }, "Pricing" : { "type" : "object", "properties" : { "checks" : { "type" : "object", "description" : "The values for the checks component of the pricing record.", "additionalProperties" : { "type" : "number", "format" : "double" } }, "currency" : { "type" : "string", "description" : "The currency of the pricing record." }, "discountPercentage" : { "type" : "number", "format" : "float", "description" : "The discount percentage for the pricing record." }, "email" : { "type" : "object", "description" : "The values for the checks component of the pricing record.", "additionalProperties" : { "type" : "number", "format" : "double" } }, "json" : { "type" : "array", "description" : "The values for the json hits component of the pricing record.", "items" : { "type" : "object", "additionalProperties" : { "type" : "number", "format" : "double" } } }, "mothers" : { "type" : "object", "description" : "The values for the mothers component of the pricing record.", "additionalProperties" : { "type" : "number", "format" : "double" } }, "organizationId" : { "type" : "string", "description" : "Organization id for the pricing record." }, "regular" : { "type" : "array", "description" : "The values for the regular hits component of the pricing record.", "items" : { "type" : "object", "additionalProperties" : { "type" : "number", "format" : "double" } } }, "sms" : { "type" : "object", "description" : "The values for the sms component of the pricing record.", "additionalProperties" : { "type" : "number", "format" : "double" } }, "vatPercentage" : { "type" : "number", "format" : "float", "description" : "The VAT (value-added tax) percentage for the pricing record." } }, "description" : "Pricing" }, "PricingUpdate" : { "type" : "object", "properties" : { "checks" : { "type" : "object", "description" : "The values for the checks component of the pricing record.", "additionalProperties" : { "type" : "number", "format" : "double" } }, "currency" : { "type" : "string", "description" : "The currency of the pricing record." }, "discountPercentage" : { "type" : "number", "format" : "float", "description" : "The discount percentage for the pricing record." }, "email" : { "type" : "object", "description" : "The values for the checks component of the pricing record.", "additionalProperties" : { "type" : "number", "format" : "double" } }, "json" : { "type" : "array", "description" : "The values for the json hits component of the pricing record.", "items" : { "type" : "object", "additionalProperties" : { "type" : "number", "format" : "double" } } }, "mothers" : { "type" : "object", "description" : "The values for the mothers component of the pricing record.", "additionalProperties" : { "type" : "number", "format" : "double" } }, "regular" : { "type" : "array", "description" : "The values for the regular hits component of the pricing record.", "items" : { "type" : "object", "additionalProperties" : { "type" : "number", "format" : "double" } } }, "sms" : { "type" : "object", "description" : "The values for the sms component of the pricing record.", "additionalProperties" : { "type" : "number", "format" : "double" } }, "vatPercentage" : { "type" : "number", "format" : "float", "description" : "The VAT (value-added tax) percentage for the pricing record." } }, "description" : "PricingUpdate" }, "Product" : { "type" : "object", "required" : [ "stock" ], "properties" : { "articleNumber" : { "type" : "string", "description" : "Product's article number." }, "availabilityDate" : { "type" : "string", "description" : "Product availability date." }, "batchSize" : { "type" : "integer", "format" : "int32", "description" : "Product batch size." }, "configuration" : { "type" : "object", "description" : "Product configuration", "additionalProperties" : { "type" : "array", "items" : { "type" : "string" } } }, "costPrice" : { "type" : "number", "format" : "float", "description" : "Product cost price." }, "createdAt" : { "type" : "string", "description" : "The date and time the product was created." }, "description" : { "type" : "string", "description" : "Product description." }, "landOfOrigin" : { "type" : "string", "description" : "Land of origin." }, "lockPrice" : { "type" : "boolean", "description" : "Lock price" }, "phase" : { "type" : "string", "description" : "Product phase." }, "prices" : { "type" : "object", "example" : "{'EUR' : { 'price' : 750.5 }, 'GBP' : { 'priceEstimation' : 100}}", "description" : "Product prices for multiple currency.", "additionalProperties" : { "type" : "object", "additionalProperties" : { "type" : "number", "format" : "float" } } }, "productId" : { "type" : "string", "description" : "Product id." }, "productType" : { "type" : "string", "description" : "Product type." }, "remark" : { "type" : "string", "description" : "Product remark." }, "sensorType" : { "type" : "string", "description" : "Product sensor type." }, "specificationSheet" : { "type" : "string" }, "specificationSheetId" : { "type" : "string", "description" : "Product specification sheet." }, "status" : { "type" : "string", "description" : "Product status." }, "stock" : { "type" : "integer", "format" : "int32", "description" : "Product stock." }, "updatedAt" : { "type" : "string", "description" : "The date and time the product was last updated." }, "weight" : { "type" : "integer", "format" : "int32", "description" : "Product weight in grams." } }, "description" : "Product" }, "NewProduct" : { "type" : "object", "required" : [ "stock" ], "properties" : { "prices" : { "type" : "object", "additionalProperties" : { "type" : "object", "additionalProperties" : { "type" : "number", "format" : "float" } } }, "articleNumber" : { "type" : "string" }, "availabilityDate" : { "type" : "string" }, "batchSize" : { "type" : "integer", "format" : "int32" }, "configuration" : { "type" : "object", "additionalProperties" : { "type" : "array", "items" : { "type" : "string" } } }, "costPrice" : { "type" : "number", "format" : "float" }, "description" : { "type" : "string" }, "landOfOrigin" : { "type" : "string" }, "lockPrice" : { "type" : "boolean" }, "phase" : { "type" : "string" }, "productId" : { "type" : "string" }, "productType" : { "type" : "string" }, "remark" : { "type" : "string" }, "sensorType" : { "type" : "string" }, "status" : { "type" : "string" }, "stock" : { "type" : "integer", "format" : "int32" }, "weight" : { "type" : "integer", "format" : "int32" }, "specificationSheetId" : { "type" : "string" } } }, "ProductUpdate" : { "type" : "object", "properties" : { "articleNumber" : { "type" : "string", "description" : "Product article number" }, "availabilityDate" : { "type" : "string", "description" : "Product availability date." }, "batchSize" : { "type" : "integer", "format" : "int32", "description" : "Product batch size." }, "configuration" : { "type" : "object", "description" : "Product configuration", "additionalProperties" : { "type" : "array", "items" : { "type" : "string" } } }, "costPrice" : { "type" : "number", "format" : "float", "description" : "Product cost price." }, "description" : { "type" : "string", "description" : "Product description." }, "landOfOrigin" : { "type" : "string", "description" : "Land of origin." }, "lockPrice" : { "type" : "boolean", "description" : "Lock price" }, "phase" : { "type" : "string", "description" : "Product phase." }, "prices" : { "type" : "object", "description" : "prices in different currencies for the product", "additionalProperties" : { "type" : "object", "additionalProperties" : { "type" : "number", "format" : "float" } } }, "productType" : { "type" : "string", "description" : "Product type." }, "remark" : { "type" : "string", "description" : "Product remark." }, "sensorType" : { "type" : "string", "description" : "Product sensor type." }, "specificationSheetId" : { "type" : "string", "description" : "Product specification sheet." }, "status" : { "type" : "string", "description" : "Product status." }, "stock" : { "type" : "integer", "format" : "int32", "description" : "Product stock." }, "weight" : { "type" : "integer", "format" : "int32", "description" : "Product weight in grams." } }, "description" : "Updating product properties." }, "VoltageResponse" : { "type" : "object", "properties" : { "voltage" : { "type" : "number", "format" : "double" } } }, "SharedByUserDetails" : { "type" : "object", "properties" : { "firstName" : { "type" : "string" }, "lastName" : { "type" : "string" } } }, "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" : "#/definitions/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" : "#/definitions/SharedWithUserDetails" } } }, "SharedWithUserDetails" : { "type" : "object", "properties" : { "firstName" : { "type" : "string" }, "lastName" : { "type" : "string" } } }, "SharedCheck" : { "type" : "object", "properties" : { "checkId" : { "type" : "string", "description" : "Id of the original check that is being shared" }, "checkSummary" : { "description" : "The underlying check that is shared", "$ref" : "#/definitions/CheckSummary" }, "createdAt" : { "type" : "string", "description" : "The date and time a check was shared. It can be blank for older shared checks" }, "organizationId" : { "type" : "string", "description" : "ID of the organization to which the shared check belongs" }, "organizationName" : { "type" : "string", "description" : "Name of the organization to which the shared check belongs" }, "shareEndDate" : { "type" : "string", "description" : "Until when can sensor data be viewed" }, "shareStartDate" : { "type" : "string", "description" : "Starting from when can sensor data be viewed" }, "sharedByUser" : { "type" : "string", "description" : "User who shared the check" }, "sharedByUserDetails" : { "$ref" : "#/definitions/SharedByUserDetails" }, "sharedCheckId" : { "type" : "string", "description" : "Id of the shared-check itself" }, "sharedWithGroup" : { "type" : "string", "description" : "Group which the check has been shared with" }, "sharedWithGroupDetails" : { "$ref" : "#/definitions/SharedWithGroupDetails" }, "sharedWithUser" : { "type" : "string", "description" : "User who the check has been shared with" }, "sharedWithUserDetails" : { "$ref" : "#/definitions/SharedWithUserDetails" } } }, "SharedWithGroupDetails" : { "type" : "object", "properties" : { "error" : { "type" : "string" }, "title" : { "type" : "string" } } }, "NewSharedCheck" : { "type" : "object", "properties" : { "checkIds" : { "type" : "array", "uniqueItems" : true, "items" : { "type" : "string" } }, "shareEndDate" : { "type" : "string" }, "shareStartDate" : { "type" : "string" }, "shareWith" : { "type" : "array", "uniqueItems" : true, "items" : { "type" : "string" } }, "shareWithGroups" : { "type" : "array", "uniqueItems" : true, "items" : { "type" : "string" } } } }, "DashboardSummary" : { "type" : "object", "properties" : { "dashboardId" : { "type" : "string" }, "name" : { "type" : "string" }, "organizationId" : { "type" : "string" } }, "description" : "Summary of a dashboard" }, "SharedDashboard" : { "type" : "object", "properties" : { "createdAt" : { "type" : "string", "description" : "The date and time a dashboard was shared. It can be blank for older shared dashboards" }, "dashboardId" : { "type" : "string", "description" : "Id of the original dashboard that is being shared" }, "dashboardSummary" : { "description" : "The underlying dashboard that is shared", "$ref" : "#/definitions/DashboardSummary" }, "name" : { "type" : "string", "description" : "Name of the shared-dashboard itself" }, "organizationId" : { "type" : "string", "description" : "ID of the organization to which the shared dashboard belongs" }, "organizationName" : { "type" : "string", "description" : "Name of the organization to which the shared dashboard belongs" }, "sharedByUser" : { "type" : "string", "description" : "User who shared the dashboard" }, "sharedByUserDetails" : { "$ref" : "#/definitions/SharedByUserDetails" }, "sharedDashboardId" : { "type" : "string", "description" : "Id of the shared-dashboard itself" }, "sharedWithUser" : { "type" : "string", "description" : "User who the dashboard has been shared with" }, "sharedWithUserDetails" : { "$ref" : "#/definitions/SharedWithUserDetails" } } }, "NewSharedDashboard" : { "type" : "object", "properties" : { "dashboardIds" : { "type" : "array", "uniqueItems" : true, "items" : { "type" : "string" } }, "shareWith" : { "type" : "array", "uniqueItems" : true, "items" : { "type" : "string" } } } }, "SharedDashboardUpdate" : { "type" : "object", "properties" : { "name" : { "type" : "string" } }, "description" : "Updating shared dashboard properties" }, "NewSoil" : { "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 } } }, "SoilEditable" : { "type" : "object", "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 } } }, "SubscriptionAssignment" : { "type" : "object", "properties" : { "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." }, "organizationId" : { "type" : "string", "description" : "Id of the subscribed organization." }, "subscription" : { "description" : "The subscription of the organization", "$ref" : "#/definitions/Subscription" }, "subscriptionId" : { "type" : "string", "description" : "Unique identifier for the subscription." } } }, "SubscriptionNew" : { "type" : "object", "required" : [ "licenseId", "name", "subscriptionId" ], "properties" : { "actions" : { "type" : "array", "description" : "The actions permitted by the license subscription.", "items" : { "type" : "string" } }, "name" : { "type" : "string", "description" : "Displayable name." }, "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" }, "SubscriptionEditable" : { "type" : "object", "properties" : { "actions" : { "type" : "array", "description" : "The actions permitted by the license subscription.", "items" : { "type" : "string" } }, "name" : { "type" : "string", "description" : "Displayable name." } }, "description" : "Object holding the editable properties of a subscription" }, "TimezoneDetails" : { "type" : "object", "properties" : { "id" : { "type" : "string" }, "offset" : { "type" : "integer", "format" : "int64" }, "readableOffset" : { "type" : "string" } } }, "UserConfig" : { "type" : "object", "required" : [ "configKey", "configValue" ], "properties" : { "configKey" : { "type" : "string", "description" : "The key of the user config key-value pair" }, "configValue" : { "type" : "string", "description" : "The key of the user config key-value pair" }, "createdAt" : { "type" : "string", "description" : "The time the config was created at" }, "email" : { "type" : "string", "description" : "Email address of the user" } } }, "UserConfigEditable" : { "type" : "object", "properties" : { "configKey" : { "type" : "string", "description" : "The key of the user config key-value pair" }, "configValue" : { "type" : "string", "description" : "The value of the user config key-value pair" } } }, "User" : { "type" : "object", "required" : [ "email" ], "properties" : { "activityNotifications" : { "type" : "object", "description" : "Activity notifications (type and frequency).", "additionalProperties" : { "type" : "string", "enum" : [ "NEVER", "IMMEDIATELY" ] } }, "favoritePages" : { "type" : "array", "description" : "List of web pages marked as favorite by the user.", "items" : { "$ref" : "#/definitions/WebPageReference" } }, "firstName" : { "type" : "string", "description" : "First name." }, "language" : { "type" : "string", "description" : "IETF language tag, e.g. en-US" }, "lastName" : { "type" : "string", "description" : "Last name." }, "metricSettings" : { "type" : "array", "description" : "The user's preferred unit per metric, e.g. temperature: Fahrenheit", "uniqueItems" : true, "items" : { "type" : "object", "additionalProperties" : { "type" : "string" } } }, "phoneNumber" : { "type" : "string", "description" : "Phone number." }, "status" : { "type" : "string", "description" : "Indicates when a user is active or inactive." }, "timezone" : { "type" : "string", "description" : "The timezone of the user, defaults to Europe/Amsterdam" }, "activatedAt" : { "type" : "string", "description" : "UTC ISO 8601 timestamp of activation, e.g. e.g 2023-12-12T15:00:00Z." }, "email" : { "type" : "string", "description" : "Email address." }, "invitedBy" : { "type" : "string", "description" : "Email address of user that sent the invite." }, "systemRole" : { "type" : "string", "description" : "System-wide role like: 'admin'" }, "userId" : { "type" : "string", "description" : "Universally unique identifier of a user." } }, "description" : "A person who uses the platform" }, "WebPageReference" : { "type" : "object", "properties" : { "url" : { "type" : "string", "description" : "URL of a web page." }, "title" : { "type" : "string", "description" : "Displayable title." } }, "description" : "A reference to a web page" }, "SignUpRequest" : { "type" : "object", "required" : [ "invitationToken", "language" ], "properties" : { "invitationToken" : { "type" : "string", "description" : "The invitation JWT (issued at invite time)." }, "language" : { "type" : "string", "description" : "IETF language tag, e.g. en-US" }, "password" : { "type" : "string", "description" : "The user's introduced password." } }, "description" : "Payload submitted by an invited user to sign up." }, "Credential" : { "type" : "object", "properties" : { "email" : { "type" : "string" }, "language" : { "type" : "string" }, "password" : { "type" : "string" } }, "description" : "Object holding user's credentials" }, "UserCredentialsAsGuest" : { "type" : "object", "properties" : { "email" : { "type" : "string" }, "firstName" : { "type" : "string" }, "language" : { "type" : "string" }, "lastName" : { "type" : "string" }, "password" : { "type" : "string" } }, "description" : "Object holding the required properties to register a guest" }, "UserNew" : { "type" : "object", "required" : [ "email", "firstName", "lastName" ], "properties" : { "activityNotifications" : { "type" : "object", "description" : "Activity notifications (type and frequency).", "additionalProperties" : { "type" : "string", "enum" : [ "NEVER", "IMMEDIATELY" ] } }, "favoritePages" : { "type" : "array", "description" : "List of web pages marked as favorite by the user.", "items" : { "$ref" : "#/definitions/WebPageReference" } }, "firstName" : { "type" : "string", "description" : "First name." }, "language" : { "type" : "string", "description" : "IETF language tag, e.g. en-US" }, "lastName" : { "type" : "string", "description" : "Last name." }, "metricSettings" : { "type" : "array", "description" : "The user's preferred unit per metric, e.g. temperature: Fahrenheit", "uniqueItems" : true, "items" : { "type" : "object", "additionalProperties" : { "type" : "string" } } }, "phoneNumber" : { "type" : "string", "description" : "Phone number." }, "rateLimitTier" : { "type" : "string", "enum" : [ "tier1", "tier2", "tier3", "tier4" ] }, "status" : { "type" : "string", "description" : "Indicates when a user is active or inactive." }, "timezone" : { "type" : "string", "description" : "The timezone of the user, defaults to Europe/Amsterdam" }, "email" : { "type" : "string", "description" : "Email address." } }, "description" : "Object holding the required properties to create a new user" }, "UserInviteRequest" : { "type" : "object", "required" : [ "email", "firstName", "lastName", "organizationId", "role" ], "properties" : { "activityNotifications" : { "type" : "object", "description" : "Activity notifications (type and frequency).", "additionalProperties" : { "type" : "string", "enum" : [ "NEVER", "IMMEDIATELY" ] } }, "favoritePages" : { "type" : "array", "description" : "List of web pages marked as favorite by the user.", "items" : { "$ref" : "#/definitions/WebPageReference" } }, "firstName" : { "type" : "string", "description" : "First name." }, "language" : { "type" : "string", "description" : "IETF language tag, e.g. en-US" }, "lastName" : { "type" : "string", "description" : "Last name." }, "metricSettings" : { "type" : "array", "description" : "The user's preferred unit per metric, e.g. temperature: Fahrenheit", "uniqueItems" : true, "items" : { "type" : "object", "additionalProperties" : { "type" : "string" } } }, "phoneNumber" : { "type" : "string", "description" : "Phone number." }, "rateLimitTier" : { "type" : "string", "enum" : [ "tier1", "tier2", "tier3", "tier4" ] }, "status" : { "type" : "string", "description" : "Indicates when a user is active or inactive." }, "timezone" : { "type" : "string", "description" : "The timezone of the user, defaults to Europe/Amsterdam" }, "email" : { "type" : "string", "description" : "Email address." }, "licenseId" : { "type" : "string", "description" : "Optional license identifier driving the email template and sender" }, "organizationId" : { "type" : "string", "description" : "Identifier of the organization the user is being invited to" }, "role" : { "type" : "string", "description" : "Role to assign the invited user within the organization" } }, "description" : "User Invite to an organization" }, "UserToken" : { "type" : "object", "properties" : { "apiToken" : { "type" : "string" } } }, "UserEditable" : { "type" : "object", "properties" : { "activityNotifications" : { "type" : "object", "description" : "Activity notifications (type and frequency).", "additionalProperties" : { "type" : "string", "enum" : [ "NEVER", "IMMEDIATELY" ] } }, "favoritePages" : { "type" : "array", "description" : "List of web pages marked as favorite by the user.", "items" : { "$ref" : "#/definitions/WebPageReference" } }, "firstName" : { "type" : "string", "description" : "First name." }, "language" : { "type" : "string", "description" : "IETF language tag, e.g. en-US" }, "lastName" : { "type" : "string", "description" : "Last name." }, "metricSettings" : { "type" : "array", "description" : "The user's preferred unit per metric, e.g. temperature: Fahrenheit", "uniqueItems" : true, "items" : { "type" : "object", "additionalProperties" : { "type" : "string" } } }, "phoneNumber" : { "type" : "string", "description" : "Phone number." }, "rateLimitTier" : { "type" : "string", "enum" : [ "tier1", "tier2", "tier3", "tier4" ] }, "status" : { "type" : "string", "description" : "Indicates when a user is active or inactive." }, "timezone" : { "type" : "string", "description" : "The timezone of the user, defaults to Europe/Amsterdam" } }, "description" : "Object holding the editable properties of a user" }, "ChartAxis" : { "type" : "object", "properties" : { "axisPosition" : { "type" : "string", "description" : "The position of the axis (e.g. left side)", "enum" : [ "LEFT", "RIGHT", "HIDDEN" ] }, "maxRange" : { "type" : "number", "format" : "double", "description" : "Maximum value of the range" }, "minRange" : { "type" : "number", "format" : "double", "description" : "Minimum value of the range" }, "name" : { "type" : "string", "description" : "Name of the axis" } } }, "ChartConfiguration" : { "type" : "object", "properties" : { "chartType" : { "type" : "string", "description" : "Type of chart visualisation (line or bar).", "enum" : [ "LINE", "BAR" ] }, "colorPerSensorField" : { "type" : "object", "description" : "Color per data series of this widget", "additionalProperties" : { "type" : "string" } }, "colorScheme" : { "type" : "string", "description" : "Color scheme of the chart.", "enum" : [ "PER_METRIC", "CUSTOM", "DISTINCT" ] }, "isStacked" : { "type" : "boolean", "description" : "Whether the chart's graph elements (lines or bars) are shown one on top of the other." }, "showWeekNumbers" : { "type" : "boolean", "description" : "Whether to show week numbers in the chart" } } }, "Data" : { "type" : "object", "properties" : { "content" : { "type" : "string" }, "position" : { "type" : "object", "additionalProperties" : { "type" : "number", "format" : "double" } }, "config" : { "type" : "object", "additionalProperties" : { "type" : "object" } }, "dataUploadId" : { "type" : "string" }, "imageDimensions" : { "$ref" : "#/definitions/ImageDimensions" } } }, "Scope" : { "type" : "object", "properties" : { "aggregated" : { "type" : "boolean" }, "checkIds" : { "type" : "array", "items" : { "type" : "string" } }, "notificationIds" : { "type" : "array", "items" : { "type" : "string" } }, "sensorType" : { "type" : "string" }, "tags" : { "type" : "array", "items" : { "type" : "string" } }, "tagsOperator" : { "type" : "string" } } }, "Widget" : { "type" : "object", "properties" : { "derivative" : { "type" : "boolean", "description" : "Whether the data of this widget represents the rate of change." }, "appId" : { "type" : "string" }, "chartConfiguration" : { "$ref" : "#/definitions/ChartConfiguration" }, "chartVerticalAxes" : { "type" : "array", "items" : { "$ref" : "#/definitions/ChartAxis" } }, "checks" : { "type" : "array", "items" : { "$ref" : "#/definitions/CheckSummary" } }, "childWidgets" : { "type" : "array", "items" : { "$ref" : "#/definitions/Widget" } }, "collectionIdsPerField" : { "type" : "object", "additionalProperties" : { "type" : "array", "items" : { "type" : "string" } } }, "comments" : { "type" : "array", "items" : { "$ref" : "#/definitions/Comment" } }, "cultivationId" : { "type" : "string" }, "cultivationTargetId" : { "type" : "string" }, "cumulative" : { "type" : "boolean" }, "dashboardId" : { "type" : "string" }, "data" : { "$ref" : "#/definitions/Data" }, "dataSourcePerCultivation" : { "type" : "object", "description" : "Map of data sources selected per cultivation", "additionalProperties" : { "type" : "array", "items" : { "type" : "string" } } }, "fields" : { "type" : "object", "additionalProperties" : { "type" : "array", "items" : { "type" : "string" } } }, "interval" : { "type" : "string" }, "intervalFrom" : { "type" : "string" }, "intervalSize" : { "type" : "string" }, "intervalTo" : { "type" : "string" }, "metricUnits" : { "type" : "object", "additionalProperties" : { "type" : "string" } }, "order" : { "type" : "integer", "format" : "int32", "description" : "Position order in a dashboard, starts from 1" }, "organizationId" : { "type" : "string" }, "parentWidgetId" : { "type" : "string" }, "partOfDay" : { "type" : "string", "description" : "The part of the day the widget displays data for." }, "scope" : { "$ref" : "#/definitions/Scope" }, "showSunEvents" : { "type" : "boolean" }, "siteId" : { "type" : "string" }, "statisticType" : { "type" : "string" }, "subtitle" : { "type" : "string" }, "title" : { "type" : "string" }, "widgetId" : { "type" : "string" }, "widgetType" : { "type" : "string" }, "imageDimensions" : { "$ref" : "#/definitions/ImageDimensions" } }, "description" : "A dashboard widget" }, "NewWidget" : { "type" : "object", "properties" : { "appId" : { "type" : "string" }, "chartConfiguration" : { "$ref" : "#/definitions/ChartConfiguration" }, "chartVerticalAxes" : { "type" : "array", "items" : { "$ref" : "#/definitions/ChartAxis" } }, "collectionIdsPerField" : { "type" : "object", "additionalProperties" : { "type" : "array", "items" : { "type" : "string" } } }, "cultivationId" : { "type" : "string" }, "cultivationTargetId" : { "type" : "string" }, "cumulative" : { "type" : "boolean" }, "data" : { "$ref" : "#/definitions/Data" }, "dataSourcePerCultivation" : { "type" : "object", "additionalProperties" : { "type" : "array", "items" : { "type" : "string" } } }, "derivative" : { "type" : "boolean" }, "fields" : { "type" : "object", "additionalProperties" : { "type" : "array", "items" : { "type" : "string" } } }, "interval" : { "type" : "string" }, "intervalFrom" : { "type" : "string" }, "intervalSize" : { "type" : "string" }, "intervalTo" : { "type" : "string" }, "metricUnits" : { "type" : "object", "additionalProperties" : { "type" : "string" } }, "parentWidgetId" : { "type" : "string" }, "partOfDay" : { "type" : "string" }, "scope" : { "$ref" : "#/definitions/Scope" }, "showSunEvents" : { "type" : "boolean" }, "statisticType" : { "type" : "string" }, "subtitle" : { "type" : "string" }, "title" : { "type" : "string" }, "widgetType" : { "type" : "string" } } }, "WidgetUpdate" : { "type" : "object", "properties" : { "cultivationTargetId" : { "type" : "string" }, "dataSourcePerCultivation" : { "type" : "object", "description" : "Map of data sources selected per cultivation", "additionalProperties" : { "type" : "array", "items" : { "type" : "string" } } }, "derivative" : { "type" : "boolean", "description" : "Whether the data of this widget represents the rate of change." }, "app" : { "type" : "string" }, "chartConfiguration" : { "$ref" : "#/definitions/ChartConfiguration" }, "chartVerticalAxes" : { "type" : "array", "items" : { "$ref" : "#/definitions/ChartAxis" } }, "collectionIdsPerField" : { "type" : "object", "additionalProperties" : { "type" : "array", "items" : { "type" : "string" } } }, "cumulative" : { "type" : "boolean" }, "data" : { "$ref" : "#/definitions/Data" }, "fields" : { "type" : "object", "additionalProperties" : { "type" : "array", "items" : { "type" : "string" } } }, "interval" : { "type" : "string" }, "intervalFrom" : { "type" : "string" }, "intervalSize" : { "type" : "string" }, "intervalTo" : { "type" : "string" }, "metricUnits" : { "type" : "object", "additionalProperties" : { "type" : "string" } }, "partOfDay" : { "type" : "string" }, "scope" : { "$ref" : "#/definitions/Scope" }, "showSunEvents" : { "type" : "boolean" }, "statisticType" : { "type" : "string" }, "subtitle" : { "type" : "string" }, "title" : { "type" : "string" } }, "description" : "Updating widget properties" }, "ZoneNew" : { "type" : "object", "required" : [ "name" ], "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" }, "polygon" : { "type" : "array", "description" : "List of coordinates that define the polygon.", "items" : { "type" : "array", "items" : { "type" : "number", "format" : "double" } }, "maxItems" : 2147483647, "minItems" : 4 }, "soilId" : { "type" : "string", "description" : "Zone's soil type id." } }, "description" : "Object holding the required properties to create a new Zone." }, "ZoneEditable" : { "type" : "object", "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" }, "polygon" : { "type" : "array", "description" : "List of coordinates that define the polygon.", "items" : { "type" : "array", "items" : { "type" : "number", "format" : "double" } }, "maxItems" : 2147483647, "minItems" : 4 }, "soilId" : { "type" : "string", "description" : "Zone's soil type id." } }, "description" : "Object holding the editable properties of a Zone." }, "AppInstallation" : { "type" : "object", "required" : [ "app", "installationId", "siteId" ], "properties" : { "description" : { "type" : "string", "description" : "Installation's description." }, "dynamicConfigurations" : { "type" : "object", "additionalProperties" : { "type" : "object" } }, "name" : { "type" : "string", "description" : "App installation name" }, "activatedAt" : { "type" : "string", "description" : "The ISO601 UTC date the app was activated. e.g 2021-03-21T00:00:00Z" }, "activatedBy" : { "type" : "string", "description" : "The email of the user that activated this installation." }, "app" : { "description" : "Application.", "$ref" : "#/definitions/App" }, "appId" : { "type" : "string", "description" : "Application type." }, "deactivatedAt" : { "type" : "string", "description" : "The ISO601 UTC date the app was deactivated, e.g 2021-03-21T00:00:00Z. Ignored when the activatedAt is not set." }, "deactivatedBy" : { "type" : "string", "description" : "The email of the user that deactivated this installation." }, "installationId" : { "type" : "string", "description" : "Application id." }, "installedAt" : { "type" : "string", "description" : "The ISO601 UTC date the app was installed. e.g 2021-03-21T00:00:00Z" }, "installedBy" : { "type" : "string", "description" : "The email of the user performing the installation." }, "locationId" : { "type" : "string", "description" : "The site the installation belongs to. Use getSiteId() instead." }, "organization" : { "$ref" : "#/definitions/Organization" }, "organizationId" : { "type" : "string", "description" : "The unique identifier of the organization it belongs to." }, "siteId" : { "type" : "string", "description" : "The site the installation belongs to." }, "status" : { "type" : "string", "description" : "The status of the installation." }, "isActive" : { "type" : "boolean", "description" : "Whether it is active or deactivated." } } }, "NewAppInstallation" : { "type" : "object", "properties" : { "description" : { "type" : "string", "description" : "Installation's description." }, "dynamicConfigurations" : { "type" : "object", "additionalProperties" : { "type" : "object" } }, "name" : { "type" : "string", "description" : "Installation's name." } } }, "AppInstallationEditable" : { "type" : "object", "properties" : { "description" : { "type" : "string", "description" : "Installation's description." }, "dynamicConfigurations" : { "type" : "object", "additionalProperties" : { "type" : "object" } }, "name" : { "type" : "string", "description" : "Installation's name." } } }, "AppEditable" : { "type" : "object", "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." }, "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" : "#/definitions/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." }, "widgets" : { "type" : "array", "description" : "Widgets that belong to the installable.", "items" : { "type" : "object" } } } }, "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." }, "NewCalculation" : { "type" : "object", "required" : [ "calculationId", "name" ], "properties" : { "aggregationKey" : { "type" : "string", "description" : "Key of the selected aggregation from the calculation response" }, "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" } }, "template" : { "type" : "string", "description" : "Template for the calculation" }, "templateId" : { "type" : "string", "description" : "Unique identifier for the calculation template" } }, "description" : "Object holding the properties of a new calculation." }, "CalculationEditable" : { "type" : "object", "properties" : { "aggregationKey" : { "type" : "string", "description" : "Key of the selected aggregation from the calculation response" }, "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" } }, "template" : { "type" : "string", "description" : "Template for the calculation" }, "templateId" : { "type" : "string", "description" : "Unique identifier for the calculation template" } }, "description" : "Object holding the editable properties of a calculation." }, "DropResponse" : { "type" : "object", "properties" : { "averageIrrigiationValue" : { "type" : "number", "format" : "double" }, "drop" : { "type" : "number", "format" : "double" }, "endDate" : { "type" : "integer", "format" : "int64" }, "irrigationStartTimestamp" : { "type" : "integer", "format" : "int64" }, "irrigationStartValue" : { "type" : "number", "format" : "double" }, "irrigationStopTimestamp" : { "type" : "integer", "format" : "int64" }, "irrigationStopValue" : { "type" : "number", "format" : "double" }, "startDate" : { "type" : "integer", "format" : "int64" } } }, "CheckStatsRequest" : { "type" : "object", "properties" : { "checkIds" : { "type" : "array", "description" : "Check ids for returning the historical data.", "uniqueItems" : true, "items" : { "type" : "string" } }, "collectionIdsPerField" : { "type" : "object", "description" : "Filter/group values based on fields and collection ids", "additionalProperties" : { "type" : "array", "uniqueItems" : true, "items" : { "type" : "string" } } }, "daysOfMonth" : { "type" : "array", "description" : "Day (1-31) list parameter, e.g. [1] for the first of the month.", "items" : { "type" : "integer", "format" : "int32" } }, "daysOfWeek" : { "type" : "array", "description" : "Day of the week (1-7) list parameter, e.g. [1] for Monday.", "items" : { "type" : "integer", "format" : "int32" } }, "hoursOfDay" : { "type" : "array", "description" : "Hour (0-23) list parameter, e.g. [2, 3] for 2:00 am and 3:00 am.", "items" : { "type" : "integer", "format" : "int32" } }, "minutesOfHour" : { "type" : "array", "description" : "Minute within the hour (0-59) list parameter, e.g. [20, 30] for 20th and 30th minute.", "items" : { "type" : "integer", "format" : "int32" } }, "organizationId" : { "type" : "string", "description" : "The id of an organization (when tags are set)." }, "sensorType" : { "type" : "string", "description" : "The id of a sensor type (when tags are set)." }, "tags" : { "type" : "array", "description" : "Set tags to automatically select checks based on their tags.", "uniqueItems" : true, "items" : { "type" : "string" } }, "tagsOperator" : { "type" : "string", "description" : "Tags boolean operator (and/or)." } } }, "CustomerRequestItem" : { "type" : "object", "required" : [ "lineTotal", "unitPrice", "units" ], "properties" : { "configuration" : { "type" : "object", "description" : "Customer request item configuration", "additionalProperties" : { "type" : "string" } }, "createdAt" : { "type" : "string", "description" : "The date and time a quote item was created." }, "customerRequestId" : { "type" : "string", "description" : "Customer request id." }, "customerRequestItemId" : { "type" : "string", "description" : "Customer request item id." }, "description" : { "type" : "string", "description" : "The description for the quote item." }, "lineTotal" : { "type" : "number", "format" : "float", "description" : "CustomerRequest item's line total." }, "motherIds" : { "type" : "array", "description" : "The mother id for the quote item.", "uniqueItems" : true, "items" : { "type" : "string" } }, "productId" : { "type" : "string", "description" : "The product id for the quote item." }, "status" : { "type" : "string", "description" : "The status of the quote item." }, "unitPrice" : { "type" : "number", "format" : "float", "description" : "CustomerRequest item's unit price." }, "units" : { "type" : "integer", "format" : "int32", "description" : "CustomerRequest item's units." }, "updatedAt" : { "type" : "string", "description" : "The date and time a quote item was last updated." } }, "description" : "CustomerRequestItem" }, "NewCustomerRequestItem" : { "type" : "object", "required" : [ "unitPrice", "units" ], "properties" : { "configuration" : { "type" : "object", "additionalProperties" : { "type" : "string" } }, "description" : { "type" : "string" }, "productId" : { "type" : "string" }, "status" : { "type" : "string" }, "unitPrice" : { "type" : "number", "format" : "float" }, "units" : { "type" : "integer", "format" : "int32" }, "customerRequestId" : { "type" : "string" } } }, "CustomerRequestItemUpdate" : { "type" : "object", "properties" : { "configuration" : { "type" : "object", "description" : "Customer request item configuration", "additionalProperties" : { "type" : "string" } }, "customerRequestItemId" : { "type" : "string", "description" : "Customer request item id." }, "description" : { "type" : "string", "description" : "The description for the quote item." }, "lineTotal" : { "type" : "number", "format" : "float", "description" : "CustomerRequest item's line total." }, "motherIds" : { "type" : "array", "description" : "The mother ids for the customer request item.", "uniqueItems" : true, "items" : { "type" : "string" } }, "productId" : { "type" : "string", "description" : "The product id for the quote item." }, "status" : { "type" : "string", "description" : "The status of the quote item." }, "unitPrice" : { "type" : "number", "format" : "float", "description" : "CustomerRequest item's unit price." }, "units" : { "type" : "integer", "format" : "int32", "description" : "CustomerRequest item's units." } }, "description" : "Update quote item properties" }, "CustomerRequest" : { "type" : "object", "required" : [ "totalPrice" ], "properties" : { "accountManager" : { "type" : "string", "description" : "CustomerRequest's account manager." }, "contactPersonEmail" : { "type" : "string", "description" : "CustomerRequest's contact person email." }, "contactPersonFirstName" : { "type" : "string", "description" : "CustomerRequest's contact person first name." }, "contactPersonLastName" : { "type" : "string", "description" : "CustomerRequest's contact person last name." }, "contactPersonPhone" : { "type" : "string", "description" : "CustomerRequest's contact person phone number." }, "countryCode" : { "type" : "string", "description" : "The country code of the quote." }, "createdAt" : { "type" : "string", "description" : "The date and time a quote was created." }, "currency" : { "type" : "string", "description" : "CustomerRequest's currency." }, "customVatPercentage" : { "type" : "integer", "format" : "int32", "description" : "CustomerRequest's custom vat percentage." }, "customerRequestId" : { "type" : "string", "description" : "Customer request id." }, "customerRequestItems" : { "type" : "array", "items" : { "$ref" : "#/definitions/CustomerRequestItem" } }, "dealer" : { "type" : "string", "description" : "CustomerRequest's dealer email." }, "deliverOnlyToCustomerAddress" : { "type" : "boolean", "description" : "Can the order by delivered to neighbours " }, "deliveredPersonally" : { "type" : "boolean", "description" : "Is the order delivered by us." }, "description" : { "type" : "string", "description" : "CustomerRequest's description." }, "discountAmount" : { "type" : "number", "format" : "float", "description" : "CustomerRequest's discount amount." }, "discountPercentage" : { "type" : "integer", "format" : "int32", "description" : "CustomerRequest's discountPercentage." }, "language" : { "type" : "string", "description" : "The language of the quote." }, "measureFrequency" : { "type" : "integer", "format" : "int32", "description" : "The desired measure frequency." }, "organizationId" : { "type" : "string", "description" : "The organization of the quote." }, "organizationLocationName" : { "type" : "string", "description" : "The organization location of the quote." }, "organizationName" : { "type" : "string", "description" : "The organization name of the quote." }, "paymentConditions" : { "type" : "boolean", "description" : "CustomerRequest's payment conditions." }, "poNumber" : { "type" : "string", "description" : "The PO Number of the customer request." }, "remarks" : { "type" : "string", "description" : "The remarks of the customer request." }, "shippingCost" : { "type" : "number", "format" : "float", "description" : "CustomerRequest's shipping cost." }, "signatureRequired" : { "type" : "boolean", "description" : "Is a signature required when delivering" }, "totalPrice" : { "type" : "number", "format" : "float", "description" : "CustomerRequest's total price." }, "totalPriceIncludingDiscount" : { "type" : "number", "format" : "float", "description" : "CustomerRequest's total including discount." }, "totalPriceIncludingVat" : { "type" : "number", "format" : "float", "description" : "CustomerRequest's total including vat amount." }, "updatedAt" : { "type" : "string", "description" : "The date and time a quote was last updated." }, "vatAmount" : { "type" : "number", "format" : "float", "description" : "CustomerRequest's vat amount." }, "vertical" : { "type" : "string", "description" : "The vertical of the quote." } }, "description" : "Customer request" }, "NewCustomerRequest" : { "type" : "object", "required" : [ "shippingCost" ], "properties" : { "accountManager" : { "type" : "string" }, "contactPersonEmail" : { "type" : "string" }, "contactPersonFirstName" : { "type" : "string" }, "contactPersonLastName" : { "type" : "string" }, "contactPersonPhone" : { "type" : "string" }, "countryCode" : { "type" : "string" }, "currency" : { "type" : "string" }, "customVatPercentage" : { "type" : "integer", "format" : "int32" }, "dealer" : { "type" : "string" }, "deliverOnlyToCustomerAddress" : { "type" : "boolean" }, "deliveredPersonally" : { "type" : "boolean" }, "description" : { "type" : "string" }, "discountPercentage" : { "type" : "integer", "format" : "int32" }, "language" : { "type" : "string" }, "measureFrequency" : { "type" : "integer", "format" : "int32" }, "organizationId" : { "type" : "string" }, "organizationLocationName" : { "type" : "string" }, "organizationName" : { "type" : "string" }, "paymentConditions" : { "type" : "boolean" }, "poNumber" : { "type" : "string" }, "remarks" : { "type" : "string" }, "shippingCost" : { "type" : "number", "format" : "float" }, "signatureRequired" : { "type" : "boolean" }, "vertical" : { "type" : "string" } } }, "CustomerRequestUpdate" : { "type" : "object", "properties" : { "accountManager" : { "type" : "string", "description" : "Customer request's account manager." }, "contactPersonEmail" : { "type" : "string", "description" : "CustomerRequest's contact person email." }, "contactPersonFirstName" : { "type" : "string", "description" : "CustomerRequest's contact person first name." }, "contactPersonLastName" : { "type" : "string", "description" : "CustomerRequest's contact person last name." }, "contactPersonPhone" : { "type" : "string", "description" : "Customer request's contact person phone number." }, "countryCode" : { "type" : "string", "description" : "Customer request's country code ." }, "currency" : { "type" : "string", "description" : "Customer request's currency." }, "customVatPercentage" : { "type" : "integer", "format" : "int32", "description" : "Customer request's custom vat percentage." }, "dealer" : { "type" : "string", "description" : "Customer request's dealer email." }, "deliverOnlyToCustomerAddress" : { "type" : "boolean", "description" : "Can the order be delivered to neighbours" }, "deliveredPersonally" : { "type" : "boolean", "description" : "Is the order delivered by us." }, "description" : { "type" : "string", "description" : "Customer request's description." }, "discountAmount" : { "type" : "number", "format" : "float", "description" : "Customer request's discount amount." }, "discountPercentage" : { "type" : "integer", "format" : "int32", "description" : "Customer request's discount percentage." }, "language" : { "type" : "string", "description" : "Customer request's language" }, "measureFrequency" : { "type" : "integer", "format" : "int32", "description" : "Customer request's measure frequency" }, "organizationId" : { "type" : "string", "description" : "Customer request's organization id." }, "organizationLocationName" : { "type" : "string", "description" : "Customer request's organization location name." }, "organizationName" : { "type" : "string", "description" : "Customer request's organization name." }, "paymentConditions" : { "type" : "boolean", "description" : "CustomerRequest's payment conditions." }, "poNumber" : { "type" : "string", "description" : "Customer PO number remarks" }, "remarks" : { "type" : "string", "description" : "Customer request's remarks" }, "shippingCost" : { "type" : "number", "format" : "float", "description" : "CustomerRequest's shipping cost." }, "signatureRequired" : { "type" : "boolean", "description" : "Is a signature required when delivering" }, "totalPrice" : { "type" : "number", "format" : "float", "description" : "Customer request's total price." }, "totalPriceIncludingDiscount" : { "type" : "number", "format" : "float", "description" : "CustomerRequest's total including discount." }, "totalPriceIncludingVat" : { "type" : "number", "format" : "float", "description" : "Customer request's total including vat amount." }, "vatAmount" : { "type" : "number", "format" : "float", "description" : "Customer request's vat amount." }, "vertical" : { "type" : "string", "description" : "Customer request's vertical." } }, "description" : "Update customer request properties" }, "Dealer" : { "type" : "object", "properties" : { "city" : { "type" : "string" }, "company" : { "type" : "string" }, "country" : { "type" : "string" }, "countryCode" : { "type" : "string" }, "email" : { "type" : "string" }, "firstName" : { "type" : "string" }, "hardwareDiscountPercentage" : { "type" : "integer", "format" : "int32" }, "hardwareDiscountPercentageValidUntil" : { "type" : "string" }, "lastName" : { "type" : "string" }, "notificationsEmails" : { "type" : "array", "uniqueItems" : true, "items" : { "type" : "string" } }, "phone" : { "type" : "string" }, "subscriptionMarginPercentage" : { "type" : "integer", "format" : "int32" }, "subscriptionMarginPercentageValidUntil" : { "type" : "string" } } }, "DealerUpdate" : { "type" : "object", "properties" : { "city" : { "type" : "string" }, "company" : { "type" : "string" }, "country" : { "type" : "string" }, "countryCode" : { "type" : "string" }, "firstName" : { "type" : "string" }, "hardwareDiscountPercentage" : { "type" : "integer", "format" : "int32" }, "hardwareDiscountPercentageValidUntil" : { "type" : "string" }, "lastName" : { "type" : "string" }, "notificationsEmails" : { "type" : "array", "uniqueItems" : true, "items" : { "type" : "string" } }, "phone" : { "type" : "string" }, "subscriptionMarginPercentage" : { "type" : "integer", "format" : "int32" }, "subscriptionMarginPercentageValidUntil" : { "type" : "string" } } }, "Invoice" : { "type" : "object", "properties" : { "createdAt" : { "type" : "string", "description" : "Invoice's created at date." }, "customerRequest" : { "$ref" : "#/definitions/CustomerRequest" }, "customerRequestId" : { "type" : "string", "description" : "Customer request id." }, "date" : { "type" : "string", "description" : "Invoice's date." }, "datePaid" : { "type" : "string", "description" : "The date when the invoice's status became Paid." }, "dateSent" : { "type" : "string", "description" : "The date when the invoice's status became Sent." }, "deliveredDate" : { "type" : "string", "description" : "Invoice's delivered date." }, "dueDate" : { "type" : "string", "description" : "Invoice's due date." }, "invoiceId" : { "type" : "string", "description" : "Invoice id." }, "invoiceNumber" : { "type" : "string", "description" : "Invoice number." }, "status" : { "type" : "string", "description" : "Invoice's status." } }, "description" : "Invoice" }, "NewInvoice" : { "type" : "object", "properties" : { "customerRequestId" : { "type" : "string" }, "date" : { "type" : "string" }, "deliveredDate" : { "type" : "string" }, "dueDate" : { "type" : "string" }, "invoiceNumber" : { "type" : "string" }, "status" : { "type" : "string" } } }, "InvoiceUpdate" : { "type" : "object", "properties" : { "date" : { "type" : "string", "description" : "Invoice's date." }, "deliveredDate" : { "type" : "string", "description" : "Invoice's delivered date." }, "dueDate" : { "type" : "string", "description" : "Invoice's due date." }, "invoiceNumber" : { "type" : "string", "description" : "Invoice's number" }, "status" : { "type" : "string", "description" : "Invoice's status." } }, "description" : "Updating of an invoice" }, "Order" : { "type" : "object", "properties" : { "active" : { "type" : "boolean", "description" : "The state of the order" }, "createdAt" : { "type" : "string", "description" : "Order's created at date." }, "customerRequest" : { "$ref" : "#/definitions/CustomerRequest" }, "customerRequestId" : { "type" : "string", "description" : "Customer request id." }, "date" : { "type" : "string", "description" : "Order's date." }, "dateDone" : { "type" : "string", "description" : "The date when the order's status became Done." }, "dateInProgress" : { "type" : "string", "description" : "The date when the order's status became In Progress." }, "deliveredDate" : { "type" : "string", "description" : "Order's delivered date." }, "dueDate" : { "type" : "string", "description" : "Order's due date." }, "orderId" : { "type" : "string", "description" : "Order id." }, "orderNumber" : { "type" : "integer", "format" : "int32", "description" : "Order number." }, "priority" : { "type" : "string", "description" : "Order's priority" }, "status" : { "type" : "string", "description" : "Order's status." } }, "description" : "Order" }, "NewOrder" : { "type" : "object", "properties" : { "customerRequestId" : { "type" : "string" }, "date" : { "type" : "string" }, "deliveredDate" : { "type" : "string" }, "dueDate" : { "type" : "string" }, "priority" : { "type" : "string" }, "status" : { "type" : "string" } } }, "OrderUpdate" : { "type" : "object", "properties" : { "date" : { "type" : "string", "description" : "Order's date." }, "deliveredDate" : { "type" : "string", "description" : "Order's delivered date." }, "dueDate" : { "type" : "string", "description" : "Order's due date." }, "priority" : { "type" : "string", "description" : "Order's priority." }, "status" : { "type" : "string", "description" : "Order's status." } }, "description" : "Updating of an order" }, "Quote" : { "type" : "object", "properties" : { "date" : { "type" : "string", "description" : "Quote's date." }, "expirationDate" : { "type" : "string", "description" : "Quote's expiration date." }, "remarks" : { "type" : "string", "description" : "Quote's remarks." }, "signedPdfId" : { "type" : "string", "description" : "Quote's signed pdf id" }, "status" : { "type" : "string", "description" : "Quote's status." } }, "description" : "updating of a quote" }, "NewQuote" : { "type" : "object", "properties" : { "customerRequestId" : { "type" : "string" }, "date" : { "type" : "string" }, "expirationDate" : { "type" : "string" }, "remarks" : { "type" : "string" }, "signedPdfId" : { "type" : "string" }, "status" : { "type" : "string" } } }, "CultivationNew" : { "type" : "object", "required" : [ "dateEnd", "dateStart", "name", "organizationId", "siteId", "targetResolution" ], "properties" : { "batch" : { "type" : "string", "description" : "Identifier of the batch a cultivation belongs to." }, "dateEnd" : { "type" : "string", "description" : "End of the cultivation in UTC as ISO 8601 format e.g. 2025-07-30T00:00:00Z", "pattern" : "\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d([+-][0-2]\\d:[0-5]\\d|Z)" }, "dateStart" : { "type" : "string", "description" : "Start of the cultivation in UTC as ISO 8601 format e.g. 2025-07-30T00:00:00Z", "pattern" : "\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d([+-][0-2]\\d:[0-5]\\d|Z)" }, "description" : { "type" : "string", "description" : "Brief description that elaborates on the name" }, "genus" : { "type" : "string", "description" : "A taxonomic rank that groups closely related species." }, "name" : { "type" : "string", "description" : "Displayable name." }, "phases" : { "type" : "array", "description" : "Contiguous phases within the cultivation timeline, ordered chronologically by start day.", "items" : { "$ref" : "#/definitions/CultivationPhase" } }, "plantGroups" : { "type" : "array", "description" : "Plant groups within the cultivation hierarchy.", "items" : { "$ref" : "#/definitions/PlantGroup" } }, "siteId" : { "type" : "string", "description" : "Identifier of the site it belongs to, together with the organizationId this is unique." }, "species" : { "type" : "string", "description" : "A group of organisms that can interbreed naturally to produce fertile offspring." }, "startOfDayInMinutes" : { "type" : "integer", "format" : "int32", "description" : "Start of the day period, expressed as minutes since midnight (0-1439), e.g. 360 for 06:00.", "minimum" : 0, "maximum" : 1439 }, "startOfNightInMinutes" : { "type" : "integer", "format" : "int32", "description" : "Start of the night period, expressed as minutes since midnight (0-1439), e.g. 1200 for 20:00.", "minimum" : 0, "maximum" : 1439 }, "variety" : { "type" : "string", "description" : "A population of plants of a given species with specific characteristics that has been selected and cultivated" }, "zoneHistory" : { "type" : "array", "description" : "The history, from newest to oldest, of the zones the cultivation has been covering since inception", "items" : { "$ref" : "#/definitions/CultivationZonesHistoryItem" } }, "zonesUuids" : { "type" : "array", "description" : "Unique identifiers of the current zones the cultivation covers.", "items" : { "type" : "string" } }, "organizationId" : { "type" : "string", "description" : "The unique identifier of the organization it belongs to." }, "targetResolution" : { "type" : "string", "description" : "Defines whether the strategy setpoints for this target are specified on a weekly or a daily basis." } }, "description" : "Object holding the required properties to create a new Cultivation." }, "CultivationEditable" : { "type" : "object", "properties" : { "batch" : { "type" : "string", "description" : "Identifier of the batch a cultivation belongs to." }, "dateEnd" : { "type" : "string", "description" : "End of the cultivation in UTC as ISO 8601 format e.g. 2025-07-30T00:00:00Z" }, "dateStart" : { "type" : "string", "description" : "Start of the cultivation in UTC as ISO 8601 format e.g. 2025-07-30T00:00:00Z" }, "description" : { "type" : "string", "description" : "Brief description that elaborates on the name" }, "genus" : { "type" : "string", "description" : "A taxonomic rank that groups closely related species." }, "name" : { "type" : "string", "description" : "Displayable name." }, "phases" : { "type" : "array", "description" : "Contiguous phases within the cultivation timeline, ordered chronologically by start day.", "items" : { "$ref" : "#/definitions/CultivationPhase" } }, "plantGroups" : { "type" : "array", "description" : "Plant groups within the cultivation hierarchy.", "items" : { "$ref" : "#/definitions/PlantGroup" } }, "siteId" : { "type" : "string", "description" : "Identifier of the site it belongs to, together with the organizationId this is unique." }, "species" : { "type" : "string", "description" : "A group of organisms that can interbreed naturally to produce fertile offspring." }, "startOfDayInMinutes" : { "type" : "integer", "format" : "int32", "description" : "Start of the day period, expressed as minutes since midnight (0-1439), e.g. 360 for 06:00.", "minimum" : 0, "maximum" : 1439 }, "startOfNightInMinutes" : { "type" : "integer", "format" : "int32", "description" : "Start of the night period, expressed as minutes since midnight (0-1439), e.g. 1200 for 20:00.", "minimum" : 0, "maximum" : 1439 }, "variety" : { "type" : "string", "description" : "A population of plants of a given species with specific characteristics that has been selected and cultivated" }, "zoneHistory" : { "type" : "array", "description" : "The history, from newest to oldest, of the zones the cultivation has been covering since inception", "items" : { "$ref" : "#/definitions/CultivationZonesHistoryItem" } }, "zonesUuids" : { "type" : "array", "description" : "Unique identifiers of the current zones the cultivation covers.", "items" : { "type" : "string" } } }, "description" : "Object containing the editable properties of Cultivation." }, "CultivationTargetEditable" : { "type" : "object", "properties" : { "hasNightTarget" : { "type" : "boolean", "description" : "Whether this target defines separate day and night values. Only allowed on a cultivation with DAILY target resolution that has both start-of-day and start-of-night times set." }, "metricId" : { "type" : "string", "description" : "Identifier of the metric" }, "name" : { "type" : "string", "description" : "Displayable name." }, "setpoints" : { "type" : "array", "description" : "The metric target and bandwidth setpoints in the cultivation, sorted by timestamp", "items" : { "$ref" : "#/definitions/CultivationTargetSetpoint" } } }, "description" : "Object containing the editable properties of CultivationTarget." }, "CultivationTargetNew" : { "type" : "object", "required" : [ "cultivationId", "metricId", "name", "organizationId" ], "properties" : { "hasNightTarget" : { "type" : "boolean", "description" : "Whether this target defines separate day and night values. Only allowed on a cultivation with DAILY target resolution that has both start-of-day and start-of-night times set." }, "metricId" : { "type" : "string", "description" : "Identifier of the metric" }, "name" : { "type" : "string", "description" : "Displayable name." }, "setpoints" : { "type" : "array", "description" : "The metric target and bandwidth setpoints in the cultivation, sorted by timestamp", "items" : { "$ref" : "#/definitions/CultivationTargetSetpoint" } }, "cultivationId" : { "type" : "string", "description" : "Universally unique identifier of a cultivation." }, "organizationId" : { "type" : "string", "description" : "The unique identifier of the organization it belongs to." } }, "description" : "Object holding the required properties to create a new CultivationTarget." }, "ResponseEntry" : { "type" : "object", "properties" : { "response" : { "type" : "object", "additionalProperties" : { "type" : "integer", "format" : "int64" } } }, "description" : "Aggregation statistical result entity" }, "StatisticsInfoRequest" : { "type" : "object", "properties" : { "checkIds" : { "type" : "array", "uniqueItems" : true, "items" : { "type" : "string" } }, "collectionIdsPerField" : { "type" : "object", "description" : "Filter/group values based on fields and collection ids", "additionalProperties" : { "type" : "array", "uniqueItems" : true, "items" : { "type" : "string" } } }, "cumulative" : { "type" : "boolean" }, "interval" : { "type" : "string" }, "intervalFrom" : { "type" : "string" }, "intervalSize" : { "type" : "string" }, "intervalTo" : { "type" : "string" }, "organizationId" : { "type" : "string" }, "partOfDay" : { "type" : "string", "enum" : [ "ALLTIME", "DAYTIME", "NIGHTTIME" ] }, "sensorType" : { "type" : "string" }, "statisticType" : { "type" : "string" }, "tags" : { "type" : "array", "uniqueItems" : true, "items" : { "type" : "string" } }, "tagsOperator" : { "type" : "string" } } }, "CheckLastRecordedStatInfo" : { "type" : "object", "properties" : { "batteryStatus" : { "type" : "string", "description" : "Sensor's battery status, if applies." }, "checkId" : { "type" : "string", "description" : "Id of the check" }, "code" : { "type" : "integer", "format" : "int64", "description" : "Error code." }, "json" : { "type" : "object", "description" : "Event's data for webchecks." }, "lastRecordedStats" : { "type" : "object", "description" : "Event's data" }, "matchCondition" : { "type" : "boolean", "description" : "Whether the condition is matched, if applies." }, "message" : { "type" : "string", "description" : "Error message." }, "timestamp" : { "type" : "string", "description" : "Event's UTC timestamp in ISO 8601 format e.g. 2017-01-17T19:23:02Z" } } }, "EventsCount" : { "type" : "object", "properties" : { "events" : { "type" : "integer", "format" : "int64" } } }, "NetworkOverviewResponse" : { "type" : "object", "properties" : { "offlineGateways" : { "type" : "integer", "format" : "int32" }, "offlineRouters" : { "type" : "integer", "format" : "int32" }, "offlineSensors" : { "type" : "integer", "format" : "int32" }, "offlineWebChecks" : { "type" : "integer", "format" : "int32" }, "onlineGateways" : { "type" : "integer", "format" : "int32" }, "onlineRouters" : { "type" : "integer", "format" : "int32" }, "onlineSensors" : { "type" : "integer", "format" : "int32" }, "onlineWebChecks" : { "type" : "integer", "format" : "int32" }, "pausedRouters" : { "type" : "integer", "format" : "int32" }, "pausedSensors" : { "type" : "integer", "format" : "int32" }, "pausedWebChecks" : { "type" : "integer", "format" : "int32" }, "totalGateways" : { "type" : "integer", "format" : "int32" }, "totalRouters" : { "type" : "integer", "format" : "int32" }, "totalSensors" : { "type" : "integer", "format" : "int32" }, "totalWebChecks" : { "type" : "integer", "format" : "int32" } } }, "CheckUptimeResponse" : { "type" : "object", "properties" : { "checkId" : { "type" : "string" }, "expectedHits" : { "type" : "integer", "format" : "int64" }, "hits" : { "type" : "integer", "format" : "int64" }, "uptime" : { "type" : "number", "format" : "double" }, "code" : { "type" : "integer", "format" : "int64" }, "message" : { "type" : "string" } } }, "IngestStatusResponse" : { "type" : "object", "properties" : { "checkSummary" : { "$ref" : "#/definitions/CheckSummary" }, "hits" : { "type" : "integer", "format" : "int64" }, "lastValueTimestamp" : { "type" : "string" } } }, "TwoValuesComparison" : { "type" : "object", "properties" : { "totalFirstPeriod" : { "type" : "number", "format" : "float", "readOnly" : true }, "totalSecondPeriod" : { "type" : "number", "format" : "float", "readOnly" : true }, "difference" : { "type" : "number", "format" : "float", "readOnly" : true }, "acceptable" : { "type" : "boolean", "readOnly" : true }, "absoluteDifference" : { "type" : "number", "format" : "float", "readOnly" : true }, "percentageDifference" : { "type" : "number", "format" : "float" } } }, "TwoValuesComparisonTableScan" : { "type" : "object", "properties" : { "actualPingsPerSecond" : { "type" : "number", "format" : "double", "readOnly" : true }, "expectedPingsPerSecond" : { "type" : "number", "format" : "double", "readOnly" : true }, "acceptable" : { "type" : "boolean", "readOnly" : true }, "absoluteDifference" : { "type" : "number", "format" : "double", "readOnly" : true }, "percentageDifference" : { "type" : "number", "format" : "double" } } }, "DeviceStatusResponse" : { "type" : "object", "properties" : { "isOnline" : { "type" : "boolean", "description" : "true when SOME devices are online" }, "offlineLocations" : { "type" : "array", "uniqueItems" : true, "items" : { "type" : "string" } }, "onlineLocations" : { "type" : "array", "uniqueItems" : true, "items" : { "type" : "string" } } }, "description" : "Online/offline status of mother devices. isOnline is true when any of the devices is online." }, "XBeeFactory" : { "type" : "object", "properties" : { "checkId" : { "type" : "string", "description" : "Check Id this XBee factory belongs to." }, "remarks" : { "type" : "string", "description" : "Remarks regarding this factory." }, "configurations" : { "type" : "object", "additionalProperties" : { "type" : "string" } }, "testResults" : { "type" : "object", "additionalProperties" : { "type" : "string" } }, "createdAt" : { "type" : "string" }, "lastChanged" : { "type" : "string" }, "macAddress" : { "type" : "string", "description" : "MAC Address." } } }, "XBeeConfiguration" : { "type" : "object", "properties" : { "changedByEmail" : { "type" : "string", "description" : "The email address of the user that changed this configuration" }, "configurationKey" : { "type" : "string", "description" : "The key for this configuration." }, "configurationValue" : { "type" : "string", "description" : "The value for this configuration: a json object or a string." } } }, "XBeeTestResult" : { "type" : "object", "properties" : { "changedByEmail" : { "type" : "string", "description" : "The email address of the user that changed this test result" }, "testResultKey" : { "type" : "string", "description" : "The key for this test result." }, "testResultValue" : { "type" : "string", "description" : "The value for this test result: a json object or a string." } } }, "XBeeFactoryEditable" : { "type" : "object", "properties" : { "checkId" : { "type" : "string" }, "remarks" : { "type" : "string" }, "configurations" : { "type" : "object", "additionalProperties" : { "type" : "string" } }, "testResults" : { "type" : "object", "additionalProperties" : { "type" : "string" } } } } } }