{"id":50822441,"url":"https://github.com/client-api/pmg-php","last_synced_at":"2026-06-13T15:03:45.785Z","repository":{"id":360082553,"uuid":"1247559727","full_name":"client-api/pmg-php","owner":"client-api","description":"PHP SDK for the Proxmox Mail Gateway (PMG) API.","archived":false,"fork":false,"pushed_at":"2026-05-24T20:00:38.000Z","size":430,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-25T00:14:50.192Z","etag":null,"topics":["anti-spam","api-client","composer","guzzle","mail-gateway","openapi","openapi-generator","php","pmg","proxmox","proxmox-mail-gateway","sdk"],"latest_commit_sha":null,"homepage":"","language":"PHP","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:43.000Z","updated_at":"2026-05-24T21:04:55.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/client-api/pmg-php","commit_stats":null,"previous_names":["client-api/pmg-php"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/client-api/pmg-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/client-api%2Fpmg-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/client-api%2Fpmg-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/client-api%2Fpmg-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/client-api%2Fpmg-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/client-api","download_url":"https://codeload.github.com/client-api/pmg-php/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/client-api%2Fpmg-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34288666,"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":["anti-spam","api-client","composer","guzzle","mail-gateway","openapi","openapi-generator","php","pmg","proxmox","proxmox-mail-gateway","sdk"],"created_at":"2026-06-13T15:03:43.039Z","updated_at":"2026-06-13T15:03:45.778Z","avatar_url":"https://github.com/client-api.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pmg-php\n\nPHP SDK for the Proxmox Mail Gateway API. Generated from\nthe upstream `apidoc.js` from Proxmox Mail Gateway via [openapi-generator-cli][gen] with custom\nMustache 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\nRequires PHP ≥ 7.4.\n\n## Install\n\n```bash\ncomposer require client-api/pmg\n```\n\n## Usage\n\n```php\n\u003c?php\nrequire 'vendor/autoload.php';\n\nuse ClientApi\\Pmg\\Configuration;\nuse ClientApi\\Pmg\\Pve;\n\n$cfg = Configuration::getDefaultConfiguration()\n    -\u003esetHost('https://pmg1.example.com:8006/api2/json')\n    -\u003esetApiKey('Authorization', 'PMGAPIToken=user@realm!tokenid=uuid-secret');\n\n$pve = new Pmg($cfg);\n\n// Per-tag accessors are lazily instantiated and share the same Configuration.\n$status = $pmg-\u003eqemu()-\u003eqemuVmStatus(node: 'pmg1', vmid: 100);\n$nodes  = $pmg-\u003enodes()-\u003enodesGetNodes();\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 are\nemitted for every compound config schema:\n\n```php\nuse ClientApi\\Pmg\\Model\\PveQemuNetConfig;\n\n$cfg = new PveQemuNetConfig([\n    'model'    =\u003e 'virtio',\n    'bridge'   =\u003e 'vmbr0',\n    'firewall' =\u003e 1,\n]);\n$shorthand = $cfg-\u003etoShorthand();\n// → 'virtio,bridge=vmbr0,firewall=1'\n\n$parsed = PveQemuNetConfig::fromShorthand($shorthand);\n```\n\n## Indexed families\n\nNumbered properties (`net0..net31`, `mp0..mp255`, …) are exposed on\nevery model as a single collapsed `getNets()` / `setNets()` accessor.\nThe per-index `getNet0`/`setNet0`/… methods are filtered out of the\nclass surface (the wire format is preserved internally via a `__call`\nmagic dispatcher):\n\n```php\n$req-\u003esetNets([\n    0 =\u003e 'virtio,bridge=vmbr0',\n    3 =\u003e '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-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclient-api%2Fpmg-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclient-api%2Fpmg-php/lists"}