- Created by Unknown User (sraaum), last modified on Oct 21, 2015
API Essentials
API Key Generation
Autoscaling
Backups
- Add/Edit Note
- Convert Backup to Template
- Create Backup
- Delete Backup
- Get List of All VS Backups
- Get List of Incremental Backups
- Get List of Normal Backups
- Restore Disk from Backup
Credit
DNS
- Add DNS Record
- Add DNS Zone
- Delete DNS Record
- Delete DNS Zone
- Edit DNS Record
- Get DNS Zones
- Get List of DNS Zone Records
- Get List of Name Servers
Firewall Rules
Flex Cloud VM Control
Getting Started with Superb Flex Cloud
IP Addresses
Logs
Network Interfaces
Recipes
- Add Recipe
- Add Recipe Step
- Assign Recipe to Virtual Server
- Delete Recipe
- Delete Recipe Step
- Edit Recipe
- Edit Recipe Step
- Get All Recipes
- Get Recipe Steps
- Get Virtual Server Recipes
- Remove recipe from Virtual Server
- Run Recipe on Multiple Virtual Servers
- Swap Recipe Step Number
SSH Keys
Templates
Test Route
Troubleshooting API Issues
Viewing Activity Logs
Virtual Server Operating Systems
Virtual Servers
- Add Virtual Server
- Billing Statistics
- Build Virtual Server
- Delete Virtual Server
- Edit Virtual Server
- Get CPU Usage Statistics
- Get List of Virtual Machines
- Get statuses for All VMs
- Reboot Virtual Server
- Reset VS Password
- Shutdown Virtual Server
- Startup a Virtual Server
- Stop Virtual Server
VS Disks
POST /virtual_machines/:virtual_machine_id/firewall_rules
Adds a firewall rule to specified VS
Sections:
Request Parameters
address* - Set the IP address for which this rule is active.
- Leave the empty field to apply this rule to all IPs
- Enter hyphen-separated IPs to apply the rule to an IP range (e.g. 192.168.1.1-192.168.1.10)
- Enter the IPs with slash to apply the rule to CIDR (e.g. 192.168.1.1/24)
command* - sets the command to ACCEPT or DROP the above mentioned IPs
port - sets the port addresses
- Leave the empty field to apply the rule to all ports
- Enter colon-separated ports to apply the rule to a port range (e.g. 1024:1028)
- Enter comma-separated ports to apply the rule to the list of ports (e.g. 80,443,21)
protocol* - protocol type (TCP or UDP)
network_interface_id* - interface of the network
Response Parameters
201 status on and the newly created firewall rule is returned on success
JSON Request example
curl -i -X POST -H 'Accept: application/json' -H 'Content-type: application/json' -u user:userpass -d '{"firewall_rule":{"address":"","command":"DROP","protocol":"TCP","network_interface_id":"105","port":""}}' --url <api_url>/virtual_machines/:virtual_machine_id/firewall_rules.json
JSON Response
{"firewall_rule":{"address":"192.168.1.1/32","command":"DROP","created_at":"2015-09-10T23:21:47+00:00","description":null,"destination_ip":null,"enable_logging":null,"enabled":null,"firewall_service_id":null,"id":214,"identifier":"njkrvksjg7iwys","network_interface_id":513,"port":"31","position":3,"protocol":"TCP","source_port":null,"updated_at":"2015-09-10T23:21:47+00:00"}}
XML Request example
curl -i -X POST -H 'Accept: application/xml' -H 'Content-type: application/xml' -u user:userpass -d '<?xml version="1.0" encoding="UTF-8"?><firewall_rule><address></address><command>DROP</command><port></port><protocol>TCP</protocol><network_interface_id>105</network_interface_id></firewall_rule>' --url <api_url>/virtual_machines/:virtual_machine_id/firewall_rules.xml
- No labels