---
title: "Get current weather"
url: "https://dev-portal.dehaven.org/apis/empty-api-v1/versions/e40571fa-f6cf-4b13-a833-6fc3b759e34d/operations/getCurrentWeather"
---

> Full API specification: https://dev-portal.dehaven.org/apis/empty-api-v1/versions/e40571fa-f6cf-4b13-a833-6fc3b759e34d.md

# Get current weather

`GET` `/current-weather`

Operation ID: `getCurrentWeather`

Retrieves current weather conditions for a specified location.

## Query parameters

- `location` (string, required) - Location for which to retrieve weather data.

## Responses

- `200` - Successful operation
- `400` - Bad Request
- `500` - Internal Server Error

## OpenAPI definition

```yaml
openapi: 3.1.0
info:
  title: Weather API
  version: 1.0.0
servers:
  - url: https://api.example.com/weather/v1
    description: Main API server
paths:
  /current-weather:
    get:
      summary: Get current weather
      description: Retrieves current weather conditions for a specified location.
      operationId: getCurrentWeather
      tags:
        - Weather
      parameters:
        - name: location
          in: query
          description: Location for which to retrieve weather data.
          schema:
            type: string
          required: true
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CurrentWeather"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
components:
  schemas:
    CurrentWeather:
      type: object
      properties:
        location:
          type: string
          description: Location of the weather data.
        temperature:
          type: number
          format: float
          description: Current temperature in Celsius.
        humidity:
          type: integer
          description: Current humidity percentage.
        wind_speed:
          type: number
          format: float
          description: Current wind speed in km/h.
        description:
          type: string
          description: Description of the current weather conditions.
      example:
        location: London
        temperature: 15.5
        humidity: 80
        wind_speed: 15.2
        description: Partly Cloudy
    Error:
      type: object
      properties:
        code:
          type: string
          description: Error code.
          example: "400"
        message:
          type: string
          description: Error message.
          example: Bad Request
```
