Path parameters

  • id string Required

    Generator ID

application/json

Body Required

Update data

  • capacity number
  • typeId string

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
  • 404 application/json

    Not Found

    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
PUT /generators/{id}
curl \
 --request PUT 'http://localhost/api/v1/generators/{id}' \
 --header "Content-Type: application/json" \
 --data '{"capacity":100.5,"typeId":"550e8400-e29b-41d4-a716-446655440000"}'
Request examples
{
  "capacity": 100.5,
  "typeId": "550e8400-e29b-41d4-a716-446655440000"
}
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 (404)
{
  "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"
}