The powsybl-network-conversion-server is a microservice of the GridSuite platform dedicated to importing cases into the network store and exporting networks back to case files.
It provides the following capabilities:
- Import a case asynchronously: read a case from the case-server datasource API, convert it to IIDM using PowSyBl importers (CGMES, UCTE, XIIDM, Matpower, IEEE-CDF, …), persist it in the network-store, index equipment in Elasticsearch, and post functional logs to the report-server — all in parallel.
- Import a CGMES case with custom boundaries: override the boundary files used during CGMES import with caller-provided boundary content.
- Export a network asynchronously: read a network variant from the network-store, convert it to the requested format with optional ZIP or GZIP compression, upload the result to S3, and notify the caller when done.
- Export a case asynchronously: convert a case file already stored in the case-server directly to a new format (without going through the network store), upload the result to S3, and notify the caller.
- Download an export file: stream a previously exported file from S3 back to the caller.
- Index equipment in Elasticsearch: on import, index all equipment types relevant to the network map (substations, voltage levels, lines, transformers, generators, loads, …). Supports full reindexation per network including all variants (created, modified, tombstoned equipment).
- List available import/export formats and parameters: expose the PowSyBl importer/exporter registry with their functional parameters.
- Spring Boot (Web, Actuator)
- Amazon S3 (AWS SDK v2) via
spring-cloud-aws-starter-s3(export file storage) - Elasticsearch (
spring-data-elasticsearch, equipment indexation) - RabbitMQ via Spring Cloud Stream (async import/export pipeline)
- PowSyBl importers: CGMES, UCTE, XIIDM, Matpower, IEEE-CDF
powsybl-network-store-client(network persistence)powsybl-case-datasource-client(case file reading)- API documentation: OpenAPI / Swagger (
springdoc) - Micrometer / Prometheus
Build Docker image:
mvn install -DskipTests -Dpowsybl.docker.install- The caller sends
POST /v1/networks— the server publishes a message on thecaseImportStartqueue. - Parallel consumers (
consumeCaseImportStart1,consumeCaseImportStart2) pick up messages for load balancing. - The case is read from case-server via the datasource API, parsed with the appropriate PowSyBl importer, and stored in the network-store. Equipment indexation and report sending are executed in parallel.
- A
caseImportSucceededmessage is published with the resultingnetworkUuidandnetworkId.
- The caller sends
POST /v1/networks/{networkUuid}/export(network) orPOST /v1/cases/{caseUuid}/export(case) — the server publishes a message onnetworkExportStartorcaseExportStart. - Parallel consumers process the export, produce a ZIP or GZIP file in a temp directory, upload it to S3, and publish a
networkExportFinishedorcaseExportFinishedmessage. - The caller can then download the file via
GET /v1/export/results/{exportUuid}.
┌──────────────────────────────────────┐
│ powsybl-network-conversion-server │──► case-server (read case files via datasource API)
│ │──► network-store-server (persist/read network variants)
│ │──► report-server (post import functional logs)
└──────────────────────────────────────┘
▲ ▼
RabbitMQ
caseImportStart / caseImportSucceeded
networkExportStart / networkExportFinished
caseExportStart / caseExportFinished
Key operations are wrapped in named Micrometer observations via NetworkConversionObserver: