# Network › Global LB › Health checks 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

> 6 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/health-checks/

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

## Operations

- `GET /dns/gslb/healthCheck` — List GSLB health checks
- `GET /dns/gslb/healthCheck/{healthCheckId}` — Get a GSLB health check
- `POST /dns/gslb/healthCheck` — Create a GSLB health check
- `PATCH /dns/gslb/healthCheck/{healthCheckId}` — Update a GSLB health check. Its protocol type is immutable.
- `DELETE /dns/gslb/healthCheck/{healthCheckId}` — Delete a health check not referenced by any record set
- `GET /dns/gslb/healthCheck/{healthCheckId}/status` — Get the current status of a GSLB health check

## List GSLB health checks

`GET /v2/dns/gslb/healthCheck`

Link: https://developers.eu.ovhcloud.com/reference/network/global-lb/health-checks/#getAllGslbHealthChecks

**Status:** Alpha version  
**IAM actions:** `gslbHealthCheck:apiovh:get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `X-Pagination-Cursor` | header | string |  | Pagination cursor |
| `X-Pagination-Size` | header | integer |  | Pagination size |
| `iamTags` | query | object |  | Filter resources on IAM tags |

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdAt` | string (date-time) | read-only | Creation timestamp |
| `disabled` | boolean | read-only | Whether check execution is disabled |
| `dnsQueryName` | string | read-only | Name queried by DNS health checks, required for the DNS type. Null when not set. |
| `dnsRecordType` | dns.gslb.HealthCheckRecordTypeEnum | read-only | Record type queried by DNS health checks, required for the DNS type. Null when not set. — one of `A`, `AAAA`, `CNAME`, `MX`, `TXT` |
| `failureThreshold` | integer | read-only | Consecutive failures before marking the endpoint unhealthy |
| `fqdn` | string | read-only | FQDN used for the HTTP Host header and TLS SNI. Null when the check targets only ipAddress. |
| `healthStatus` | dns.gslb.HealthStatusEnum | read-only | Current endpoint health — one of `HEALTHY`, `UNHEALTHY`, `UNKNOWN` |
| `iam` | iam.ResourceMetadata | read-only | IAM resource metadata |
| `iam.displayName` | string | read-only | Resource display name |
| `iam.id` | string (uuid) | read-only | Unique identifier of the resource |
| `iam.state` | iam.ResourceMetadata.StateEnum | read-only | Resource state — one of `EXPIRED`, `IN_CREATION`, `OK`, `SUSPENDED` |
| `iam.tags` | object | read-only | Resource tags. Tags that were internally computed are prefixed with ovh: |
| `iam.urn` | string | read-only | Unique resource name used in policies |
| `id` | string (uuid) | read-only | Unique identifier of the health check |
| `inverted` | boolean | read-only | Whether health status is inverted |
| `ipAddress` | ip | read-only | Public IPv4 or IPv6 endpoint address. Null when the check targets only fqdn. |
| `lastCheckedAt` | string (date-time) | read-only | Last execution timestamp. Null until the first check has run. |
| `lastError` | string | read-only | Error of the most recent check. Null when that check succeeded or no check has run yet. |
| `name` | string | read-only | Optional health check name |
| `port` | integer | read-only | Endpoint port, null for protocols that do not use one, such as ICMP |
| `requestInterval` | integer | read-only | Interval between checks, 10 or 30 seconds |
| `resourcePath` | string | read-only | HTTP request path, required for the HTTP, HTTPS, HTTP_STR_MATCH and HTTPS_STR_MATCH types. Null when not set. |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Resource lifecycle status — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `searchString` | string | read-only | String expected in the HTTP response body, required for the HTTP_STR_MATCH and HTTPS_STR_MATCH types. Null when not set. |
| `type` | dns.gslb.HealthCheckTypeEnum | read-only | Health check protocol — one of `DNS`, `HTTP`, `HTTPS`, `HTTPS_STR_MATCH`, `HTTP_STR_MATCH`, `ICMP`, `TCP` |
| `updatedAt` | string (date-time) | read-only | Last modification timestamp |

```json
[
  {
    "createdAt": "2024-01-01T12:00:00Z",
    "disabled": true,
    "dnsQueryName": "string",
    "dnsRecordType": "A",
    "failureThreshold": 0,
    "fqdn": "string",
    "healthStatus": "HEALTHY",
    "iam": {
      "displayName": "string",
      "id": "00000000-0000-0000-0000-000000000000",
      "state": "EXPIRED",
      "tags": {
        "key": "string"
      },
      "urn": "string"
    },
    "id": "00000000-0000-0000-0000-000000000000",
    "inverted": true,
    "ipAddress": "192.0.2.0",
    "lastCheckedAt": "2024-01-01T12:00:00Z",
    "lastError": "string",
    "name": "string",
    "port": 0,
    "requestInterval": 0,
    "resourcePath": "string",
    "resourceStatus": "CREATING",
    "searchString": "string",
    "type": "DNS",
    "updatedAt": "2024-01-01T12:00:00Z"
  }
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/dns/gslb/healthCheck" \
  -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/healthCheck")

# 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/healthCheck");

print_r($result);
?>
```

## Get a GSLB health check

`GET /v2/dns/gslb/healthCheck/{healthCheckId}`

Link: https://developers.eu.ovhcloud.com/reference/network/global-lb/health-checks/#getGslbHealthCheck

**Status:** Alpha version  
**IAM actions:** `gslbHealthCheck:apiovh:get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `healthCheckId` | path | string (uuid) | yes | Health check ID |

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdAt` | string (date-time) | read-only | Creation timestamp |
| `disabled` | boolean | read-only | Whether check execution is disabled |
| `dnsQueryName` | string | read-only | Name queried by DNS health checks, required for the DNS type. Null when not set. |
| `dnsRecordType` | dns.gslb.HealthCheckRecordTypeEnum | read-only | Record type queried by DNS health checks, required for the DNS type. Null when not set. — one of `A`, `AAAA`, `CNAME`, `MX`, `TXT` |
| `failureThreshold` | integer | read-only | Consecutive failures before marking the endpoint unhealthy |
| `fqdn` | string | read-only | FQDN used for the HTTP Host header and TLS SNI. Null when the check targets only ipAddress. |
| `healthStatus` | dns.gslb.HealthStatusEnum | read-only | Current endpoint health — one of `HEALTHY`, `UNHEALTHY`, `UNKNOWN` |
| `iam` | iam.ResourceMetadata | read-only | IAM resource metadata |
| `iam.displayName` | string | read-only | Resource display name |
| `iam.id` | string (uuid) | read-only | Unique identifier of the resource |
| `iam.state` | iam.ResourceMetadata.StateEnum | read-only | Resource state — one of `EXPIRED`, `IN_CREATION`, `OK`, `SUSPENDED` |
| `iam.tags` | object | read-only | Resource tags. Tags that were internally computed are prefixed with ovh: |
| `iam.urn` | string | read-only | Unique resource name used in policies |
| `id` | string (uuid) | read-only | Unique identifier of the health check |
| `inverted` | boolean | read-only | Whether health status is inverted |
| `ipAddress` | ip | read-only | Public IPv4 or IPv6 endpoint address. Null when the check targets only fqdn. |
| `lastCheckedAt` | string (date-time) | read-only | Last execution timestamp. Null until the first check has run. |
| `lastError` | string | read-only | Error of the most recent check. Null when that check succeeded or no check has run yet. |
| `name` | string | read-only | Optional health check name |
| `port` | integer | read-only | Endpoint port, null for protocols that do not use one, such as ICMP |
| `requestInterval` | integer | read-only | Interval between checks, 10 or 30 seconds |
| `resourcePath` | string | read-only | HTTP request path, required for the HTTP, HTTPS, HTTP_STR_MATCH and HTTPS_STR_MATCH types. Null when not set. |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Resource lifecycle status — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `searchString` | string | read-only | String expected in the HTTP response body, required for the HTTP_STR_MATCH and HTTPS_STR_MATCH types. Null when not set. |
| `type` | dns.gslb.HealthCheckTypeEnum | read-only | Health check protocol — one of `DNS`, `HTTP`, `HTTPS`, `HTTPS_STR_MATCH`, `HTTP_STR_MATCH`, `ICMP`, `TCP` |
| `updatedAt` | string (date-time) | read-only | Last modification timestamp |

```json
{
  "createdAt": "2024-01-01T12:00:00Z",
  "disabled": true,
  "dnsQueryName": "string",
  "dnsRecordType": "A",
  "failureThreshold": 0,
  "fqdn": "string",
  "healthStatus": "HEALTHY",
  "iam": {
    "displayName": "string",
    "id": "00000000-0000-0000-0000-000000000000",
    "state": "EXPIRED",
    "tags": {
      "key": "string"
    },
    "urn": "string"
  },
  "id": "00000000-0000-0000-0000-000000000000",
  "inverted": true,
  "ipAddress": "192.0.2.0",
  "lastCheckedAt": "2024-01-01T12:00:00Z",
  "lastError": "string",
  "name": "string",
  "port": 0,
  "requestInterval": 0,
  "resourcePath": "string",
  "resourceStatus": "CREATING",
  "searchString": "string",
  "type": "DNS",
  "updatedAt": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/dns/gslb/healthCheck/{healthCheckId}" \
  -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/healthCheck/{healthCheckId}")

# 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/healthCheck/{healthCheckId}");

print_r($result);
?>
```

## Create a GSLB health check

`POST /v2/dns/gslb/healthCheck`

Link: https://developers.eu.ovhcloud.com/reference/network/global-lb/health-checks/#createGslbHealthCheck

**Status:** Alpha version  
**IAM actions:** `gslbHealthCheck:apiovh:create`

### Request body (required)

Type: `dns.gslb.CreateHealthCheckRequest`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `disabled` | boolean |  | Disable execution. Defaults to false. |
| `dnsQueryName` | string |  | Name queried by DNS health checks |
| `dnsRecordType` | dns.gslb.HealthCheckRecordTypeEnum |  | Record type queried by DNS health checks — one of `A`, `AAAA`, `CNAME`, `MX`, `TXT` |
| `failureThreshold` | integer |  | Consecutive failures from 1 to 10. Defaults to 3. |
| `fqdn` | string |  | FQDN for the HTTP Host header and TLS SNI |
| `inverted` | boolean |  | Invert health status. Defaults to false. |
| `ipAddress` | ip |  | Public IPv4 or IPv6 endpoint address. Private and loopback addresses are rejected. Required for ICMP, and for other protocols unless fqdn is set. |
| `name` | string |  | Optional name. At most 255 characters. |
| `port` | integer |  | Endpoint port from 1 to 65535 when required by the protocol |
| `requestInterval` | integer |  | Interval of 10 or 30 seconds. Defaults to 30. |
| `resourcePath` | string |  | HTTP request path starting with /. At most 255 characters. |
| `searchString` | string |  | Expected response text for HTTP_STR_MATCH or HTTPS_STR_MATCH |
| `type` | dns.gslb.HealthCheckTypeEnum | yes | Health check protocol. Immutable after creation. — one of `DNS`, `HTTP`, `HTTPS`, `HTTPS_STR_MATCH`, `HTTP_STR_MATCH`, `ICMP`, `TCP` |

```json
{
  "disabled": true,
  "dnsQueryName": "string",
  "dnsRecordType": "A",
  "failureThreshold": 0,
  "fqdn": "string",
  "inverted": true,
  "ipAddress": "192.0.2.0",
  "name": "string",
  "port": 0,
  "requestInterval": 0,
  "resourcePath": "string",
  "searchString": "string",
  "type": "DNS"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dns.gslb.HealthCheck | successful operation |
| 400 | object | Error 400 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdAt` | string (date-time) | read-only | Creation timestamp |
| `disabled` | boolean | read-only | Whether check execution is disabled |
| `dnsQueryName` | string | read-only | Name queried by DNS health checks, required for the DNS type. Null when not set. |
| `dnsRecordType` | dns.gslb.HealthCheckRecordTypeEnum | read-only | Record type queried by DNS health checks, required for the DNS type. Null when not set. — one of `A`, `AAAA`, `CNAME`, `MX`, `TXT` |
| `failureThreshold` | integer | read-only | Consecutive failures before marking the endpoint unhealthy |
| `fqdn` | string | read-only | FQDN used for the HTTP Host header and TLS SNI. Null when the check targets only ipAddress. |
| `healthStatus` | dns.gslb.HealthStatusEnum | read-only | Current endpoint health — one of `HEALTHY`, `UNHEALTHY`, `UNKNOWN` |
| `id` | string (uuid) | read-only | Unique identifier of the health check |
| `inverted` | boolean | read-only | Whether health status is inverted |
| `ipAddress` | ip | read-only | Public IPv4 or IPv6 endpoint address. Null when the check targets only fqdn. |
| `lastCheckedAt` | string (date-time) | read-only | Last execution timestamp. Null until the first check has run. |
| `lastError` | string | read-only | Error of the most recent check. Null when that check succeeded or no check has run yet. |
| `name` | string | read-only | Optional health check name |
| `port` | integer | read-only | Endpoint port, null for protocols that do not use one, such as ICMP |
| `requestInterval` | integer | read-only | Interval between checks, 10 or 30 seconds |
| `resourcePath` | string | read-only | HTTP request path, required for the HTTP, HTTPS, HTTP_STR_MATCH and HTTPS_STR_MATCH types. Null when not set. |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Resource lifecycle status — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `searchString` | string | read-only | String expected in the HTTP response body, required for the HTTP_STR_MATCH and HTTPS_STR_MATCH types. Null when not set. |
| `type` | dns.gslb.HealthCheckTypeEnum | read-only | Health check protocol — one of `DNS`, `HTTP`, `HTTPS`, `HTTPS_STR_MATCH`, `HTTP_STR_MATCH`, `ICMP`, `TCP` |
| `updatedAt` | string (date-time) | read-only | Last modification timestamp |

```json
{
  "createdAt": "2024-01-01T12:00:00Z",
  "disabled": true,
  "dnsQueryName": "string",
  "dnsRecordType": "A",
  "failureThreshold": 0,
  "fqdn": "string",
  "healthStatus": "HEALTHY",
  "id": "00000000-0000-0000-0000-000000000000",
  "inverted": true,
  "ipAddress": "192.0.2.0",
  "lastCheckedAt": "2024-01-01T12:00:00Z",
  "lastError": "string",
  "name": "string",
  "port": 0,
  "requestInterval": 0,
  "resourcePath": "string",
  "resourceStatus": "CREATING",
  "searchString": "string",
  "type": "DNS",
  "updatedAt": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/v2/dns/gslb/healthCheck" \
  -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.CreateHealthCheckRequest
result = client.post("/v2/dns/gslb/healthCheck",
	disabled = None, # Disable execution. Defaults to false. (type: boolean, nullable)
	dnsQueryName = None, # Name queried by DNS health checks (type: string, nullable)
	dnsRecordType = None, # Record type queried by DNS health checks (type: dns.gslb.HealthCheckRecordTypeEnum, nullable)
	failureThreshold = None, # Consecutive failures from 1 to 10. Defaults to 3. (type: integer, nullable)
	fqdn = None, # FQDN for the HTTP Host header and TLS SNI (type: string, nullable)
	inverted = None, # Invert health status. Defaults to false. (type: boolean, nullable)
	ipAddress = None, # Public IPv4 or IPv6 endpoint address. Private and loopback addresses are rejected. Required for ICMP, and for other protocols unless fqdn is set. (type: ip, nullable)
	name = None, # Optional name. At most 255 characters. (type: string, nullable)
	port = None, # Endpoint port from 1 to 65535 when required by the protocol (type: integer, nullable)
	requestInterval = None, # Interval of 10 or 30 seconds. Defaults to 30. (type: integer, nullable)
	resourcePath = None, # HTTP request path starting with /. At most 255 characters. (type: string, nullable)
	searchString = None, # Expected response text for HTTP_STR_MATCH or HTTPS_STR_MATCH (type: string, nullable)
	type = None, # Health check protocol. Immutable after creation. (type: dns.gslb.HealthCheckTypeEnum)
)

# 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.CreateHealthCheckRequest
$result = $ovh->post("/v2/dns/gslb/healthCheck", array(
	disabled => null, // Disable execution. Defaults to false. (type: boolean, nullable)
	dnsQueryName => null, // Name queried by DNS health checks (type: string, nullable)
	dnsRecordType => null, // Record type queried by DNS health checks (type: dns.gslb.HealthCheckRecordTypeEnum, nullable)
	failureThreshold => null, // Consecutive failures from 1 to 10. Defaults to 3. (type: integer, nullable)
	fqdn => null, // FQDN for the HTTP Host header and TLS SNI (type: string, nullable)
	inverted => null, // Invert health status. Defaults to false. (type: boolean, nullable)
	ipAddress => null, // Public IPv4 or IPv6 endpoint address. Private and loopback addresses are rejected. Required for ICMP, and for other protocols unless fqdn is set. (type: ip, nullable)
	name => null, // Optional name. At most 255 characters. (type: string, nullable)
	port => null, // Endpoint port from 1 to 65535 when required by the protocol (type: integer, nullable)
	requestInterval => null, // Interval of 10 or 30 seconds. Defaults to 30. (type: integer, nullable)
	resourcePath => null, // HTTP request path starting with /. At most 255 characters. (type: string, nullable)
	searchString => null, // Expected response text for HTTP_STR_MATCH or HTTPS_STR_MATCH (type: string, nullable)
	type => null, // Health check protocol. Immutable after creation. (type: dns.gslb.HealthCheckTypeEnum)
));

print_r($result);
?>
```

## Update a GSLB health check. Its protocol type is immutable.

`PATCH /v2/dns/gslb/healthCheck/{healthCheckId}`

Link: https://developers.eu.ovhcloud.com/reference/network/global-lb/health-checks/#updateGslbHealthCheck

**Status:** Alpha version  
**IAM actions:** `gslbHealthCheck:apiovh:edit`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `healthCheckId` | path | string (uuid) | yes | Health check ID |

### Request body (required)

Type: `dns.gslb.UpdateHealthCheckRequest`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `disabled` | boolean |  | Whether to disable check execution. When null, checks are enabled. |
| `dnsQueryName` | string |  | New name queried by DNS health checks. When null, the name is removed. |
| `dnsRecordType` | dns.gslb.HealthCheckRecordTypeEnum |  | New record type queried by DNS health checks. When null, the record type is removed. — one of `A`, `AAAA`, `CNAME`, `MX`, `TXT` |
| `failureThreshold` | integer |  | New number of consecutive failures. When null, the default of 3 is restored. From 1 to 10. |
| `fqdn` | string |  | New FQDN for the HTTP Host header and TLS SNI. When null, the FQDN is removed. |
| `inverted` | boolean |  | Whether to invert the health status. When null, the health status is not inverted. |
| `ipAddress` | ip |  | New public IPv4 or IPv6 endpoint address. When null, the address is removed. |
| `name` | string |  | New health check name. When null, the name is removed. |
| `port` | integer |  | New endpoint port. When null, the port is removed, which is only valid for protocols that do not use a port, such as ICMP. From 1 to 65535. |
| `requestInterval` | integer |  | New interval of 10 or 30 seconds. When null, the default of 30 is restored. |
| `resourcePath` | string |  | New HTTP request path starting with /. When null, the path is removed. |
| `searchString` | string |  | New expected HTTP response text. When null, the text is removed. |

```json
{
  "disabled": true,
  "dnsQueryName": "string",
  "dnsRecordType": "A",
  "failureThreshold": 0,
  "fqdn": "string",
  "inverted": true,
  "ipAddress": "192.0.2.0",
  "name": "string",
  "port": 0,
  "requestInterval": 0,
  "resourcePath": "string",
  "searchString": "string"
}
```

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdAt` | string (date-time) | read-only | Creation timestamp |
| `disabled` | boolean | read-only | Whether check execution is disabled |
| `dnsQueryName` | string | read-only | Name queried by DNS health checks, required for the DNS type. Null when not set. |
| `dnsRecordType` | dns.gslb.HealthCheckRecordTypeEnum | read-only | Record type queried by DNS health checks, required for the DNS type. Null when not set. — one of `A`, `AAAA`, `CNAME`, `MX`, `TXT` |
| `failureThreshold` | integer | read-only | Consecutive failures before marking the endpoint unhealthy |
| `fqdn` | string | read-only | FQDN used for the HTTP Host header and TLS SNI. Null when the check targets only ipAddress. |
| `healthStatus` | dns.gslb.HealthStatusEnum | read-only | Current endpoint health — one of `HEALTHY`, `UNHEALTHY`, `UNKNOWN` |
| `id` | string (uuid) | read-only | Unique identifier of the health check |
| `inverted` | boolean | read-only | Whether health status is inverted |
| `ipAddress` | ip | read-only | Public IPv4 or IPv6 endpoint address. Null when the check targets only fqdn. |
| `lastCheckedAt` | string (date-time) | read-only | Last execution timestamp. Null until the first check has run. |
| `lastError` | string | read-only | Error of the most recent check. Null when that check succeeded or no check has run yet. |
| `name` | string | read-only | Optional health check name |
| `port` | integer | read-only | Endpoint port, null for protocols that do not use one, such as ICMP |
| `requestInterval` | integer | read-only | Interval between checks, 10 or 30 seconds |
| `resourcePath` | string | read-only | HTTP request path, required for the HTTP, HTTPS, HTTP_STR_MATCH and HTTPS_STR_MATCH types. Null when not set. |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Resource lifecycle status — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `searchString` | string | read-only | String expected in the HTTP response body, required for the HTTP_STR_MATCH and HTTPS_STR_MATCH types. Null when not set. |
| `type` | dns.gslb.HealthCheckTypeEnum | read-only | Health check protocol — one of `DNS`, `HTTP`, `HTTPS`, `HTTPS_STR_MATCH`, `HTTP_STR_MATCH`, `ICMP`, `TCP` |
| `updatedAt` | string (date-time) | read-only | Last modification timestamp |

```json
{
  "createdAt": "2024-01-01T12:00:00Z",
  "disabled": true,
  "dnsQueryName": "string",
  "dnsRecordType": "A",
  "failureThreshold": 0,
  "fqdn": "string",
  "healthStatus": "HEALTHY",
  "id": "00000000-0000-0000-0000-000000000000",
  "inverted": true,
  "ipAddress": "192.0.2.0",
  "lastCheckedAt": "2024-01-01T12:00:00Z",
  "lastError": "string",
  "name": "string",
  "port": 0,
  "requestInterval": 0,
  "resourcePath": "string",
  "resourceStatus": "CREATING",
  "searchString": "string",
  "type": "DNS",
  "updatedAt": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X PATCH \
  "https://api.eu.ovhcloud.com/v2/dns/gslb/healthCheck/{healthCheckId}" \
  -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.UpdateHealthCheckRequest
result = client.patch("/v2/dns/gslb/healthCheck/{healthCheckId}",
	disabled = None, # Whether to disable check execution. When null, checks are enabled. (type: boolean, nullable)
	dnsQueryName = None, # New name queried by DNS health checks. When null, the name is removed. (type: string, nullable)
	dnsRecordType = None, # New record type queried by DNS health checks. When null, the record type is removed. (type: dns.gslb.HealthCheckRecordTypeEnum, nullable)
	failureThreshold = None, # New number of consecutive failures. When null, the default of 3 is restored. From 1 to 10. (type: integer, nullable)
	fqdn = None, # New FQDN for the HTTP Host header and TLS SNI. When null, the FQDN is removed. (type: string, nullable)
	inverted = None, # Whether to invert the health status. When null, the health status is not inverted. (type: boolean, nullable)
	ipAddress = None, # New public IPv4 or IPv6 endpoint address. When null, the address is removed. (type: ip, nullable)
	name = None, # New health check name. When null, the name is removed. (type: string, nullable)
	port = None, # New endpoint port. When null, the port is removed, which is only valid for protocols that do not use a port, such as ICMP. From 1 to 65535. (type: integer, nullable)
	requestInterval = None, # New interval of 10 or 30 seconds. When null, the default of 30 is restored. (type: integer, nullable)
	resourcePath = None, # New HTTP request path starting with /. When null, the path is removed. (type: string, nullable)
	searchString = None, # New expected HTTP response text. When null, the text is removed. (type: string, 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.UpdateHealthCheckRequest
$result = $ovh->patch("/v2/dns/gslb/healthCheck/{healthCheckId}", array(
	disabled => null, // Whether to disable check execution. When null, checks are enabled. (type: boolean, nullable)
	dnsQueryName => null, // New name queried by DNS health checks. When null, the name is removed. (type: string, nullable)
	dnsRecordType => null, // New record type queried by DNS health checks. When null, the record type is removed. (type: dns.gslb.HealthCheckRecordTypeEnum, nullable)
	failureThreshold => null, // New number of consecutive failures. When null, the default of 3 is restored. From 1 to 10. (type: integer, nullable)
	fqdn => null, // New FQDN for the HTTP Host header and TLS SNI. When null, the FQDN is removed. (type: string, nullable)
	inverted => null, // Whether to invert the health status. When null, the health status is not inverted. (type: boolean, nullable)
	ipAddress => null, // New public IPv4 or IPv6 endpoint address. When null, the address is removed. (type: ip, nullable)
	name => null, // New health check name. When null, the name is removed. (type: string, nullable)
	port => null, // New endpoint port. When null, the port is removed, which is only valid for protocols that do not use a port, such as ICMP. From 1 to 65535. (type: integer, nullable)
	requestInterval => null, // New interval of 10 or 30 seconds. When null, the default of 30 is restored. (type: integer, nullable)
	resourcePath => null, // New HTTP request path starting with /. When null, the path is removed. (type: string, nullable)
	searchString => null, // New expected HTTP response text. When null, the text is removed. (type: string, nullable)
));

print_r($result);
?>
```

## Delete a health check not referenced by any record set

`DELETE /v2/dns/gslb/healthCheck/{healthCheckId}`

Link: https://developers.eu.ovhcloud.com/reference/network/global-lb/health-checks/#deleteGslbHealthCheck

**Status:** Alpha version  
**IAM actions:** `gslbHealthCheck:apiovh:delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `healthCheckId` | path | string (uuid) | yes | Health check ID |

### Responses

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

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/v2/dns/gslb/healthCheck/{healthCheckId}" \
  -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/healthCheck/{healthCheckId}")

# 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/healthCheck/{healthCheckId}");

print_r($result);
?>
```

## Get the current status of a GSLB health check

`GET /v2/dns/gslb/healthCheck/{healthCheckId}/status`

Link: https://developers.eu.ovhcloud.com/reference/network/global-lb/health-checks/#getGslbHealthCheckStatus

**Status:** Alpha version  
**IAM actions:** `gslbHealthCheck:apiovh:get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `healthCheckId` | path | string (uuid) | yes | Health check ID |

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `healthCheckId` | string (uuid) | read-only | Identifier of the health check |
| `lastCheckedAt` | string (date-time) | read-only | Last execution timestamp. Null until the first check has run. |
| `status` | dns.gslb.HealthStatusEnum | read-only | Current endpoint health — one of `HEALTHY`, `UNHEALTHY`, `UNKNOWN` |

```json
{
  "healthCheckId": "00000000-0000-0000-0000-000000000000",
  "lastCheckedAt": "2024-01-01T12:00:00Z",
  "status": "HEALTHY"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/dns/gslb/healthCheck/{healthCheckId}/status" \
  -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/healthCheck/{healthCheckId}/status")

# 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/healthCheck/{healthCheckId}/status");

print_r($result);
?>
```
