Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Announcement: Try the Ask AI chatbot for answers to your technical questions about Juniper products and solutions.

close
header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
REST API Version 16.0 References
Table of Contents Expand all
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

PUT /system/servers/{server_id}/firewall_rules

date_range 04-Aug-21

SUMMARY Sets the access control firewall rules based on the supplied server ID.

Table 1: PUT /system/servers/{server_id}/firewall_rules resource details:

PUT /system/servers/{server_id}/firewall_rules resource details

MIME Type

application/json

Table 2: PUT /system/servers/{server_id}/firewall_rules request parameter details:

PUT /system/servers/{server_id}/firewall_rules request parameter details

Parameter Type Optionality Data Type MIME Type Description

server_id

path

Required

Number (Integer)

text/plain

Required - The ID of the server.

Table 3: PUT /system/servers/{server_id}/firewall_rules request body details:

PUT /system/servers/{server_id}/firewall_rules request body details

Parameter Data Type MIME Type Description Sample

rules

Array<Object>

application/json

Required - A list of new rules in a JSON string. Each rule record contains the following fields:
  • is_any_source_ip - Boolean - Whether any source IP is accepted.
  • port_range - String - A port range in the format of start-end.
  • port_type - String - one of: ANY, SINGLE, RANGE.
  • protocol - String - one of: ANY, TCP, UDP.
  • single_port - String - A single port.
  • source_ip - String - A specific IP address.

[ { "is_any_source_ip": true, "port_range": "String", "port_type": "String <one of: ANY, SINGLE, RANGE>", "protocol": "String <one of: ANY, TCP, UDP>", "single_port": "String", "source_ip": "String" } ]

Table 4: PUT /system/servers/{server_id}/firewall_rules response codes:

PUT /system/servers/{server_id}/firewall_rules response codes

HTTP Response Code Unique Code Description

200

The rules were updated.

404

1002

The requested server with the given server ID cannot be found.

422

1005

One or more parameters are invalid in request.

500

1020

An error occurred while trying to set the access control firewall rules on the server with the given Id.

Response Description

A list of the rules in a JSON string. Each rule contains the following fields:
  • is_any_source_ip - Boolean - Whether any source IP address is accepted.
  • port_range - String - A port range in the format of start-end.
  • port_type - String - one of: ANY, SINGLE, RANGE.
  • protocol - String - one of: ANY, TCP, UDP.
  • single_port - String - A single port.
  • source_ip - String - A specific IP address.

Response Sample

content_copy zoom_out_map
[
    {
        "is_any_source_ip": true,
        "port_range": "String",
        "port_type": "String <one of: ANY, SINGLE, RANGE>",
        "protocol": "String <one of: ANY, TCP, UDP>",
        "single_port": "String",
        "source_ip": "String"
    }
]
footer-navigation