Dies ist eine alte Version des Dokuments!
General example:
curl -H "Content-Type: application/json" -X POST -u USER:PASSWORD -d '{ "text": "FUNKRUFTEXT", "callSignNames": ["RUFZEICHEN"], "transmitterGroupNames": ["SENDERGRUPPENNAME"], "emergency": false }' URL/calls
Example with real user data (login credentials not working; they have to be replaced by the real ones):
curl -H "Content-Type: application/json" -X POST -u dl1acb:sehrgeheimespasswort -d '{ "text": "DL1ABC: Das ist eine Sendung über die REST-API", "callSignNames": ["dh1xyz"], "transmitterGroupNames": ["dl-bw"], "emergency": false }' http://http://www.hampager.de:8080/calls
import requests headers = {'Content-type': 'application/json'} data = '{ "text": "this is the message", "callSignNames": ["destinationcallsign"], "transmitterGroupNames": ["txgroup"], "emergency": false }' data = data.encode('utf-8') response = requests.post('http://dapnet.db0sda.ampr.org:8080/calls', headers=headers, auth=('yourcallsign', 'yourpassword'), data=data) print(response)
It is also possible to hand over more than one call sign to the API. The call signs then have to be comma separated .
But be aware: If one call sign fails (not registered, typo), the whole call is discarded.