Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to define the endpoint path for uptime status.
Rest API
GET /api/[1]/status Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'health' instead of 'uptime' which is more general.
Using 'logs' which is unrelated to uptime status.
✗ Incorrect
The endpoint path for checking uptime is usually '/uptime'.
2fill in blank
mediumComplete the code to specify the HTTP method for retrieving SLA data.
Rest API
[1] /api/sla/data Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using POST which is for sending data.
Using DELETE which removes data.
✗ Incorrect
GET method is used to retrieve data without modifying it.
3fill in blank
hardFix the error in the JSON response key for uptime percentage.
Rest API
{
"uptime_[1]": 99.95
} Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'percent' which is less descriptive.
Using 'percentile' which is a statistical term.
✗ Incorrect
The correct key name is 'uptime_percentage' to clearly indicate the value.
4fill in blank
hardFill both blanks to filter SLA records by minimum uptime and sort order.
Rest API
GET /api/sla/records?min_uptime=[1]&sort=[2]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 100 as minimum uptime which is too strict.
Using 'desc' when ascending order is expected.
✗ Incorrect
We filter records with minimum uptime 99.9 and sort them in ascending order.
5fill in blank
hardFill all three blanks to create a JSON payload for updating SLA thresholds.
Rest API
{
"[1]": [2],
"[3]": 99.99
} Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing 'threshold' with key names.
Using wrong numeric values.
✗ Incorrect
The payload sets 'min_uptime' to 100 and 'max_downtime' to 99.99.