Views:
Retrieve a list of all of the virtual segments on the SMS in XML format. The request also returns the device NAME from the DEVICE table. See DEVICE table.
Note
Note
Use the following link examples to download the XML schema from the SMS: "https://<sms_ip_or_hostname>/xsds/VirtualSegment.xsd" or "https://<sms_ip_or_hostname>/xsds/sms/response/xsd".

Definition

virtualsegment/get

Parameters

Parameter Type Description
name string Name of the virtual segment
description (optional) string Description for the virtual segment
virtualSegPosition   Indicates where in the list virtual segment is placed. You define the priority order for a virtual segment so that any overlapping definitions are resolved. Attempting to define an overlapping virtual segment on a device which does not allow it will produce an error.
virtualSegPosition/positionType ORDINAL_POSITION, FIRST, LAST Attribute; must be one of the three values
virtualSegPosition/ordinalPosition positive integer Must be provided when positionType is ORDINAL_POSITION
vlanIdList (optional) Used to assign a list of VLAN IDs, and/or VLAN ranges or a named object referencing a named VLAN group
vlanIdList/vlanList Used when assigning a list of VLAN IDs and/or VLAN ranges to the virtual segment
vlanIdList/vlanList/vlan Single element for either a VLAN ID or VLAN range
vlanIdList/vlanList/vlan/vlanID integer (1 to 4094) VLAN ID
vlanIdList/vlanList/vlan/vlanID/vlanRange Element containing a VLAN range
vlanIdList/vlanList/vlan/vlanID/vlanRange/start integer (1 to 4094) VLAN ID start of the range
vlanIdList/vlanList/vlan/vlanID/vlanRange/end integer (1 to 4094) VLAN ID end of the range
vlanIdList/namedVlanGroup string Named VLAN group identifier
sourceAddressList (optional) Used to assign a list of IP addresses and/or IP address blocks or a named object referencing a named address group for the source address
sourceAddressList/cidrList Used when providing a list of IP addresses and/or IP address blocks
sourceAddressList/cidrList/cidr IP address or IP address block
sourceAddressList/namedAddrGroup string Named address group identifier
destinationAddressList (optional) Used to assign a list of IP addresses, and/or IP address blocks or a named object referencing a named address group for the destination address
destinationAddressList/cidrList Used when providing a list of IP addresses and/or IP address blocks
destinationAddressList/cidrList/cidr IP address or IP address block
destinationAddressList/namedAddrGroup string Named address group identifier
segmentGroup Used when assigning a virtual segment to a segment group
segmentGroup/segmentGroupID Identifier element for the segment group
segmentGroup/segmentGroupID/name string Name of the segment group
segmentGroup/segmentGroupID/id string ID of the segment group
physicalSegments (optional) Used for assigning the virtual segment to one or more segments on one or more devices
physicalSegments/physicalSegment Identifies the device and the segments to assign the virtual segment to
physicalSegments/physicalSegment/device Identifies the device
physicalSegments/physicalSegment/device/uuid string UUID of the device
physicalSegments/physicalSegment/device/shortID positive integer Short ID of the device
physicalSegments/physicalSegment/device/name string Name of the device
physicalSegments/physicalSegment/device/ipAddress string IP Address of the device
physicalSegments/physicalSegment/segmentNameList Element containing a list of the segment names
physicalSegments/physicalSegment/segmentNameList/segmentNames string Name of the segment

Example

curl -v -k --header "X-SMS-API-KEY: <string>" "https://<sms_server>/virtualsegment/
get?"

Response

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" 
xmlns:xs="http://www.w3.org/2001/XMLSchema" >
  
  
<xs:simpleType name="uuid">
	<xs:restriction base="xs:string">
		<xs:pattern value="[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]
			{4}-[0-9a-f]{4}-[0-9a-f]{12}"/>
	</xs:restriction>
</xs:simpleType>

<xs:simpleType name="vs_name">	
	<xs:restriction base="xs:string">
 	<xs:maxLength value="127"/>
 </xs:restriction>
</xs:simpleType>

<xs:simpleType name="vlan_Constraint">
	<xs:restriction base="xs:int">
 	<xs:minInclusive value="0"/>
 	<xs:maxInclusive value="4095"/>
 </xs:restriction>
</xs:simpleType>

<xs:simpleType name="vs_description">
 <xs:restriction base="xs:string">
  <xs:maxLength value="250"/>
  </xs:restriction>
</xs:simpleType>
    

<xs:simpleType name="positionType">
	<xs:restriction base="xs:string">
 	<xs:annotation>
  	<xs:documentation>Placement of the object in the list, first, last,
				or somewhere in between</xs:documentation>
  </xs:annotation>
  	<xs:enumeration value="FIRST" />
  	<xs:enumeration value="LAST" />
  	<xs:enumeration value="ORDINAL_POSITION" />
 </xs:restriction>
</xs:simpleType>

<xs:complexType name="messageList">		
	<xs:sequence>
 	<xs:element type="xs:string" name="message" 
			minOccurs="1" 
			maxOccurs="unbounded"/>
 </xs:sequence>
</xs:complexType>
   

<xs:complexType name="deviceResult">
	<xs:all>
 	<xs:element name="device" type="deviceType"/>
  <xs:element name="success" type="xs:boolean"/>
  <xs:element name="messages" type="messageList" 
			minOccurs="0" maxOccurs="1"/>
 </xs:all>
</xs:complexType>

<xs:complexType name="deviceResultList">
	<xs:sequence>
 	<xs:element type="deviceResult" name="deviceResult" 
			minOccurs="1"	maxOccurs="unbounded"/>
 </xs:sequence>
</xs:complexType>

<xs:complexType name="rangeType">
	<xs:all>
 	<xs:annotation>
  	<xs:documentation>Range (i.e. 5 - 90)</xs:documentation>
   </xs:annotation>
   	<xs:element type="vlan_Constraint" name="start"/>
    <xs:element type="vlan_Constraint" name="end"/>
 </xs:all>
</xs:complexType>
 
   
<xs:complexType name="idName">
	<xs:choice>
 	<xs:element name="id"   type="xs:string"/> 
  <xs:element name="name" type="xs:string"/>
 </xs:choice>
</xs:complexType>

<xs:complexType name="cidrListType">
	<xs:sequence>
 	<xs:element type="xs:string" name="cidr" maxOccurs="unbounded">
  	<xs:annotation>
   	<xs:documentation>1 or more repetitions:1 
					or more repetitions:</xs:documentation>
   </xs:annotation>
  </xs:element>
 </xs:sequence>
</xs:complexType>

<xs:element name="virtualSegment"  type="virtualSegmentType" 
		nillable="false" />
	<xs:element name="virtualSegmentList" type="virtualSegmentListType" 
		nillable="false"/>

 <xs:complexType name="segmentGroupType">
 	<xs:sequence>
  	<xs:element type="segmentGroupIDType" name="segmentGroupID"/>
  </xs:sequence>
 </xs:complexType>

 <xs:complexType name="sourceAddressListType">
 	<xs:choice>
  	<xs:annotation>
   	<xs:documentation>You have a CHOICE of the next 
					2 items at this level</xs:documentation>
   </xs:annotation>
   	<xs:element type="cidrListType" name="cidrList">
    	</xs:element>
     	<xs:element type="xs:string" name="namedAddrGroup">
     </xs:element>
  </xs:choice>
</xs:complexType>

<xs:complexType name="vlanIdListType">
	<xs:sequence>
 	<xs:annotation>
  	<xs:documentation>VLAN can either be a 1 named resource 
				or a list of integer/ranges</xs:documentation>
  </xs:annotation>
  <xs:choice>
  	<xs:element type="vlanListType" name="vlanList" >
   </xs:element>
   <xs:element type="xs:string" name="namedVlanGroup">
   </xs:element>
  </xs:choice>
 </xs:sequence>
</xs:complexType>

<xs:complexType name="virtualSegmentType" >
		<xs:annotation>
			<xs:documentation>Definition of the virtual segment</xs:documentation>
  	<xs:documentation>Any optional fields should be omitted, 
				no empty elements</xs:documentation>
  	<xs:documentation>Required: Name, segmentGroup, one, 
				two or all of: [vlanIdList,sourceAddressList, 
				destinationAddressList]</xs:documentation>
  	<xs:documentation>Optional: description, and physicalSegments. 
				If physicalSegments is not provided no devices will be updated with the 
				virtual segment</xs:documentation>
		</xs:annotation>


		<xs:all>
 		<xs:element type="vs_name" name="name" />
  	<xs:element type="vs_description" name="description" 
				nillable="false" minOccurs="0"/>
  	<xs:element type="virtualSegPositionType" name="virtualSegPosition"/>
  	<xs:element type="vlanIdListType" name="vlanIdList" 
				nillable="false" minOccurs="0">
  	</xs:element>
  	<xs:element type="sourceAddressListType" name="sourceAddressList" 
				nillable="false" minOccurs="0">
  	</xs:element>
  	<xs:element type="destinationAddressListType" name="destinationAddressList" 
				nillable="false" minOccurs="0">
  	</xs:element>
  	<xs:element type="segmentGroupType" name="segmentGroup" />
  	<xs:element type="physicalSegmentsType" name="physicalSegments" 
				nillable="false" minOccurs="0">
  	</xs:element>
 	</xs:all>
	</xs:complexType>

	<xs:complexType name="virtualSegmentListType">
		<xs:sequence>
 		<xs:element type="virtualSegmentType" name="virtualSegment"  
				nillable="false" minOccurs="1" maxOccurs="unbounded">
  	</xs:element>
 	</xs:sequence>
	</xs:complexType>
	<xs:complexType name="destinationAddressListType">
		<xs:choice>
 		<xs:annotation>
  		<xs:documentation>You have a CHOICE of the next 
					2 items at this level</xs:documentation>
  	</xs:annotation>
  	<xs:element type="cidrListType" name="cidrList">
  	</xs:element>
  	<xs:element type="xs:string" name="namedAddrGroup">
  	</xs:element>
 	</xs:choice>
	</xs:complexType>

	<xs:complexType name="segmentGroupIDType">
		<xs:choice>
 		<xs:annotation>
  		<xs:documentation>You have a CHOICE of the next 
					2 items at this level</xs:documentation>
  	</xs:annotation>
  	<xs:element type="xs:string" name="id">
  	</xs:element>
  	<xs:element type="xs:string" name="name"/>
 	</xs:choice>
	</xs:complexType>

	<xs:complexType name="virtualSegPositionType">
		<xs:sequence>
 		<xs:element  nillable="true" type="xs:positiveInteger" 
				minOccurs="0" name="ordinalPosition">
  	</xs:element>
 	</xs:sequence>
 	<xs:attribute type="positionType" name="positionType"/>
	</xs:complexType>

	<xs:complexType name="deviceType">
		<xs:choice>
 		<xs:annotation>
  		<xs:documentation>You have a CHOICE of the next 
					4 items at this level</xs:documentation>
  	</xs:annotation>
  	<xs:element type="uuid" name="id"/>
  	<xs:element type="xs:positiveInteger" name="shortID"/>
  	<xs:element type="xs:string" name="name"/>
  	<xs:element type="xs:string" name="ipAddress"/>
 	</xs:choice>
	</xs:complexType>


	<xs:complexType name="segmentNameListType">
		<xs:sequence>
 		<xs:element type="xs:string" name="segmentNames" 
				minOccurs="1" maxOccurs="unbounded">
  		<xs:annotation>
   		<xs:documentation>1 or more device segment names</xs:documentation>
   	</xs:annotation>
  	</xs:element>
 	</xs:sequence>
	</xs:complexType>

	<xs:complexType name="vlanIdRangeType" >
		<xs:choice>
 		<xs:element name="vlanID" type="vlan_Constraint"/>
  	<xs:element name="vlanRange" type="rangeType"/>
 	</xs:choice>
	</xs:complexType>
	

	<xs:complexType name="vlanListType" >
		<xs:sequence>
 		<xs:element name="vlan" type="vlanIdRangeType" 
				minOccurs="1" maxOccurs="unbounded"/>
 	</xs:sequence>
	</xs:complexType>

	<xs:complexType name="physicalSegmentsType">
		<xs:sequence>
 		<xs:annotation>
  		<xs:documentation>1 or more repetitions:</xs:documentation>
  	</xs:annotation>
  	<xs:element type="deviceSegmentsType" name="physicalSegment" 
				maxOccurs="unbounded">
  	</xs:element>
 	</xs:sequence>
	</xs:complexType>
    
	<xs:complexType name="deviceSegmentsType">
		<xs:sequence>
 		<xs:element type="deviceType" name="device"/>
  	<xs:element type="segmentNameListType" name="segmentNameList"/>
 	</xs:sequence>
	</xs:complexType>
</xs:schema>