The local API allows you to control and get data from the EAGLE-200 while you are on the same local network as the device. Local API Manual: https://rainforestautomation.com/wp-content/uploads/2017/02/EAGLE-200-Local-API-Manual-v1.0.pdf
Developer Resources on the Web: https://www.rainforestautomation.com/support/developer/
As documented in the Local API Manual, we use XML commands for local API. Alternatively, you could use our APIs that work with JSON bodies.
The Authorization: Basic requires a Base64 encoded 32 character string created using the username (Cloud ID) and password (Install Code) together with a semicolon between them before base64 encoding them.
Using postman in collaboration with python. you can test out simple POST request as follows. For the basic authorization, using your device local IP, the Cloud ID as the username, and the Install Code as the password.
For the body, use 'raw' and 'text' format. And test with one of our XML commands for a response:
<Command><Name>device_list</Name></Command>
Alternatively, you can directly code in with python using a rough format like:
x = open('commands.xml', 'r').read()
url = "192.168.100.1"
print(requests.post(url, data=x, verify=false, headers={"list headers specified in documentation here like content-type, authorization, etc"}).text)
With C programming language, you can pair it with the open-source CURL library for all REST communication with your Eagle-200. The following two lines of code does the Base64 encoding:
curl_easy_setopt(curl, CURLOPT_USERNAME, USERNAME);
curl_easy_setopt(curl, CURLOPT_PASSWORD, PASSWORD);
See here for reference: https://everything.curl.dev/libcurl-http/auth