GET /generators

List all generators, optionally filtered by typeId

Query parameters

  • typeId string

    Type ID (UUID)

Responses

  • 200 application/json

    OK

    Hide response attributes Show response attributes object
    • capacity number Required
    • createdAt string
    • id string
    • isRenewable boolean
    • typeDescription string
    • typeId string
    • typeName string
    • 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 /generators
curl \
 --request GET 'https://localhost/api/v1/generators'
Response examples (200)
[
  {
    "capacity": 100.5,
    "createdAt": "string",
    "id": "550e8400-e29b-41d4-a716-446655440001",
    "isRenewable": true,
    "typeDescription": "Solar photovoltaic panels",
    "typeId": "550e8400-e29b-41d4-a716-446655440000",
    "typeName": "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"
}