Benutzer-Werkzeuge

Webseiten-Werkzeuge


dapnetapisendcall

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
dapnetapisendcall [2022/01/30 13:18]
dj7lc [Example for python3]
dapnetapisendcall [2026/01/30 14:06] (aktuell)
dj7lc Fix urls
Zeile 2: Zeile 2:
  
 ===== Example for curl from linux console ===== ===== Example for curl from linux console =====
 +
 +===== HAMNET =====
  
 <​code>​ <​code>​
-curl -H "​Content-Type:​ application/​json"​ -X POST -u yourcallsign:​yourpassword -d '{ "​text":​ "this is the message",​ "​callSignNames":​ ["​destinationcallsign"​],​ "​transmitterGroupNames":​ ["​txgroup"​],​ "​emergency":​ false }' http://​dapnet.db0sda.ampr.org:8080/calls+curl -H "​Content-Type:​ application/​json"​ -X POST -u yourcallsign:​yourpassword -d '{ "​text":​ "this is the message",​ "​callSignNames":​ ["​destinationcallsign"​],​ "​transmitterGroupNames":​ ["​txgroup"​],​ "​emergency":​ false }' http://​dapnet.db0sda.hamnet.radio:8080/calls
 </​code>​ </​code>​
 +
 +===== INTERNET =====
 +
 +<​code>​
 +curl -H "​Content-Type:​ application/​json"​ -X POST -u yourcallsign:​yourpassword -d '{ "​text":​ "this is the message",​ "​callSignNames":​ ["​destinationcallsign"​],​ "​transmitterGroupNames":​ ["​txgroup"​],​ "​emergency":​ false }' http://​hampager.de/​api/​calls
 +</​code>​
 +
  
 ===== Example for python3 ===== ===== Example for python3 =====
Zeile 12: Zeile 21:
 import requests import requests
  
-url = '​http://​dapnet.db0sda.ampr.org:​8080/​calls'​+# HAMNET 
 +url = '​http://​dapnet.db0sda.hamnet.radio:8080/​calls'​ 
 + 
 +# INTERNET 
 +#url = '​http://​hampager.de/​api/​calls'​
  
 headers = {'​Content-type':​ '​application/​json'​} headers = {'​Content-type':​ '​application/​json'​}
Zeile 24: Zeile 37:
 print(response) print(response)
 </​code>​ </​code>​
 +
 +===== make sure to select the correct DAPNET server =====
 +When you are connected to HAMNET (either through the air or via VPN) you can use the HAMNET node http://​www.hampager.de:​8080/​calls
 +
 +If you're not connected to HAMNET please use the server connected to the public internet http://​www.hampager.de:​8080/​calls
 +
 ===== calls to more than one callsign ===== ===== calls to more than one callsign =====
  
-It is also possible to hand over more than one call sign to the API. The call signs then have to be comma separated.+It is also possible to hand over more than one call sign to the API. The call signs then have to be comma separated ​and quoted.
  
 <​code>​ <​code>​
Zeile 36: Zeile 55:
 ===== calls to more than one tx group ===== ===== calls to more than one tx group =====
  
-The tx groups have to be comma separated.+The tx groups have to be comma separated ​and quoted.
  
 <​code>​ <​code>​
dapnetapisendcall.1643545082.txt.gz · Zuletzt geändert: 2022/01/30 13:18 von dj7lc