Resources

The following types of resources can be accessed and configured using aXAPIv3.

Elements

An element is a specific instance of a configurable object on the ACOS device. You can typically configure more than one of each type of element on the ACOS device. All elements exist within collections.

Example

A configured virtual port on the ACOS device is an element.

URI: /axapi/v3/slb/virtual-server/{name}/port/{port-number}+{protocol}

The following example shows retrieving a configured virtual port 80+tcp on the SLB virtual server named vs1 :

curl -k GET https://10.10.10.10/axapi/v3/slb/virtual-server/vs1/port/80+tcp \
-H "Content-Type:application/json" \
-H "Authorization: A10 ae894d193ab92f8e1f9243296efe39"

If the request succeeds, the following response will be received:

{
        "port": {
                "port-number": 80,
                "protocol": "tcp",
                "range": 0,
                "conn-limit": 8000000,
                "reset": 0,
                "no-logging": 0,
                "use-alternate-port": 0,
                "action": "enable",
                "def-selection-if-pref-failed": "def-selection-if-pref-failed",
                "ha-conn-mirror": 0,
                "skip-rev-hash": 0,
                "message-switching": 0,
                "force-routing-mode": 0,
                "reset-on-server-selection-fail": 0,
                "clientip-sticky-nat": 0,
                "extended-stats": 0,
                "snat-on-vip": 0,
                "stats-data-action": "stats-data-enable",
                "syn-cookie": 0,
                "no-auto-up-on-aflex": 0,
                "scaleout-bucket-count": 32,
                "auto": 0,
                "ipinip": 0,
                "rtp-sip-call-id-match": 0,
                "use-rcv-hop-for-resp": 0,
                "template-tcp": "default",
                "template-virtual-port": "default",
                "use-default-if-no-server": 0,
                "no-dest-nat": 0,
                "uuid": "fbb05d0a-4f10-11e5-ade5-79d397dc1ac7",
                "sampling-enable": [{
                        "counters1": "curr_conn"
                }, {
                        "counters1": "slowest_rsp_time"
                }, {
                        "counters1": "total_dns_pkts"
                }, {
                        "counters1": "total_ssl_conn"
                }]
        }
}

Collections

A collection is a set of a particular type of element. Whenever a new element of that type is created, it is added to the collection.

You can configure individual elements separately, or you can create or modify multiple elements at once by creating or replacing the collection in which they are contained.

New elements are created through the collection resource URI.

Example

The list of all virtual ports on a particular virtual server.

URI: /axapi/v3/slb/virtual-server/{name}/port/

The following example shows retrieving a list of configured virtual ports on the virtual server named vs1 :

curl -k GET https://10.10.10.10/axapi/v3/slb/virtual-server/vs1/port \
-H "Content-Type:application/json" \
-H "Authorization: A10 ae894d193ab92f8e1f9243296efe39"

If the request succeeds, the following response will be received:

{
        "port-list": [{
                "port-number": 80,
                "protocol": "tcp",
                "range": 0,
                "conn-limit": 8000000,
                "reset": 0,
                "no-logging": 0,
                "use-alternate-port": 0,
                "action": "enable",
                "def-selection-if-pref-failed": "def-selection-if-pref-failed",
                "ha-conn-mirror": 0,
                "skip-rev-hash": 0,
                "message-switching": 0,
                "force-routing-mode": 0,
                "reset-on-server-selection-fail": 0,
                "clientip-sticky-nat": 0,
                "extended-stats": 0,
                "snat-on-vip": 0,
                "stats-data-action": "stats-data-enable",
                "syn-cookie": 0,
                "no-auto-up-on-aflex": 0,
                "scaleout-bucket-count": 32,
                "auto": 0,
                "ipinip": 0,
                "rtp-sip-call-id-match": 0,
                "use-rcv-hop-for-resp": 0,
                "template-tcp": "default",
                "template-virtual-port": "default",
                "use-default-if-no-server": 0,
                "no-dest-nat": 0,
                "uuid": "fbb05d0a-4f10-11e5-ade5-79d397dc1ac7",
                "sampling-enable": [{
                        "counters1": "curr_conn"
                }, {
                        "counters1": "slowest_rsp_time"
                }, {
                        "counters1": "total_dns_pkts"
                }, {
                        "counters1": "total_ssl_conn"
                }],
                "a10-url": "/axapi/v3/slb/virtual-server/vs1/port/80+tcp"
        }]
}

Intermediate Resources

An intermediate resource contains representations of all elements and collections contained within it, but does not have any configurable parameters of its own.

Example

The SLB resource, which would include all SLB configurations on the ACOS device, including its real and virtual ports and servers.

URI: /axapi/v3/slb/

The following example shows the global SLB settings:

curl -k GET https://10.10.10.10/axapi/v3/slb \
-H "Content-Type:application/json" \
-H "Authorization: A10 ae894d193ab92f8e1f9243296efe39"

See View Entire SLB Configuration for response.

Configuration Resources

A configuration object is used to configure settings of a particular feature on the ACOS device. Unlike elements, which exist in collections, there is only one of each type of configuration object. If you do not explicitly configure parameters for a configuration object, then the default values for those parameters will apply.

Example

The global SLB settings, which include time-outs and resource usage.

URI: /axapi/v3/slb/common/

The following example shows the global slb settings:

curl -k GET https://10.10.10.10/axapi/v3/slb/common \
-H "Content-Type:application/json" \
-H "Authorization: A10 ae894d193ab92f8e1f9243296efe39"

If the request succeeds, the following response will be received:

{
        "common": {
                "extended-stats": 0,
                "stats-data-disable": 0,
                "graceful-shutdown-enable": 0,
                "rate-limit-logging": 0,
                "dsr-health-check-enable": 0,
                "reset-stale-session": 0,
                "dns-cache-enable": 0,
                "dns-cache-age": 300,
                "dns-cache-entry-size": 256,
                "dns-vip-stateless": 0,
                "buff-thresh": 0,
                "max-buff-queued-per-conn": 1000,
                "gateway-health-check": 0,
                "msl-time": 2,
                "fast-path-disable": 0,
                "l2l3-trunk-lb-disable": 0,
                "snat-gwy-for-l3": 0,
                "disable-server-auto-reselect": 0,
                "enable-l7-req-acct": 0,
                "disable-adaptive-resource-check": 0,
                "snat-on-vip": 0,
                "mss-table": 536,
                "no-auto-up-on-aflex": 0,
                "hw-compression": 0,
                "max-http-header-count": 90,
                "scale-out": 1,
                "sort-res": 0,
                "use-mss-tab": 0,
                "drop-icmp-to-vip-when-vip-down": 0,
                "uuid": "8efc8170-5dc0-11e5-9e23-c3d12b0485c7"
        }
}

Statistics Data Resources

A statistics data resource can be used to retrieve statistics of a particular element or collection. Not all elements and collections will have statistics data.

Example

The statistics data for a particular virtual port will return statistics about traffic on that port.

URI: /axapi/v3/slb/virtual-server/{name}/port/{port-number}+{protocol}/stats

The following example shows retrieving statistics for a configured virtual port 80+tcp on the SLB virtual server named vs1 :

curl -k GET https://10.10.10.10/axapi/v3/slb/virtual-server/vs1/port/80+tcp/stats \
-H "Content-Type:application/json" \
-H "Authorization: A10 ae894d193ab92f8e1f9243296efe39"

If the request succeeds, the following response will be received:

        {
        "port": {
                "stats": {
                        "curr_conn": 0,
                        "total_l4_conn": 0,
                        "total_l7_conn": 0,
                        "total_tcp_conn": 0,
                        "total_conn": 0,
                        "total_fwd_bytes": 0,
                        "total_fwd_pkts": 0,
                        "total_rev_bytes": 0,
                        "total_rev_pkts": 0,
                        "total_dns_pkts": 0,
                        "total_mf_dns_pkts": 0,
                        "es_total_failure_actions": 0,
                        "compression_bytes_before": 0,
                        "compression_bytes_after": 0,
                        "compression_hit": 0,
                        "compression_miss": 0,
                        "compression_miss_no_client": 0,
                        "compression_miss_template_exclusion": 0,
                        "curr_req": 0,
                        "total_req": 0,
                        "total_req_succ": 0,
                        "peak_conn": 0,
                        "curr_conn_rate": 0,
                        "last_rsp_time": 0,
                        "fastest_rsp_time": 0,
                        "slowest_rsp_time": 0,
                        "loc_permit": 0,
                        "loc_deny": 0,
                        "loc_conn": 0,
                        "curr_ssl_conn": 0,
                        "total_ssl_conn": 0
                },
                "a10-url": "/axapi/v3/slb/virtual-server/vs1/port/80+tcp/stats",
                "port-number": 80,
                "protocol": "tcp"
        }
}

Operational Data Resources

An operational data resource can be used to retrieve information about the operational status of a particular element or collection. Not all elements and collections have an operational status. Some elements will have an up/down status that cannot be altered. However, other statuses might include dynamic sessions which can be reset.

Example

The operational data resource for a virtual port will return information about whether the port is up or down.

URI: /axapi/v3/slb/virtual-server/{name}/port/{port-number}+{protocol}/oper

The following example shows retrieving operational data for a configured virtual port 80+tcp on the SLB virtual server named vs1 :

curl -k GET https://10.10.10.10/axapi/v3/slb/virtual-server/vs1/port/80+tcp/oper \
-H "Content-Type:application/json" \
-H "Authorization: A10 ae894d193ab92f8e1f9243296efe39"

If the request succeeds, the following response will be received:

{
        "port": {
                "oper": {
                        "state": "Down",
                        "loc_list": "",
                        "geo_location": "",
                        "level_str": "",
                        "group_id": 0,
                        "loc_max_depth": 0,
                        "loc_success": 0,
                        "loc_error": 0,
                        "loc_override": 0,
                        "loc_last": ""
                },
                "a10-url": "/axapi/v3/slb/virtual-server/vs1/port/80+tcp/oper",
                "port-number": 80,
                "protocol": "tcp"
        }
}

Baseline Data Resources

Not all elements and collections will have baseline data resources. A baseline data resource can be used to retrieve the minimum, maximum, and average value for each enabled counter over the last 30 seconds. Counters will vary per object, and can be used to help troubleshoot or improve performance. To view baseline information, first use the sampling-enable property for the object of interest and choose from the available counters. Note that only the counters used in the sampling-enable property are listed in the GET response.

Example

After using the sampling-enable property to select counters such as current connections, total DNS packets, total SSL connections, and slowest response time, then the baseline data resource can be used to retrieve the data.

URI: /axapi/v3/slb/virtual-server/{name}/port/{port-number}+{protocol}/baseline

The following example shows how to update the existing SLB virtual server named vs1 to use the sampling-enable parameter on port 80 tcp:

curl -k PUT https://10.10.10.10/axapi/v3/slb/virtual-server/vs1/port \
-H "Content-Type:application/json" \
-H "Authorization: A10 ae894d193ab92f8e1f9243296efe39"
-d '{
        "port": {
                "port-number": 80,
                "protocol": "tcp",
                "sampling-enable": [{
                        "counters1": "curr_conn"
                }, {
                        "counters1": "slowest_rsp_time"
                }, {
                        "counters1": "total_dns_pkts"
                }, {
                        "counters1": "total_ssl_conn"
                }]
        }
}'

The following example shows retrieving the baseline data for the enabled counters:

curl -k GET https://10.10.10.10/axapi/v3/slb/virtual-server/vs1/port/80+tcp/baseline \
-H "Content-Type:application/json" \
-H "Authorization: A10 ae894d193ab92f8e1f9243296efe39"

If the request succeeds, the following response will be received:

{
        "port": {
                "baseline": [{
                        "counter_name": "curr_conn",
                        "min": 0,
                        "max": 0,
                        "avg": 0
                }, {
                        "counter_name": "total_dns_pkts",
                        "min": 0,
                        "max": 0,
                        "avg": 0
                }, {
                        "counter_name": "slowest_rsp_time",
                        "min": 0,
                        "max": 0,
                        "avg": 0
                }, {
                        "counter_name": "total_ssl_conn",
                        "min": 0,
                        "max": 0,
                        "avg": 0
                }],
                "a10-url": "/axapi/v3/slb/virtual-server/vs1/port/80+tcp/baseline",
                "port-number": 80,
                "protocol": "tcp"
        }
}

Rate Data Resources

Not all elements and collections will have rate data resources. A rate data resource can be used to retrieve the average value of each counter over the following intervals:

  • last second
  • last 5 seconds
  • last 10 seconds
  • last 30 seconds

Counters will vary per object, and can be used to help troubleshoot or improve performance. To view rate information, first use the sampling-enable property for the object of interest and choose from the available counters. Note that only the counters used in the sampling-enable property are listed in the GET response.

Example

After using the sampling-enable property to select counters such as current connections, total DNS packets, total SSL connections, and slowest response time, then the rate data resource can be used to retrieve the data. See Baseline Data Resources for the sampling-enable example.

URI: /axapi/v3/slb/virtual-server/{name}/port/{port-number}+{protocol}/rate

The following example shows retrieving the rate data for the enabled counters:

curl -k GET https://10.10.10.10/axapi/v3/slb/virtual-server/vs1/port/80+tcp/rate \
-H "Content-Type:application/json" \
-H "Authorization: A10 ae894d193ab92f8e1f9243296efe39"

If the request succeeds, the following response will be received:

{
        "port": {
                "rate": [{
                        "counter_name": "curr_conn",
                        "1sec_rate": 0,
                        "5sec_rate": 0,
                        "10sec_rate": 0,
                        "30sec_rate": 0
                }, {
                        "counter_name": "total_dns_pkts",
                        "1sec_rate": 0,
                        "5sec_rate": 0,
                        "10sec_rate": 0,
                        "30sec_rate": 0
                }, {
                        "counter_name": "slowest_rsp_time",
                        "1sec_rate": 0,
                        "5sec_rate": 0,
                        "10sec_rate": 0,
                        "30sec_rate": 0
                }, {
                        "counter_name": "total_ssl_conn",
                        "1sec_rate": 0,
                        "5sec_rate": 0,
                        "10sec_rate": 0,
                        "30sec_rate": 0
                }],
                "a10-url": "/axapi/v3/slb/virtual-server/vs1/port/80+tcp/rate",
                "port-number": 80,
                "protocol": "tcp"
        }
}

UUID

Every object gets an auto-generated unique identifier assigned when it is created. Once you save the running configuration, the UUID remains the same regardless if the ACOS device is reloaded or fails over in VCS mode.

Example

When you configure a real server, the server gets a UUID. When you configure a virtual port on a virtual server, that element gets a UUID. When you add a service group, that collection gets a UUID. The UUID can be used as an endpoint to retrieve information about an object, to update an object, or to delete an object.

URI: /axapi/v3/uuid/{id}

The following example shows using the UUID of fbb05d0a-4f10-11e5-ade5-79d397dc1ac7 to retrieve a configured virtual port 80 tcp on the SLB virtual server named vs1:

curl -k GET https://10.10.10.10/axapi/v3/uuid/fbb05d0a-4f10-11e5-ade5-79d397dc1ac7 \
-H "Content-Type:application/json" \
-H "Authorization: A10 ae894d193ab92f8e1f9243296efe39"

If the request succeeds, the following response will be received:

{
        "port": {
                "port-number": 80,
                "protocol": "tcp",
                "range": 0,
                "conn-limit": 8000000,
                "reset": 0,
                "no-logging": 0,
                "use-alternate-port": 0,
                "action": "enable",
                "def-selection-if-pref-failed": "def-selection-if-pref-failed",
                "ha-conn-mirror": 0,
                "skip-rev-hash": 0,
                "message-switching": 0,
                "force-routing-mode": 0,
                "reset-on-server-selection-fail": 0,
                "clientip-sticky-nat": 0,
                "extended-stats": 0,
                "snat-on-vip": 0,
                "stats-data-action": "stats-data-enable",
                "syn-cookie": 0,
                "no-auto-up-on-aflex": 0,
                "scaleout-bucket-count": 32,
                "auto": 0,
                "ipinip": 0,
                "rtp-sip-call-id-match": 0,
                "use-rcv-hop-for-resp": 0,
                "template-tcp": "default",
                "template-virtual-port": "default",
                "use-default-if-no-server": 0,
                "no-dest-nat": 0,
                "uuid": "fbb05d0a-4f10-11e5-ade5-79d397dc1ac7",
                "sampling-enable": [{
                        "counters1": "curr_conn"
                }, {
                        "counters1": "slowest_rsp_time"
                }, {
                        "counters1": "total_dns_pkts"
                }, {
                        "counters1": "total_ssl_conn"
                }]
        }
}