Skip to content

Commit

Permalink
Connect via HTTP using cURL
Browse files Browse the repository at this point in the history
  • Loading branch information
Ekwuno committed Dec 9, 2024
1 parent 88a270a commit 5ae09e3
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
Binary file added src/assets/img/image/cloud/open-in-http.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 39 additions & 0 deletions src/content/doc-cloud/connect/http.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
sidebar_position: 5
sidebar_label: Connect via HTTP using cURL
title: Connect via HTTP using cURL | Surreal Cloud
description: Connect to your Surreal Cloud instance using the HTTP API and run queries.
---

import Image from "@components/Image.astro";

import OpenInHTTPCurlLight from '@img/image/cloud/open-in-http.png';
import OpenInHTTPCurlDark from '@img/image/cloud/open-in-http.png';

# Connect via HTTP using cURL

Surreal Cloud supports connection via HTTP. This allows you to connect to your Surreal Cloud Instance using curl or any HTTP client. To get started, select the **Connect** button on your Instance. Then select **HTTP cURL**.

This will open a modal to fill in your credentials for **Namespace** and **Database** and authentication before you can copy the URL.


<Image
alt="Open in Surrealist"
src={{
light: OpenInHTTPCurlLight,
dark: OpenInHTTPCurlDark,
}}
/>


> [!NOTE]
> The URL provided can be used in any HTTP client, but by default it is set to use curl. Use the URL in your HTTP client to connect to your Surreal Cloud Instance from clients like Postman or any other HTTP client.
## Connect to your Surreal Cloud Instance

Once you have filled in the credentials, copy the URL and connect to your Surreal Cloud Instance. Below is an example of the connection URL in curl.

```bash
curl -X GET "https://cloud-demo-069qmb9jjttknc0djomp73flfs.aws-use1.surreal.cloud/version"
```

1 change: 1 addition & 0 deletions src/content/doc-cloud/connect/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ You can connect to your Surreal Cloud instances in three main ways. In this sect
- [connect via Surrealist](/docs/cloud/connect/surrealist) : Surrealist is a query builder and IDE for SurrealDB. It allows you to connect to your Surreal Cloud Instance and run queries in a graphical interface.
- [connect via CLI](/docs/cloud/connect/cli) : using the command-line interface for SurrealDB, you can connect to your Surreal Cloud Instance and run queries in a command-line interface.
- [connect via SDK](/docs/cloud/connect/sdk) : Surreal Cloud supports a variety of SDKs for connecting to your Instance. You can use the SDKs to connect to your Instance and run queries in your preferred programming language.
- [connect via HTTP](/docs/cloud/connect/http) : Surreal Cloud supports a REST API for connecting to your Instance. You can use the API to connect to your Instance and run queries using CURL or any HTTP client.

## Before you begin

Expand Down

0 comments on commit 5ae09e3

Please sign in to comment.