INC Platform - Resource Manager

Add Terminal Access Binding

Add a terminal access binding.

Interface URI

/res/access/macAccessBind

Access Method

HTTP
POST
Message body
<macAccessBind>
<terminalMac>1a:2a:3a:4c:1c:2c</terminalMac>
<terminalName>a1</terminalName>
<bindType>2</bindType>
<ifInfo>
<deviceId>2</deviceId>
<ifIndex>1</ifIndex>
</ifInfo>
</macAccessBind>
Elements
macAccessBind sub-elements
terminalMac Terminal MAC address.
String type. Required. No default value.
terminalName Terminal name.
String type. Optional. No default value.
bindType Binding type. 1 for no authentication. 2 for MAC-to-interface binding.
Integer type. Required. No default value.
maintainer Maintainer.
String type. Optional. No default value.
ifInfo Interface information.
Element type. Required when bindType takes 2. Multiple elements are supported.
ifInfo/deviceId Device ID.
Long integer type.
ifInfo/ifIndex Interface index.
Long integer type.

Returned Result

Status codes
  • 201 (Created): Success.
  • 409 (Conflict): Failure. See Error Codes.
Message header

If the operation succeeds, the Location field gives the URI of the new resource. The message body is empty.
HTTP/1.1 201 Created
Location: http://localhost:8080/imcrs/res/access/macAccessBind/4

Example 1

Add a terminal access binding, which maps MAC address 1a:2a:3a:4c:1c:2c to the interface whose index is 1 on device whose ID is 2.

Request
POST http://localhost:8080/imcrs/res/access/macAccessBind
accept: application/xml
Content-Type: application/xml; charset=UTF-8
...
<macAccessBind>
<terminalMac>1a:2a:3a:4c:1c:2c</terminalMac>
<terminalName>a1</terminalName>
<bindType>2</bindType>
<ifInfo>
<deviceId>2</deviceId>
<ifIndex>1</ifIndex>
</ifInfo>
</macAccessBind>
Response
HTTP/1.1 201 Created
Location: http://localhost:8080/imcrs/res/access/macAccessBind/4

Example 2

Exclude MAC address 1a:2a:3a:4a:1a:2a from authentication.

Request
POST http://localhost:8080/imcrs/res/access/macAccessBind
accept: application/xml
Content-Type: application/xml; charset=UTF-8
...

<macAccessBind>
<terminalMac>1a:2a:3a:4a:1a:2a</terminalMac>
<terminalName>a1</terminalName>
<bindType>1</bindType>
</macAccessBind>
Response
HTTP/1.1 201 Created
Location: http://localhost:8080/imcrs/res/access/macAccessBind/1