@@ -32,8 +32,8 @@ and `docker-compose up` creates containers from those images and launches them.
3232If you'd like to build the images yourself, you can instead run
3333` docker-compose up --build ` .
3434
35- * For alert creation, the commands will all be the same except add `-f
36- docker-compose-alerts.yml` to utilize the alerts docker compose file. For
35+ * For alert creation, the commands will all be the same except add `-f
36+ docker-compose-alerts.yml` to utilize the alerts docker compose file. For
3737example, instead of ` docker-compose --profile python up ` , you should have
3838` docker-compose -f docker-compose-alerts.yml --profile python up ` * .
3939
@@ -45,3 +45,35 @@ log as requests are made to them.
4545You can test out the FIDS/Alerts sample application by visiting http://localhost:8080 in
4646your web browser (if not running Docker locally, use the Docker host's
4747address).
48+
49+ ## Alerts Backend Note:
50+
51+ Whenever an event is triggered for an alert, AeroAPI will send a POST request to your
52+ configured endpoint. In order to configure your endpoint, you need to publicly expose its
53+ address/port (specified using the POST_PORT environment variable, NOT the WEB_SERVER_PORT variable).
54+ Furthermore, as noted in the docker-compose-alerts.yml file, we encourage the service for
55+ accepting POSTed triggered alerts to be isolated, and thus will be sent to a different Docker
56+ container. This means that you will have to set the endpoint URL using /post, instead of /api/post.
57+ In order to get send your alerts to this webapp, you should configure this webapp
58+ (http://localhost:8081/post for example) to receive alerts using a REST client like cURL,
59+ like the following command:
60+ ```
61+ curl --location --request PUT 'https://aeroapi.flightaware.com/aeroapi/alerts/endpoint' \
62+ --header 'Content-Type: application/json; charset=UTF-8' \
63+ --header 'x-apikey: <YOUR API KEY>' \
64+ --data-raw '{
65+ "url": "http://<YOUR IP>:8081/post"
66+ }'
67+ ```
68+ (see the [ documentation] ( https://flightaware.com/aeroapi/portal/documentation#put-/alerts/endpoint )
69+ for more information). NOTE: if you previously configured a different production endpoint to receive alerts,
70+ ** you will change the same URL!** This means that ALL of your configured alerts
71+ will all be sent to the newly configured endpoint.
72+
73+ You can see this newly configured URL by going to FlightAware's
74+ [ push notification testing page] ( https://flightaware.com/commercial/aeroapi/send.rvt )
75+ or by going to the alert creation page on the webapp. On this push notification testing
76+ page, you can also do two things: test your configured endpoint on the backend to see if it
77+ receives a test triggered alert properly, and also see the success/failure of triggered alerts
78+ that were sent up to 24 hours in the past. If there was an error it will display the
79+ full error message.
0 commit comments