Cloud Server - Firewall
GET or POST
https://api.absam.io/v1/cloud-server/firewall
REQUEST HEADERS
access-token: xxxxxxxxxxxxxxxxxxxxxxxxxx
secret-access-token: xxxxxxxxxxxxxx
Generate the access token and secret access token on the dashboard.

GET FIREWALL STATUS
GET
REQUEST BODY
Name Type Description Required
id integer Cloud ID true
action string Value: status true
Response parameters (JSON)
{
    "enabled": true
}

CHANGE FIREWALL STATUS
POST
REQUEST BODY
Name Type Description Required
id integer Cloud ID true
action string Value: change true
set string Value: on | off true
Response parameters (JSON)
{
    "success": "The firewall has been changed."
}

LIST FIREWALL RULES
GET
REQUEST BODY
Name Type Description Required
id integer Cloud ID true
action string Value: list true
Response parameters (JSON)
{
   "rules":{
      "in":[
         {
            "pos":0,
            "port":"8800",
            "proto":"tcp",
            "ip":"all",
            "expires":null,
            "comment":""
         },
      ],
      "out":[
         {
            "pos":1,
            "port":"80",
            "proto":"tcp",
            "ip":"1.2.3.4",
            "expires":null,
            "comment":""
         }
      ]
   }
}

DELETE FIREWALL RULE
POST
REQUEST BODY
Name Type Description Required
id integer Cloud ID true
action string Value: delrule true
pos integer Value: pos from rule true
Response parameters (JSON)
{
    "success": "The rule has been removed."
}

ADD FIREWALL RULE
POST
REQUEST BODY
Name Type Description Required
id integer Cloud ID true
action string Value: addrule true
type string Direction of rule. Value: in | out true
port integer Port of rule. Ex: 22 | 80 - If empty: all ports false
ip string IP or Range of IPs that will be allowed to access this rule. Ex: 1.2.3.4 | 1.2.3.4/24 - Default: 0.0.0.0/0 false
proto integer Protocol of port. Value: tcp | udp | icmp - If empty: all protocols false
comment string Comment of rule. false
expires integer Time in hours that the rule will expire. Min 1 | Max 24 false
Response parameters (JSON)
{
    "success": "The rule has been created."
}

EDIT FIREWALL RULE
POST
REQUEST BODY
Name Type Description Required
id integer Cloud ID true
action string Value: editrule true
pos integer Value: pos from rule true
port integer Port of rule. Ex: 22 | 80 - If empty: all ports false
ip string IP or Range of IPs that will be allowed to access this rule. Ex: 1.2.3.4 | 1.2.3.4/24 - Default: 0.0.0.0/0 false
proto integer Protocol of port. Value: tcp | udp | icmp - If empty: all protocols false
comment string Comment of rule. false
expires integer Time in hours that the rule will expire. Min 1 | Max 24 false
Response parameters (JSON)
{
    "success": "The rule has been updated."
}