Create a Role and Assign it to a Site

This procedure outlines how to create a new role and assign it to a site. A role must be assigned to a site to be usable.

Note

Note

The attributes in this topic are a representative sample of what is a available. For a complete list of attributes, elements, and resources, see the main documentation of the REST API. The documentation resides in a user interface that is accessed using this URL: http://api.extremenetworks.com/extremecloud/rest_api/index.html

To create a role and assign it to a site:

  1. Log in to the REST API server (api.ezcloudx.com) using administrator credentials. You must also forward the credentials with each API call. For an example of how to log in, see Log in to the REST API Server.
  2. Verify that the role does not already exist by checking the list of current roles using the GET method:
    GET HTTP://ipAddress/v3/roles
  3. Create the new role instance using the POST method:
    POST HTTP://ipAddress/v3/roles

    When you POST or PUT data to the REST API, at minimum set the Content-Type header to application/json. However, you should generally specify two headers when you post the log in request.

    Example:
    • content-type: application/json ;charset=UTF-8
      
    • accept: application/json, text/plain, */*
    Any of the following Accept headers are allowed with the Content-Type header request header:
    • accept: application/json
    • accept-encoding: gzip, deflate, br
    • accept-language: en-US,en;q=0.8,und;q=0.6
    Click to expand in new window

    Request Attributes

    Attribute Data Type Description
    cpAddApNameAndSerial Boolean A flag to indicate if the AP serial number and name should be added as a parameter for external captive portal (ECP) authentication.
    cpAddBssid Boolean A flag to indicate if the access point's BSSIDs should be added as a parameter for ECP authentication.
    cpAddIpAndPort Boolean A flag to indicate if IP address and port should be added as a parameter for ECP authentication.
    cpAddMac Boolean A flag to indicate if the client's MAC should be added as a parameter for ECP authentication.
    cpAddRole Boolean A flag to indicate if the current role assigned to the client should be added as a parameter for ECP authentication.
    cpAddSign Boolean A flag to indicate if the AWS Signature should be added as a parameter for ECP authentication.
    cpAddSsid Boolean A flag to indicate if SSID should be added as a parameter for ECP authentication.
    cpAddTime Boolean A flag to indicate if time should be added as a parameter for ECP authentication.
    cpAddVlan Boolean A flag to indicate if the current VLAN assigned to the client should be added as a parameter for ECP authentication.
    cpAddVnsName Boolean A flag to indicate if Virtual Network segment name should be added as a parameter for ECP authentication.
    cpDefaultRedirectUrl String The redirection URL to which the wireless device user will be directed to after authentication.
    cpHttp Boolean A flag to indicate if HTTP should be used.
    cpIdentity String The identity used by the ECP and AP redirecting station to identify each other. Validations: A not null and non-empty string, having maximum of 255 characters, if any of the filter rule has an action as 'FILTERACTION_REDIRECT'.
    cpRedirect String The URL of the captive portal login page.
    cpRedirectUrlSelect RedirUrlSelect The post-authentication URL selection.
    cpSharedKey String The shared secret (used with identity to sign and encrypt the redirection URL). It is a password that is common to both the controller and the external Web server if you want to encrypt the information passed between the controller and the external web server. Validations: A not null and non-empty string, between 8 and 64 characters, if any of the filter rules has an action as 'FILTERACTION_REDIRECT'.
    defaultAction PolicyAccessControlAction The default access control action to be applied when there are no policy rules or none of the rules match the frame. Validations: A not null and valid PolicyAccessControlAction value as a string.
    defaultCos String The class of service (CoS) to assign to a matching frame if the role has no rules, or none of the rules match the frame or if none of the rules that match the frame assign a CoS to the frame. Set this to null to indicate that no CoS will be applied to the frame. In that case the frame's QoS fields will not be remarked and the traffic will not be rate limited in either direction. Validations: A valid UUID of a CoS.
    features Array of strings A list of supported features.
    filters Array of PolicyRuleElement filters A list of rule filters associated with the role. More information about filters is available at: http://documentation.extremenetworks.com/extremecloud/rest_api/index.html
    name String The role name that is unique across the customer sites. Validations: A not null and non-empty string, between 1 to 255 characters. Valid character set: Alphanumeric and special characters, except semi-colon, colon, and ampersand.
    topology String If defaultAction == containToVlan, the topology must reference a defined topology. If defaultAction has any other value, the topology should be null and in any case it will be ignored/discarded. Validations: A valid UUID of a topology.
  4. Assign the role to an existing site.
    PUT HTTP://ipAddress/v3/management/sites/siteID

Example: POST Request - Create a Role

{
  "custId":"1-25ROO1C",
  "id":"26820c30-a870-11e7-8fd1-a34beb33e832",
  "name":"Role_1",
  "filters":null,
  "l2Filters":[{
     "name":"filter-1",
    "intoNetwork":"destAddr",
    "outFromNetwork":"sourceAddr",
    "action":"FILTERACTION_ALLOW",
    "topologyId":null,
    "cosId":null,
    "userDefinedEthertype":2048,
    "macAddrType":"user_defined",
    "macAddress":"11:22:33:44:55:66",
    "ethertype":"ipv4","userPriority":"notApplicable"
  }],
  "l3Filters":[],
  "l7Filters":[],
  "defaultAction":"deny",
  "topology":null,
  "defaultCos":"86500336-ed48-11e5-9ce9-5e5517507c66",
  "cpRedirect":null,
  "features":["APP-CONTROL","CP-AT-AP","CP-AT-AP-PRONTO","IPV6","WIRED-PORTS"],
  "cpIdentity":"",
  "cpSharedKey":"",
  "cpDefaultRedirectUrl":null,
  "cpRedirectUrlSelect":"URLTARGET",
  "cpHttp":false,
  "cpAddIpAndPort":true,
  "cpAddApNameAndSerial":true,
  "cpAddBssid":true,
  "cpAddVnsName":true,
  "cpAddSsid":true,
  "cpAddMac":true,
  "cpAddRole":true,
  "cpAddVlan":true,
  "cpAddTime":true,
  "cpAddSign":true
}

Example: Response - Create a Role

{
  "custId" : "1-25ROO1C",
  "id" : "26820c30-a870-11e7-8fd1-a34beb33e832",
  "name" : "Role_1",
  "filters" : null,
  "l2Filters" : [ {
    "custId" : null,
    "id" : null,
    "name" : "filter-1",
    "intoNetwork" : "destAddr",
    "outFromNetwork" : "sourceAddr",
    "action" : "FILTERACTION_ALLOW",
    "topologyId" : null,
    "cosId" : null,
    "userDefinedEthertype" : 2048,
    "macAddrType" : "user_defined",
    "macAddress" : "11:22:33:44:55:66",
    "ethertype" : "ipv4",
    "userPriority" : "notApplicable"
  } ],
  "l3Filters" : [ ],
  "l7Filters" : [ ],
  "defaultAction" : "deny",
  "topology" : null,
  "defaultCos" : "86500336-ed48-11e5-9ce9-5e5517507c66",
  "cpRedirect" : null,
  "features" : [ "APP-CONTROL", "CP-AT-AP", "CP-AT-AP-PRONTO", "IPV6", "WIRED-PORTS" ],
  "cpIdentity" : null,
  "cpSharedKey" : null,
  "cpDefaultRedirectUrl" : null,
  "cpRedirectUrlSelect" : "URLTARGET",
  "cpHttp" : false,
  "cpAddIpAndPort" : true,
  "cpAddApNameAndSerial" : true,
  "cpAddBssid" : true,
  "cpAddVnsName" : true,
  "cpAddSsid" : true,
  "cpAddMac" : true,
  "cpAddRole" : true,
  "cpAddVlan" : true,
  "cpAddTime" : true,
  "cpAddSign" : true
}

Example: PUT Request - Update a Site

{

  "custId":"1-25ROO1C",
  "id":"0c891450-a85b-11e7-8fd1-a34beb33e832",
  "siteName":"Default",
  "country":"UNITED_STATES",
  "timezone":"America/New_York",
  "scheduleUpgradeInfo":{
     "custId":null,
     "id":null,
     "preferredDayOfWeek":null,
     "preferredWeek":null,
     "preferredTime":{
       "custId":null,
       "id":null,
       "hour":0,
       "minute":0
     }
  },
  "siteManagerName":null,
  "siteManagerEmail":null,
  "contact":null,
  "smartRFPolicy":{
     "custId":null,
     "id":null,
     "txMinimumPower5":3,
     "txMaximumPower5":16,
     "txMinimumPower24":3,
     "txMaximumPower24":16,
     "acsChannelSelection5":"CHPLAN_ALLBYCOUNTRY",
     "acsChannelSelectionList5":["157+1/40","100/40","140+1/40","132+1/40","140/40","108/40","36/40","165/40","100+1/40","132/40","149+1/40","157/40","44/40","149/40","60+1/40","108+1/40","116+1/40","52/40","124/40","124+1/40","44+1/40","52+1/40","36+1/40","116/40","60/40"],
  "acsChannelSelection24":"CHPLAN_AUTO",
  "acsChannelSelectionList24":["11","1","6"],
  "dot11nChannelWidth5":"Ch1Width_40MHz",
  "dot11nChannelWidth24":"Ch1Width_20MHz",
  "rfSensitivity":"medium",
  "ocsClientAware24":0,
  "ocsClientAware5":0,
  "ocsVoiceAware24":"dynamic",
  "ocsVoiceAware5":"dynamic",
  "interferenceRecovery":true,
  "coverageHoleRecovery":true,
  "neighborRecovery":true,
  "minInterferenceChannelSwitch5":20,
  "minInterferenceChannelSwitch24":20,
  "minSnrThreshold5":20,
  "minSnrThreshold24":20,
  "runOcsScanOncePerDay":false,
  "dcsNoiseInterferenceThreshold5":-80,
  "dcsChannelOccupanyThreshold5":100,
  "dcsUpdatePeriod5":5,
  "dcsNoiseInterferenceThreshold24":-80,
  "dcsChannelOccupanyThreshold24":100,
  "dcsUpdatePeriod24":5,"interferenceWaitTime24":10
  },
   "managementPolicy":{
     "custId":null,
     "id":null,
     "name":null,"adminPassword":null,
     "enableTraps":false,
     "snmpTrapReceivers":[],
     "snmpUSMs":[]
   },
  "deviceGroups":[{
     "custId":null,
     "id":"0c891450-a85b-11e7-8fd1-a34beb33e832",
     "groupName":null,
     "loadBalanceBandPreferenceEnabled":false,
     "roleIDs":["148c4042-efb0-11e5-9ce9-5e5517507c66","91f27cd0-8fcb-11e5-8994-feff819cdc9f","0c1c48c0-a85b-11e7-8fd1-a34beb33e832","26820c30-a870-11e7-8fd1-a34beb33e832"],
  "apSerialNumbers":["1549Y-1019600000"],
  "switchSerialNumbers":["1551N-40607"],
  "topologyIDs":["87b7f72c-8fcb-11e5-8994-feff819cdc9f"],
  "serviceIDs":[],
  "backboneTopologyIDs":[],
  "radioAssignment":[{
     "serviceId":"0c602f90-a85b-11e7-8fd1-a34beb33e832",
     "radioBand":"Band5"
  }, {
     "serviceId":"0c602f90-a85b-11e7-8fd1-a34beb33e832",
     "radioBand":"Band24"
  }, {
     "serviceId":"f0e17380-a870-11e7-8fd1-a34beb33e832",
     "radioBand":"Band5"
  }, {
     "serviceId":"f0e17380-a870-11e7-8fd1-a34beb33e832",
     "radioBand":"Band24"
  } ],
  "wiredInterfaceAssignment":[],
  "enableDpi":true,"minimumBaseRate2_4":6,
  "minimumBaseRate5":6,
  "aggregateMpdu2_4":true,
  "aggregateMpdu5":true,
  "stbcEnabled2_4":false,
  "stbcEnabled5":false,
  "txbfEnabled2_4":"disabled",
  "txbfEnabled5":"muMimo",
  "dnsServers":["0.0.0.0"]
  } ],
  "treeNode":{
     "custId":null,
     "id":null,"country":null,
     "region":null,
     "campus":null,
     "city":null,
     "mapCoordinates":null
  },
  "snmpConfig":{
     "custId":null,
     "id":null,
     "snmpVersion":"DISABLED",
     "v2Communities":{},
     "v3Users":[],
     "notifications":[]
  },
  "syslogConfiguration":{
     "custId":null,
     "id":null,
     "enabled":false,
     "logging":"INFO",
     "syslogConfig":{"":514},
     "logGuestTraffic":false
  },
  "siteType":"IDENTIFI",
  "features":["APP-CONTROL","CP-AT-AP","CP-AT-AP-PRONTO","IPV6","WIRED-PORTS"],"floorIds":[]
}

Example: Response - Update a Site

{
  "custId" : "1-25ROO1C",
  "id" : "0c891450-a85b-11e7-8fd1-a34beb33e832",
  "siteName" : "Default",
  "country" : "UNITED_STATES",
  "timezone" : "America/New_York",
  "scheduleUpgradeInfo" : {
    "custId" : null,
    "id" : null,
    "preferredDayOfWeek" : null,
    "preferredWeek" : null,
    "preferredTime" : {
      "custId" : null,
      "id" : null,
      "hour" : 0,
      "minute" : 0
    }
  },
  "siteManagerName" : null,
  "siteManagerEmail" : null,
  "contact" : null,
  "smartRFPolicy" : {
    "custId" : null,
    "id" : null,
    "txMinimumPower5" : 3,
    "txMaximumPower5" : 16,
    "txMinimumPower24" : 3,
    "txMaximumPower24" : 16,
    "acsChannelSelection5" : "CHPLAN_ALLBYCOUNTRY",
    "acsChannelSelectionList5" : [ "157+1/40", "100/40", "140+1/40", "132+1/40", "140/40", "108/40", "36/40", "165/40", "100+1/40", "132/40", "149+1/40", "157/40", "44/40", "149/40", "60+1/40", "108+1/40", "116+1/40", "52/40", "124/40", "124+1/40", "44+1/40", "52+1/40", "36+1/40", "116/40", "60/40" ],
    "acsChannelSelection24" : "CHPLAN_AUTO",
    "acsChannelSelectionList24" : [ "11", "1", "6" ],
    "dot11nChannelWidth5" : "Ch1Width_40MHz",
    "dot11nChannelWidth24" : "Ch1Width_20MHz",
    "rfSensitivity" : "medium",
    "ocsClientAware24" : 0,
    "ocsClientAware5" : 0,
    "ocsVoiceAware24" : "dynamic",
    "ocsVoiceAware5" : "dynamic",
    "interferenceRecovery" : true,
    "coverageHoleRecovery" : true,
    "neighborRecovery" : true,
    "minInterferenceChannelSwitch5" : 20,
    "minInterferenceChannelSwitch24" : 20,
    "minSnrThreshold5" : 20,
    "minSnrThreshold24" : 20,
    "runOcsScanOncePerDay" : false,
    "dcsNoiseInterferenceThreshold5" : -80,
    "dcsChannelOccupanyThreshold5" : 100,
    "dcsUpdatePeriod5" : 5,
    "dcsNoiseInterferenceThreshold24" : -80,
    "dcsChannelOccupanyThreshold24" : 100,
    "dcsUpdatePeriod24" : 5,
    "interferenceWaitTime24" : 10
  },
  "managementPolicy" : {
    "custId" : null,
    "id" : null,
    "name" : null,
    "adminPassword" : null,
    "enableTraps" : false,
    "snmpTrapReceivers" : [ ],
    "snmpUSMs" : [ ]
  },
  "deviceGroups" : [ {
    "custId" : null,
    "id" : "0c891450-a85b-11e7-8fd1-a34beb33e832",
    "groupName" : null,
    "loadBalanceBandPreferenceEnabled" : false,
    "roleIDs" : [ "148c4042-efb0-11e5-9ce9-5e5517507c66", "91f27cd0-8fcb-11e5-8994-feff819cdc9f", "0c1c48c0-a85b-11e7-8fd1-a34beb33e832", "26820c30-a870-11e7-8fd1-a34beb33e832" ],
    "apSerialNumbers" : [ "1549Y-1019600000" ],
    "switchSerialNumbers" : [ "1551N-40607" ],
    "topologyIDs" : [ "87b7f72c-8fcb-11e5-8994-feff819cdc9f" ],
    "serviceIDs" : [ "0c602f90-a85b-11e7-8fd1-a34beb33e832" ],
    "backboneTopologyIDs" : [ ],
    "radioAssignment" : [ {
      "custId" : null,
      "id" : null,
      "serviceId" : "0c602f90-a85b-11e7-8fd1-a34beb33e832",
      "radioBand" : "Band5"
    }, {
      "custId" : null,
      "id" : null,
      "serviceId" : "0c602f90-a85b-11e7-8fd1-a34beb33e832",
      "radioBand" : "Band24"
    } ],
    "wiredInterfaceAssignment" : [ ],
    "enableDpi" : true,
    "minimumBaseRate2_4" : 6,
    "minimumBaseRate5" : 6,
    "aggregateMpdu2_4" : true,
    "aggregateMpdu5" : true,
    "stbcEnabled2_4" : false,
    "stbcEnabled5" : false,
    "txbfEnabled2_4" : "disabled",
    "txbfEnabled5" : "muMimo",
    "dnsServers" : [ "0.0.0.0" ]
  } ],
  "treeNode" : {
    "custId" : null,
    "id" : null,
    "country" : null,
    "region" : null,
    "campus" : null,
    "city" : null,
    "mapCoordinates" : null
  },
  "snmpConfig" : {
    "custId" : null,
    "id" : null,
    "snmpVersion" : "DISABLED",
    "v2Communities" : { },
    "v3Users" : [ ],
    "notifications" : [ ]
  },
  "syslogConfiguration" : {
    "custId" : null,
    "id" : null,
    "enabled" : false,
    "logging" : "INFO",
    "syslogConfig" : { },
    "logGuestTraffic" : false
  },
  "siteType" : "IDENTIFI",
  "features" : [ "APP-CONTROL", "CP-AT-AP", "CP-AT-AP-PRONTO", "IPV6", "WIRED-PORTS" ],
  "floorIds" : [ ]
}