account or zone Load Balancer Details
GET/{accounts_or_zones}/{account_or_zone_id}/load_balancers/{load_balancer_id}
Fetch a single configured account or zone-scoped load balancer.
Security
<details>
<summary>API Token</summary>
The preferred authorization scheme for interacting with the Cloudflare API. <a href="https://developers.cloudflare.com/fundamentals/api/get-started/create-token/">Create a token</a>.
Example:<code>Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY</code>
</details>
<details>
<summary>API Email + API Key</summary>
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
Example:<code>X-Auth-Email: user@example.com</code>
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:<code>X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194</code>
</details>
Accepted Permissions (at least one required)
Load Balancers Account Write``Load Balancers Account Read
P ath ParametersExpand Collapse
load_balancer_id: string
account_id: optional string
The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
zone_id: optional string
The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
ReturnsExpand Collapse
<details>
<summary>
errors: array of <a href="https://developers.cloudflare.com/api/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20response_info%20%3E%20(schema)">ResponseInfo</a> { code, message, documentation_url, source }
</summary>
code: number
minimum1000
<a href="#(resource)%20%24shared%20%3E%20(model)%20response_info%20%3E%20(schema)%20%3E%20(property)%20code">Link to this property</a>
message: string
<a href="#(resource)%20%24shared%20%3E%20(model)%20response_info%20%3E%20(schema)%20%3E%20(property)%20message">Link to this property</a>
documentation_url: optional string
<a href="#(resource)%20%24shared%20%3E%20(model)%20response_info%20%3E%20(schema)%20%3E%20(property)%20documentation_url">Link to this property</a>
<details>
<summary>
source: optional object {pointer }
</summary>
pointer: optional string
<a href="#(resource)%20%24shared%20%3E%20(model)%20response_info%20%3E%20(schema)%20%3E%20(property)%20source%20%3E%20(property)%20pointer">Link to this property</a>
</details>
<a href="#(resource)%20%24shared%20%3E%20(model)%20response_info%20%3E%20(schema)%20%3E%20(property)%20source">Link to this property</a>
</details>
<details>
<summary>
messages: array of <a href="https://developers.cloudflare.com/api/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20response_info%20%3E%20(schema)">ResponseInfo</a> { code, message, documentation_url, source }
</summary>
code: number
minimum1000
<a href="#(resource)%20%24shared%20%3E%20(model)%20response_info%20%3E%20(schema)%20%3E%20(property)%20code">Link to this property</a>
message: string
<a href="#(resource)%20%24shared%20%3E%20(model)%20response_info%20%3E%20(schema)%20%3E%20(property)%20message">Link to this property</a>
documentation_url: optional string
<a href="#(resource)%20%24shared%20%3E%20(model)%20response_info%20%3E%20(schema)%20%3E%20(property)%20documentation_url">Link to this property</a>
<details>
<summary>
source: optional object {pointer }
</summary>
pointer: optional string
<a href="#(resource)%20%24shared%20%3E%20(model)%20response_info%20%3E%20(schema)%20%3E%20(property)%20source%20%3E%20(property)%20pointer">Link to this property</a>
</details>
<a href="#(resource)%20%24shared%20%3E%20(model)%20response_info%20%3E%20(schema)%20%3E%20(property)%20source">Link to this property</a>
</details>
<details>
<summary>
result: <a href="https://developers.cloudflare.com/api/resources/load_balancers#(resource)%20load_balancers%20%3E%20(model)%20load_balancer%20%3E%20(schema)">LoadBalancer</a> { id, adaptive_routing, country_pools, 21 more }
</summary>
id: optional string
<a href="#(resource)%20load_balancers%20%3E%20(method)%20get%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20load_balancer%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>
<details>
<summary>
adaptive_routing: optional <a href="https://developers.cloudflare.com/api/resources/load_balancers#(resource)%20load_balancers%20%3E%20(model)%20adaptive_routing%20%3E%20(schema)">AdaptiveRouting</a> { failover_across_pools }
Controls features that modify the routing of requests to pools and origins in response to dynamic conditions, such as during the interval between active health monitoring requests. For example, zero-downtime failover occurs immediately when an origin becomes unavailable due to HTTP 521, 522, or 523 response codes. If there is another healthy origin in the same pool, the request is retried once against this alternate origin.
</summary>
failover_across_pools: optional boolean
Extends zero-downtime failover of requests to healthy origins from alternate pools, when no healthy alternate exists in the same pool, according to the failover order defined by traffic and origin steering. When set false (the default) zero-downtime failover will only occur between origins within the same pool. See <code>session_affinity_attributes</code> for control over when sessions are broken or reassigned.
<a href="#(resource)%20load_balancers%20%3E%20(model)%20load_balancer%20%3E%20(schema)%20%3E%20(property)%20adaptive_routing%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20adaptive_routing%20%3E%20(schema)%20%3E%20(property)%20failover_across_pools">Link to this property</a>
</details>
<a href="#(resource)%20load_balancers%20%3E%20(method)%20get%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20load_balancer%20%3E%20(schema)%20%3E%20(property)%20adaptive_routing">Link to this property</a>
country_pools: optional map[array of string]
A mapping of country codes to a list of pool IDs (ordered by their failover priority) for the given country. Any country not explicitly defined will fall back to using the corresponding region_pool mapping if it exists else to default_pools.
<a href="#(resource)%20load_balancers%20%3E%20(method)%20get%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20load_balancer%20%3E%20(schema)%20%3E%20(property)%20country_pools">Link to this property</a>
created_on: optional string
<a href="#(resource)%20load_balancers%20%3E%20(method)%20get%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20load_balancer%20%3E%20(schema)%20%3E%20(property)%20created_on">Link to this property</a>
default_pools: optional array of <a href="https://developers.cloudflare.com/api/resources/load_balancers#(resource)%20load_balancers%20%3E%20(model)%20default_pools%20%3E%20(schema)">DefaultPools</a>
A list of pool IDs ordered by their failover priority. Pools defined here are used by default, or when region_pools are not configured for a given region.
<a href="#(resource)%20load_balancers%20%3E%20(method)%20get%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20load_balancer%20%3E%20(schema)%20%3E%20(property)%20default_pools">Link to this property</a>
description: optional string
Object description.
<a href="#(resource)%20load_balancers%20%3E%20(method)%20get%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20load_balancer%20%3E%20(schema)%20%3E%20(property)%20description">Link to this property</a>
enabled: optional boolean
Whether to enable (the default) this load balancer.
<a href="#(resource)%20load_balancers%20%3E%20(method)%20get%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20load_balancer%20%3E%20(schema)%20%3E%20(property)%20enabled">Link to this property</a>
fallback_pool: optional string
The pool ID to use when all other pools are detected as unhealthy.
<a href="#(resource)%20load_balancers%20%3E%20(method)%20get%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20load_balancer%20%3E%20(schema)%20%3E%20(property)%20fallback_pool">Link to this property</a>
<details>
<summary>
location_strategy: optional <a href="https://developers.cloudflare.com/api/resources/load_balancers#(resource)%20load_balancers%20%3E%20(model)%20location_strategy%20%3E%20(schema)">LocationStrategy</a> { mode, prefer_ecs }
Controls location-based steering for non-proxied requests. See <code>steering_policy</code> to learn how steering is affected.
</summary>
<details>
<summary>
mode: optional "pop"or "resolver_ip"
Determines the authoritative location when ECS is not preferred, does not exist in the request, or its GeoIP lookup is unsuccessful.
- <code>"pop"</code>: Use the Cloudflare PoP location.
- <code>"resolver_ip"</code>: Use the DNS resolver GeoIP location. If the GeoIP lookup is unsuccessful, use the Cloudflare PoP location.
</summary>
One of the following:
"pop"
<a href="#(resource)%20load_balancers%20%3E%20(model)%20load_balancer%20%3E%20(schema)%20%3E%20(property)%20location_strategy%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20location_strategy%20%3E%20(schema)%20%3E%20(property)%20mode%20%3E%20(member)%200">Link to this property</a>
"resolver_ip"
<a href="#(resource)%20load_balancers%20%3E%20(model)%20load_balancer%20%3E%20(schema)%20%3E%20(property)%20location_strategy%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20location_strategy%20%3E%20(schema)%20%3E%20(property)%20mode%20%3E%20(member)%201">Link to this property</a>
</details>
<a href="#(resource)%20load_balancers%20%3E%20(model)%20load_balancer%20%3E%20(schema)%20%3E%20(property)%20location_strategy%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20location_strategy%20%3E%20(schema)%20%3E%20(property)%20mode">Link to this property</a>
<details>
<summary>
prefer_ecs: optional "always"or "never"or "proximity"or "geo"
Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the authoritative location.
- <code>"always"</code>: Always prefer ECS.
- <code>"never"</code>: Never prefer ECS.
- <code>"proximity"</code>: Prefer ECS only when <code>steering_policy="proximity"</code>.
- <code>"geo"</code>: Prefer ECS only when <code>steering_policy="geo"</code>.
</summary>
One of the following:
"always"
<a href="#(resource)%20load_balancers%20%3E%20(model)%20load_balancer%20%3E%20(schema)%20%3E%20(property)%20location_strategy%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20location_strategy%20%3E%20(schema)%20%3E%20(property)%20prefer_ecs%20%3E%20(member)%200">Link to this property</a>
"never"
<a href="#(resource)%20load_balancers%20%3E%20(model)%20load_balancer%20%3E%20(schema)%20%3E%20(property)%20location_strategy%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20location_strategy%20%3E%20(schema)%20%3E%20(property)%20prefer_ecs%20%3E%20(member)%201">Link to this property</a>
"proximity"
<a href="#(resource)%20load_balancers%20%3E%20(model)%20load_balancer%20%3E%20(schema)%20%3E%20(property)%20location_strategy%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20location_strategy%20%3E%20(schema)%20%3E%20(property)%20prefer_ecs%20%3E%20(member)%202">Link to this property</a>
"geo"
<a href="#(resource)%20load_balancers%20%3E%20(model)%20load_balancer%20%3E%20(schema)%20%3E%20(property)%20location_strategy%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20location_strategy%20%3E%20(schema)%20%3E%20(property)%20prefer_ecs%20%3E%20(member)%203">Link to this property</a>
</details>
<a href="#(resource)%20load_balancers%20%3E%20(model)%20load_balancer%20%3E%20(schema)%20%3E%20(property)%20location_strategy%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20location_strategy%20%3E%20(schema)%20%3E%20(property)%20prefer_ecs">Link to this property</a>
</details>
<a href="#(resource)%20load_balancers%20%3E%20(method)%20get%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20load_balancer%20%3E%20(schema)%20%3E%20(property)%20location_strategy">Link to this property</a>
modified_on: optional string
<a href="#(resource)%20load_balancers%20%3E%20(method)%20get%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20load_balancer%20%3E%20(schema)%20%3E%20(property)%20modified_on">Link to this property</a>
name: optional string
The DNS hostname to associate with your Load Balancer. If this hostname already exists as a DNS record in Cloudflare’s DNS, the Load Balancer will take precedence and the DNS record will not be used.
<a href="#(resource)%20load_balancers%20%3E%20(method)%20get%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20load_balancer%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>
networks: optional array of string
List of networks where Load Balancer or Pool is enabled.
<a href="#(resource)%20load_balancers%20%3E%20(method)%20get%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20load_balancer%20%3E%20(schema)%20%3E%20(property)%20networks">Link to this property</a>
<details>
<summary>
pool_sets: optional array of object {disabled, fixed_response, match, 2 more }
An optional list of pool sets, evaluated in array order with first match wins. Pool sets are independent from the standard steering fields (<code>region_pools</code> / <code>country_pools</code> / <code>pop_pools</code> / <code>default_pools</code> / <code>steering_policy</code> / <code>random_steering</code> / <code>fallback_pool</code> / <code>rules</code>). On a PATCH, an empty array (<code>pool_sets: []</code>) clears all pool sets, while omitting the field leaves existing pool sets unchanged.
</summary>
disabled: optional boolean
Disable this specific pool set. It will no longer be evaluated.
<a href="#(resource)%20load_balancers%20%3E%20(method)%20get%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20load_balancer%20%3E%20(schema)%20%3E%20(property)%20pool_sets%20%3E%20(items)%20%3E%20(property)%20disabled">Link to this property</a>
<details>
<summary>
fixed_response: optional object {content_type, location, message_body, status_code }
A collection of fields used to directly respond to the client instead of routing to a pool. When supplied on a rule, that rule stops further rule evaluation.
</summary>
content_type: optional string
The http ‘Content-Type’ header to include in the response.
maxLength32
<a href="#(resource)%20load_balancers%20%3E%20(method)%20get%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20load_balancer%20%3E%20(schema)%20%3E%20(property)%20pool_sets%20%3E%20(items)%20%3E%20(property)%20fixed_response%20%3E%20(property)%20content_type">Link to this property</a>
location: optional string
The http ‘Location’ header to include in the response.
maxLength2048
<a href="#(resource)%20load_balancers%20%3E%20(method)%20get%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20load_balancer%20%3E%20(schema)%20%3E%20(property)%20pool_sets%20%3E%20(items)%20%3E%20(property)%20fixed_response%20%3E%20(property)%20location">Link to this property</a>
message_body: optional string
Text to include as the http body.
maxLength1024
<a href="#(resource)%20load_balancers%20%3E%20(method)%20get%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20load_balancers%20%3E%20(model)%20load_balancer%20%3E%20(schema)%20%3E%20(property)%20pool_sets%20%3E%20(items)%20%3E%20(property)%20fixed_response%20%3E%20(property)%20message_body">Link to this property</a>
