Assigned Port

You can use REST API calls to obtain information about ports assigned to edge (also called "access") switches.
new for 5.11

The assigned port refers to the specific port assignment that has been applied to the edge switch. This assignment maps to the vni and the switch, and includes the assigned VXLan. Only assigned ports are managed by the system.

The following table lists the properties that can be used in the body of an assigned-port-related request and/or are provided in the response body. (In the "Optional" column, if a default value is applicable, it is listed in angle brackets (< >).)

Resource: Assigned Port

Property Name Type Editable Sort/Filter Optional in Request/Response Body? Description
nasPort String No sortBy, like No The assigned port,

links:

self, vxlanNetworkIdentifiers, vlan, switch

Link Yes* No. No

Self-referencing link.

The switch for this point, a link to the assigned vxlanNetworkIdentifiers, and the assigned vlan.

Properties URIs and Actions

The following table indicates the URIs that you can append to the root URI, along with the actions you can take, and possible return codes you can receive.

Property URIs and Actions

URI Action Description Return Codes

networkSegmentationGroups/{groupGuid}/distributionSwitches/{dsGuid}/switches/{guid}/assignedPorts

GET Returns the list of assigned ports on the edge switch. This is not all of the ports, but only those that have been assigned a vni/vxlan mapping. If the Cloudpath server has not been correctly configured for SmartZone integration, this URI will generate a 403 message.

200- OK

401 - Unauthorized

403 - Forbidden

404 - Not Found

/networkSegmentationGroups/{groupGuid}/distributionSwitches/{dsGuid}/switches/{swguid}/assignedPorts?nasPort={nasPortId}

GET

Returns the specific assigned port on the edge switch. If the Cloudpath server has not been correctly configured for SmartZone integration, this URI will generate a 403 message.

Note: The nasPort must be passed as a GET parameter; this differs from other APIs because of the naming of nasPorts.

200- OK

401 - Unauthorized

403 - Forbidden

404 - Not Found

Example of Using GET for Assigned Ports

This example demonstrates how to obtain information about all the assigned ports in a specified edge switch.

URI:

This example uses the following URI:

https://raynsg.cloudpath.net/admin/publicApi/networkSegmentationGroups/4c878282-d6ee-4133-98e4-37b1d113caa1/distributionSwitches/8C7A153CDCFA/switches/C0C520B0C4F5/assignedPorts

where:

  • https://raynsg.cloudpath.net/admin/publicApi is the root URI of the Cloudpath system being used (must include https, as shown).
  • 4c878282-d6ee-4133-98e4-37b1d113caa1 is the GUID of the network segmentation group
  • 8C7A153CDCFA is the GUID of the distribution list
  • C0C520B0C4F5 is the GUID of one of the edge switches

Request Headers:

The following table shows the required request headers for this URI example, with an example value of an active token that must be pasted into the Authorization header value:

Request Headers

Key Value
Content-type application/json
Authorization eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJqZWZmLnJob2RpZUBjb21tc2NvcGUuY29tIiwicm9sZVBrIjoiMjEwMDAiLCJhY2NvdW50QWRtaW5QayI6IjIiLCJhcGlLZXkiOiJaV2NjTGpQZUdZMGUiLCJpYXQiOjE1NzU1NzUxNTcsImV4cCI6MTU3NTU3NTQ1N30.2q4KTyDUevkAAz7mJyp529Be1-ip3EC8P06Xarmz5ao

Request Body:

None required.

Action:

Use the GET action to send the request.

Response Body:

Once the request is sent, you will receive a "Status: 200 OK" if the GET is successful. The response body provides information about all the assigned ports of the specified edge switch:

{
    "page": {
        "page": 1,
        "pageSize": 2,
        "totalCount": 2
    },
    "contents": [
        {
            "nasPort": "1/1/10",
            "links": [
                {
                    "rel": "self",
                    "href": "https://nsg192.cloudpath.net/admin/publicApi/networkSegmentationGroups/4c878282-d6ee-4133-98e4-37b1d113caa1/distributionSwitches/8C7A153CDCFA/switches/C0C520B0C4F5/assignedPorts?nasPort=1/1/10",
                    "hreflang": null,
                    "media": null,
                    "title": null,
                    "type": null,
                    "deprecation": null
                },
                {
                    "rel": "edgeSwitches",
                    "href": "https://nsg192.cloudpath.net/admin/publicApi/networkSegmentationGroups/4c878282-d6ee-4133-98e4-37b1d113caa1/distributionSwitches/8C7A153CDCFA/switches/C0C520B0C4F5",
                    "hreflang": null,
                    "media": null,
                    "title": null,
                    "type": null,
                    "deprecation": null
                },
                {
                    "rel": "vlans",
                    "href": "https://nsg192.cloudpath.net/admin/publicApi/networkSegmentationGroups/4c878282-d6ee-4133-98e4-37b1d113caa1/distributionSwitches/8C7A153CDCFA/vlans/301",
                    "hreflang": null,
                    "media": null,
                    "title": null,
                    "type": null,
                    "deprecation": null
                }
            ]
        },
        {
            "nasPort": "1/1/9",
            "links": [
                {
                    "rel": "self",
                    "href": "https://nsg192.cloudpath.net/admin/publicApi/networkSegmentationGroups/4c878282-d6ee-4133-98e4-37b1d113caa1/distributionSwitches/8C7A153CDCFA/switches/C0C520B0C4F5/assignedPorts?nasPort=1/1/9",
                    "hreflang": null,
                    "media": null,
                    "title": null,
                    "type": null,
                    "deprecation": null
                },
                {
                    "rel": "edgeSwitches",
                    "href": "https://nsg192.cloudpath.net/admin/publicApi/networkSegmentationGroups/4c878282-d6ee-4133-98e4-37b1d113caa1/distributionSwitches/8C7A153CDCFA/switches/C0C520B0C4F5",
                    "hreflang": null,
                    "media": null,
                    "title": null,
                    "type": null,
                    "deprecation": null
                },
                {
                    "rel": "vlans",
                    "href": "https://nsg192.cloudpath.net/admin/publicApi/networkSegmentationGroups/4c878282-d6ee-4133-98e4-37b1d113caa1/distributionSwitches/8C7A153CDCFA/vlans/300",
                    "hreflang": null,
                    "media": null,
                    "title": null,
                    "type": null,
                    "deprecation": null
                }
            ]
        }
    ]
}