{"id":50822501,"url":"https://github.com/client-api/pmg-kotlin","last_synced_at":"2026-06-13T15:04:23.824Z","repository":{"id":359817655,"uuid":"1247559639","full_name":"client-api/pmg-kotlin","owner":"client-api","description":null,"archived":false,"fork":false,"pushed_at":"2026-05-23T15:19:38.000Z","size":268,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-23T17:08:56.232Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/client-api.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-23T13:31:37.000Z","updated_at":"2026-05-23T15:19:42.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/client-api/pmg-kotlin","commit_stats":null,"previous_names":["client-api/pmg-kotlin"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/client-api/pmg-kotlin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/client-api%2Fpmg-kotlin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/client-api%2Fpmg-kotlin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/client-api%2Fpmg-kotlin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/client-api%2Fpmg-kotlin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/client-api","download_url":"https://codeload.github.com/client-api/pmg-kotlin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/client-api%2Fpmg-kotlin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34288673,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-13T02:00:06.617Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-13T15:04:23.082Z","updated_at":"2026-06-13T15:04:23.820Z","avatar_url":"https://github.com/client-api.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pmg-kotlin\n\nKotlin SDK for the Proxmox Mail Gateway API. Generated\nfrom the upstream `apidoc.js` from Proxmox Mail Gateway via [openapi-generator-cli][gen] with\ncustom Mustache template overrides.\n\n\u003e **Not an official Proxmox project.** Community SDK derived from the\n\u003e upstream `apidoc.js`. Always verify against the upstream API viewer.\n\u003e \u003chttps://pmg.proxmox.com/\u003e.\n\nTargets the JVM via OkHttp 4 + Moshi. Requires JDK ≥ 21 (the\nartifact is compiled with the Kotlin 2.2 toolchain targeting JVM 21\nbytecode; older JDKs cannot load it). Gradle 8 + the\n`foojay-resolver-convention` plugin can auto-provision JDK 21 if your\nlocal toolchain is older.\n\n## Install\n\nPublished to **GitHub Packages** on every GitHub release. Configure\nthe GitHub Packages Maven repo in your build (with a personal access\ntoken that has `read:packages` scope), then add the dependency:\n\n```kotlin\nrepositories {\n    maven {\n        url = uri(\"https://maven.pkg.github.com/client-api/pmg-kotlin\")\n        credentials {\n            username = System.getenv(\"GITHUB_ACTOR\") ?: providers.gradleProperty(\"gpr.user\").get()\n            password = System.getenv(\"GITHUB_TOKEN\") ?: providers.gradleProperty(\"gpr.token\").get()\n        }\n    }\n}\n\ndependencies {\n    implementation(\"com.clientapi:pmg:2026.5.24\")\n}\n```\n\nOr build locally:\n\n```bash\n./gradlew build\n./gradlew publishToMavenLocal\n```\n\n## Usage\n\n```kotlin\nimport com.clientapi.pmg.Pve\nimport com.clientapi.pmg.infrastructure.ApiClient\n\n// Configure the shared OkHttp + auth headers (set once, reused everywhere).\nApiClient.apiKey[\"Authorization\"] = \"PMGAPIToken=user@realm!tokenid=uuid-secret\"\n\nval pmg = Pve(basePath = \"https://pmg1.example.com:8006/api2/json\")\n\n// Per-tag accessors are lazily instantiated and share the same basePath + Call.Factory.\nval status = pmg.qemu().qemuVmStatus(node = \"pmg1\", vmid = 100L)\nval nodes  = pmg.nodes().nodesGetNodes()\n```\n\nThe unified `Pmg` class wraps each per-tag API class (`QemuApi`,\n`LxcApi`, `ClusterApi`, `NodesApi`, …) so consumers don't need to\ninstantiate them individually.\n\n## Compound configs\n\nPVE encodes many fields as CLI-style shorthand strings\n(`net0=virtio,bridge=vmbr0,firewall=1`). Round-trip helpers will be\nemitted for every compound config schema in a future iteration. For\nnow, build the string manually and pass through the relevant API.\n\n## Indexed families\n\nNumbered properties (`net0..net31`, `mp0..mp255`, …) are exposed via\n`getNets()` / `withNets(map)` extension functions on every model.\nThe per-index data class fields are annotated\n`@Deprecated(level = DeprecationLevel.HIDDEN)`, so direct access is a\ncompile error and IDE autocomplete only surfaces the collapsed view:\n\n```kotlin\nval req = QemuCreateVmRequest().withNets(mapOf(\n    0 to PveQemuNetField(string = \"virtio,bridge=vmbr0\"),\n    3 to PveQemuNetField(string = \"e1000,bridge=vmbr1\"),\n))\n// Wire format: { \"net0\": \"virtio,bridge=vmbr0\", \"net3\": \"e1000,bridge=vmbr1\" }\n```\n\n## License\n\nApache 2.0 — see [LICENSE](./LICENSE).\n\n[gen]: https://openapi-generator.tech\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclient-api%2Fpmg-kotlin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclient-api%2Fpmg-kotlin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclient-api%2Fpmg-kotlin/lists"}