Version 2.1.1792967583 · latest Download OpenAPI Markdown

TCP/UDP forwarding

TCP/UDP port forwarding rules. Each rule has listen ports and protocols, an origin list and a balancing method; (protocol, port) is unique platform-wide.

streamsTCP/UDP forwardingAuthentication: User (some parameters admin only)6 endpoints

List streams

GET/api/v2/streams
Authentication: User (some parameters admin only)

Query parameters

FieldTypeRequiredDescription
pageinteger— Page number, starting from 1
Default 1
page_sizeinteger— Items per page
Default 20
sortstring— Sort fields, comma-separated; prefix `-` for descending, e.g. `-created_at,id`
tenant_idinteger— Admin only: filter by tenant. Ignored for tenant credentials, which only see their own tenant's data
portinteger— Only list forwarding rules listening on this port.
group_idinteger— Only list rules in this group.
upidinteger— Only list rules under this user package.
enabledboolean— Filter by enabled state.
idinteger— Filter by exact forwarding rule ID.
originstring— Filter by substring of the origin IP.
protocolstring— Only list rules that have a listener with this protocol.
Values ["tcp","udp"]
stop_codeinteger— Filter by stop code; 0 = normal.
package_idinteger— Filter by base package (the owning user package was bought from it).
region_idinteger— Filter by region (the CNAME's primary line group belongs to it); owners without their own CNAME use their user package's shared one.
node_group_idinteger— Filter by line group (the CNAME's primary or backup line group).
cname_domain_idinteger— Filter by CNAME root domain.
cname_hostnamestring— Filter by CNAME host label, exact match (case-insensitive, without the root domain).
sync_statestring— Filter by config sync state: behind = some online node has not yet installed the config version containing its latest change;
Values ["behind","synced"]

Create stream

POST/api/v2/streams
Authentication: User (some parameters admin only)

Query parameters

FieldTypeRequiredDescription
tenant_idinteger— Owner tenant when an admin creates on behalf of a tenant (required); ignored for tenant callers, where the owner is always the caller.

Request body application/json

FieldTypeRequiredDescription
aclStreamAcl— Layer-4 access control. Rules match the source IP or CIDR in order and the first hit decides; if none match, default_action applies; deny drops the connection immediately.
balanceStreamBalance— Load balancing method. rr is round robin, ip_hash hashes the source IP, least_conn picks the fewest connections, random picks at random.
Values ["rr","ip_hash","least_conn","random"]
cnameCnameBinding— Access name (CNAME). Users point their domain to fqdn with a CNAME record; the platform generates its DNS records from the node group. null when there is no access name.
conn_limitinteger— Per-IP concurrent connection limit; 0 = unlimited.
enabledboolean— Whether enabled
expected_updated_atstring— Optimistic lock (used on update) - the updated_at of the resource as the caller read it. If it differs from the stored one, 409 stale_version is returned and nothing is saved; omit to skip the check; ignored on create.
group_idsinteger[]— IDs of the forwarding groups this rule belongs to.
listenStreamListen[]Required Listener list. Each item is a port and a protocol.
namestring— Name
origin_portintegerRequired Origin port to connect to.
originsStreamOrigin[]Required Origin list. Each item has an origin IP, a weight, and backup/down flags.
proxy_protocolboolean— Whether to send a PROXY protocol header to the origin.
stop_codeinteger— 0 = normal; non-zero = new connections are dropped immediately (set by admin or billing; 512 in the snapshot when the user package has expired).
udp_responsesinteger— UDP responses. 1-100 = end each UDP session after this many packets from the origin (instead of waiting for the UDP idle timeout); 0 = not set. Only for request/response traffic (DNS, probes); do not set it for games or voice that send many replies per request, or their sessions get cut short.
upidinteger— User package ID (empty = no quota check; empty falls back to tenant_id in the snapshot).

Batch operate streams

POST/api/v2/streams/batch
Authentication: User (some parameters admin only)

Query parameters

FieldTypeRequiredDescription
tenant_idinteger— Owner tenant when an admin creates on behalf of a tenant (required); ignored for tenant callers, where the owner is always the caller.

Request body application/json

FieldTypeRequiredDescription
actionstringRequired Operation. set_enabled toggles enabled state, delete removes, set_groups replaces groups, update edits fields in bulk, create adds new ones, set_lines changes the CNAME's primary/backup line groups (admin only), set_cname_domain changes the CNAME root domain (admin only, host label kept).
Values ["set_enabled","delete","set_groups","update","create","set_lines","set_cname_domain"]
backup_group_idinteger— Used by set_lines: backup line group; 0 clears it, omitted leaves it unchanged.
cname_domain_idinteger— Used by set_cname_domain: the new CNAME root domain.
enabledboolean— Whether enabled
group_idsinteger[]— IDs of the forwarding groups this rule belongs to.
idsinteger[]— IDs of the forwarding rules to operate on, at most 100 per call (required by every action except create).
itemsStreamWrite[]— Used by create: the forwarding rules to create (up to 100), each shaped like the POST /streams request body.
node_group_idinteger— Used by set_lines: primary line group (required).
patchStreamPatch— For batch update. Fields that are given are applied to every rule, with the same rules as a single update.
region_idinteger— Used by set_lines: region; when given, both line groups must belong to it.

Get stream

GET/api/v2/streams/{id}
Authentication: User (some parameters admin only)

Update stream

PUT/api/v2/streams/{id}
Authentication: User (some parameters admin only)

Request body application/json

FieldTypeRequiredDescription
aclStreamAcl— Layer-4 access control. Rules match the source IP or CIDR in order and the first hit decides; if none match, default_action applies; deny drops the connection immediately.
balanceStreamBalance— Load balancing method. rr is round robin, ip_hash hashes the source IP, least_conn picks the fewest connections, random picks at random.
Values ["rr","ip_hash","least_conn","random"]
cnameCnameBinding— Access name (CNAME). Users point their domain to fqdn with a CNAME record; the platform generates its DNS records from the node group. null when there is no access name.
conn_limitinteger— Per-IP concurrent connection limit; 0 = unlimited.
enabledboolean— Whether enabled
expected_updated_atstring— Optimistic lock (used on update) - the updated_at of the resource as the caller read it. If it differs from the stored one, 409 stale_version is returned and nothing is saved; omit to skip the check; ignored on create.
group_idsinteger[]— IDs of the forwarding groups this rule belongs to.
listenStreamListen[]Required Listener list. Each item is a port and a protocol.
namestring— Name
origin_portintegerRequired Origin port to connect to.
originsStreamOrigin[]Required Origin list. Each item has an origin IP, a weight, and backup/down flags.
proxy_protocolboolean— Whether to send a PROXY protocol header to the origin.
stop_codeinteger— 0 = normal; non-zero = new connections are dropped immediately (set by admin or billing; 512 in the snapshot when the user package has expired).
udp_responsesinteger— UDP responses. 1-100 = end each UDP session after this many packets from the origin (instead of waiting for the UDP idle timeout); 0 = not set. Only for request/response traffic (DNS, probes); do not set it for games or voice that send many replies per request, or their sessions get cut short.
upidinteger— User package ID (empty = no quota check; empty falls back to tenant_id in the snapshot).

Delete stream

DELETE/api/v2/streams/{id}
Authentication: User (some parameters admin only)

TCP/UDP forwarding object

FieldTypeRequiredDescription
aclStreamAcl— Layer-4 access control. Rules match the source IP or CIDR in order and the first hit decides; if none match, default_action applies; deny drops the connection immediately.
actionstringRequired Operation. set_enabled toggles enabled state, delete removes, set_groups replaces groups, update edits fields in bulk, create adds new ones, set_lines changes the CNAME's primary/backup line groups (admin only), set_cname_domain changes the CNAME root domain (admin only, host label kept).
Values ["set_enabled","delete","set_groups","update","create","set_lines","set_cname_domain"]
affectedinteger— Number of affected records
backup_group_idinteger— Used by set_lines: backup line group; 0 clears it, omitted leaves it unchanged.
balanceStreamBalance— Load balancing method. rr is round robin, ip_hash hashes the source IP, least_conn picks the fewest connections, random picks at random.
Values ["rr","ip_hash","least_conn","random"]
cnameCnameBinding— Access name (CNAME). Users point their domain to fqdn with a CNAME record; the platform generates its DNS records from the node group. null when there is no access name.
cname_domain_idinteger— Used by set_cname_domain: the new CNAME root domain.
conn_limitinteger— Per-IP concurrent connection limit; 0 = unlimited.
created_atstring— Created at
read-only
enabledboolean— Whether enabled
expected_updated_atstring— Optimistic lock (used on update) - the updated_at of the resource as the caller read it. If it differs from the stored one, 409 stale_version is returned and nothing is saved; omit to skip the check; ignored on create.
group_idsinteger[]— IDs of the forwarding groups this rule belongs to.
idinteger— Record ID
read-only
idsinteger[]— IDs of the forwarding rules to operate on, at most 100 per call (required by every action except create).
itemsStreamWrite[]— Used by create: the forwarding rules to create (up to 100), each shaped like the POST /streams request body.
listenStreamListen[]— Listener list. Each item is a port and a protocol.
namestring— Name
node_group_idinteger— Used by set_lines: primary line group (required).
node_issuesNodeIssue[]— Ports or reasons for which the forward is not fully in effect on online nodes (in the list and the detail); omitted when everything is in effect.
read-only
origin_portinteger— Origin port to connect to.
originsStreamOrigin[]— Origin list. Each item has an origin IP, a weight, and backup/down flags.
patchStreamPatch— For batch update. Fields that are given are applied to every rule, with the same rules as a single update.
proxy_protocolboolean— Whether to send a PROXY protocol header to the origin.
region_idinteger— Used by set_lines: region; when given, both line groups must belong to it.
stop_codeinteger— 0 = normal; non-zero = new connections are dropped immediately (set by admin or billing; 512 in the snapshot when the user package has expired).
tenant_idinteger— Owner tenant (user) ID
read-only
udp_responsesinteger— UDP responses. 1-100 = end each UDP session after this many packets from the origin (instead of waiting for the UDP idle timeout); 0 = not set. Only for request/response traffic (DNS, probes); do not set it for games or voice that send many replies per request, or their sessions get cut short.
updated_atstring— Updated at
read-only
upidinteger— User package ID (empty = no quota check; empty falls back to tenant_id in the snapshot).