Skip to content

Connections

Each database provides three connection endpoints:

ProtocolURLPortUse Case
HTTPhttps://your-db.owlgraph.ai443Queries, mutations, ontology management
gRPCyour-db.owlgraph.ai:90809080High-performance client access
GraphQLhttps://your-db.owlgraph.ai/graphql443Auto-generated GraphQL API

All requests require an API key passed in the X-OWLGraph-Key header:

Terminal window
curl -X POST https://your-db.owlgraph.ai/query \
-H "X-OWLGraph-Key: your-api-key" \
-H "Content-Type: application/dql" \
-d '{ q(func: type(Animal)) { name } }'

Generate API keys from Dashboard > Settings > API Keys.

Terminal window
export OWLGRAPH_URL="https://your-db.owlgraph.ai"
export OWLGRAPH_KEY="your-api-key"
curl -X POST "$OWLGRAPH_URL/query" \
-H "X-OWLGraph-Key: $OWLGRAPH_KEY" \
-H "Content-Type: application/dql" \
-d '{ q(func: type(Animal)) { name dgraph.type } }'
conn, err := grpc.Dial("your-db.owlgraph.ai:9080",
grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{})),
)
client := dgo.NewDgraphClient(api.NewDgraphClient(conn))
import pydgraph
stub = pydgraph.DgraphClientStub("your-db.owlgraph.ai:9080")
client = pydgraph.DgraphClient(stub)
const dgraph = require("dgraph-js");
const grpc = require("@grpc/grpc-js");
const stub = new dgraph.DgraphClientStub(
"your-db.owlgraph.ai:9080",
grpc.credentials.createSsl()
);
const client = new dgraph.DgraphClient(stub);