The agrirouter is a universal data exchange platform for farmers and agricultural contractors that makes it possible to connect machinery and agricultural software, regardless of vendor or manufacturer. Agrirouter does not save data; it transfers data. As a universal data exchange platform, agrirouter fills a gap on the way to Farming 4.0. Its underlying concept unites cross-vendor and discrimination-free data transfer. You retain full control over your data. Even data exchange with service providers (e.g. agricultural contractors) and other partners is uncomplicated: Data are very rapidly transferred via the online connection, and if you wish, is intelligently connected to other datasets.
The agrirouter postman tools can be used to onboard endpoints to check simulate the onboarding. The Postman Collection includes request templates for onboarding, message sending to the inbox and message requesting from the outbox. The nodejs servers are used to provide some required functionalities that could not be implemented in postman.
-
Get Postman: https://www.getpostman.com/
-
Import the postman collection from folder "postman" (for further information see here )
-
(For FMIS and Telemetry Platforms only):
-
Install nodejs (see https://nodejs.org/en/)
-
Install putty (see https://www.putty.org/ )
-
Install an editor (e.g. notepad++)
-
-
Get OpenSSL (see https://www.openssl.org/)
Decide, if you want to onboard a CU or a farming software or a telemetry platform
-
Receive a registration code through the agrirouter UI (see https://lb.my-agrirouter.com/en/connect-the-machine/ )
-
Open Request "Onboarding CU" and select Onboarding Request in Postman
-
Enter your app information in the "PreRequestScripts"
-
endpoint_reg_code is where the registration token from the authorization request shall be stored
-
reg_external_id use this to create an external id; we advice a UUID of form urn:uuid:324234….
-
-
Send Request
⇒ Receive onboarded app credentials
⇒ The data is written to different environment variables
Receive a registration code throught the authorization process (see Authorization Server below)
-
Open Request Onboarding FMIS&Telemetry and select 01_GetSignature
-
Enter your app information in the PreRequestScripts
-
private_key is the private key you received when setting up your application in the agrirouter UI, see https://github.com/DKE-Data/agrirouter-interface-documentation/blob/develop/docs/integration/authorization.adoc )
-
endpoint_reg_code is where the registration token from the authorization request shall be stored
-
reg_external_id use this to create an external id; we advice a UUID of form urn:uuid:324234….
-
-
Setup and start the node server for signature creation (see Node Server for Signature Creation)
-
Send Request ⇒ You will receive the signature which is required for the secured onboarding
-
(optional) Select request 02_Verify Request Secure and click send to get an account id and to check, if the data you received so far is valid
-
Select Request 03_Onboarding Request Secure and click send to receive the onboarding credentials
⇒ Receive onboarded app credentials
⇒ The data is written to different environment variables
-
Open Environment variables list by clicking
-
Copy value of environment variable endpointAuthCertificate
-
Open Nodepad++ or an editor and replace "\n" by an actual line break
-
Save the first part of the text ("-----BEGIN ENCRYPTED PRIVATE KEY----- … -----END ENCRYPTED PRIVATE KEY-----" ) to a file private.key
-
Save the second part of the text ("-----BEGIN CERTIFICATE----- … -----END CERTIFICATE-----") to a file key.cert
-
To use the certificate in postman, it needs to be converted, e.g. using openssl.
-
Start command line and navigate to the folder where the key-file is stored.
-
Run openssl pkey -in private.key -out serv.key -des3
-
As password, use the value from endpointAuthSecret (as well for the new password)
-
For communication with agrirouter, you need to setup the credentials. They are automatically added, when you performed the onboarding process before.
The certificates required for communication need to be added by hand:
Adding the certificate in Postman
-
As private key, use serv.key
-
As certificate, use key.cert
-
The passkey can be found in the environment variable endpointAuthSecret
-
Select agrirouter: Messaging / 01 - Send Message to agrirouter
-
Set the request in the environment variable encoded_request
-
Send the request
Remark
Requests are base64-encoded protobuf-structures. Check the documentation on how to build messages
For initial tests you can use the agrirouter protobuf toolset.
To create a registration code for Farming Software and Telemetry platforms, we provide a small example server tool. It can be found in "./authorization-server"
For details on the authorization process, see https://github.com/DKE-Data/agrirouter-interface-documentation/blob/develop/docs/integration/authorization.adoc
To make your application compatible with this tool, you need to setup the redirect-URL as "http://fuf.me:8080/auth".
The NodeJS Server for signature creation is required to create an application signature for the FMIS- and Telemetry onboarding process. It can be found in ./signature-creator.