This site provides an example of a hosted API, that is fully customizable.
Documentation for the various endpoints can be found below.
This endpoint retrieves data within a specified date range.
Parameters- startDate (required): The start date of the range. Format: YYYY-MM-DD.
- endDate (required): The end date of the range. Format: YYYY-MM-DD.
api.ind320.no/dates?startDate=2023-01-01&endDate=2023-01-31
[
{
"id": 1,
"date": "2023-01-01",
},
{
"id": 2,
"date": "2023-01-02",
},
// ...
]
Response codes
- 200 (OK): The request was successful.
- 400 (Bad request): If the date format is incorrect, if required parameters (startDate and endDate) are missing, if the dates are not in the correct format (YYYY-MM-DD), if the dates have invalid values, or if the startDate is greater than the endDate.
- 500 (Internal server error): An error occurred on the server.
This endpoint retrieves data with a specified id.
Parameters- value (required): The id of the data to retrieve.
api.ind320.no/id?value=1
[
{
"id": 1,
"date": "2023-01-01",
},
]
Response codes
- 200 (OK): The request was successful.
- 400 (Bad request): If the id is missing or if the id is not an integer.
- 500 (Internal server error): An error occurred on the server.