Action - Set Loadbalancing Method

This API is used to initiate action Set load balancing method on one or more ADC objects for which the action applies to. Suspend action is supported on the following object types:
  • F5 – LTM pools

  • Citrix – GSLB Virtual Server and SLB Virtual Server

  • A10 - FQDN and SLB Service Group

  • AVI - SLB Pool

  • Infoblox - LBDN and Pool

  • Cloudflare - LoadBalancer and Pool

Before you begin

Before attempting to initiate suspend action with this API, users must ensure the ACF permission is available:
  • ADC > ControlCenter > Actions > LB mode
This can be checked under Accounts > Role > Authorized Functions.

Request Structure

Endpoint: /adc-device-object-action-lbmethod
Type: PUT
Sample URL: https://<IP/HostName/TenantName>:<GWPORT>/avxapi/adc-device-object-action-lbmethod?gwsource=external

To understand the elements of the sample URL, click here.

Headers:
Content-Type: application/json
Table 1. Input Parameter
Name Description
sessionId

Header

(Mandatory) Specifies the session ID of the user session received after login.

Type: String

Constraints: The session ID is used when username and password are not provided.

username

Header

(Mandatory) Specifies the login username used to access the AppViewX.

Type: String

Constraints: The username, along with the password, is used when the session ID is not provided.

password

Header

(Mandatory) Specifies the login password used to access the AppViewX.

Type: String

Constraints: The password, along with the username, is used when the session ID is not provided.

Content-Type

Header

(Mandatory) Specifies the format of the data in the payload.

Type: String

Constraints: The value of this param must be ‘application/json’.

gwsource

Query

(Mandatory) Specifies the source from which the request is triggered. The options are:
  • web
  • external
Type: String
payload

Body

(Mandatory) Contains all the params to be sent in the request body for the post request. See Payload section for more details.

Payload

Name Description
objects

Key value pair[]

(Mandatory) Object information containing resource id and parent resource id. For object details, click here.
lbMode

String

(Mandatory) Load balancing mode to set. Possibles values for lbMode can be found here.
Table 2. Object Details
Name Description
_id

String

Resource ID of the object.
Note: Use the search API to search/get the resource ID.
parent_id

String

Resource ID of the parent object.
Note: Use the search API to search/get the resource ID.

Response Structure

  • Status Code: 202 OK
  • Message: Successful
  • Headers:
    • Content-Type: application/json
Name Description
response

String

Success message or failure description in case of error.
message

String

Success message along with the objectIds or failure description in case of error.
appStatusCode

String

Application specific status code for the response. Will be non-null for failure response.
tags

String

More info in case of failure response.

Status Codes

HTTP Status Code appStatusCode Message Possible remediation
202 Accepted - Action triggered for the following <n> object(s) : <resourceIds> -
400 Bad Request ADC_CC_05014 Invalid input. Please provide 'lbMode' to perform action! Check and ensure if a non-null/non-empty value is given in the payload field - ‘lbMode’.
400 Bad Request ADC_OBJ_ACTION_001 Object id not found. Check and ensure if a non-null/non-empty value is given in paylo.ad field - ‘objects._id’.
400 Bad Request ADC_OBJ_ACTION_002 parent object id not found. Check and ensure if a non-null/non-empty value is given in the payload field - ‘objects.parent_id’.
400 Bad Request ADC_OBJ_ACTION_003 No object(s) not found to perform action. Check and ensure if a non-null/non-empty value is given in the payload field - ‘objects’.
400 Bad Request ADC_OBJ_ACTION_004 Action is invalid for the given objects. Check for supported objects for the action and chan.ge the request objectId.
403 Forbidden ADC_DASH_0029 No given object(s) have Write permission. Check and ensure if the requested object has Read Write permission.
403 Forbidden ADC_INV_1077 Action cannot be performed on unmanaged device object(s) -

Sample Request/Response

Use Case

Trigger set load balancing mode action on object with resource id - lp:@5f369cc10ca9846e86a13e95:@ms_pool_1:@Common

Request URL

https://<IP/HostName/TenantName>:<GWPORT>/avxapi/adc-device-object-action-lbmethod

Sample Request
{
  "payload": {
    "objects": [
      {
        "_id": "lp:@5f369cc10ca9846e86a13e95:@ms_pool_1:@Common",
        "parent_id": "vs:@5f369cc10ca9846e86a13e95:@CVS:@Common"
      }
    ],
    "lbMode": "round-robin"
  }
}
Sample Response
{
  "response": "Action triggered successfully.",
  "message": "Action triggered for the following 1 object(s) : lp:@5f369cc10ca9846e86a13e95:@ms_pool_1:@Common",
  "appStatusCode": null,
  "tags": null,
  "headers": null
}

Reference

Understanding the sample URL:
  • IP/HostName/TenantName: Replace with the actual IP address, hostname, or tenant name based on the specific configuration in AppViewX.
    • IP: A unique identifier assigned to each device connected to a computer network that uses the Internet Protocol for communication

      The IP address will be included in the endpoint URL for an on-prem deployment.

    • HostName: A human-readable label assigned to a device (host) on a network

      The hostname will be included in the endpoint URL for an on-prem deployment.

    • TenantName: An identifier label for a tenant given to indicate which tenant's data the API request will access/modify

      The tenant name will be included in the endpoint URL for a SaaS deployment.

  • GWPORT: AppViewX gateway port

    A gateway port refers to a network port through which data is sent and received to communicate with a gateway in an on-prem deployment.

    Example: 31443

  • avxapi: Path parameter value (static) that is part of the endpoint's URL
  • Endpoint: Endpoint of the API, for example: execute-hook
  • gwsource: Source or origin of a gateway, for example: external.

What's Next