# Network › Global LB › Record sets API

> Part of the OVHcloud developer hub. Index of every page and section: https://developers.eu.ovhcloud.com/llms.txt
> The Network product's sections: https://developers.eu.ovhcloud.com/reference/network/llms.txt
> Everything in one file: https://developers.eu.ovhcloud.com/llms-full.txt

> 5 operations of the OVHcloud API. Calls carry `authorization: Bearer $OVH_TOKEN`; the EU host is shown, Canada and the United States answer on api.ca.ovhcloud.com and api.us.ovhcloud.com.

Page: https://developers.eu.ovhcloud.com/reference/network/global-lb/record-sets/

OpenAPI v1: https://api.eu.ovhcloud.com/v1/__schemas/developer-hub-navigation/network/global-lb/record-sets.json?format=openapi3
OpenAPI v2: https://api.eu.ovhcloud.com/v2/__schemas/developer-hub-navigation/network/global-lb/record-sets.json?format=openapi3

## Operations

- `GET /dns/gslb/zone/{zoneId}/recordSet` — List GSLB record sets in a hosted zone
- `GET /dns/gslb/zone/{zoneId}/recordSet/{recordSetId}` — Get a GSLB record set
- `POST /dns/gslb/zone/{zoneId}/recordSet` — Create a GSLB record set
- `PATCH /dns/gslb/zone/{zoneId}/recordSet/{recordSetId}` — Update a GSLB record set. Name, type, routing policy and failover role are immutable.
- `DELETE /dns/gslb/zone/{zoneId}/recordSet/{recordSetId}` — Delete a GSLB record set

## List GSLB record sets in a hosted zone

`GET /v2/dns/gslb/zone/{zoneId}/recordSet`

Link: https://developers.eu.ovhcloud.com/reference/network/global-lb/record-sets/#getAllGslbRecordSets

**Status:** Alpha version  
**IAM actions:** `gslbZone:apiovh:record/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `X-Pagination-Cursor` | header | string |  | Pagination cursor |
| `X-Pagination-Size` | header | integer |  | Pagination size |
| `name` | query | string |  | Filter by exact record set name, ignoring case. The trailing dot is optional. |
| `type` | query | dns.gslb.RecordTypeEnum |  | Filter by DNS record type — one of `A`, `AAAA`, `CNAME`, `MX`, `TXT` |
| `zoneId` | path | string (uuid) | yes | Zone ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dns.gslb.RecordSet[] | successful operation |
| 400 | object | Error 400 response |
| 404 | object | Error 404 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `chainTarget` | string | read-only | Target record name for chained routing. Null when the record set is not chained. |
| `coordinates` | dns.gslb.Coordinates | read-only | Endpoint coordinates for GEOPROXIMITY |
| `coordinates.latitude` | number | yes | Latitude from -90 to 90 degrees |
| `coordinates.longitude` | number | yes | Longitude from -180 to 180 degrees |
| `createdAt` | string (date-time) | read-only | Creation timestamp |
| `evaluateTargetHealth` | boolean | read-only | Whether to fall through to the global scope when a GEOLOCATION chain target is unhealthy, always false for other record sets |
| `failover` | dns.gslb.FailoverTypeEnum | read-only | Failover role of this entry, null for routing policies other than FAILOVER — one of `PRIMARY`, `SECONDARY` |
| `geoLocation` | dns.gslb.GeoLocation | read-only | Geographic routing scope, required for GEOLOCATION routing. Null when not set. |
| `geoLocation.continentCode` | dns.gslb.ContinentCodeEnum |  | Continent code — one of `AF`, `AN`, `AS`, `EU`, `NA`, `OC`, `SA` |
| `geoLocation.countryCode` | common.CountryEnum |  | ISO 3166-1 alpha-2 country code — one of `AC`, `AD`, `AE`, `AF`, `AG`, `AI`, `AL`, `AM`, `AO`, `AQ`, `AR`, `AS`, … |
| `geoLocation.subdivisionCode` | string |  | ISO 3166-2 subdivision code without its country prefix, for example CA for US-CA. Requires `countryCode`. When omitted, the scope is not a subdivision. |
| `healthCheckId` | string (uuid) | read-only | Identifier of the associated health check. Null when no health check is linked. |
| `id` | string (uuid) | read-only | Unique identifier of the record set |
| `name` | string | read-only | Fully qualified domain name with a trailing dot |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Resource lifecycle status — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `routingPolicy` | dns.gslb.RoutingPolicyEnum | read-only | Traffic routing policy — one of `FAILOVER`, `GEOLOCATION`, `GEOPROXIMITY`, `MULTIVALUE`, `SIMPLE`, `WEIGHTED` |
| `setIdentifier` | string | read-only | Identifier distinguishing entries with the same name and type, can be null only for SIMPLE routing |
| `ttl` | integer | read-only | Time to live in seconds. Record sets with the same name and type share one TTL. Updating the TTL updates all of them. |
| `type` | dns.gslb.RecordTypeEnum | read-only | DNS record type — one of `A`, `AAAA`, `CNAME`, `MX`, `TXT` |
| `updatedAt` | string (date-time) | read-only | Last modification timestamp |
| `values` | string[] | read-only | DNS record values. Empty when chainTarget is set. |
| `weight` | integer | read-only | Weight from 0 to 255, required for WEIGHTED routing. Null when not set. |
| `zoneId` | string (uuid) | read-only | Identifier of the parent hosted zone |

```json
[
  {
    "chainTarget": "string",
    "coordinates": {
      "latitude": 0,
      "longitude": 0
    },
    "createdAt": "2024-01-01T12:00:00Z",
    "evaluateTargetHealth": true,
    "failover": "PRIMARY",
    "geoLocation": {
      "continentCode": "AF",
      "countryCode": "AC",
      "subdivisionCode": "string"
    },
    "healthCheckId": "00000000-0000-0000-0000-000000000000",
    "id": "00000000-0000-0000-0000-000000000000",
    "name": "string",
    "resourceStatus": "CREATING",
    "routingPolicy": "FAILOVER",
    "setIdentifier": "string",
    "ttl": 0,
    "type": "A",
    "updatedAt": "2024-01-01T12:00:00Z",
    "values": [
      "string"
    ],
    "weight": 0,
    "zoneId": "00000000-0000-0000-0000-000000000000"
  }
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/dns/gslb/zone/{zoneId}/recordSet" \
  -H "accept: application/json" \
  -H "X-Schemas-Version: 2026-06" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/v2/dns/gslb/zone/{zoneId}/recordSet")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/v2/dns/gslb/zone/{zoneId}/recordSet");

print_r($result);
?>
```

## Get a GSLB record set

`GET /v2/dns/gslb/zone/{zoneId}/recordSet/{recordSetId}`

Link: https://developers.eu.ovhcloud.com/reference/network/global-lb/record-sets/#getGslbRecordSet

**Status:** Alpha version  
**IAM actions:** `gslbZone:apiovh:record/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `recordSetId` | path | string (uuid) | yes | Record set ID |
| `zoneId` | path | string (uuid) | yes | Zone ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dns.gslb.RecordSet | successful operation |
| 404 | object | Error 404 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `chainTarget` | string | read-only | Target record name for chained routing. Null when the record set is not chained. |
| `coordinates` | dns.gslb.Coordinates | read-only | Endpoint coordinates for GEOPROXIMITY |
| `coordinates.latitude` | number | yes | Latitude from -90 to 90 degrees |
| `coordinates.longitude` | number | yes | Longitude from -180 to 180 degrees |
| `createdAt` | string (date-time) | read-only | Creation timestamp |
| `evaluateTargetHealth` | boolean | read-only | Whether to fall through to the global scope when a GEOLOCATION chain target is unhealthy, always false for other record sets |
| `failover` | dns.gslb.FailoverTypeEnum | read-only | Failover role of this entry, null for routing policies other than FAILOVER — one of `PRIMARY`, `SECONDARY` |
| `geoLocation` | dns.gslb.GeoLocation | read-only | Geographic routing scope, required for GEOLOCATION routing. Null when not set. |
| `geoLocation.continentCode` | dns.gslb.ContinentCodeEnum |  | Continent code — one of `AF`, `AN`, `AS`, `EU`, `NA`, `OC`, `SA` |
| `geoLocation.countryCode` | common.CountryEnum |  | ISO 3166-1 alpha-2 country code — one of `AC`, `AD`, `AE`, `AF`, `AG`, `AI`, `AL`, `AM`, `AO`, `AQ`, `AR`, `AS`, … |
| `geoLocation.subdivisionCode` | string |  | ISO 3166-2 subdivision code without its country prefix, for example CA for US-CA. Requires `countryCode`. When omitted, the scope is not a subdivision. |
| `healthCheckId` | string (uuid) | read-only | Identifier of the associated health check. Null when no health check is linked. |
| `id` | string (uuid) | read-only | Unique identifier of the record set |
| `name` | string | read-only | Fully qualified domain name with a trailing dot |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Resource lifecycle status — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `routingPolicy` | dns.gslb.RoutingPolicyEnum | read-only | Traffic routing policy — one of `FAILOVER`, `GEOLOCATION`, `GEOPROXIMITY`, `MULTIVALUE`, `SIMPLE`, `WEIGHTED` |
| `setIdentifier` | string | read-only | Identifier distinguishing entries with the same name and type, can be null only for SIMPLE routing |
| `ttl` | integer | read-only | Time to live in seconds. Record sets with the same name and type share one TTL. Updating the TTL updates all of them. |
| `type` | dns.gslb.RecordTypeEnum | read-only | DNS record type — one of `A`, `AAAA`, `CNAME`, `MX`, `TXT` |
| `updatedAt` | string (date-time) | read-only | Last modification timestamp |
| `values` | string[] | read-only | DNS record values. Empty when chainTarget is set. |
| `weight` | integer | read-only | Weight from 0 to 255, required for WEIGHTED routing. Null when not set. |
| `zoneId` | string (uuid) | read-only | Identifier of the parent hosted zone |

```json
{
  "chainTarget": "string",
  "coordinates": {
    "latitude": 0,
    "longitude": 0
  },
  "createdAt": "2024-01-01T12:00:00Z",
  "evaluateTargetHealth": true,
  "failover": "PRIMARY",
  "geoLocation": {
    "continentCode": "AF",
    "countryCode": "AC",
    "subdivisionCode": "string"
  },
  "healthCheckId": "00000000-0000-0000-0000-000000000000",
  "id": "00000000-0000-0000-0000-000000000000",
  "name": "string",
  "resourceStatus": "CREATING",
  "routingPolicy": "FAILOVER",
  "setIdentifier": "string",
  "ttl": 0,
  "type": "A",
  "updatedAt": "2024-01-01T12:00:00Z",
  "values": [
    "string"
  ],
  "weight": 0,
  "zoneId": "00000000-0000-0000-0000-000000000000"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/dns/gslb/zone/{zoneId}/recordSet/{recordSetId}" \
  -H "accept: application/json" \
  -H "X-Schemas-Version: 2026-06" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/v2/dns/gslb/zone/{zoneId}/recordSet/{recordSetId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/v2/dns/gslb/zone/{zoneId}/recordSet/{recordSetId}");

print_r($result);
?>
```

## Create a GSLB record set

`POST /v2/dns/gslb/zone/{zoneId}/recordSet`

Link: https://developers.eu.ovhcloud.com/reference/network/global-lb/record-sets/#createGslbRecordSet

**Status:** Alpha version  
**IAM actions:** `gslbZone:apiovh:record/create`, `gslbHealthCheck:apiovh:get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `zoneId` | path | string (uuid) | yes | Zone ID |

### Request body (required)

Type: `dns.gslb.CreateRecordSetRequest`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `chainTarget` | string |  | Target record name for chaining, up to three hops. Unavailable for GEOPROXIMITY parents. |
| `coordinates` | dns.gslb.Coordinates |  | Endpoint coordinates, required for GEOPROXIMITY routing |
| `coordinates.latitude` | number | yes | Latitude from -90 to 90 degrees |
| `coordinates.longitude` | number | yes | Longitude from -180 to 180 degrees |
| `evaluateTargetHealth` | boolean |  | Whether to fall through to the global scope when the chain target is unhealthy. Only supported for GEOLOCATION chains. |
| `failover` | dns.gslb.FailoverTypeEnum |  | Failover role of this entry, required for FAILOVER routing. PRIMARY requires a health check. Immutable after creation. — one of `PRIMARY`, `SECONDARY` |
| `geoLocation` | dns.gslb.GeoLocation |  | Geographic scope of this entry, required for GEOLOCATION routing. An empty object is the global fallback. |
| `geoLocation.continentCode` | dns.gslb.ContinentCodeEnum |  | Continent code — one of `AF`, `AN`, `AS`, `EU`, `NA`, `OC`, `SA` |
| `geoLocation.countryCode` | common.CountryEnum |  | ISO 3166-1 alpha-2 country code — one of `AC`, `AD`, `AE`, `AF`, `AG`, `AI`, `AL`, `AM`, `AO`, `AQ`, `AR`, `AS`, … |
| `geoLocation.subdivisionCode` | string |  | ISO 3166-2 subdivision code without its country prefix, for example CA for US-CA. Requires `countryCode`. When omitted, the scope is not a subdivision. |
| `healthCheckId` | string (uuid) |  | Associated health check. Unsupported for SIMPLE. |
| `name` | string | yes | Fully qualified domain name in the hosted zone, ending with a dot. Immutable after creation. |
| `routingPolicy` | dns.gslb.RoutingPolicyEnum |  | Traffic routing policy, defaults to SIMPLE. Immutable after creation. — one of `FAILOVER`, `GEOLOCATION`, `GEOPROXIMITY`, `MULTIVALUE`, `SIMPLE`, `WEIGHTED` |
| `setIdentifier` | string |  | Identifier that distinguishes entries with the same name and type. Required for non-SIMPLE routing. At most 128 characters. |
| `ttl` | integer | yes | Time to live in seconds. Record sets with the same name and type share one TTL. The value must equal the TTL of any existing one. From 0 to 2147483647. |
| `type` | dns.gslb.RecordTypeEnum | yes | DNS record type. FAILOVER, GEOLOCATION, MULTIVALUE and GEOPROXIMITY require A or AAAA. Immutable after creation. — one of `A`, `AAAA`, `CNAME`, `MX`, `TXT` |
| `values` | string[] |  | Record values. Required unless `chainTarget` is set. A `CNAME` accepts a single value. `MULTIVALUE` and `GEOPROXIMITY` accept one value per entry. |
| `weight` | integer |  | Relative weight of this entry for WEIGHTED routing. Required for WEIGHTED routing. From 0 to 255. |

```json
{
  "chainTarget": "string",
  "coordinates": {
    "latitude": 0,
    "longitude": 0
  },
  "evaluateTargetHealth": true,
  "failover": "PRIMARY",
  "geoLocation": {
    "continentCode": "AF",
    "countryCode": "AC",
    "subdivisionCode": "string"
  },
  "healthCheckId": "00000000-0000-0000-0000-000000000000",
  "name": "string",
  "routingPolicy": "FAILOVER",
  "setIdentifier": "string",
  "ttl": 0,
  "type": "A",
  "values": [
    "string"
  ],
  "weight": 0
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dns.gslb.RecordSet | successful operation |
| 400 | object | Error 400 response |
| 403 | object | Error 403 response |
| 404 | object | Error 404 response |
| 409 | object | Error 409 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `chainTarget` | string | read-only | Target record name for chained routing. Null when the record set is not chained. |
| `coordinates` | dns.gslb.Coordinates | read-only | Endpoint coordinates for GEOPROXIMITY |
| `coordinates.latitude` | number | yes | Latitude from -90 to 90 degrees |
| `coordinates.longitude` | number | yes | Longitude from -180 to 180 degrees |
| `createdAt` | string (date-time) | read-only | Creation timestamp |
| `evaluateTargetHealth` | boolean | read-only | Whether to fall through to the global scope when a GEOLOCATION chain target is unhealthy, always false for other record sets |
| `failover` | dns.gslb.FailoverTypeEnum | read-only | Failover role of this entry, null for routing policies other than FAILOVER — one of `PRIMARY`, `SECONDARY` |
| `geoLocation` | dns.gslb.GeoLocation | read-only | Geographic routing scope, required for GEOLOCATION routing. Null when not set. |
| `geoLocation.continentCode` | dns.gslb.ContinentCodeEnum |  | Continent code — one of `AF`, `AN`, `AS`, `EU`, `NA`, `OC`, `SA` |
| `geoLocation.countryCode` | common.CountryEnum |  | ISO 3166-1 alpha-2 country code — one of `AC`, `AD`, `AE`, `AF`, `AG`, `AI`, `AL`, `AM`, `AO`, `AQ`, `AR`, `AS`, … |
| `geoLocation.subdivisionCode` | string |  | ISO 3166-2 subdivision code without its country prefix, for example CA for US-CA. Requires `countryCode`. When omitted, the scope is not a subdivision. |
| `healthCheckId` | string (uuid) | read-only | Identifier of the associated health check. Null when no health check is linked. |
| `id` | string (uuid) | read-only | Unique identifier of the record set |
| `name` | string | read-only | Fully qualified domain name with a trailing dot |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Resource lifecycle status — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `routingPolicy` | dns.gslb.RoutingPolicyEnum | read-only | Traffic routing policy — one of `FAILOVER`, `GEOLOCATION`, `GEOPROXIMITY`, `MULTIVALUE`, `SIMPLE`, `WEIGHTED` |
| `setIdentifier` | string | read-only | Identifier distinguishing entries with the same name and type, can be null only for SIMPLE routing |
| `ttl` | integer | read-only | Time to live in seconds. Record sets with the same name and type share one TTL. Updating the TTL updates all of them. |
| `type` | dns.gslb.RecordTypeEnum | read-only | DNS record type — one of `A`, `AAAA`, `CNAME`, `MX`, `TXT` |
| `updatedAt` | string (date-time) | read-only | Last modification timestamp |
| `values` | string[] | read-only | DNS record values. Empty when chainTarget is set. |
| `weight` | integer | read-only | Weight from 0 to 255, required for WEIGHTED routing. Null when not set. |
| `zoneId` | string (uuid) | read-only | Identifier of the parent hosted zone |

```json
{
  "chainTarget": "string",
  "coordinates": {
    "latitude": 0,
    "longitude": 0
  },
  "createdAt": "2024-01-01T12:00:00Z",
  "evaluateTargetHealth": true,
  "failover": "PRIMARY",
  "geoLocation": {
    "continentCode": "AF",
    "countryCode": "AC",
    "subdivisionCode": "string"
  },
  "healthCheckId": "00000000-0000-0000-0000-000000000000",
  "id": "00000000-0000-0000-0000-000000000000",
  "name": "string",
  "resourceStatus": "CREATING",
  "routingPolicy": "FAILOVER",
  "setIdentifier": "string",
  "ttl": 0,
  "type": "A",
  "updatedAt": "2024-01-01T12:00:00Z",
  "values": [
    "string"
  ],
  "weight": 0,
  "zoneId": "00000000-0000-0000-0000-000000000000"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/v2/dns/gslb/zone/{zoneId}/recordSet" \
  -H "accept: application/json" \
  -H "X-Schemas-Version: 2026-06" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: dns.gslb.CreateRecordSetRequest
result = client.post("/v2/dns/gslb/zone/{zoneId}/recordSet",
	chainTarget = None, # Target record name for chaining, up to three hops. Unavailable for GEOPROXIMITY parents. (type: string, nullable)
	coordinates = None, # Endpoint coordinates, required for GEOPROXIMITY routing (type: dns.gslb.Coordinates, nullable)
	evaluateTargetHealth = None, # Whether to fall through to the global scope when the chain target is unhealthy. Only supported for GEOLOCATION chains. (type: boolean, nullable)
	failover = None, # Failover role of this entry, required for FAILOVER routing. PRIMARY requires a health check. Immutable after creation. (type: dns.gslb.FailoverTypeEnum, nullable)
	geoLocation = None, # Geographic scope of this entry, required for GEOLOCATION routing. An empty object is the global fallback. (type: dns.gslb.GeoLocation, nullable)
	healthCheckId = None, # Associated health check. Unsupported for SIMPLE. (type: string, nullable)
	name = None, # Fully qualified domain name in the hosted zone, ending with a dot. Immutable after creation. (type: string)
	routingPolicy = None, # Traffic routing policy, defaults to SIMPLE. Immutable after creation. (type: dns.gslb.RoutingPolicyEnum, nullable)
	setIdentifier = None, # Identifier that distinguishes entries with the same name and type. Required for non-SIMPLE routing. At most 128 characters. (type: string, nullable)
	ttl = None, # Time to live in seconds. Record sets with the same name and type share one TTL. The value must equal the TTL of any existing one. From 0 to 2147483647. (type: integer)
	type = None, # DNS record type. FAILOVER, GEOLOCATION, MULTIVALUE and GEOPROXIMITY require A or AAAA. Immutable after creation. (type: dns.gslb.RecordTypeEnum)
	values = None, # Record values. Required unless `chainTarget` is set. A `CNAME` accepts a single value. `MULTIVALUE` and `GEOPROXIMITY` accept one value per entry. (type: array, nullable)
	weight = None, # Relative weight of this entry for WEIGHTED routing. Required for WEIGHTED routing. From 0 to 255. (type: integer, nullable)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: dns.gslb.CreateRecordSetRequest
$result = $ovh->post("/v2/dns/gslb/zone/{zoneId}/recordSet", array(
	chainTarget => null, // Target record name for chaining, up to three hops. Unavailable for GEOPROXIMITY parents. (type: string, nullable)
	coordinates => null, // Endpoint coordinates, required for GEOPROXIMITY routing (type: dns.gslb.Coordinates, nullable)
	evaluateTargetHealth => null, // Whether to fall through to the global scope when the chain target is unhealthy. Only supported for GEOLOCATION chains. (type: boolean, nullable)
	failover => null, // Failover role of this entry, required for FAILOVER routing. PRIMARY requires a health check. Immutable after creation. (type: dns.gslb.FailoverTypeEnum, nullable)
	geoLocation => null, // Geographic scope of this entry, required for GEOLOCATION routing. An empty object is the global fallback. (type: dns.gslb.GeoLocation, nullable)
	healthCheckId => null, // Associated health check. Unsupported for SIMPLE. (type: string, nullable)
	name => null, // Fully qualified domain name in the hosted zone, ending with a dot. Immutable after creation. (type: string)
	routingPolicy => null, // Traffic routing policy, defaults to SIMPLE. Immutable after creation. (type: dns.gslb.RoutingPolicyEnum, nullable)
	setIdentifier => null, // Identifier that distinguishes entries with the same name and type. Required for non-SIMPLE routing. At most 128 characters. (type: string, nullable)
	ttl => null, // Time to live in seconds. Record sets with the same name and type share one TTL. The value must equal the TTL of any existing one. From 0 to 2147483647. (type: integer)
	type => null, // DNS record type. FAILOVER, GEOLOCATION, MULTIVALUE and GEOPROXIMITY require A or AAAA. Immutable after creation. (type: dns.gslb.RecordTypeEnum)
	values => null, // Record values. Required unless `chainTarget` is set. A `CNAME` accepts a single value. `MULTIVALUE` and `GEOPROXIMITY` accept one value per entry. (type: array, nullable)
	weight => null, // Relative weight of this entry for WEIGHTED routing. Required for WEIGHTED routing. From 0 to 255. (type: integer, nullable)
));

print_r($result);
?>
```

## Update a GSLB record set. Name, type, routing policy and failover role are immutable.

`PATCH /v2/dns/gslb/zone/{zoneId}/recordSet/{recordSetId}`

Link: https://developers.eu.ovhcloud.com/reference/network/global-lb/record-sets/#updateGslbRecordSet

**Status:** Alpha version  
**IAM actions:** `gslbZone:apiovh:record/edit`, `gslbHealthCheck:apiovh:get`

Omitted fields keep their current value. A null value removes a field, except `ttl` and `values`, which cannot be null.

Record sets with the same name and type share one TTL. Updating the TTL updates all of them.

Linking a health check also requires the `gslbHealthCheck:apiovh:get` action on that health check.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `recordSetId` | path | string (uuid) | yes | Record set ID |
| `zoneId` | path | string (uuid) | yes | Zone ID |

### Request body (required)

Type: `dns.gslb.UpdateRecordSetRequest`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `chainTarget` | string |  | New target record name for chained routing. When null or empty, the chain target is removed. |
| `coordinates` | dns.gslb.Coordinates |  | New endpoint coordinates for `GEOPROXIMITY` routing. When null, the coordinates are removed. |
| `coordinates.latitude` | number | yes | Latitude from -90 to 90 degrees |
| `coordinates.longitude` | number | yes | Longitude from -180 to 180 degrees |
| `evaluateTargetHealth` | boolean |  | Whether to fall through to the global scope when a `GEOLOCATION` chain target is unhealthy. When null, the value is reset to false. |
| `geoLocation` | dns.gslb.GeoLocation |  | New geographic scope for `GEOLOCATION` routing. When null, the scope is removed. |
| `geoLocation.continentCode` | dns.gslb.ContinentCodeEnum |  | Continent code — one of `AF`, `AN`, `AS`, `EU`, `NA`, `OC`, `SA` |
| `geoLocation.countryCode` | common.CountryEnum |  | ISO 3166-1 alpha-2 country code — one of `AC`, `AD`, `AE`, `AF`, `AG`, `AI`, `AL`, `AM`, `AO`, `AQ`, `AR`, `AS`, … |
| `geoLocation.subdivisionCode` | string |  | ISO 3166-2 subdivision code without its country prefix, for example CA for US-CA. Requires `countryCode`. When omitted, the scope is not a subdivision. |
| `healthCheckId` | string (uuid) |  | Health check to link. Omit it to keep the current link, or set it to null to unlink the current health check. |
| `setIdentifier` | string |  | New identifier distinguishing entries with the same name and type. When null, the identifier is removed, which is only valid for `SIMPLE` routing. |
| `ttl` | integer |  | New time to live in seconds. Record sets with the same name and type share one TTL. Updating the TTL updates all of them. When omitted, the current TTL is kept. A null value is rejected. From 0 to 2147483647. |
| `values` | string[] |  | New record values. The list replaces the one currently set. When omitted, the current values are kept. A null value is rejected. |
| `weight` | integer |  | New relative weight for `WEIGHTED` routing. When null, the weight is removed. From 0 to 255. |

```json
{
  "chainTarget": "string",
  "coordinates": {
    "latitude": 0,
    "longitude": 0
  },
  "evaluateTargetHealth": true,
  "geoLocation": {
    "continentCode": "AF",
    "countryCode": "AC",
    "subdivisionCode": "string"
  },
  "healthCheckId": "00000000-0000-0000-0000-000000000000",
  "setIdentifier": "string",
  "ttl": 0,
  "values": [
    "string"
  ],
  "weight": 0
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dns.gslb.RecordSet | successful operation |
| 400 | object | Error 400 response |
| 403 | object | Error 403 response |
| 404 | object | Error 404 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `chainTarget` | string | read-only | Target record name for chained routing. Null when the record set is not chained. |
| `coordinates` | dns.gslb.Coordinates | read-only | Endpoint coordinates for GEOPROXIMITY |
| `coordinates.latitude` | number | yes | Latitude from -90 to 90 degrees |
| `coordinates.longitude` | number | yes | Longitude from -180 to 180 degrees |
| `createdAt` | string (date-time) | read-only | Creation timestamp |
| `evaluateTargetHealth` | boolean | read-only | Whether to fall through to the global scope when a GEOLOCATION chain target is unhealthy, always false for other record sets |
| `failover` | dns.gslb.FailoverTypeEnum | read-only | Failover role of this entry, null for routing policies other than FAILOVER — one of `PRIMARY`, `SECONDARY` |
| `geoLocation` | dns.gslb.GeoLocation | read-only | Geographic routing scope, required for GEOLOCATION routing. Null when not set. |
| `geoLocation.continentCode` | dns.gslb.ContinentCodeEnum |  | Continent code — one of `AF`, `AN`, `AS`, `EU`, `NA`, `OC`, `SA` |
| `geoLocation.countryCode` | common.CountryEnum |  | ISO 3166-1 alpha-2 country code — one of `AC`, `AD`, `AE`, `AF`, `AG`, `AI`, `AL`, `AM`, `AO`, `AQ`, `AR`, `AS`, … |
| `geoLocation.subdivisionCode` | string |  | ISO 3166-2 subdivision code without its country prefix, for example CA for US-CA. Requires `countryCode`. When omitted, the scope is not a subdivision. |
| `healthCheckId` | string (uuid) | read-only | Identifier of the associated health check. Null when no health check is linked. |
| `id` | string (uuid) | read-only | Unique identifier of the record set |
| `name` | string | read-only | Fully qualified domain name with a trailing dot |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Resource lifecycle status — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `routingPolicy` | dns.gslb.RoutingPolicyEnum | read-only | Traffic routing policy — one of `FAILOVER`, `GEOLOCATION`, `GEOPROXIMITY`, `MULTIVALUE`, `SIMPLE`, `WEIGHTED` |
| `setIdentifier` | string | read-only | Identifier distinguishing entries with the same name and type, can be null only for SIMPLE routing |
| `ttl` | integer | read-only | Time to live in seconds. Record sets with the same name and type share one TTL. Updating the TTL updates all of them. |
| `type` | dns.gslb.RecordTypeEnum | read-only | DNS record type — one of `A`, `AAAA`, `CNAME`, `MX`, `TXT` |
| `updatedAt` | string (date-time) | read-only | Last modification timestamp |
| `values` | string[] | read-only | DNS record values. Empty when chainTarget is set. |
| `weight` | integer | read-only | Weight from 0 to 255, required for WEIGHTED routing. Null when not set. |
| `zoneId` | string (uuid) | read-only | Identifier of the parent hosted zone |

```json
{
  "chainTarget": "string",
  "coordinates": {
    "latitude": 0,
    "longitude": 0
  },
  "createdAt": "2024-01-01T12:00:00Z",
  "evaluateTargetHealth": true,
  "failover": "PRIMARY",
  "geoLocation": {
    "continentCode": "AF",
    "countryCode": "AC",
    "subdivisionCode": "string"
  },
  "healthCheckId": "00000000-0000-0000-0000-000000000000",
  "id": "00000000-0000-0000-0000-000000000000",
  "name": "string",
  "resourceStatus": "CREATING",
  "routingPolicy": "FAILOVER",
  "setIdentifier": "string",
  "ttl": 0,
  "type": "A",
  "updatedAt": "2024-01-01T12:00:00Z",
  "values": [
    "string"
  ],
  "weight": 0,
  "zoneId": "00000000-0000-0000-0000-000000000000"
}
```

### Example

```bash
curl -X PATCH \
  "https://api.eu.ovhcloud.com/v2/dns/gslb/zone/{zoneId}/recordSet/{recordSetId}" \
  -H "accept: application/json" \
  -H "X-Schemas-Version: 2026-06" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: dns.gslb.UpdateRecordSetRequest
result = client.patch("/v2/dns/gslb/zone/{zoneId}/recordSet/{recordSetId}",
	chainTarget = None, # New target record name for chained routing. When null or empty, the chain target is removed. (type: string, nullable)
	coordinates = None, # New endpoint coordinates for `GEOPROXIMITY` routing. When null, the coordinates are removed. (type: dns.gslb.Coordinates, nullable)
	evaluateTargetHealth = None, # Whether to fall through to the global scope when a `GEOLOCATION` chain target is unhealthy. When null, the value is reset to false. (type: boolean, nullable)
	geoLocation = None, # New geographic scope for `GEOLOCATION` routing. When null, the scope is removed. (type: dns.gslb.GeoLocation, nullable)
	healthCheckId = None, # Health check to link. Omit it to keep the current link, or set it to null to unlink the current health check. (type: string, nullable)
	setIdentifier = None, # New identifier distinguishing entries with the same name and type. When null, the identifier is removed, which is only valid for `SIMPLE` routing. (type: string, nullable)
	ttl = None, # New time to live in seconds. Record sets with the same name and type share one TTL. Updating the TTL updates all of them. When omitted, the current TTL is kept. A null value is rejected. From 0 to 2147483647. (type: integer, nullable)
	values = None, # New record values. The list replaces the one currently set. When omitted, the current values are kept. A null value is rejected. (type: array, nullable)
	weight = None, # New relative weight for `WEIGHTED` routing. When null, the weight is removed. From 0 to 255. (type: integer, nullable)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: dns.gslb.UpdateRecordSetRequest
$result = $ovh->patch("/v2/dns/gslb/zone/{zoneId}/recordSet/{recordSetId}", array(
	chainTarget => null, // New target record name for chained routing. When null or empty, the chain target is removed. (type: string, nullable)
	coordinates => null, // New endpoint coordinates for `GEOPROXIMITY` routing. When null, the coordinates are removed. (type: dns.gslb.Coordinates, nullable)
	evaluateTargetHealth => null, // Whether to fall through to the global scope when a `GEOLOCATION` chain target is unhealthy. When null, the value is reset to false. (type: boolean, nullable)
	geoLocation => null, // New geographic scope for `GEOLOCATION` routing. When null, the scope is removed. (type: dns.gslb.GeoLocation, nullable)
	healthCheckId => null, // Health check to link. Omit it to keep the current link, or set it to null to unlink the current health check. (type: string, nullable)
	setIdentifier => null, // New identifier distinguishing entries with the same name and type. When null, the identifier is removed, which is only valid for `SIMPLE` routing. (type: string, nullable)
	ttl => null, // New time to live in seconds. Record sets with the same name and type share one TTL. Updating the TTL updates all of them. When omitted, the current TTL is kept. A null value is rejected. From 0 to 2147483647. (type: integer, nullable)
	values => null, // New record values. The list replaces the one currently set. When omitted, the current values are kept. A null value is rejected. (type: array, nullable)
	weight => null, // New relative weight for `WEIGHTED` routing. When null, the weight is removed. From 0 to 255. (type: integer, nullable)
));

print_r($result);
?>
```

## Delete a GSLB record set

`DELETE /v2/dns/gslb/zone/{zoneId}/recordSet/{recordSetId}`

Link: https://developers.eu.ovhcloud.com/reference/network/global-lb/record-sets/#deleteGslbRecordSet

**Status:** Alpha version  
**IAM actions:** `gslbZone:apiovh:record/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `recordSetId` | path | string (uuid) | yes | Record set ID |
| `zoneId` | path | string (uuid) | yes | Zone ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/v2/dns/gslb/zone/{zoneId}/recordSet/{recordSetId}" \
  -H "accept: application/json" \
  -H "X-Schemas-Version: 2026-06" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/v2/dns/gslb/zone/{zoneId}/recordSet/{recordSetId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/v2/dns/gslb/zone/{zoneId}/recordSet/{recordSetId}");

print_r($result);
?>
```
