The MockX Weather API provides developers with access to a wide range of weather data, including current conditions, forecasts, and air quality indices. Utilize our API to fetch weather information by location, search for specific conditions, and manage weather data entries.
Endpoints Overview
The MockX Weather API includes several endpoints to cater to different data access and manipulation needs:
GET /: Retrieve all weather data entries.
GET /search: Search for weather data based on query parameters.
GET /locations: Get a list of all locations with weather data.
GET /:id: Fetch weather data by a unique ID.
POST /add: Add a new weather data entry.
PUT /:id: Update an entire weather data entry by ID.
PATCH /:id: Partially update a weather data entry by ID.
DELETE /:id: Delete a weather data entry by ID.
Get All Weathers
Retrieve a list of all weather data entries.
Parameters:
limit: Limit the number of returned entries.
skip: Skip a specific number of entries.
select: Specify fields to include in the returned entries.
Example Response:
Search Weather
Search for weather data entries based on query parameters.
Parameters:
q: Search query (e.g., "sunny", "cloudy").
limit, skip, select: Same as above.
Example Response:
Get Weather Locations
Retrieve a list of all unique locations with weather data.
Example Response:
Get Weather by ID
Fetch detailed weather information for a specific entry by its unique ID.
Parameters:
id: The unique identifier of the weather data entry.
select: Specify fields to include in the returned weather data.
Example Response:
Add New Weather Data
Add a new weather data entry to the database.
Body:
Include all relevant weather data details in the request body.
Example Response:
Update Weather Data by ID
Update the details of an existing weather data entry by its ID.
Parameters:
id: The unique identifier of the weather data entry to be updated.
Body: Include the updated weather data details in the request body.
Example Response:
Delete Weather Data by ID
Remove a weather data entry from the database by its ID.
Parameters:
id: The unique identifier of the weather data entry to be deleted.
MockX offers free, reliable mock APIs for easy testing and development, ideal for developers seeking to enhance their workflow without the complexities of setting up any server.