Cubro Packetmaster RestAPI User Guide
Cubro Packetmaster RestAPI User Guide
Description of the REST API interfaces of the Cubro Packetmaster devices. This document can be applied to the
G4 family (EX32, EX32+, EX484-3, EX48400 and EX20400), G6 family (EX5-3, EX6-3) and Aggreator C32.
Some notes:
Path
An URL as used by REST is made up of the scheme (e.g. "http"), the host (e.g. "192.168.0.200"), the base path
(here "/rest") and the specific path (e.g. "/rules/all"), this results in e.g. http://192.168.0.200/rest/rules/all
(http://192.168.0.200/rest/rules/all).
Dynamic Parameters
In this document, parameters/Keys written in all-caps and in parentheses (e.g. '(EXAMPLE)') are placeholders
for keys with dynamic names. Three dots after it '...' additionally indicate that multiple such fields are expected.
Parameter Casing
Most parameters are in snake case (e.g. "snake_case") but some can also be addressed using camel case
(camelCase) or lower case (lowercase).
An user account has a certain access level and REST methods might have minimum level required. Three user
level exist: READ (1), WRITE (7) and SUPER (31); in the brackets are the numeric representations. Every level
encompasses the levels below it. A user is at least level 1 (READ).
Types
Sometimes, multiple types are possible for a parameter or returned in a response, the type mentioned here
always represents the most likely type used, e.g. a numeric value for throughputs even if it can be 'n/a' in case
the port does yet not exist for long enough.
Errors
Errors are normally returned using an error object with an 'error' field but in some cases it is possible that it is
actually simply in the 'result' field of an result object. This is normally only the case if the error is not likely to be
dire for the user.
HTTP Methods
Instead of using the HTTP methods PUT/DELETE there is the possibility of using POST together with the HTTP
header X-HTTP-Method-Override:<METHOD> (where <METHOD> stands for the PUT/DELETE to represent)
instead.
file:///C:/Users/fabia/Downloads/rest_api (1).html 1/80
20.09.22, 09:13 Cubro Packetmaster RestAPI User Guide
Summary
Path Operation Description
GET Returns a map of all supported group select hash keys and
their states
/device/grouphash
POST Sets whether certain group select hash keys should be used or
not
PUT
/savepoints/activeportsavepoint
Activates a port save-point
Security
Read_Rights_Required
Type: basic
Description:
Read-only access to everything. Any user has at least this rights level.
Numeric level: 1
Write_Rights_Required
Type: basic
Description:
Can add/change/remove rules/groups/apps, add/change/remove rule save-points and set them as load-on-
boot, reset counters, and change group hashing methods used.
Numeric level: 7
Super_Rights_Required
Type: basic
Description:
Can do everything, therefore has the ability to e.g. change port settings, add/change/remove port save-
points, import save-points, upgrade/reboot device, change IP/label/description, add/change/remove users,
enable/disable user access checks and change any setting/mode like the special protocol transparency
settings.
Numeric level: 31
Paths
DELETE /apps Stops a running app
DESCRIPTION
Stops an app instance.
REQUEST PARAMETERS
RESPONSES
Uses default content-types: application/json
200 OK
Result state.
Result
default
Error state.
Error
SECURITY
Schema Scopes
Write_Rights_Required
DESCRIPTION
Returns a list of all available apps
RESPONSES
Uses default content-types: application/json
200 OK
Map with apps with the keys being the app names. (APPNAME) is a placeholder for the unique name of the
app.
PROPERTIES
(APPNAME): App
default
Error state.
Error
DESCRIPTION
Starts an available app, creating a new instance.
REQUEST PARAMETERS
user_description Custom description for the new instance of the app. query string
RESPONSES
Uses default content-types: application/json
200 OK
Result state.
Result
default
Error state.
Error
SECURITY
Schema Scopes
Write_Rights_Required
DESCRIPTION
Modifies the parameters of an already running app.
REQUEST PARAMETERS
Data
Name Description Type type
user_description Custom description for the new instance of the app. query string
RESPONSES
Uses default content-types: application/json
200 OK
Result state.
Result
default
Error state.
Error
SECURITY
Schema Scopes
Write_Rights_Required
DESCRIPTION
Calls a custom app action.
REQUEST PARAMETERS
RESPONSES
Uses default content-types: application/json
200 OK
Result state.
Result
default
Error state.
Error
DESCRIPTION
Returns all running apps (app instances)
RESPONSES
Uses default content-types: application/json
200 OK
Map with app instances with the keys being the PIDs. (PID) is a placeholder for the unique ID of an app
instance.
PROPERTIES
(PID): App
default
Error state.
Error
DESCRIPTION
Returns the state and configuration of ports relevant to the bypass functionality.
RESPONSES
Uses default content-types: application/json
200 OK
State of the related ports.
PROPERTIES
(PORT_NO): object
PROPERTIES
split: boolean
Whether the port is split
link: boolean
Whether the link is up.
speed: string
Text description of link speed and configured speed (latter in parentheses). Auto means that the
speed is to be determined through protocol negotiation.
DESCRIPTION
Returns the state of the bypass-related switches, relevant ports and relevant configuration.
RESPONSES
Uses default content-types: application/json
200 OK
States of various bypass-related switches, relevant ports and relevant configuration.
PROPERTIES
state: object
State of the bypass itself.
PROPERTIES
hw: boolean
State of the hardware-based switch bypass.
sw: boolean[]
ITEMS
boolean
DESCRIPTION
States of the software-based route bypass switches.
backup: boolean
Whether using the backup appliance in the hot-standby scenario.
maintenance: boolean
Whether in maintenance mode where automated switching is not happening.
valid: boolean
Whether the port configuration is valid, also in regards to the selected scenario.
portState: object
State of a related port of the bypass.
PROPERTIES
(PORT_NO): object
(PORT_NO) refers to the physical port in question, 1 is QS1 and so on…
PROPERTIES
split: boolean
Whether the port is split
link: boolean
Whether the link is up.
speed: string
Text description of link speed and configured speed (latter in parentheses). Auto means that the
speed is to be determined through protocol negotiation.
toolOnlineState: boolean[]
ITEMS
boolean
DESCRIPTION
List of online states of the appliances according to selected trigger (REST/heartbeat
packets/pings) or depending on the setting the state of the related link (if applicable).
config: object
Bypass-related configs.
PROPERTIES
maintenanceMode: boolean
Whether the maintenance mode is enabled, the mode for manual control of the bypass switches
and the backup switch (in hot-standby mode). While maintenance is enabled no checks for
appliance on/offline status are performed and no automatic switching happens.
swBypass(N): boolean
Whether a route (software-based) bypass is in effect.
backupMode: boolean
Whether the backup appliance is used.
onceLiveAfterSetup: boolean
Maintenance mode has been turned off at least once since the last time it got configured, i.e. the
current setup is or was live.
expectToolPortsSplit: boolean
The appliance (AKA tool) ports are expected to be split, e.g. using a break-out box or cables are
100G interface is split into four independent 25G interfaces.
expectLivePortsSplit: boolean
The live ports are expected to be split, e.g. using a break-out box or cables are 100G interface is
split into four independent 25G interfaces.
Note that the exact scenario also depends on whether the tool or live ports are split.
swapToolPorts: boolean
In a hot-standby scenario means that ports 1 and 2 are swapped in regards to the priority of the
appliances, i.e. port 2 then has the main appliance and 1 the backup appliance.
restTimeout: integer
Maximal amount of seconds to wait for a request to the particular URL until an appliance is
considered down.
pingTarget(N): string
IPv4 address of the target to ping.
(N) is to be replaced with the number of the particular appliance from 1 (the first) through 4 (the
forth). Note that in a hot-standy scenario 1 is the main and 2 the backup appliance.
Only applies if ping (timeout) is configured as a trigger and the number of appliances depends on
the configured scenario.
pingInterval: integer
Time in seconds to wait after a successful ping before sending another one.
pingTimeout: integer
Maximal amount of seconds to wait for a reply to a ping until an appliance is considered down.
heartbeatInterval: integer
Time in seconds between heartbeat packets being sent out.
heartbeatTimeout: integer
Seconds of no heartbeat until an appliance is considered down.
heartbeatSrcMAC: string
The source or first target MAC address (former in hot-standby mode).
heartbeatDstMAC: string
The destination or second target MAC address (former in hot-standby mode).
heartbeatSrcIP: string
The source or first target IPv4 address (former in hot-standby mode).
heartbeatDstIP: string
The destination or second target IPv4 address (former in hot-standby mode).
heartbeatSrcUdpPort: integer
The source or first target UDP port (former in hot-standby mode).
heartbeatDstUdpPort: integer
The destination or second target UDP port (former in hot-standby mode).
Configuration state might not apply, e.g. because a trigger other than heartbeats is used.
autoResetBypass: boolean
Whether the an activated bypass is automatically resetted into the off state on resumption of
ping/heartbeat packets/REST for keeping bypass off.
triggerOnLinkLoss: boolean
Whether the additional trigger which makes the online/offline state of an appliance also dependent
on the corresponding link state, i.e. if the link with the main appliance goes down then depending
on the backup appliance state switches to the backup appliance or activates the bypass.
default
Error state.
Error
DESCRIPTION
Sets the state of various switches.
REQUEST PARAMETERS
Data
Name Description Type type
backup Change the state of backup mode switch. In backup mode the query boolean
backup appliance instead of the main appliance mode is used.
Only applies to the hot-standby scenario.
maintenance Change the state of the maintenance mode. In maintenance mode query boolean
no automatic switching is happening.
sw(N) Change the state of the software-based route bypasses. Replace query boolean
(N) with the index of the bypass starting with 1.
RESPONSES
Uses default content-types: application/json
200 OK
Result state.
Result
default
Error state.
Error
DESCRIPTION
Returns the device API level.
RESPONSES
Uses default content-types: application/json
200 OK
Device API level.
PROPERTIES
name: string
default
Error state.
Error
DESCRIPTION
Deletes the given controller.
REQUEST PARAMETERS
connection Connection type of the controller. Either "tcp" or "ssl" query string
RESPONSES
Uses default content-types: application/json
200 OK
Result state.
Result
default
Error state.
Error
SECURITY
Schema Scopes
Super_Rights_Required
DESCRIPTION
Returns the configured controller details
RESPONSES
Uses default content-types: application/json
200 OK
Configured controller details
PROPERTIES
connection: string
tcp or ssl
ip: string
port: integer
role: string
status: string
default
Error state.
Error
DESCRIPTION
Adds the given controller.
REQUEST PARAMETERS
connection Connection type of the controller. Either "tcp" or "ssl" query string
RESPONSES
Uses default content-types: application/json
200 OK
Result state.
Result
default
Error state.
Error
SECURITY
Schema Scopes
Super_Rights_Required
DESCRIPTION
Returns the web UI device label and notes.
RESPONSES
Uses default content-types: application/json
200 OK
Device label and notes.
PROPERTIES
name: string
Device label.
notes: string
Device notes.
default
Error state.
Error
DESCRIPTION
Sets the device label and device notes used in the web UI.
REQUEST PARAMETERS
RESPONSES
Uses default content-types: application/json
200 OK
Result state.
Result
default
Error state.
Error
SECURITY
Schema Scopes
Super_Rights_Required
DESCRIPTION
Returns the device Datapath ID.
RESPONSES
Uses default content-types: application/json
200 OK
Datapath ID.
PROPERTIES
name: string
default
Error state.
Error
DESCRIPTION
Returns various information about physical characteristics, namely status of the fans, PSU and temperature
sensors.
RESPONSES
Uses default content-types: application/json
200 OK
Load information.
PROPERTIES
fan: object[]
ITEMS
object
PROPERTIES
index: string
status: string
Information about the status of the fan unit.
speed_rate: string
Speed rate of the fan in percent.
mode: string
Information about the running mode of the fan.
psu: object[]
ITEMS
object
PROPERTIES
index: integer
status: string
Information about whether the PSU is present or not. Can be either PRESENT or ABSENT.
power: string
Information about the power state of the PSU. Can be either OK, FAIL or - (latter if the PSU is
absent).
type: string
Information about the type of the PSU. Can be either AC, DC or - (if the PSU is absent or
unplugged).
alert: string
Information about whether the PSU is in an alert state. Can be either NO (everything is running
fine) or ALERT (power failure).
temp_sensors: object[]
ITEMS
object
PROPERTIES
index: integer
temp: integer
Current temperature reported by the temperature sensor.
lower_alarm: integer
Lower temperature threshold (degree C) at which alarm will be raised.
upper_alarm: integer
Upper temperature threshold (degree C) at which alarm will be raised.
critical_limit: integer
Temperature limit (degree C) at which device will turn off.
position: string
Location of the sensor if known, e.g. "AROUND_CHIP", can be an empty string.
default
Error state.
Error
DESCRIPTION
Returns the device model generation.
RESPONSES
Uses default content-types: application/json
200 OK
Device model generation information.
PROPERTIES
generation: string
Generation of the model of device in use.
default
Error state.
Error
GET /device/grouphash Returns a map of all supported group select hash keys and their states
DESCRIPTION
Returns a map of all supported group select hash keys and their states. The key is an hash key available
on this device. The boolean value indicates whether that hash key is used (true = it is used).
RESPONSES
Uses default content-types: application/json
200 OK
map of all group select hash keys.
PROPERTIES
macsa: boolean
Boolean value indicating whether MAC source address is used as a key.
macda: boolean
Boolean value indicating whether MAC destination address is used as a key.
ethertype: boolean
Boolean value indicating whether the ethertype value is used as a key.
ipsa: boolean
Boolean value indicating whether the IP source address is used as a key.
ipda: boolean
Boolean value indicating whether the IP destination address is used as a key.
ip_protocol: boolean
Boolean value indicating whether the IP protocol number is used as a key.
src_port: boolean
Boolean value indicating whether the source port is used as a key.
dst_port: boolean
Boolean value indicating whether the destination port is used as a key.
default
Error state.
Error
POST /device/grouphash Sets whether certain group select hash keys should be used or not
DESCRIPTION
Sets whether certain group select hash keys should be used or not.
REQUEST PARAMETERS
Data
Name Description Type type
macsa Boolean value indicating whether MAC source address should be query boolean
used as a key.
macda Boolean value indicating whether MAC destination address should query boolean
be used as a key.
ether_type Boolean value indicating whether the ethertype value should be used query boolean
as a key.
ipsa Boolean value indicating whether the IP source address should be query boolean
used as a key.
ipda Boolean value indicating whether the IP destination address should query boolean
be used as a key.
ip_protocol Boolean value indicating whether the IP protocol number should be query boolean
used as a key.
src_port Boolean value indicating whether the source port should be used as query boolean
a key.
Data
Name Description Type type
dst_port Boolean value indicating whether the destination port should be used query boolean
as a key.
RESPONSES
Uses default content-types: application/json
200 OK
Result state.
Result
default
Error state.
Error
SECURITY
Schema Scopes
Write_Rights_Required
DESCRIPTION
Sets the HTTPS setting.
REQUEST PARAMETERS
RESPONSES
Uses default content-types: application/json
200 OK
Result state.
Result
default
Error state.
Error
DESCRIPTION
Shows whether the device ID LED is activated or not
RESPONSES
Uses default content-types: application/json
200 OK
Result state.
PROPERTIES
activated: boolean
DESCRIPTION
Activates or deactivates the device ID LED
REQUEST PARAMETERS
activated true enables the LED, false disables it. query boolean required
RESPONSES
Uses default content-types: application/json
200 OK
Result state.
Result
default
Error state.
Error
SECURITY
Schema Scopes
Write_Rights_Required
DESCRIPTION
Returns the version of the active image.
RESPONSES
Uses default content-types: application/json
200 OK
Image version information.
PROPERTIES
version: string
Version of image in use.
default
Error state.
Error
DESCRIPTION
Returns the current and stored IP configuration of the management port.
RESPONSES
Uses default content-types: application/json
200 OK
IP configuration information.
PROPERTIES
current_ip: string
Current IP address of the management port
current_netmask: string
Current netmask of the management port
current_gateway: string
Current default gateway of the management port
stored_ip: string
IP address of the management port after reboot
stored_netmask: string
Netmask of the management port after reboot
stored_gateway: string
Default gateway of the management port after reboot
default
Error state.
Error
DESCRIPTION
Sets the current and stored (the one loaded on boot) IP configuration
REQUEST PARAMETERS
Data
Name Description Type type
Data
Name Description Type type
ip New IP address of the management port, e.g. '192.168.0.200' or query string required
'169.254.254.42'.
mask New network mask of the management port, e.g. '255.255.0.0'. query string required
gw New default gateway of the management port, e.g. '192.168.0.1'. query string required
RESPONSES
Uses default content-types: application/json
200 OK
Result state.
Result
default
Error state.
Error
SECURITY
Schema Scopes
Super_Rights_Required
DESCRIPTION
Returns various information about the load on the OS, namely CPU usage.
RESPONSES
Uses default content-types: application/json
200 OK
Load information.
PROPERTIES
proc_no_running: integer
Number of currenty running processes.
proc_no_total: integer
Total number of processes.
default
Error state.
Error
DESCRIPTION
Returns total and free amount of memory.
RESPONSES
Uses default content-types: application/json
200 OK
Memory usage information.
PROPERTIES
total: integer
Total memory in Kibibyte.
free: integer
Free memory in Kibibyte.
default
Error state.
Error
DESCRIPTION
Returns the device model.
RESPONSES
Uses default content-types: application/json
200 OK
Device model information.
PROPERTIES
model: string
Model of the device.
default
Error state.
Error
DESCRIPTION
Returns the device label used in the web UI.
RESPONSES
Uses default content-types: application/json
200 OK
Device label.
PROPERTIES
name: string
default
Error state.
Error
DESCRIPTION
Sets the device label used in the web UI, the one displayed in the right-left there.
REQUEST PARAMETERS
RESPONSES
Uses default content-types: application/json
200 OK
Result state.
Result
default
Error state.
Error
SECURITY
Schema Scopes
Super_Rights_Required
DESCRIPTION
Returns the name resolution settings, namely the DNS servers.
RESPONSES
Uses default content-types: application/json
200 OK
file:///C:/Users/fabia/Downloads/rest_api (1).html 31/80
20.09.22, 09:13 Cubro Packetmaster RestAPI User Guide
PROPERTIES
dns: string[]
IP address of the DNS server.
ITEMS
string
default
Error state.
Error
DESCRIPTION
Sets the name resolution settings, namely the DNS servers. If empty sets to default values ("8.8.8.8" and
"8.8.4.4")
REQUEST PARAMETERS
Data
Name Description Type type
dns1 IP address of the first name server, e.g. 8.8.8.8 . It is queried first. query string
dns2 IP address of the second name server, e.g. 8.8.4.4 . It is queried after query string
the first server.
dns3 IP address of the third name server. It is queried after the second server. query string
RESPONSES
Uses default content-types: application/json
200 OK
Result state.
Result
default
file:///C:/Users/fabia/Downloads/rest_api (1).html 32/80
20.09.22, 09:13 Cubro Packetmaster RestAPI User Guide
Error state.
Error
SECURITY
Schema Scopes
Super_Rights_Required
DESCRIPTION
Returns the state of the permanent mode. Permanent mode means that the active rules/groups are always
permanent and remain throughout reboots.
RESPONSES
Uses default content-types: application/json
200 OK
Permanent rules mode.
PROPERTIES
state: boolean
default
Error state.
Error
DESCRIPTION
Sets the permanent mode.
REQUEST PARAMETERS
state New state of permanent mode, true = on. query boolean required
RESPONSES
Uses default content-types: application/json
200 OK
Result state.
Result
default
Error state.
Error
SECURITY
Schema Scopes
Super_Rights_Required
DESCRIPTION
Reboots the device right away.
RESPONSES
Uses default content-types: application/json
200 OK
Result state (device might reboot before returning it)
Result
default
Error state.
Error
SECURITY
Schema Scopes
Super_Rights_Required
DESCRIPTION
Restarts the webserver right away.
RESPONSES
Uses default content-types: application/json
200 OK
Result state (webserver might be restarting before returning it)
Result
default
Error state.
Error
SECURITY
Schema Scopes
Super_Rights_Required
DESCRIPTION
Returns the rule storage mode setting.
RESPONSES
200 OK
Rule storage mode ("simple"/"ipv6").
PROPERTIES
modeCurrent: string , x ∈ { "simple" , "ipv6" }
Currently active rule storage mode.
default
Error state.
Error
DESCRIPTION
Sets the rule storage mode, might affect the matching and action capabilities of some devices, e.g.
concerning IPv6.
REQUEST PARAMETERS
mode New rule storage mode ('simple' or 'ipv6'). query string , x ∈ { "simple" , "ipv6" } required
RESPONSES
Uses default content-types: application/json
200 OK
Rule storage mode ('simple' or 'ipv6').
PROPERTIES
modeCurrent: string , x ∈ { "simple" , "ipv6" }
Currently active rule storage mode (the newly activated one)
default
Error state.
Error
SECURITY
Schema Scopes
Super_Rights_Required
DESCRIPTION
Returns the serial number of the device.
RESPONSES
Uses default content-types: application/json
200 OK
Serial number information.
PROPERTIES
generation: string
Serial no. of the device in use.
default
Error state.
Error
DESCRIPTION
Returns the revision.
RESPONSES
200 OK
Revision information.
PROPERTIES
revision: string
Revision of cch machinery in use.
default
Error state.
Error
DESCRIPTION
Adds and validates a license for this device
REQUEST PARAMETERS
Data
Name Description Type type
validUntil date until the license is valid. Is not verified here. E.g. "2019- query boolean required
09-07"
serialNumber Serial number of the device. Needs to be the same as the query boolean required
serial number on this device
RESPONSES
Uses default content-types: application/json
200 OK
Result state.
Result
default
Error state.
Error
DESCRIPTION
Shows whether the device ID LED is activated or not
RESPONSES
Uses default content-types: application/json
200 OK
Result state.
PROPERTIES
activated: boolean
DESCRIPTION
Shows whether the device ID LED is activated or not
RESPONSES
Uses default content-types: application/json
200 OK
Result state.
PROPERTIES
activated: boolean
DESCRIPTION
REQUEST PARAMETERS
RESPONSES
Uses default content-types: application/json
200 OK
Result state.
Result
default
Error state.
Error
SECURITY
Schema Scopes
Write_Rights_Required
DESCRIPTION
Adds a group. Also deletes all rules which have this group as an action.
REQUEST BODY
application/json
Groups JSON
GroupInput
RESPONSES
Uses default content-types: application/json
200 OK
Result state.
Result
default
Error state.
Error
SECURITY
Schema Scopes
Write_Rights_Required
DESCRIPTION
Modifies an existing group matched by its group ID.
REQUEST BODY
application/json
Groups JSON
GroupInput
RESPONSES
Uses default content-types: application/json
200 OK
Result state.
Result
default
Error state.
Error
SECURITY
Schema Scopes
Write_Rights_Required
DESCRIPTION
Deletes all active groups. Also deletes all rules which have any group as an action.
RESPONSES
Uses default content-types: application/json
200 OK
Result state.
Result
default
Error state.
Error
SECURITY
Schema Scopes
Write_Rights_Required
DESCRIPTION
file:///C:/Users/fabia/Downloads/rest_api (1).html 42/80
20.09.22, 09:13 Cubro Packetmaster RestAPI User Guide
RESPONSES
Uses default content-types: application/json
200 OK
Object with active groups.
PROPERTIES
rules: object[]
ITEMS
GroupOutput
default
Error state.
Error
DESCRIPTION
Returns the configuration of all ports.
RESPONSES
Uses default content-types: application/json
200 OK
Port configs.
PROPERTIES
port_config: PortConfig
default
Error state.
Error
DESCRIPTION
Sets the configuration of one port to the given values.
REQUEST PARAMETERS
duplex Duplex setting, can be full, half, or auto. query string , x ∈ { "full" ,
"half" , "auto" }
RESPONSES
Uses default content-types: application/json
200 OK
Result state.
Result
default
Error state.
Error
SECURITY
Schema Scopes
Write_Rights_Required
DESCRIPTION
Returns status and other information about the ports. Don't use if performance is a concern!
RESPONSES
Uses default content-types: application/json
200 OK
Port info.
EXAMPLE
{
"result": [
{
"properties": {
"admin_status": "PORT_UP",
"duplex": "Full (auto)",
"if_name": "eth-0-1",
"link_status": "LINK_UP",
"mac_addr": "00:1e:08:0a:0d:78",
"port_no": 1,
"speed": "1Gb (auto)"
},
"type": "object"
}
]
}
PROPERTIES
result: object
PROPERTIES
port_no: string
Port ID, e.g. 1.
EXAMPLE
if_name: string
Interface name, e.g. eth-0-1.
EXAMPLE
"eth-0-1"
duplex: string
Current duplex status, and duplex setting in parentheses
mac_addr: string
MAC address of the interface, hex bytes separated using colons
speed: string
Current speed, and speed setting in parentheses, e.g. 1Gb (auto)
EXAMPLE
"1Gb (auto)"
default
Error state.
Error
DESCRIPTION
Returns the status of all SFPs.
RESPONSES
Uses default content-types: application/json
200 OK
Port counters.
file:///C:/Users/fabia/Downloads/rest_api (1).html 46/80
20.09.22, 09:13 Cubro Packetmaster RestAPI User Guide
EXAMPLE
{
"result": "Port port-6 transceiver info: \nTransceiver Type: 1000BASE-T\n
\\ Transceiver Vendor Name : CISCO-FINISAR \n Transceiver PN \\ : GE
GB3RC-C \n Transceiver S/N : EC1501064242\\ \nTransceiver Out
put Wavelength: N/A\nSupported Link Type and\\ Length: \n Link Length for
copper: 100 m\nDigital diagnostic\\ is not implemented.\n"
}
PROPERTIES
result: string
All the SFP info formatted for fixed-width display (e.g. a terminal)
default
Error state.
Error
DESCRIPTION
Returns the counters of all ports.
RESPONSES
Uses default content-types: application/json
200 OK
Port counters.
ITEMS
object
PROPERTIES
portnum: string
ID of the port
rxpkts: integer
Number of received packets
rxbytes: integer
Number of received bytes
rxdrop: integer
Number of packets dropped on receiving
rxerrs: integer
Total number of packets dropped due to rx errors (sum or greater than rxframe+rxover+rxcrc)
rxframe: integer
Number of packets dropped due to frame alignment errors
rxover: integer
Number of packets dropped due to rx overrun
rxcrc: integer
Number of packets dropped due to CRC errors
txpkts: integer
Number of transmitted packets
txbytes: integer
Number of transmitted bytes
txdrop: integer
Number of packets dropped on sending
txerrs: integer
Total number of packets dropped due to tx errors (equal or greater than txcoll)
txcoll: integer
Number of packets dropped due to collisions
default
Error state.
Error
DESCRIPTION
Deletes the specified rule. A rule is identified by all match fields (including priority), all other fields are
ignored and can be omitted.
REQUEST PARAMETERS
Data
Name Description Type type
RESPONSES
Uses default content-types: application/json
200 OK
Result state.
Result
default
Error state.
Error
SECURITY
Schema Scopes
Write_Rights_Required
DESCRIPTION
Adds the given rule.
REQUEST PARAMETERS
Data
Name Description Type type
priority Priority of the rule. Higher priority rules are query integer required
tried first, each packet can only be matched ,{x∈
by a single rule. ℤ|0≤
x≤
65535
}
actions String with all actions (order matters!) query string required
separated by ','.
RESPONSES
Uses default content-types: application/json
200 OK
Result state.
Result
default
Error state.
Error
SECURITY
Schema Scopes
Write_Rights_Required
DESCRIPTION
Modifies an existing rule. Modifies the actions, the name or the description of a specified rule. The rule is
identified by its match fields (including priority). The match (including priority) cannot be modified.
REQUEST PARAMETERS
Data
Name Description Type type
actions New string of all actions (order matters!), query string required
separated by ','.
RESPONSES
Uses default content-types: application/json
200 OK
Result state.
Result
default
Error state.
Error
SECURITY
Schema Scopes
Write_Rights_Required
DESCRIPTION
Deletes all active rules.
RESPONSES
Uses default content-types: application/json
200 OK
Result state.
Result
default
Error state.
Error
SECURITY
Schema Scopes
Write_Rights_Required
DESCRIPTION
Returns all active rules on this device.
RESPONSES
200 OK
An object containing all active rules on this device.
PROPERTIES
rules: object[]
ITEMS
RuleOutput
used_flows: integer
Number of TCAM flows utilized.
default
Error state.
Error
DESCRIPTION
Resets the packet and byte counters of all rules.
RESPONSES
Uses default content-types: application/json
200 OK
Result state.
Result
default
Error state.
Error
SECURITY
Schema Scopes
Schema Scopes
Write_Rights_Required
DESCRIPTION
Returns all rule and port save-points.
RESPONSES
Uses default content-types: application/json
200 OK
Rule and port save-points.
PROPERTIES
RuleSavePoints: object[]
ITEMS
RuleSavePoint
PortSavePoints: object[]
ITEMS
PortSavePoint
default
Error state.
Error
DESCRIPTION
Activates a port save-point with the given name.
REQUEST PARAMETERS
name Name of the port save point to activate. query string required
RESPONSES
Uses default content-types: application/json
200 OK
Result state.
Result
default
Error state.
Error
SECURITY
Schema Scopes
Super_Rights_Required
DESCRIPTION
Activates a rule save-point with the given name making all rules and group active (or at least trying to,
success depends on e.g. whether it matches the current port settings). Does not make the rule save-point
permanent.
REQUEST PARAMETERS
name Name of the port save point to activate query string required
RESPONSES
Uses default content-types: application/json
200 OK
file:///C:/Users/fabia/Downloads/rest_api (1).html 55/80
20.09.22, 09:13 Cubro Packetmaster RestAPI User Guide
Result state.
Result
default
Error state.
Error
SECURITY
Schema Scopes
Write_Rights_Required
DESCRIPTION
Sets the rule save-point with the given name to be loaded on boot Does not make it active before next
boot. There can be only one to be loaded on boot.
REQUEST PARAMETERS
name Name of the port save point to set to be loaded on boot query string required
RESPONSES
Uses default content-types: application/json
200 OK
Result state.
Result
default
Error state.
Error
SECURITY
Schema Scopes
Super_Rights_Required
DESCRIPTION
Returns selected rule and port save-points (selected by names).
REQUEST PARAMETERS
RESPONSES
Uses default content-types: application/json
200 OK
Rule and port save-points.
PROPERTIES
meta_data: object
PROPERTIES
device: string
Device Model of the Device this Savepoint was created on.
software_version: string
Software Version of the Device this Savepoint was created on.
RuleSavePoints: object[]
ITEMS
RuleSavePoint
PortSavePoints: object[]
ITEMS
PortSavePoint
default
Error state.
Error
DESCRIPTION
Renames the port save-point with the given name given in "oldname" to the name given in "newname". If
the "override" parameter is equal to "true" the the currently active ports get saved into this port save point,
thereby overwriting all existing ports in that save-point. Also modifies the description to the and the
description given in "description". The description will not be modified if the "description" parameter is not
set or "null".
REQUEST PARAMETERS
Data
Name Description Type type
old_name Existing name of the port save point query string required
new_name New name of the port save point query string required
override If "true" (which is the default), save the currently active ports query boolean
into this save-point
RESPONSES
Uses default content-types: application/json
200 OK
Port save point in question.
PROPERTIES
portSavePoints: object[]
ITEMS
PortSavePoint
default
Error state.
Error
SECURITY
Schema Scopes
Super_Rights_Required
DESCRIPTION
Modifies an existing rule save-point. Renames the rule save-point with the given name given in "oldname"
to the name given in "newname". If the "override" parameter is equal to "true" the the currently active rules
get saved into this rule save point, thereby overwriting all existing rules in that save-point. Also modifies the
description to the and the description given in "description". The description will not be modified if the
"description" parameter is not set or "null".
REQUEST PARAMETERS
Data
Name Description Type type
old_name Existing name of the rule save point query string required
new_name New name of the rule save point query string required
override If "true" (which is the default), save the currently active rules query boolean
into this save-point
RESPONSES
Uses default content-types: application/json
200 OK
Rule save point in question.
RuleSavePoint
default
Error state.
Error
SECURITY
Schema Scopes
Write_Rights_Required
DESCRIPTION
Deletes the port save-point with the given name if it exists.
REQUEST PARAMETERS
name Name of the port save point to delete query string required
RESPONSES
Uses default content-types: application/json
200 OK
Result state.
Result
default
Error state.
Error
SECURITY
Schema Scopes
Schema Scopes
Super_Rights_Required
POST /savepoints/portsavepoint Creates a new port save-point from current port settings
DESCRIPTION
Saves the current port config into a new port save-point with the name given in "name" and the description
given in "description". Returns the new port save-point.
REQUEST PARAMETERS
RESPONSES
Uses default content-types: application/json
200 OK
New port save point.
PortSavePoint
default
Error state.
Error
SECURITY
Schema Scopes
Super_Rights_Required
PUT From current rules/groups creates a 'Quicksave' rule save-point set to load on boot
/savepoints/quicksaverules
file:///C:/Users/fabia/Downloads/rest_api (1).html 61/80
20.09.22, 09:13 Cubro Packetmaster RestAPI User Guide
DESCRIPTION
Saves the currently active rules and groups into a rule save-point with the name 'Quicksave' which will be
set to load on boot. Any already existing rule save-point by this name will be replaced. User level has to be
higher or equal to WRITE.
RESPONSES
Uses default content-types: application/json
200 OK
The rule save-point in question.
PROPERTIES
RuleSavePoints: object[]
ITEMS
RuleSavePoint
default
Error state.
Error
SECURITY
Schema Scopes
Write_Rights_Required
DESCRIPTION
Deletes the rule save-point with the given name if it exists.
REQUEST PARAMETERS
name Name of the rule save point to delete query string required
RESPONSES
Uses default content-types: application/json
200 OK
Result state.
Result
default
Error state.
Error
SECURITY
Schema Scopes
Write_Rights_Required
DESCRIPTION
Saves the currently active rules and groups into a new rule save-point with the name given in "name" and
the description given in "description". Returns the new rule save-point.
REQUEST PARAMETERS
RESPONSES
Uses default content-types: application/json
200 OK
New rule save point.
RuleSavePoint
default
Error state.
Error
SECURITY
Schema Scopes
Write_Rights_Required
DESCRIPTION
Deletes a web UI user account.
REQUEST PARAMETERS
RESPONSES
Uses default content-types: application/json
200 OK
Result state.
Result
default
Error state.
Error
SECURITY
Schema Scopes
Schema Scopes
Super_Rights_Required
DESCRIPTION
Returns all web UI user accounts.
RESPONSES
Uses default content-types: application/json
200 OK
User accounts.
PROPERTIES
(USER_NAME): object
User name info object, (USER_NAME) stands for the user in question.
PROPERTIES
userid: integer
Internal user ID.
username: string
Username.
description: string
User account description.
default
Error state.
Error
DESCRIPTION
Adds a web UI user account.
file:///C:/Users/fabia/Downloads/rest_api (1).html 65/80
20.09.22, 09:13 Cubro Packetmaster RestAPI User Guide
REQUEST PARAMETERS
accesslevel New access level; 1 = READ, 7 = WRITE, 31 = query integer , x ∈ { "1" required
SUPER. , "7" , "31" }
radius If this is true, this user's password is checked query boolean required
against the RADIUS server.
RESPONSES
Uses default content-types: application/json
200 OK
Result state.
Result
default
Error state.
Error
SECURITY
Schema Scopes
Super_Rights_Required
DESCRIPTION
Modifies an existing web UI user account.
REQUEST PARAMETERS
radius If this is true, this user's password is checked query boolean required
against the RADIUS server.
RESPONSES
Uses default content-types: application/json
200 OK
Result state.
Result
default
Error state.
Error
SECURITY
Schema Scopes
Super_Rights_Required
DESCRIPTION
RESPONSES
Uses default content-types: application/json
200 OK
UAC state.
PROPERTIES
enabled: boolean
Whether the RADIUS setting is enabled.
server: string
IP address or hostname of the RADIUS server.
port: integer
UDP port of the RADIUS server.
secret: string
RADIUS secret required to communicate with the RADIUS server.
radius_login_level: integer
RADIUS login level, either of [0 (No access), 1 (read access), 7 (write access), 31 (super user
access)] Determines what user access level any user has, that loggs in via RADIUS, but does not
have a local user profile.
refresh_rate: integer
Determines how many seconds a RADIUS session will be cached.
default
Error state.
Error
SECURITY
Schema Scopes
Super_Rights_Required
DESCRIPTION
Sets the basic RADIUS configuration.
REQUEST PARAMETERS
Data
Name Description Type type
secret RADIUS secret required to communicate with the query string required
RADIUS server.
radius_login_level RADIUS login level, either of [0 (No access), 1 (read query integer required
access), 7 (write access), 31 (super user access)]
Determines what user access level any user has, that
loggs in via RADIUS, but does not have a local user
profile.
refresh_rate Determines how many seconds a RADIUS session query integer required
will be cached.
RESPONSES
Uses default content-types: application/json
200 OK
UAC state.
PROPERTIES
state: boolean
Boolean value indicating whether user access control is activated (true = on).
default
Error state.
Error
SECURITY
Schema Scopes
Schema Scopes
Super_Rights_Required
DESCRIPTION
Returns the state of the UAC (mandatory user authentication and access control) setting, whether it is
enabled or not.
RESPONSES
Uses default content-types: application/json
200 OK
UAC state.
PROPERTIES
state: boolean
Boolean value indicating whether user access control is activated (true = on).
default
Error state.
Error
DESCRIPTION
Sets the state of UAC (mandatory user authentication and access control).
REQUEST PARAMETERS
Data
Name Description Type type
state New UAC state, true = active mandatory auth. and access query boolean required
control
RESPONSES
Uses default content-types: application/json
200 OK
UAC state.
PROPERTIES
state: boolean
Boolean value indicating whether user access control is activated (true = on).
default
Error state.
Error
SECURITY
Schema Scopes
Super_Rights_Required
Schema definitions
App: object
PROPERTIES
canBeInstantiated: boolean
Whether an instance of the app can be started. False e.g. for apps which for which there can be only one
instance running at the same time and this currently being the case.
paramFormat: object[]
Tuple consisting of:
ITEMS
object
name: string
Name of the app.
file:///C:/Users/fabia/Downloads/rest_api (1).html 71/80
20.09.22, 09:13 Cubro Packetmaster RestAPI User Guide
actions: object[]
ITEMS
object
description: string
Description of the app.
Error: object
PROPERTIES
error: string
Error info
GroupInput: string
DESCRIPTION
(GID) stands for the group number.
EXAMPLE
{
"(GID)": {
"buckets": [
{
"actions": "<Actions for that bucket, similar to rule actions, sep
erated using commas>",
"watch_port": "<ID of the watch port>"
}
],
"group_id": "<Unique ID of the group>",
"type": "<'select' for loadbalancing; 'ff' for fast failover; 'all' clones
the traffic and executes all buckets>"
}
}
GroupOutput: object
EXAMPLE
{
"buckets": [
{
"actions": "push_vlan:0x8100, set_field:4->vlan_vid, output:2",
"watch_port": 3
},
{
"actions": "push_vlan:0x8100, set_field:7->vlan_vid, output:5",
"watch_port": 6
}
],
"description": "test",
"group_id": 1,
"type": "ALL"
}
PROPERTIES
group_id: integer
Unique integer ID of the group
type: string
select for loadbalancing, ff for fast failover, all for cloning the traffic and executing all buckets
buckets: object[]
Bucket-related properties
ITEMS
object
PROPERTIES
watch_port: string
ID of the watch_port
actions: string
String containing all actions of that bucket
PortConfig: object
DESCRIPTION
Port config.
EXAMPLE
{
"duplex": "auto",
"ifName": "1",
"mediaType": "auto-select",
"shutdown": false,
"speed": "auto",
"type": 1
}
PROPERTIES
if_name: string required
Interface Name, e.g. "eth-0-1" or "eth-0-1/1".
EXAMPLE
"eth-0-1/1"
xg_speed: object
Speed level, 1G/XG (XG normally means 10G) for devices which need to reboot for it to take effect
PROPERTIES
currSetting: string , x ∈ { "1G" , "XG" }
Current setting.
PortSavePoint: object
DESCRIPTION
(PORT_SAVE_POINT) is a placeholder for the name of the port save-point
PROPERTIES
(PORT_SAVE_POINT)...: object
PROPERTIES
name: string , x ∈ { "(PORT_SAVE_POINT)" }
ports: object[]
ITEMS
PortConfig
readonly: boolean
true if the port save-point cannot be edited/deleted.
description: string
Port save-point description
Result: object
EXAMPLE
{
"result": "OK"
}
PROPERTIES
result: string
Result info, on success often just 'OK'
RuleOutput: object
EXAMPLE
{
"actions": "output:2",
"cookie": 1152921504606847000,
"datarate": "0 bit/s",
"datarate_raw": 0,
"description": "just an example",
"match": {
"in_port": 1
},
"n_bytes": 0,
"n_packets": 0,
"name": "example",
"priority": 32768,
"real_flow_ct": 1
}
PROPERTIES
cookie: integer
internal ID, maps information like name and description to a rule
name: string
Name of the rule
description: string
Description of the rule
priority: string
Priority value. Higher priority rules are tried first, each packet can only be matched by a single rule.
match: object
Match object with fields that make up match. Some match fields have are only keys, so their values will
simply be empty strings.
ADDITIONAL PROPERTIES
object
actions: string
Actions of this rule in a string seperated using commas
datarate: string
Data rate in a human-readable format
n_bytes: string
Total byte size of all packets matched by this rule
n_packets: string
Number of packets that were handled by this rule
real_flow_ct: integer
RuleSavePoint: object
DESCRIPTION
(RULE_SAVE_POINT) is a placeholder for the name of the rule save-point
EXAMPLE
{
"Factory Default": {
"description": "Taps the connection between ports 1 and 2 to port 3. Also
taps the connection between ports 5 and 6 to port 4. Does not affect the port con
figuration.",
"flowusage": 4,
"groups": [
{
"buckets": [
{
"actions": "output:1",
"watch_port": "1"
}
],
"description": "",
"group_id": "1",
"type": "ALL"
}
],
"groupusage": 1,
"readonly": false,
"rules": [
{
"actions": [
"output:2",
"output:3"
],
"cookie": "1152921504606846982",
"description": "",
"duration": "49s",
"duration_raw": "49.145",
"hard_age": "",
"match": {
"in_port": "1"
},
"n_bytes": "0",
"n_packets": "0",
"name": "",
"priority": "32768",
"real_flow_ct": 1,
"table": "0"
},
{
"actions": [
"output:4",
"output:5"
],
"cookie": "1152921504606846980",
"description": "",
"duration": "61s",
"duration_raw": "61.094",
"hard_age": "",
"match": {
"in_port": "6"
},
"n_bytes": "0",
file:///C:/Users/fabia/Downloads/rest_api (1).html 78/80
20.09.22, 09:13 Cubro Packetmaster RestAPI User Guide
"n_packets": "0",
"name": "",
"priority": "32768",
"real_flow_ct": 1,
"table": "0"
},
{
"actions": [
"output:4",
"output:6"
],
"cookie": "1152921504606846981",
"description": "",
"duration": "55s",
"duration_raw": "55.819",
"hard_age": "",
"match": {
"in_port": "5"
},
"n_bytes": "0",
"n_packets": "0",
"name": "",
"priority": "32768",
"real_flow_ct": 1,
"table": "0"
},
{
"actions": [
"output:1",
"output:3"
],
"cookie": "1152921504606846983",
"description": "",
"duration": "45s",
"duration_raw": "45.061",
"hard_age": "",
"match": {
"in_port": "2"
},
"n_bytes": "0",
"n_packets": "0",
"name": "",
"priority": "32768",
"real_flow_ct": 1,
"table": "0"
}
],
"type": "RuleSavePoint"
}
}
PROPERTIES
(RULE_SAVE_POINT)...: object
PROPERTIES
rules: object[]
ITEMS
RuleOutput
groupusage: integer
How many groups this rule save-point utilizes.
readonly: boolean
true if the port save-point cannot be edited/deleted.
groups: object[]
ITEMS
GroupOutput
flowusage: integer
How many TCAM flows this rule save-point utilizes.
description: string
Rule save-point description