Core Resources

Firewalls

Define and manage firewall rules to secure your servers and control inbound or outbound traffic.

Attach security group

Attach security group to server

Accepts: application/json
Returns: application/json

Parameters

URL Params
id
string
Security group id
sid
string
Server id

Response

object of GenericResponse

Reference Type:  GenericResponse

message
string
A human-readable message describing the result of the operation.
example: User created successfully.
success
boolean
Indicates whether the operation was successful.
example: true
POST /v1/firewall/groups/:id/servers/:sid
curl -X POST https://api.serverista.com/v1/firewall/groups/:id/servers/:sid \
  -H "Authorization: ApiKey YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d ''
Response

{
  "message": "example_message",
  "success": true
}

Remove security group from server

Remove security group from the given server

Accepts: application/json
Returns: application/json

Parameters

URL Params
id
string
Security group id
sid
string
Server id

Response

object of GenericResponse

Reference Type:  GenericResponse

message
string
A human-readable message describing the result of the operation.
example: User created successfully.
success
boolean
Indicates whether the operation was successful.
example: true
DELETE /v1/firewall/groups/:id/servers/:sid
curl -X DELETE https://api.serverista.com/v1/firewall/groups/:id/servers/:sid \
  -H "Authorization: ApiKey YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d ''
Response

{
  "message": "example_message",
  "success": true
}

List security groups

Get a list of all security groups in the current account

Accepts: application/json
Returns: application/json

Parameters

no parameters


Response

object of SecurityGroups

Reference Type:  SecurityGroups

total_pages
integer
Total number of pages
example: 15
data
array of SecurityGroup
Reference Type: SecurityGroup

List of security groups returned for the current page.
example: {SecurityGroup}
limit
integer
Number of items per page
example: 10
page
integer
Current page number
example: 1
total_count
integer
Total number of items
example: 150
GET /v1/firewall/groups
curl -X GET https://api.serverista.com/v1/firewall/groups \
  -H "Authorization: ApiKey YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d ''
Response

{
  "data": [
    {
      "...": null
    }
  ],
  "limit": 123,
  "page": 123,
  "total_count": 123,
  "total_pages": 123
}

Create security group

Create a security group with firewall rules attached

Accepts: application/json
Returns: application/json

Parameters

Request Body
body
SecurityGroupRequest
Reference Type: SecurityGroupRequest

Security group payload

Response

object of GenericResponse

Reference Type:  GenericResponse

message
string
A human-readable message describing the result of the operation.
example: User created successfully.
success
boolean
Indicates whether the operation was successful.
example: true
POST /v1/firewall/groups
curl -X POST https://api.serverista.com/v1/firewall/groups \
  -H "Authorization: ApiKey YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d ''
Response

{
  "message": "example_message",
  "success": true
}

Get security group

Get a security group by its id

Accepts: application/json
Returns: application/json

Parameters

URL Params
id
string
Security group id

Response

object of SecurityGroup

Reference Type:  SecurityGroup

created_by_user
integer
Identifier of the user who created this security group.
example: 12
name
string
Name of the security group.
example: default
updated_at
string
Timestamp when the security group was last updated.
example: 2025-10-31T15:00:00Z
account_id
integer
Identifier of the account that owns this security group.
example: 5
created_at
string
Timestamp when the security group was created.
example: 2025-09-01T10:00:00Z
description
string
Description of the security group.
example: Default security group for all new servers.
id
integer
Unique identifier of the security group.
example: 10
rules
array of Rule
Reference Type: Rule

List of firewall rules associated with this security group.
example: {"id":1,"action":"ACCEPT","proto":"tcp","dport":"22"}
servers
array of Server
Reference Type: Server

List of servers associated with this security group.
example: {"id":101,"user_defined_name":"production-web-01"}
GET /v1/firewall/groups/:id
curl -X GET https://api.serverista.com/v1/firewall/groups/:id \
  -H "Authorization: ApiKey YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d ''
Response

{
  "account_id": 123,
  "created_at": "example_created_at",
  "created_by_user": 123,
  "description": "example_description",
  "id": 123,
  "name": "example_name",
  "rules": [
    {
      "...": null
    }
  ],
  "servers": [
    {
      "...": null
    }
  ],
  "updated_at": "example_updated_at"
}

Update security group

Update a security group with firewall rules attached

Accepts: application/json
Returns: application/json

Parameters

URL Params
id
string
Security group id
Request Body
body
SecurityGroupRequest
Reference Type: SecurityGroupRequest

Security group payload

Response

object of GenericResponse

Reference Type:  GenericResponse

message
string
A human-readable message describing the result of the operation.
example: User created successfully.
success
boolean
Indicates whether the operation was successful.
example: true
POST /v1/firewall/groups/:id
curl -X POST https://api.serverista.com/v1/firewall/groups/:id \
  -H "Authorization: ApiKey YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d ''
Response

{
  "message": "example_message",
  "success": true
}

Delete security group

Delete a security group given its id

Accepts: application/json
Returns: application/json

Parameters

URL Params
id
string
Security group id

Response

object of GenericResponse

Reference Type:  GenericResponse

message
string
A human-readable message describing the result of the operation.
example: User created successfully.
success
boolean
Indicates whether the operation was successful.
example: true
DELETE /v1/firewall/groups/:id
curl -X DELETE https://api.serverista.com/v1/firewall/groups/:id \
  -H "Authorization: ApiKey YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d ''
Response

{
  "message": "example_message",
  "success": true
}

Update server firewall

Update a security group with firewall rules attached

Accepts: application/json
Returns: application/json

Parameters

URL Params
id
string
Server id
Request Body
body
UpdateServerFirewallRequest
Reference Type: UpdateServerFirewallRequest

Server firewall update payload

Response

object of GenericResponse

Reference Type:  GenericResponse

message
string
A human-readable message describing the result of the operation.
example: User created successfully.
success
boolean
Indicates whether the operation was successful.
example: true
POST /v1/firewall/groups/servers/:id
curl -X POST https://api.serverista.com/v1/firewall/groups/servers/:id \
  -H "Authorization: ApiKey YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d ''
Response

{
  "message": "example_message",
  "success": true
}