... | ... | @@ -59,7 +59,7 @@ To send Target Reports to AIRUS server you must connect via WS to the following |
|
|
Note that the AIRUS environment to which the websocket is going to be send is included in the endpoint (in this case dev, could be changed to pre).
|
|
|
To open this websocket connection two parameters are needed:
|
|
|
|
|
|
* `$token` : This token needs to be obtained by sending an API-REST GET request to the following endpoint: `https://dev-fcm.airus-suite.com/api/token?username=external-user&password=airus23`
|
|
|
* `$token` : This token needs to be obtained by sending an API-REST GET request to the following endpoint: `https://dev-fcm.airus-suite.com/api/token?username=user&password=password` (Replace user and password with the correct credentials)
|
|
|
* `$station-id`: This is the surveillance station identifier, use unique serial numbers. For instance: pildo.
|
|
|
|
|
|
Take into account:
|
... | ... | @@ -339,7 +339,8 @@ def on_error(ws, error): |
|
|
def on_message(ws, message):
|
|
|
print(f"Received message: {message}")
|
|
|
|
|
|
token = requests.get('https://dev-fcm.airus-suite.com/api/token?username=external-user&password=airus23', timeout=3.05)
|
|
|
token = requests.get('https://dev-fcm.airus-suite.com/api/token?username=user&password=password', timeout=3.05)
|
|
|
# Replace user and password with the correct credentials
|
|
|
host = "dev-dsdp-acquisition.airus-suite.com"
|
|
|
surveillance_id = "08f73584-bbe7-48e8-88ee-56519ff040c7"
|
|
|
url = f"wss://{host}/ws/dsdp/{surveillance_id}/{token}"
|
... | ... | |