Create Network Rule

Creates a new network rule in the server.

POST api/servers/{server}/network-rules

Parameters

Parameter Type Status Description
name string required Maximum: 100
port string required Minimum: 1 Maximum: 65535 Must match this regular expression: /^([0-9]{0,5})(:[0-9]{0,5})?$/
type string required tcp or udp
from_ip_address ip optional Maximum: 45

Example request:

curl -X POST "https://ploi.io/api/servers/{server}/network-rules" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
--data '{"name":"My Rule", "port":"1000", "type":"tcp", "from_ip_address":"127.0.0.1"}'