Repository navigation
Releases: pidginhost/sdk-php
Release list
v0.16.0
PidginHost PHP SDK v0.16.0
Install from Packagist:
composer require pidginhost/sdk:0.16.0
Removed
- Operations meant only for PidginHost staff or the PidginHost mobile app are
gone, along with theOAPI group:KubernetesClustersL3Retrieve,
KubernetesClustersL3CutoverCreate,KubernetesClustersL3RevertCreate,
KubernetesClustersEncryptionReconcileCreate,
KubernetesClustersNodeOperationsResumeCreate,
KubernetesClustersPoolRemovalJournalsResumeCreate,
EmailServicesRestoreCreate,OMobileSessionRetrieve,
OMobileDashboardRetrieveandORegisterCreate. The
ClusterEncryptionReconcileRequestandMobileOAuthSessionmodels went
with them.
v0.15.0
PidginHost PHP SDK v0.15.0
Install from Packagist:
composer require pidginhost/sdk:0.15.0
Added
- Account dashboard and session.
AccountDashboardRetrievereturns
DashboardandAccountSessionRetrievereturnsAccountSessionResponse. - Domain availability and TLD catalog.
DomainDomainCheckAvailabilityRetrieve
checks a name with a GET, andDomainTldCatalogRetrievereturnsTLDCatalog.
TLDgainedmin_yearsandyear_step. - Hosting usage and upgrades.
HostingHostingUsageRetrievereturns
HostingUsageandHostingHostingUpgradeOptionsRetrievereturns
HostingUpgradeOptions. - Servers, volumes, buckets, private networks, dedicated servers, hosting and
services gainedbilling(ResourceBilling): the price and billing cycle,
or null. DedicatedServer.hardware(DedicatedHardware) describes the machine.InvoiceListandInvoiceDetailgainedinvoice_type,
can_pay_with_fundsandlocal_amounts(InvoiceLocalAmounts).Volume.statussays whether a volume is active or busy. Volume updates
answer 409 withVolumeBusywhile a resize or move is still running.- Kubernetes pool and node deletes take a body,
ResourcePoolDeleteRequest
andNodeOperationDeleteRequest, to accept local data loss.
Changed
- The domain availability check returns
DomainAvailability(available,
supported), which is what the API sends.CheckAvailabilityis gone. DNSRecordfields that belong to one record type, such asaddressor
txtdata, are optional. Reading a zone with mixed record types no longer
fails.ClusterDetailRequestandPatchedClusterDetailRequestno longer have
price_per_month, which the API never let you change.
v0.14.0
PidginHost PHP SDK v0.14.0
Install from Packagist:
composer require pidginhost/sdk:0.14.0
Added
- Kubernetes cluster encryption.
KubernetesClustersEncryptionRetrieve,
...EncryptionCreate,...EncryptionRecheckCreateand
...EncryptionReconcileCreateread and switch Cilium WireGuard encryption,
with theClusterEncryption,ClusterEncryptionOperation,
ClusterEncryptionRequest,ClusterEncryptionReconcileRequest,
ClusterEncryptionRefusalandClusterEncryptionErrormodels and the
ClusterEncryptionStatusEnum,EncryptionModeEnumand
EncryptionReasonCodeEnumenums. - Kubernetes node operations and pool removals. List, read, cancel, resume
and retry node operations, reboot a pool node, and list, read and resume pool
removal journals (NodeOperation,PoolRemovalJournal,PoolRemovalItem,
their paginated lists and enums). - Load balancer upgrades:
KubernetesClustersUpgradeLbCreatewith
LBUpgradeRequest,LBUpgradePlanResponseandLBUpgradeDispatchResponse. - Server traffic:
CloudServersTrafficRetrievereturns
ServerTrafficResponse. PublicIPv4andPublicIPv6gainedserver_id, the id that
/api/cloud/servers/{id}/takes, or null when the address is unattached.Server.networksandServerDetail.networksare typed (ServerNetworks,
ServerPublicNetwork,ServerPublicInterface,ServerPrivateInterface)
instead of a free-form map. The JSON is unchanged.- Email responses that had no model now have one:
EmailStats,StatsDay,
StatsTotals,EmailReputation,EmailMessageList,
EmailMessageSummary,EmailSendResponse,ApiCredentialCreated,
SmtpCredentialCreatedandInboundRouteWriteResponse. FeaturesEnumgainedlb-envoy-metrics.
Changed
This release is breaking. Request bodies now have their own models, and
several response types were corrected to match what the API already sends.
- Request bodies have their own
...Requestmodels, without the read-only
fields of the response. Creating a firewall rule set or an IPv4 address no
longer needs placeholder values such asid: 0. Pass the request model
wherever a call takes a body:
PHP:$cloudApi->cloudFirewallRulesSetCreate(new FirewallRulesSetRequest(['name' => 'web'])).- Request-only models renamed from
XtoXRequest: ActivateFreeDNS, BucketCreate, BucketResize, BucketVisibility, ChangeBillingCycle, ChangeCompany, ChangePassword, ClusterAdd, ContactsUpdate, DNSRecordCreate, DeactivateFreeDNS, DedicatedRDNS, DeleteRecord, DepositCreate, DestroyProtection, DomainAdd, FloatingIPv4Create, FloatingIPv6Create, LowBalanceSettings, NameserversUpdate, PowerAction, PrivateNetworkAddHost, PrivateNetworkRemoveHost, Reinstall, ResourcePoolAdd, ServerAdd, ServerProductUpgrade, SnapshotCreate, Subscribe, TicketCreate, TicketReply. - Patch bodies renamed from
PatchedXtoPatchedXRequest: ClusterDetail, Company, Domain, DomainRegistrant, FirewallRule, FirewallRulesSet, HTTPRoute, K8sPortForward, LBFirewallRule, Profile, ResourcePool, ServerDetail, TCPRoute, UDPRoute. - New request models next to unchanged response models: APITokenCreateRequest, AddressRequest, AttachVolumeRequest, CheckAvailabilityRequest, ClusterDetailRequest, CompanyRequest, DNSGlueRequest, DomainCreateRequest, DomainRegistrantRequest, DomainRequest, FirewallRuleRequest, FirewallRulesSetRequest, HTTPRouteRequest, K8sPortForwardRequest, LBFirewallRuleRequest, PrivateNetworkRequest, ProfileRequest, PublicInterfaceRequest, RenewDomainRequest, ResourcePoolRequest, ReverseDNSRequest, SSHKeyRequest, SandboxAddressRequest, ServerDetailRequest, TCPRouteRequest, TransferRoDomainRequest, UDPRouteRequest, VolumeRequest.
- SSH key, volume, private network and inbound route updates use
SSHKeyUpdateRequest,VolumeUpdateRequest,
PrivateNetworkUpdateRequestandInboundRouteCreateRequest(and their
Patched...forms), which leave out fields an update cannot change.
- Request-only models renamed from
PublicInterface.ipv4and.ipv6are always present, as an empty string
when the interface has no address of that family. Decoding the public
interface of a server without IPv6 used to fail.SSHKey.keycan be set when creating a key (SSHKeyRequest); it stays fixed
afterwards.PublicIPv4.serverandPublicIPv6.serverare the server hostname, or an
empty string when unattached (they were null).- Response types corrected to what the API sends:
DedicatedServer.ipsis a list ofDedicatedServerIP,
.server_statusis aDedicatedServerStatusand.os_namemay be null;
InvoiceDetail.servicesis a list ofInvoiceService;
EmailService.price_monthly_euris a number and.quota_monthlyan
integer;ResourcePool.size,StorageProduct.min_sizeand.max_sizeare
integers;TicketMessage.has_attachmentis a boolean;AttachVolumeis the
attach result (attached); tenClusterDetailfields, three
HostingServicefields,OSImage.family_nameandResourcePoolNode.ipmay
be null. ServerDetail.passwordis no longer in responses; it is write-only in
ServerDetailRequest.ResourcePool.new_sizemoved toResourcePoolRequest.APITokenCreateandAPITokenListmarkaccountandmembership_status
as read-only and optional.- Snapshot and boot ISO lists are plain arrays, as the API returns them:
PaginatedSnapshotListandPaginatedBootISOListare removed. EmailServicesDestroyis removed: the API always answered 405.InboundRoute.mode, the FreeDNSsourceandSuppressionEntry.reasonkeep
their enum namesModeEnum,SourceEnumandReasonEnum.
Repository
- The GitHub repository now keeps history: each release is one commit on
main. Tags up to v0.13.0 remain separate snapshots.
v0.13.0
PidginHost PHP SDK v0.13.0
Install from Packagist:
composer require pidginhost/sdk:0.13.0
Added
- Kubernetes port forwards can be called at all now. All six routes under
/api/kubernetes/clusters/{cluster_id}/port-forwards/generated with no
request body and no response model, so this SDK could reach none of them.
They now exposeKubernetesClustersPortForwardsList,...Retrieve,
...Create,...Update,...PartialUpdateand...Destroy, with the new
K8sPortForward,PatchedK8sPortForward,PaginatedK8sPortForwardListand
ProtocolEnummodels. - Gateway route listings are typed and paginated:
PaginatedHTTPRouteList,
PaginatedTCPRouteListandPaginatedUDPRouteList. The list and detail
reads previously had no response schema at all. NodeMetricsResponsegaineddiskandmaxdisk, which the endpoint has
always returned but never documented.- The node RRD route documents the
timeframequery parameter it accepts
(hour,day,week,month,year), so a window other than the default
is now reachable.
Changed
This release is breaking. Every change below corrects a type the API was
already sending -- the previous declarations did not describe the wire, so the
affected responses could not be decoded.
KubernetesClusters{Httproutes,Tcproutes,Udproutes,PortForwards}Retrieve2
are removed. Those names existed only because the list and detail reads
collided on one operation id while the schema was incomplete. The list reads
are now...List; the detail reads are...Retrieve.KubernetesClusters{Httproutes,Tcproutes,Udproutes}Retrievechanged
meaning: it was the list read and is now the detail read. The signature
changed with it, so this surfaces at compile time rather than silently.NodeMetricsResponse.mem,.maxmem,.netinand.netoutwidened to 64-bit.
They are byte counts: a node with 2 GiB of memory reports 2147483648, one
past the 32-bit range, so these responses failed to decode on essentially
every real node.ClusterDetail.dual_stackand.talos_upgrade_availableare booleans,
.storage_quota_gbis an integer,.last_pool_used_bytesis a 64-bit
integer and.price_per_houris a number -- all five were declared as
strings while sending a bool or a number, which made the whole cluster object
undecodable.
v0.12.2
PidginHost PHP SDK v0.12.2
Install from Packagist:
composer require pidginhost/sdk:0.12.2
v0.12.0
PidginHost PHP SDK v0.12.0
Install from Packagist:
composer require pidginhost/sdk:0.12.0
Changed (breaking)
-
The eight
/api/cloud/buckets/routes now describe their real request and
response bodies. The bucket viewset advertised its fully read-onlyBucket
serializer as the body of every route, socreate,resizeandvisibility
documented no writable field to send, andcredentials/revealand
credentials/rotateclaimed to returnBucketwhile really returning an
access key and secret. Any client that trusted the documented shape
read a credential response that could not contain credentials -- and on
rotatethe old keys are already invalidated by then.New components:
BucketCreate(name,quota_gb,public_read),
BucketResize(quota_gb),BucketVisibility(public_read),
BucketCredentials(bucket,endpoint,region,access_key,
secret_key) andBucketCancelResponse(id,status).createdocuments
the202it really answers;DELETEreturns202with a body rather than
204; the two credential routes take no request body and declare
Cache-Control: no-store. -
Decimal fields are now
stringinstead offloat. The API serialises every
DecimalFieldas a JSON string (Django REST Framework's
COERCE_DECIMAL_TO_STRINGdefault), and the schema says so:
type: string, format: decimal. This generator mapped that tofloatanyway,
which cannot decode"12.50"-- so every response carrying a price failed
to parse, includingDeposit,Invoice,Subscription,Service,
Profile.funds,TLDpricing,ClusterDetail.price_per_monthand
FundsBalanceResponse.balance. 35 properties across 22 components were
affected. The Python, JS and Rust SDKs already produced strings; only this
one and Go did not.Read the value as a string and parse it with a decimal type of your choosing.
Do not use a binary float for money.
Fixed
- Generator bumped to openapi-generator 7.24.0, which fixes the escaping of
validate:"regexp=..."struct tags on pattern-constrained fields. No API
shapes changed.
v0.11.0
PidginHost PHP SDK v0.11.0
Install from Packagist:
composer require pidginhost/sdk:0.11.0
Versions v0.8.0 through v0.10.2 shipped without entries in this file. The
Go changelog
records those schema changes; they apply to this SDK too.
Changed (breaking)
-
AttachIPv4→AttachIPv4Request,AttachIPv6→AttachIPv6Request. The server attach routes now have distinct request and response components, so the generated request types are renamed. -
POST /api/cloud/servers/{id}/detach-ipv4/returnsServerDetachIPv4Responseinstead ofDetachIPv4Response. Thedetachedfield is unchanged.DetachIPv4Responsestill serves the standalonePOST /api/cloud/ipv4/{id}/detach/route. -
Six enum components renamed off content-derived names. Where several serializers expose a field called
status,typeorpriorityover different choice sets, drf-spectacular was naming the component by hashing its values, so adding a single choice silently renamed the type. These are now pinned:Was Now Priority3cdEnumTicketPriorityEnumStatus03cEnumInvoiceStatusEnumStatus63aEnumServiceStatusEnumStatusA57EnumResourceStatusEnumStatusEf2EnumTicketStatusEnumType85bEnumClusterTypeEnumA one-time rename: the names no longer move when a choice set gains a value.
ClusterType.typehad already been renamed once this way (Type2faEnum→Type85bEnumwhenbetawas added) and now shares the pre-existingClusterTypeEnum, which carried the identicaldev/prod/betaset under a second name.
Added
rebootonAttachIPv4RequestandAttachIPv6Request(boolean, defaultfalse). A public address is written to the machine config and the guest OS only reads it while booting, so on a running server the address is inert until a restart. Setrebootto have the API issue that restart.reboot_requiredandrebootedonAttachIPv4ResponseandAttachIPv6Response.attachedalone could describe a server that answers neither ping nor SSH on the new address; these say whether a restart is still owed and whether one was performed. A stopped server reports bothfalseand is never booted just to pick the address up, andreboot: trueon a rescue-mode or transitioning server keepsreboot_required: truerather than rebooting out of the rescue ISO.AttachIPv6Responseis new.POST /api/cloud/servers/{id}/attach-ipv6/previously echoed the request body back, so there was noattachedflag to check.- Rescue mode:
POST /api/cloud/servers/{id}/rescue/enter/and.../rescue/exit/, typed asRescueEnterQueued/RescueExitQueued. - Boot ISOs:
GET /api/cloud/servers/{id}/boot-isos/withBootISO,PaginatedBootISOList, andIsoBootRequest. - Glue / personal-DNS records:
/api/domain/domain/{domain}/dns/and/api/domain/domain/{domain}/dns/{name}/, typed asDNSGlueandPaginatedDNSGlueList. TicketMessage,ServiceCompany,DestroyProtectionResponse, andCategoryEnum.
Fixed
attach-ipv4reports a missing field as a missing field. Omittingipv4returnedObject with address=None does not exist, which reads as a bad address rather than a bad field name; it is now400 {"ipv4": ["This field is required."]}.attach-ipv6rejects a conflicting address with a400instead of200plus a message, so a failed attach no longer looks like a success. Re-attaching the address a server already has is idempotent.
Notes
In this SDK, model class names match the component names; accessors follow (getRebootRequired()).
v0.10.2
PidginHost PHP SDK v0.10.2
Install from Packagist:
composer require pidginhost/sdk:0.10.2
v0.10.1
PidginHost PHP SDK v0.10.1
Install from Packagist:
composer require pidginhost/sdk:0.10.1
v0.10.0
PidginHost PHP SDK v0.10.0
Install from Packagist:
composer require pidginhost/sdk:0.10.0