---
title: Database Operations with Edge Server
description: How to make an API call with the Couchbase Edge Server REST API.
pubDate: 2026-08-17T09:53:44.266Z
antora:
  editUrl: https://github.com/couchbaselabs/docs-couchbase-lite-edge-server/edit/release/1.0/modules/rest-based-access/pages/database-operations.adoc
  xref: xref:1.0@couchbase-edge-server:rest-based-access:database-operations.adoc[]
---

[Consult the llms.txt file for a full list of contents](/llms.txt)
[View original HTML](/couchbase-edge-server/1.0/rest-based-access/database-operations.html)

# Database Operations with Edge Server

> How to make an API call with the Couchbase Edge Server REST API. 

## [](#prerequisites)Prerequisites

In order make an API call with the Edge Server REST API, you must have configured Edge Server for REST-based access.

* You must have specified the host information, including the base URL and port.
* You must have specified TLS certificate information.
* If necessary, you must have specified a HTTP Basic user name and password. The user specified must have the role required to carry out the API call.

To configure Edge Server for REST-based access, see [Get Started with the Edge Server REST API](rest-api-start.md).

## [](#make-an-api-call)Make an API Call

You can use a client such as [cURL](https://curl.se) or a native SDK call to make an API call with the Management API.

To make an API call:

1. Use the base URL and port that you specified when configuring Edge Server, for example:  
`<https://localhost:59840>`
2. Pass the TLS certificate information and the HTTP Basic username and password as required.
3. If a request body is required, pass it in JSON format.

Alternatively, you can use a client such as [Insomnia](https://insomnia.rest) or [Postman](https://www.postman.com) to explore the details of the REST API, generate code samples, and so on. The Edge Server REST API uses an [OpenAPI](https://swagger.io/resources/open-api) v3 specification. To download the Edge Server REST API specification, go to the [REST API Reference](../public-api-reference/index.md) and click **Download**.

## [](#examples)Examples

In the command line examples:

* `$USER` and `$PASSWORD` are the credentials for Couchbase Edge Server.
* `$CERT` is the name and path to a TLS certificate file, for example `cert.cer`.
* `$HOST` and `$PORT` are the host and port to connect to Couchbase Edge Server, for example `localhost:59840`.

Note that the following cURL examples use a self-signed TLS server certificate. In production, you are strongly recommended to use a TLS certificate generated by a well-known authority.

### [](#get-server-information)Get Server Information

The following request gets information about the Edge Server node.

HTTP Request

```sh
curl --cacert $CERT --user $USER:$PASSWORD \
  "https://$HOST:$PORT/"
```

The response is a JSON object similar to the following.

HTTP Response

```json
{
  "couchdb": "Welcome",
  "vendor": {
    "name": "Couchbase Edge Server",
    "version": "1.0.0 (37; )"
  },
  "version": "CouchbaseEdgeServer/1.0.0 (37; ) CouchbaseLiteCore/0.0.0-EE (770a516a19d505b7+403e27d509bb1131)"
}
```

### [](#list-all-databases)List All Databases

The following request lists all the databases available on the Edge Server node.

HTTP Request

```sh
curl --cacert $CERT --user $USER:$PASSWORD \
  "https://$HOST:$PORT/_all_dbs"
```

The response is a JSON array similar to the following. In this case, the Edge Server node has two databases.

HTTP Response

```json
[
  "scratch",
  "travel-sample"
]
```

### [](#get-information-about-a-database)Get Information About a Database

The following request gets information about the specified database.

HTTP Request

```sh
curl --cacert $CERT --user $USER:$PASSWORD \
  "https://$HOST:$PORT/travel-sample"
```

The response is a JSON object similar to the following.

HTTP Response

```json
{
  "db_name": "travel-sample",
  "db_uuid": "8478be31c9674c499c07edd4e3115de7",
  "collections": {
    "_default": {
      "doc_count": 0,
      "update_seq": 0
    },
    "inventory.airline": {
      "doc_count": 1,
      "update_seq": 1
    },
    "inventory.airport": {
      "doc_count": 1980,
      "update_seq": 1980
    },
    "inventory.hotel": {
      "doc_count": 0,
      "update_seq": 0
    },
    "inventory.landmark": {
      "doc_count": 0,
      "update_seq": 0
    },
    "inventory.route": {
      "doc_count": 0,
      "update_seq": 0
    }
  }
}
```

### [](#get-information-about-a-keyspace)Get Information About a Keyspace

The following request gets information about the specified keyspace.

HTTP Request

```sh
curl --cacert $CERT --user $USER:$PASSWORD \
  "https://$HOST:$PORT/travel-sample.inventory.airport"
```

The response is a JSON object similar to the following.

HTTP Response

```json
{
  "db_name": "travel-sample",
  "db_uuid": "8478be31c9674c499c07edd4e3115de7",
  "scope_name": "inventory",
  "collection_name": "airport",
  "doc_count": 1980,
  "update_seq": 1980,
  "committed_update_seq": 1980
}
```

## [](#see-also)See Also

* [Edge Server REST API](rest-api-landing.md)
* [Get Started with the Edge Server REST API](rest-api-start.md)
* [Document Access with Edge Server](document-access.md)
* [Monitor Changes with Edge Server](changes-feed.md)
* [Run Queries with Edge Server](queries-api.md)
* [Manage Replication with Edge Server](replication.md)
* [Edge Server Public REST API](../public-api-reference/index.md)