GET /types

Get all energy generator types, optionally filtered by renewable status

Query parameters

  • renewable boolean

    Filter by renewable status (true/false)

Responses

  • 200 application/json

    OK

    Hide response attributes Show response attributes object
    • createdAt string
    • description string Required

      Maximum length is 80.

    • id string
    • isRenewable boolean
    • name string Required

      Maximum length is 20.

    • updatedAt string
  • 400 application/json

    Bad Request

    Hide response attributes Show response attributes object
    • code integer
    • error string
    • message string
  • 500 application/json

    Internal Server Error

    Hide response attributes Show response attributes object
    • code integer
    • error string
    • message string
GET /types
curl \
 --request GET 'http://localhost/api/v1/types'
Response examples (200)
[
  {
    "createdAt": "string",
    "description": "Solar photovoltaic panels",
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "isRenewable": true,
    "name": "Solar",
    "updatedAt": "string"
  }
]
Response examples (400)
{
  "code": 400,
  "error": "Invalid input",
  "message": "The provided data is invalid"
}
Response examples (500)
{
  "code": 400,
  "error": "Invalid input",
  "message": "The provided data is invalid"
}