Generate NSX-T logical segment API payloads for overlay and VLAN transport zones with curl and Policy API JSON output.
NSX-T Data Center uses logical segments as the software-defined equivalent of a VLAN or portgroup. A segment provides layer-2 connectivity for virtual machines and containers and can be backed by an overlay transport zone (using GENEVE encapsulation over physical underlay) or a VLAN transport zone (mapped directly to physical VLANs). Segments connect to Tier-1 or Tier-0 gateways to provide routing and access to external networks.
Select the transport zone type (Overlay for GENEVE-based microsegmentation, VLAN for physical-network bridging), enter the segment name and gateway CIDR, and optionally specify the connected gateway path. The tool generates the NSX-T Policy API JSON payload that can be sent directly to the NSX Manager REST API using <code>PATCH /policy/api/v1/infra/segments/SEGMENT_ID</code>. The curl tab shows the complete command with authentication headers.
The Policy API uses PATCH (not POST) for idempotent segment creation. For VLAN transport zones, enter VLAN IDs as individual values or ranges (for example: 100, 200-210); the generator expands ranges into the integer array required by the API. The connected gateway path follows the format /infra/tier-1s/your-gw-id or /infra/tier-0s/your-gw-id.