TypeDB Cloud
Preliminaries
Connecting to TypeDB Cloud requires:
-
A cluster deployed through TypeDB Cloud
-
The
address
andport
of the server - these can be found on the page for your cluster -
A valid
username
andpassword
- you should have set the password for theadmin
user while setting up your cluster
Connecting your client
-
Console
-
Studio
Run Console in CLI:
typedb console --address=<server-address> --username=<username>
You will be prompted for a password.
Run Studio and follow instructions below:
-
In the TypeDB Cloud website, navigate to your cluster and click Connect. Then, click TypeDB Studio.
-
The Connect to your cluster dialog will display the connection URI for your cluster, with a placeholder:
<db_password>
. -
In TypeDB Studio, click Connect to TypeDB in the top right corner.
-
Select
TypeDB Cloud
. Copy in the Connection URI, and replace<db_password>
with your actual password. Consider saving this connection URI in a secure location. . -
Select
TypeDB Cloud
. -
Click Manage Cloud Addresses button.
-
Add address and port for at least one server from your TypeDB Cloud deployment, then close the Address Management window.
-
Fill in the
Username
andPassword
fields with valid user credentials. -
Turn on the
Enable TLS
option and leave theCA Certificate
field empty. For self-hosted deployments, encryption parameters may vary. -
Click
Connect
.
Connecting your application
For programmatic access, use one of the TypeDB drivers via the network API:
-
Rust
-
Python
-
Java
-
Node.js
-
C#
-
C++
-
C
-
HTTP
let uri = format!("{}:{}", address, port);
let driver = TypeDBDriver::new(
&uri,
Credentials::new(username, password),
DriverOptions::new(false, None).unwrap(),
).await;
uri = f"{address}:{port}"
driver = TypeDB.driver(uri, Credentials(username, password), DriverOptions(False, None))
uri = String.format("%s:%s", address, port)
Driver driver = TypeDB.driver(uri, new Credentials(username, password), new DriverOptions(false, null));
Coming soon. |
Coming soon. |
Coming soon. |
Coming soon. |
Send a sign in HTTP request:
curl --request POST \
--url https://{address}:{http_port}/v1/signin \
--json '{"username": "USERNAME", "password": "PASSWORD"}'
Note that the {http_port}
is different from the regular TypeDB port mentioned above and is defaulted to 8000
.
A successful response will contain an authentication token:
{
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTc0NDYzNTI5NSwiaWF0IjoxNzQ0NjIwODk1fQ.WEhmBTAXI_qZUlAB7zw52LDGJhnqfNTXS63QDSZlqds"
}
Put it in the authorization header of the future requests. See HTTP endpoint authentication for more information.