Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

For the password a key has to be generated using the portal of Farm21. 

To get all sensor data for an organization, specify the server url as follows:

Code Block
 <serverUrl>https://app.farm21.tech/api/public/beta</serverUrl>

It is also possible to specify a specific group id to import only sensors that are part of that group. The group id is available in the portalThe group id will soon be available on the portal as well. It is required to configure the URL. The groupid is part of the configured URL and should be changed to the group id to be used. See the serverUrl in the following example where the group id is 668.

Code Block
<serverUrl>https://app.farm21.tech/api/public/beta/v2/groups/668/data</serverUrl>

For a complete example of the import configuration, see the following example:

Code Block
languagexml
titleImport Configuration
<?xml version="1.0" encoding="UTF-8"?>
<timeSeriesImportRun xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/timeSeriesImportRun.xsd">
	<import>		
		<general>
	        <importType>Farm21</importType>
    	    <serverUrl>https://app.farm21.tech/api/public/beta/v2/groups/668/data</serverUrl>
	        <user>Bearer</user>
	        <password>$FARM21_API_KEY$</password>
	        <relativeViewPeriod unit="hour" start="-120" end="0" startOverrulable="true"/>
	        <idMapId>IdImportFarm21</idMapId>
	        <dataFeedId>Farm21</dataFeedId>
		</general>
		<timeSeriesSet>
			<moduleInstanceId>Import_Farm21</moduleInstanceId>
            <valueType>scalar</valueType>
            <parameterId>soil_moisture_10</parameterId>
            <locationId>1450</locationId>
            <timeSeriesType>external historical</timeSeriesType>
            <timeStep unit="nonequidistant" />
            <readWriteMode>add originals</readWriteMode>
		</timeSeriesSet>
		</import>
</timeSeriesImportRun>

...