Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

REST API Method: PUT /rest/portmirror/{identifier}

Page Tree
rootResource - portmirror

Creates a Port mirror config given a specific ID.

URL:

https://134.56.227.163/rest/portmirror/{identifier}

HTTP Method

PUT

Requires Authentication:

true



Parameters

Parameter Name Required Service Affecting Data Type Default Value Possible Values Description
PMSrcPortYesNostringnone20 - Max LengthSpecifies the source interface to be used for mirroring
PMDestPortYesNostringnone20 - Max LengthSpecifies the port on which the mirrored packets are received.
DirectionNoNoEnum2Possible values:
  • 0 - TRANSMIT
  • 1 - RECEIVE
  • 2 - BOTH
Specifies direction of packets with respect to source port to be mirrored. The direction can be to monitor transmitted packets, received packets or both.

Usage Example: (about cURL | requires a session token)

Code Block
languagebash
curl --cookie PHPSESSID=fsqgefadjojefv6lmdtij6lh44cuc2h83fqaispmu6m519sa5642 -s -k -i https://134.56.72.218/rest/portmirror/1 -X PUT --data "ConfigIEState=1&PMDestPort=tap17&PMSrcPort=tap14&Direction=2"

Response:

Code Block
languagehtml/xml
<?xml version="1.0"?>
<root>
 <status>
  <http_code>200</http_code>
 </status>
 <portmirror id="1" href="https://134.56.72.218/rest/portmirror/1">
  <Direction>2</Direction>
  <PMDestPort>tap17</PMDestPort>
  <PMSrcPort>tap14</PMSrcPort>
 </portmirror>
</root>