Complete the code to send a GET request to check API status.
curl -X [1] https://api.example.com/statusThe GET method is used to retrieve data from the API, such as its status.
Complete the code to set a header for JSON content type in the API request.
curl -H "Content-Type: [1]" https://api.example.com/data
APIs commonly use 'application/json' to indicate JSON data format in requests.
Fix the error in the alert condition to trigger when API response time exceeds 500ms.
if response_time [1] 500: send_alert()
The alert should trigger when response time is greater than 500 milliseconds.
Fill both blanks to create a monitoring script that checks API status code and alerts if not 200.
if status_code [1] 200 and status_code [2] 0: send_alert()
The script alerts if status code is not 200 and greater than 0 (valid error code).
Fill all three blanks to create a JSON alert payload with API name, status, and response time.
{"api": "[1]", "status": [2], "response_time_ms": [3]The JSON payload includes the API name as a string, and numeric status code and response time variables.