Current API server ([carbonserver/carbonserver/api](https://github.com/mlco2/codecarbon/tree/master/carbonserver/carbonserver/api)) uses pydantic v1. It would be interesting to migrate to v2. The migration comes with breaking changes. Migration guide from `pydantic` team --> https://docs.pydantic.dev/latest/migration/