⚙️
API Docs
  • LayerStack API
    • Introduction
    • Cloud Server
    • Firewalls
    • Location
    • Order
    • Changelog
    • OS Template
    • Plans
Powered by GitBook
On this page
  • Firewalls
  • Endpoints Summary
  • Assign Firewalls to a Cloud Server
  • Unassign Firewalls from a Cloud Server
  • Get Firewalls List of a Cloud Server
  1. LayerStack API

Firewalls

Firewalls

Firewalls is the entity that handles firewall operations to a cloud server. Currently only assigning and unassigning a firewall are supported by our API. Creation of firewall and editing firewall rules should be done in our LayerPanel.

Endpoints Summary

ENDPOINT (CLICK TO READ FULL SPECIFICATION)
METHOD
DESCRIPTION

POST

assign firewall(s) to an object (cloud server).

POST

unassign firewall(s) from an object (cloud server).

GET

get firewall list from an object (cloud server).

Assign Firewalls to a Cloud Server

Request: POST /firewalls/assign/object/$vm_object_id where $vm_object_id is the object id of the cloud server.

NAME
TYPE
DESCRIPTION

firewalls

array

ids of firewall to be assigned. ID of firewall can be obtained from Firewall Details page in LayerPanel.

Sample Payload:

{"firewalls":[{"id":143}, {"id":144}]}

Unassign Firewalls from a Cloud Server

Request: POST /firewalls/unassign/object/$vm_object_id where $vm_object_id is the object id of the cloud server.

NAME
TYPE
DESCRIPTION

firewalls

array

ids of firewall to be assigned. ID of firewall can be obtained from Firewall Details page in LayerPanel.

Sample Payload:

{"firewalls":[{"id":153}, {"id":154}]}

Get Firewalls List of a Cloud Server

Request: GET /firewalls/object/$vm_object_id where $vm_object_id is the object id of the cloud server.

PreviousCloud ServerNextLocation

Last updated 2 years ago

/firewalls/assign/object/$vm_object_id
/firewalls/unassign/object/$vm_object_id
/firewalls/object/$vm_object_id