Backend Servers

Manage backend servers using the API.

Backend Server List

Type: GET

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

Return backend server list for SYMBALANCER_ID.

Parameters:

SYMBALANCER_ID

symBalancer ID

Curl
 curl --request GET \
      --url https://cloud.syminet.com/api/v1/symbalancers/detail/SYMBALANCER_ID \
      --header "authorization:bearer $API_TOKEN"
Response
{
    "data": [
      {
        "downtime": 0,
        "ip": "10.11.11.240",
        "slice_id": 4960,
        "slice_name": "web1",
        "status": "UP"
      },
      {
        "downtime": 0,
        "ip": "10.11.11.127",
        "slice_id": 4961,
        "slice_name": "web2",
        "status": "UP"
      }
   ]
}

Add Server

Type: POST

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

Add backend server to SYMBALANCER_ID

Required URL Parameters:

SYMBALANCER_ID

Symbalancer ID to add a slice to.

Required JSON Properties:

name

Integer SLICE_ID to add.

Note

SLICE_ID to add: must be in the same region as the balancer, must have a private IPv4 assigned, and must not already be assigned to a balancer.

Curl
 curl --request POST \
      --url https://cloud.syminet.com/api/v1/symbalancers/SYMBAALNCER_ID/servers/add \
      --header "content-type: application/json" \
      --header "authorization:bearer $API_TOKEN" \
      --data '
      {
         "name": 1234
      }
      '

Response: 202 OK

Remove Server

Type: DELETE

https://cloud.syminet.com/api/v1/symbalancers/{SYMBALANCER_ID}/servers/remove/{SLICE_ID}

Remove backend server SLICE_ID from symBalancer SYMBALANCER_ID

Required URL Parameters:

SYMBALANCER_ID

smBalancer ID to remove the backend slice from.

SLICE_ID

Slice ID to remove.

Curl
 curl --request DELETE \
      --url https://cloud.syminet.com/api/v1/symbalancers/SYMBALANCER_ID/servers/remove/SLICE_ID \
      --header "authorization:bearer $API_TOKEN"

Response: 202 OK

Set Server States

There are three endpoints for setting server state:

Set State READY

Type: GET

https://cloud.syminet.com/api/v1/symbalancers/{SYMBALANCER_ID}/servers/setstate/ready/{SLICE_ID}

On symBalancer SYMBALANCER_ID, set backend server state for SLICE_ID to READY.

Required URL Parameters:

SYMBALANCER_ID

symBalancer ID

SLICE_ID

Slice ID to set state READY.

Curl
 curl --request GET \
      --url https://cloud.syminet.com/api/v1/symbalancers/SYMBALANCER_ID/servers/setstate/ready/SLICE_ID \
      --header "authorization:bearer $API_TOKEN"

Response: 202 OK

Set state DRAIN

Type: GET

https://cloud.syminet.com/api/v1/symbalancers/{SYMBALANCER_ID}/servers/setstate/drain/{SLICE_ID}

On symBalancer SYMBALANCER_ID, set backend server state for SLICE_ID to DRAIN.

Required URL Parameters:

SYMBALANCER_ID

symBalancer ID

SLICE_ID

Slice ID to set state DRAIN.

Curl
 curl --request GET \
      --url https://cloud.syminet.com/api/v1/symbalancers/SYMBALANCER_ID/servers/setstate/drain/SLICE_ID \
      --header "authorization:bearer $API_TOKEN"

Response: 202 OK

Set state MAINT

Type: GET

https://cloud.syminet.com/api/v1/symbalancers/{SYMBALANCER_ID}/servers/setstate/maintenance/{SLICE_ID}

On symBalancer SYMBALANCER_ID, set backend server state for SLICE_ID to MAINT. (maintenance)

Required URL Parameters:

SYMBALANCER_ID

symBalancer ID

SLICE_ID

Slice ID to set state MAINT.

Curl
 curl --request GET \
      --url https://cloud.syminet.com/api/v1/symbalancers/SYMBALANCER_ID/servers/setstate/maintenance/SLICE_ID \
      --header "authorization:bearer $API_TOKEN"

Response: 202 OK