NSX-T Data Center REST API

Get state of the given IpAddressBlock

Get state of a given IPAddressBlock. It lists all the allocated IPs and subnets created using that block per Project and VPCs.

Request:

Method:
GET
URI Path(s):
/policy/api/v1/infra/ip-blocks/state
/policy/api/v1/orgs/{org-id}/projects/{project-id}/infra/ip-blocks/state
Request Headers:
n/a
Query Parameters:
IntentPathRequestParams+
Request Body:
n/a

Example Request:

GET https://<policy-mgr>/policy/api/v1/infra/ip-blocks/state?intent_path=/infra/ip-blocks/ip_block_marketing

Successful Response:

Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
IpAddressBlockState+

Example Response:

{ "projects": [ { "path": "/orgs/default/projects/Marketing_project", "vpc_subnets": [ { "policy_path": "/orgs/default/projects/Marketing_project/vpcs/marketing_vpc/subnets/marketing_vpc_subnet", "size": 16, "creation_time": "1725350609432" } ], "allocations": [ { "cidr": "192.168.3.0", "allocation_time": "1725350578838" } ] }, { "path": "/orgs/default/projects/Sales_project", "vpc_subnets": [], "allocations": [ { "cidr": "192.168.3.11", "allocation_time": "1725448847267" }, { "cidr": "192.168.3.10", "allocation_time": "1725431042422" } ] } ] }

Required Permissions:

read

Feature:

policy_ipam

Additional Errors: