IPv4 Manager
Dedicated IPv4 addresses for what you host.
Everything the IPv4 Manager does with your addresses has a method. All of them act on your own account and need your API key. Every call is a POST to /cpi/<method> with a JSON body that carries the key, and the answer is { "code": ..., "data": ... }. A refusal has a negative code and a sentence in data.
What each screen does, as a call
The plan is chosen in the dashboard, from the plans window. It has no public method.
Reading your addresses
ipv4_list answers a list of your addresses in address order. Each one has:
ipv4_pool_status answers available, coming_soon, the prices by internal, external and parked, and the caps your plan allows on internal and external. Read it before a purchase: when coming_soon is true nothing is on sale.
Buying an address
Find what it can point at
ipv4_attach_targets lists your VPS, deployments, datacenters and load balancers, each with an id, a kind (vps, deployment, datacenter or balancer) and a label. A Workspace VPS is never a target for a new address.
Buy it
ipv4_purchase takes state (internal for a thing on Xuda, external for your own server) and target_id. For internal give the id from the list, with its kind and label. For external give the host name of your machine. The account's default card is charged on its next invoice. The answer is the new address's row.
Name it
ipv4_set_ptr takes the address and a ptr host name.
The reverse DNS name is saved trimmed and in lower case, and must be a host name with a dot, like mail.example.com.
Moving, parking and releasing
ipv4_attachpoints an address you hold at another target, withtarget_typeinternalorexternal, switching its state and its rate. The bill is prorated.ipv4_parkstops it reaching anything and keeps it for you at the parked rate.ipv4_releasereturns it to the pool and stops billing. The answer hasquarantine_until, the day it returns to the pool. You cannot get that address back.
When a call is refused
data says why. The sentences that matter:
Billing is checked before anything is claimed. If billing cannot be updated after a purchase the claim is undone, so a refused purchase leaves no address behind.
Connection setup
ipv4_external_config answers mode, status and note for an address on your own server. Today the status reads pending: the steps to set up the tunnel and the forwarding are not ready yet, and the screen says so. A call for an address that does not point at your own server is refused.