Ports

Manage symBalancer ports.

Port List

Type: GET

https://cloud.syminet.com/api/v1/symbalancers/{SYMBALANCER_ID}/ports

Return a JSON list of all ports.

Required URL Parameters:

SYMBALANCER_ID

symBalancer ID to list ports.

Curl
 curl --request GET \
      --url https://cloud.syminet.com/api/v1/symbalancers/SYMBALANCER_ID/ports \
      --header "content-type: application/json" \
      --header "authorization:bearer $API_TOKEN"
Response
{
    "data": [
      {
        "cert_id": null,
        "cert_name": null,
        "dest_port": 80,
        "dest_protocol": "http",
        "port": 80,
        "protocol": "http"
    },
    {
        "cert_id": "0a600f35-67ad-4674-b621-5a25a4eda0e1",
        "cert_name": "example.com.crt",
        "dest_port": 80,
        "dest_protocol": "http",
        "port": 443,
        "protocol": "https"
    }
  ]
}

Add Port

Type: POST

https://cloud.syminet.com/api/v1/symbalancers/{SYMBALANCER_ID}/ports/add

Add a port to a symBalancer.

Note

If port already exists, it will be replaced.

Required URL Parameters:

SYMBALANCER_ID

symBalancer ID to add port to.

Required JSON Properties:

port

Frontend port to listen on.

protocol

Frontend protocol. Must be: http, https, or tcp. Default http.

Optional JSON Properties:

dest_port

Port number to forward traffic to on backend servers. If omitted, will default to match port.

dest_protocol

Backend protocol to use with backend servers. Must be: http, https, or tcp. If omitted, will default to match protocol.

cert_id

UUID of certificate to use for terminating TLS directly on the balancer.

Curl
curl --request POST \
     --url https://cloud.syminet.com/api/v1/symbalancers/SYMBALANCER_ID/ports/add \
     --header "content-type: application/json" \
     --header "authorization:bearer $API_TOKEN" \
     --data '
     {
        "port": 80,
        "protocol": "http",
        "dest_port": 80,
        "dest_protocol": "http"
     }
     '

Response: 202 OK

Delete Port

Type: DELETE

https://cloud.syminet.com/api/v1/symbalancers/{SYMBALANCER_ID}/ports/delete/{PORT_ID}

Delete a port from a symBalancer.

Required URL Parameters:

SYMBALANCER_ID

symBalancer ID to add port to.

PORT_ID

Port number to delete. This is the frontend port on the balancer, not the backend destination port.

Curl
curl --request DELETE \
     --url https://cloud.syminet.com/api/v1/symbalancers/SYMBALANCER_ID/ports/delete/PORT_ID \
     --header "content-type: application/json" \
     --header "authorization:bearer $API_TOKEN"

Response: 202 OK