Now that users can see the status of their infrastructure and manage alerts, it's time to move on to the next step: getting data from real sources instead of using Django management commands to input sample data.
To do so, we will create an API endpoint that accepts data from remote systems. An API endpoint is just a fancy name for a Django view that doesn't have a template to render. The response from an API endpoint is typically either just a 200 OK status or a JSON response. API endpoints are not meant to be used by human users. Instead, they are meant to be used by different software systems to connect together and share information.
The API endpoint that we need to create will be a simple view that accepts a POST request with all the information needed to create a new DataPoint
object. To make sure that malicious users can't spam our database with random data, we will also add a simple authentication mechanism to our API endpoint so that it will accept...