> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agribackup.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Check Infrastructure and Service Dependency Health

> Query the live operational status of the AgriBackup API and its critical dependencies: Hedera Hashgraph DLT, Copernicus Sentinel-2, and HashiCorp Vault.

This endpoint provides a real-time snapshot of the AgriBackup API infrastructure and its three critical external dependencies: the Hedera Hashgraph distributed ledger used for cryptographic anchoring, the Copernicus CDSE Sentinel-2 satellite system used for deforestation analysis, and HashiCorp Vault used for credential management. You should integrate this endpoint into your monitoring stack to proactively detect degraded states before they affect your compliance operations. If any dependency is `DOWN`, the corresponding ingestion or anchoring features will be unavailable or running in a degraded mode. The global `status` field reflects the worst-case health across all components.

## Endpoint

`GET /api/v1/enterprise/eudr/health`

## Response Fields

<ResponseField name="status" type="string" required>
  The global health status of the EUDR API. Reflects the aggregate state of all dependencies. Possible values: `OPERATIONAL` (all systems healthy), `DEGRADED` (one or more dependencies partially unavailable), `DOWN` (critical failure preventing API operation).
</ResponseField>

<ResponseField name="services" type="object" required>
  An object containing the individual health status of each service dependency.
</ResponseField>

<ResponseField name="services.hedera.status" type="string" required>
  The connection status to the Hedera Hashgraph node used for DLT anchoring. `UP` means anchoring and smart contract operations are available. `DOWN` means all Hedera-dependent operations (polygon anchoring, shipment linking) will fail. Possible values: `UP`, `DOWN`.
</ResponseField>

<ResponseField name="services.hedera.latencyMs" type="integer">
  Network latency to the Hedera consensus node in milliseconds. `null` if the node is unreachable.
</ResponseField>

<ResponseField name="services.copernicus.status" type="string" required>
  The connection status to Copernicus CDSE Sentinel-2 satellite APIs and OAuth services used for deforestation analysis. `UP` means satellite NDVI analysis is available. `DOWN` means satellite analysis will be unavailable and polygon ingestion will be impacted. Possible values: `UP`, `DOWN`.
</ResponseField>

<ResponseField name="services.copernicus.lastSync" type="string">
  ISO-8601 timestamp of the last successful Copernicus OAuth token check or data synchronization. Example: `2026-06-19T12:00:00Z`
</ResponseField>

<ResponseField name="services.vault.status" type="string" required>
  The connection status to HashiCorp Vault used for secure storage and retrieval of TRACES NT credentials and signing secrets. `UP` means credential-dependent operations are available. `DOWN` means TRACES NT submission and credential operations will fail. Possible values: `UP`, `DOWN`.
</ResponseField>

## Status Values Reference

| Global Status | Meaning                                                                         |
| ------------- | ------------------------------------------------------------------------------- |
| `OPERATIONAL` | All service dependencies are `UP`. Full API functionality is available.         |
| `DEGRADED`    | One or more dependencies are `DOWN` but the API is partially functional.        |
| `DOWN`        | Critical dependencies are unavailable. Core API operations are not functioning. |

## Error Responses

| Status | Code           | Description                                        |
| ------ | -------------- | -------------------------------------------------- |
| `401`  | `UNAUTHORIZED` | Missing or invalid `X-API-Key`                     |
| `403`  | `FORBIDDEN`    | Your API key does not have diagnostics permissions |

<CodeGroup>
  ```python Python theme={null}
  import agribackup
  from agribackup.rest import ApiException

  configuration = agribackup.Configuration(host="https://live.agribackup.com/api/v1")
  configuration.api_key['ApiKeyAuth'] = 'sk_live_YOUR_API_KEY'

  with agribackup.ApiClient(configuration) as api_client:
      api_instance = agribackup.EnterpriseDiagnosticsApi(api_client)
      try:
          health = api_instance.get_health()
          print(f"Global Status: {health.status}")
          print(f"Hedera DLT:    {health.services.hedera.status} "
                f"(latency: {health.services.hedera.latency_ms}ms)")
          print(f"Copernicus:    {health.services.copernicus.status} "
                f"(last sync: {health.services.copernicus.last_sync})")
          print(f"Vault:         {health.services.vault.status}")

          if health.status != "OPERATIONAL":
              print("\nWARNING: One or more dependencies are degraded. "
                    "Compliance operations may be impacted.")
      except ApiException as e:
          print("Exception when calling get_health: %s\n" % e)
  ```

  ```javascript Node.js theme={null}
  import { AgriBackupClient } from '@agribackup/sdk';

  const client = new AgriBackupClient({
    apiKey: 'sk_live_YOUR_API_KEY',
    baseUrl: 'https://live.agribackup.com/api/v1'
  });

  async function checkHealth() {
    try {
      const health = await client.diagnostics.getHealth();
      console.log(`Global Status: ${health.status}`);
      console.log(`Hedera DLT:    ${health.services.hedera.status} (latency: ${health.services.hedera.latencyMs}ms)`);
      console.log(`Copernicus:    ${health.services.copernicus.status} (last sync: ${health.services.copernicus.lastSync})`);
      console.log(`Vault:         ${health.services.vault.status}`);

      if (health.status !== 'OPERATIONAL') {
        console.warn('WARNING: One or more dependencies are degraded. Compliance operations may be impacted.');
      }
    } catch (error) {
      console.error('Error checking health:', error);
    }
  }

  checkHealth();
  ```

  ```bash cURL theme={null}
  curl --request GET \
    --url https://live.agribackup.com/api/v1/enterprise/eudr/health \
    --header 'X-API-Key: sk_live_YOUR_API_KEY'
  ```
</CodeGroup>

### Example Response (All Systems Operational)

```json theme={null}
{
  "status": "OPERATIONAL",
  "services": {
    "hedera": {
      "status": "UP",
      "latencyMs": 142
    },
    "copernicus": {
      "status": "UP",
      "lastSync": "2026-06-19T12:00:00Z"
    },
    "vault": {
      "status": "UP"
    }
  }
}
```

### Example Response (Degraded — Copernicus Unavailable)

```json theme={null}
{
  "status": "DEGRADED",
  "services": {
    "hedera": {
      "status": "UP",
      "latencyMs": 155
    },
    "copernicus": {
      "status": "DOWN",
      "lastSync": "2026-06-19T10:00:00Z"
    },
    "vault": {
      "status": "UP"
    }
  }
}
```

<Tip>
  Integrate this endpoint into your ERP health dashboard and set up alerts for any `status` value other than `OPERATIONAL`. When `copernicus.status` is `DOWN`, polygon ingestion jobs will be unable to complete satellite analysis. When `hedera.status` is `DOWN`, anchoring and shipment linking operations will not succeed.
</Tip>
