Management Plane API > Networking > Services > Loadbalancer

Retrieve a paginated list of load balancer rules

Retrieve a paginated list of load balancer rules.

Request:

Method:
GET
URI Path(s):
/api/v1/loadbalancer/rules
Request Headers:
n/a
Query Parameters:
ListRequestParameters+
Request Body:
n/a

Example Request:

GET https://<nsx-mgr>/api/v1/loadbalancer/rules

Successful Response:

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

Example Response:

[{ "resource_type" : "LbRule", "id" : "b6a5bffa-f6a9-447c-936f-4633f9eb43a7", "display_name": "LoginRouteRule", "description": "LbRule to route login requests to dedicated pool", "match_conditions" : [{ "type": "LbHttpRequestUriCondition", "match_type": "EQUALS", "uri": "/login", "inverse": false }], "match_strategy" : "ALL", "phase" : "HTTP_FORWARDING" "actions" : [{ "type": "LbSelectPoolAction", "pool_id": "b6a5bffa-f6a9-447c-6666-4633f9eb1234" }] "_create_time" : 1478304339963, "_create_user" : "admin", "_last_modified_user" : "admin", "_system_owned" : false, "_last_modified_time" : 1478304339963, "_revision" : 0 }, { "resource_type" : "LbRule", "id" : "b6a5bffa-f6a9-447c-936f-4633f9eb43a7", "display_name": "URIRewriteRule", "description": "Sample URI rewrite rule", "match_conditions" : [{ "type": "LbHttpRequestUriCondition", "match_type": "REGEX", "uri": "/news/(?<year>\\d+)/(?<month>\\d+)/(?<article>.*)", "inverse": false }], "match_strategy" : "ALL", "phase" : "HTTP_REQUEST_REWRITE", "actions" : [{ "type": "LbHttpRequestUriRewriteAction", "uri": "/news/$year-$month-$article", "uri_arguments": "" }] "_create_time" : 1478304339963, "_create_user" : "admin", "_last_modified_user" : "admin", "_system_owned" : false, "_last_modified_time" : 1478304339963, "_revision" : 0 }, { "resource_type" : "LbRule", "id" : "b6a5bffa-f6a9-447c-936f-4633f9eb43a6", "display_name": "ServiceMaintenanceRule", "description": "LbRule to be used while system is down", "match_conditions" : [], "match_strategy" : "ALL", "phase" : "HTTP_FORWARDING", "actions" : [{ "type": "LbHttpRejectAction", "reply_status": "503", }] "_create_time" : 1478304339963, "_create_user" : "admin", "_last_modified_user" : "admin", "_system_owned" : false, "_last_modified_time" : 1478304339963, "_revision" : 0 } ]

Required Permissions:

read

Feature:

lb_rules

Additional Errors: