Create VLAN/Q-in-Q mapping for a group: Request

Prev Next

To create a VLAN/Q-in-Q mapping for a specific group, send the following request:

POST https://<IA_IP_address>:<port_number>/config/v1/rbac/vlan/mappings

Required header:

Cookie: px=<token>
Content-Type: application/json

Note

To use this request, your user account must be assigned to the Admin role.

Request body:

VlanRange Example

{
    "alias":"team39",
    "group":"wheel",
    "user":"klish_menu",
    "modified":"2019-05-28T06:17:02Z",
    "type":"vlan",
    "vlanRanges":[
      {
        "tagStart":1,
        "tagEnd":1
      },
      {
        "tagStart":1,
        "tagEnd":101
      }
    ]
  }

QinQ Example

{
    "alias":"qinq1",
    "group":"qinq1",
    "user":"klish_menu",
    "modified":"2019-05-28T03:41:31Z",
    "type":"qinq",
    "qinqRanges":[
      {
        "outerTag":103,
        "innerTags":[
          {
            "tagStart":101,
            "tagEnd":109
          }
        ]
      }
    ]
  }

Options

  • IA_IP_address—The IP address of the NDR appliance running the NDR API.

  • port_number—The port number of the NDR appliance running the NDR API.

  • token—This token authenticates the session. By default, the session times out after 24 hours.

Example

POST https://xxx.xxx.xxx.xxx:443/config/v1/rbac/vlan/mappings

Required header:

Cookie: px=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Create VLAN/Q-in-Q mapping for a group: Response

HTTP/1.1 [Response Code] [Response Message]
Date: [Date]
Response fields
  • 201—New mapping was successfully created.

cURL code sample: Create VLAN/Q-in-Q mapping for a group

curl -k --cookie "px=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -X POST -H "Content-Type: application/json"https://xxx.xxx.xxx.xxx:443/config/v1/rbac/vlan/mappings -d '{ "alias": "fireeye_iss_team", "group": "CN=Domain Admins,CN=Users,DC=theitbros,DC=com", "user": "npadmin", "type": "vlan", "vlanRanges": [ { "tagStart": 128, "tagEnd": 200 } ] } '

This cURL sample includes the following options:

  • -k—This option explicitly allows cURL to perform insecure SSL connections and transfers, which allows you to test your SSL connection without installing a CA certificate.

  • --cookie "px=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"—This option specifies the authentication token for this session.

  • -X PUT—Specifies using the POST method.

  • -H "Content-Type: application/json"—Specifies that the response should be in JSON.

  • https://xxx.xxx.xxx.xxx:443/config/v1/rbac/vlan/mappings—The request URL. Replace xxx.xxx.xxx.xxx with the IP address of your NDR appliance.

  • -d <data>—Specifies the new mapping values.

Results

This example creates a new VLAN/Q-in-Q mapping.