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

# sabaoth postgres get

> Show a PostgreSQL service, including its status, resources and connection details

Shows one service in the effective organization: its status, resources, connection details, backup settings and network exposure.

```bash theme={null}
sabaoth postgres get <service-id> [--org <org-id>] [--json]
```

## Arguments

**service-id** `string` *required*

The service's ID, for example `clu_abc`. Find it with `sabaoth postgres list`.

## Flags

**--org** `string`

Organization to act in, instead of the selected one.

**--json** `boolean` (default: false)

Print the result as JSON on stdout.

## Examples

```bash theme={null}
sabaoth postgres get clu_abc
sabaoth postgres get clu_abc --json
sabaoth postgres get clu_abc --org org_other
```

## Output

```text theme={null}
$ sabaoth postgres get clu_abc
Name:        orders-db
ID:          clu_abc
Status:      ready
Version:     16
Resources:   500m CPU, 1024Mi memory, 10Gi storage
Replicas:    1
Tier:        starter
Created:     2026-01-01T00:00:00Z
Updated:     2026-01-01T00:05:00Z

Connection:
  Host:      orders-db.example.sabaothcloud.com
  Port:      5432
  Database:  app
  Username:  app_owner

Backups:     enabled, 14 day retention, schedule 0 2 * * *
Exposure:    private
```

With `--json`:

```json theme={null}
{
  "id": "clu_abc",
  "name": "orders-db",
  "status": "ready",
  "organization_id": "org_abc",
  "postgres_version": "16",
  "cpu_millicores": 500,
  "memory_mb": 1024,
  "storage_gb": 10,
  "replicas": 1,
  "tier": "starter",
  "created_at": "2026-01-01T00:00:00Z",
  "updated_at": "2026-01-01T00:05:00Z",
  "connection": {
    "host": "orders-db.example.sabaothcloud.com",
    "port": 5432,
    "database": "app",
    "username": "app_owner"
  },
  "backup": { "enabled": true, "retention_days": 14, "schedule": "0 2 * * *" },
  "exposure": { "exposed": false }
}
```

| Field | Description |
| - | - |
| `status` | The service's current state. See [Service statuses](#service-statuses). |
| `status_message` | Extra detail about the status, when the API provides it. |
| `connection` | Host, port, database and username. Present once the service has connection details. |
| `backup` | Whether scheduled backups are on, how long they're kept and the cron schedule. |
| `exposure` | Whether the service is reachable from the internet. When `exposed` is `true`, it can also include `host`, `port` and `allowed_ips`. |

> [!NOTE]
>
> Connection details never include a password. Create database users and get their passwords in the dashboard; see [Database users](https://docs.sabaothcloud.com/dashboard/database-users.md).

## Service statuses

| Status | Meaning |
| - | - |
| `pending`, `provisioning` | The service is being created. |
| `ready` | Running and accepting connections. |
| `updating`, `scaling` | A configuration or size change is being applied. |
| `backingup`, `restoring`, `pitrrecovery` | A backup, restore or point-in-time recovery is running. |
| `failoverinprogress` | A standby is being promoted. |
| `paused` | The service is paused. |
| `failed` | Something went wrong. Check `status_message` and the [logs](https://docs.sabaothcloud.com/cli/commands/postgres-logs.md). |
| `deleting`, `pendingdeletion`, `deleted` | The service is being, or has been, deleted. |

## Behavior

A service in another organization is reported exactly like a service that doesn't exist, with `CLUSTER_NOT_FOUND`. This avoids confirming that an ID exists somewhere you can't see. If you expected to find it, check you're in the right organization with `sabaoth config`, or pass `--org`.

## Errors

| Code | Exit | Meaning |
| - | - | - |
| `CLUSTER_NOT_FOUND` | 1 | No service with this ID in the effective organization. |
| `INVALID_CLUSTER_ID` | 1 | The API rejected the value as a service ID. Check it with `sabaoth postgres list`. |

## Related

* [`sabaoth postgres list`](https://docs.sabaothcloud.com/cli/commands/postgres-list)
* [Networking and connecting](https://docs.sabaothcloud.com/dashboard/networking.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.