Endpoints

Endpoints in Eve are managed connections to external databases, services, and APIs. They provide a unified interface for interacting with various data sources while handling connection pooling, authentication, monitoring, and access control.

What Are Endpoints?

Endpoints are connection abstractions that:

  • Establish and manage connections to external databases and services
  • Provide unified read/write/transaction interfaces across different database types
  • Handle connection pooling and health monitoring automatically
  • Integrate with RBAC for fine-grained access control
  • Support metadata collection and schema introspection

Endpoint Governance

Every endpoint participates in Eden's shared governance model:

LayerBehavior
IdentityRequests run under a resolved Eden user, agent, or external OIDC subject.
Control-plane RBACEndpoint configuration is gated by explicit control-plane permissions.
Data-plane RBACRuntime read/write/execute access is granted per endpoint or resource.
Credential isolationBackend credentials stay in endpoint configuration or endpoint-level security assignments.
Templates, APIs, and workflowsApproved operations can be defined as templates, published as APIs, and orchestrated through workflows.
Eve native gateway and transportNative protocol traffic can pass through Eve-managed listeners and VPN routes where supported.
Policy and maskingEndpoint-specific request controls can redact, block, mirror, or route traffic before backend egress.
Audit evidenceEden records safe endpoint, subject, route, policy, and latency evidence.

Some endpoint kinds add provider-specific connection and request behavior. See the provider page for the configuration and governance controls that apply to that endpoint kind.

Endpoint Categories

Databases

TypeEndpoint kindDescription
PostgreSQLpostgresPostgreSQL-compatible relational databases.
MySQLmysqlMySQL and MariaDB relational databases.
SQL ServermssqlMicrosoft SQL Server databases.
OracleoracleOracle Database services.
Amazon RDSrdsManaged AWS relational database endpoints, commonly PostgreSQL-compatible RDS or Aurora.
MongoDBmongoDocument databases using MongoDB connection strings.
RedisredisRedis-compatible key-value stores and caches.
ElastiCacheelasticacheAWS managed Redis-compatible cache clusters.
CassandracassandraDistributed wide-column NoSQL databases.
ClickHouseclickhouseColumnar analytical databases.
SnowflakesnowflakeSnowflake cloud data warehouse access.

Vector databases are also database endpoints: Pinecone, Weaviate, and the broader vector-store family support retrieval and similarity-search workloads.

LLMs

TypeEndpoint kindDescription
LLM ProvidersllmModel providers such as OpenAI, Anthropic, OpenRouter, Ollama, and Azure OpenAI.

Applications

TypeEndpoint kindDescription
Google Workspacegoogle_workspaceGmail, Drive, Calendar, Docs, Sheets, and related Workspace APIs.
GitHubgithubGitHub repositories, issues, pull requests, and automation APIs.
GitLabgitlabGitLab projects, repositories, issues, merge requests, and pipelines.
DatadogdatadogMetrics, logs, monitors, dashboards, and observability APIs.
PostHogposthogProduct analytics, events, insights, funnels, trends, and feature flags.
TavilytavilyWeb search and research APIs.
ErasereraserDiagram generation APIs.
SalesforcesalesforceSalesforce CRM objects and SOQL workflows.

Servers, Storage, And APIs

TypeEndpoint kindDescription
HTTP EndpointshttpREST and GraphQL APIs.
Amazon S3s3S3-compatible object storage.
AWS LambdafunctionServerless function invocation.

Platforms

TypeEndpoint kindDescription
AWSawsAWS cloud infrastructure operations across services.
AzureazureMicrosoft Azure resource operations.
DatabricksdatabricksDatabricks SQL warehouse and platform access.

Agents

Agent runtimes consume Eve model endpoints and Adam gateway routes, but their identity and integration configuration lives under Authentication and Agents. This keeps endpoint configuration separate from the human, service, and runtime identities that use it.

Creating Endpoints

PostgreSQL

bash
curl http://{host}:8000/api/v1/endpoints \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -d '{
    "endpoint": "main_postgres",
    "kind": "Postgres",
    "config": {
      "write_conn": {
        "url": "postgresql://user:password@host:5432/database"
      }
    }
  }'

Redis

bash
curl http://{host}:8000/api/v1/endpoints \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -d '{
    "endpoint": "cache",
    "kind": "Redis",
    "config": {
      "write_conn": {
        "host": "host", "port": 6379
      }
    }
  }'

MongoDB

bash
curl http://{host}:8000/api/v1/endpoints \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -d '{
    "endpoint": "documents",
    "kind": "Mongo",
    "config": {
      "write_conn": {
        "url": "mongodb://user:password@host:27017/database"
      }
    }
  }'

HTTP Endpoint

bash
curl http://{host}:8000/api/v1/endpoints \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -d '{
    "endpoint": "external_api",
    "kind": "Http",
    "config": {
      "base_url": "https://api.example.com",
      "headers": {
        "Authorization": "Bearer api_key",
        "Content-Type": "application/json"
      }
    }
  }'

Response

json
{
  "status": "success",
  "data": {
    "id": "main_postgres",
    "uuid": "550e8400-e29b-41d4-a716-446655440000"
  }
}

Database Operations

Reading Data

bash
curl http://{host}:8000/api/v1/endpoints/main_postgres/read \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -d '{
    "query": "SELECT * FROM users WHERE status = $1 LIMIT $2",
    "params": ["active", 10]
  }'

Response:

json
{
  "status": "success",
  "data": {
    "rows": [
      {
        "id": 1,
        "name": "John Doe",
        "email": "john@example.com",
        "status": "active"
      }
    ],
    "row_count": 1
  }
}

Writing Data

bash
curl http://{host}:8000/api/v1/endpoints/main_postgres/write \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -d '{
    "query": "INSERT INTO users (name, email, status) VALUES ($1, $2, $3) RETURNING id",
    "params": ["Alice", "alice@example.com", "active"]
  }'

Response:

json
{
  "status": "success",
  "data": {
    "rows": [{ "id": 3 }],
    "rows_affected": 1
  }
}

Transaction Operations

bash
curl http://{host}:8000/api/v1/endpoints/main_postgres/transaction \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -d '{
    "operations": [
      {
        "query": "UPDATE accounts SET balance = balance - $1 WHERE id = $2",
        "params": [100.00, 1]
      },
      {
        "query": "UPDATE accounts SET balance = balance + $1 WHERE id = $2",
        "params": [100.00, 2]
      },
      {
        "query": "INSERT INTO transactions (from_account, to_account, amount) VALUES ($1, $2, $3)",
        "params": [1, 2, 100.00]
      }
    ]
  }'

Database-Specific Operations

MongoDB

bash
curl http://{host}:8000/api/v1/endpoints/documents/read \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -d '{
    "collection": "products",
    "operation": "find",
    "filter": {
      "category": "electronics",
      "price": {"$lt": 1000}
    },
    "options": {
      "limit": 20,
      "sort": {"price": 1}
    }
  }'

Redis

bash
# SET operation
curl http://{host}:8000/api/v1/endpoints/cache/write \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -d '{
    "command": "SET",
    "args": ["user:123", "{\"name\": \"John\"}"]
  }'

# GET operation
curl http://{host}:8000/api/v1/endpoints/cache/read \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -d '{
    "command": "GET",
    "args": ["user:123"]
  }'

Retrieving Endpoint Information

Get Endpoint Details

bash
curl http://{host}:8000/api/v1/endpoints/main_postgres \
  -H "Authorization: Bearer $TOKEN"

Response:

json
{
  "status": "success",
  "data": {
    "id": "main_postgres",
    "uuid": "550e8400-e29b-41d4-a716-446655440000",
    "kind": "Postgres",
    "config": {
      "host": "localhost",
      "port": 5432,
      "database": "myapp"
    },
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z"
  }
}

Note: Sensitive credentials like passwords are not returned in GET responses.

List All Endpoints

bash
curl http://{host}:8000/api/v1/endpoints \
  -H "Authorization: Bearer $TOKEN"

Updating Endpoints

bash
curl http://{host}:8000/api/v1/endpoints/main_postgres \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -X PATCH \
  -d '{
    "config": {
      "pool_size": 20,
      "connection_timeout": 45
    }
  }'

Deleting Endpoints

bash
curl http://{host}:8000/api/v1/endpoints/main_postgres \
  -H "Authorization: Bearer $TOKEN" \
  -X DELETE

Response:

json
{
  "status": "success",
  "data": {
    "id": "main_postgres",
    "uuid": "550e8400-e29b-41d4-a716-446655440000",
    "kind": "Postgres",
    "modified_objects": {
      "objects": {
        "deleted_from_cache": ["endpoint_cache_uuid"],
        "deleted_from_postgres": ["endpoint_postgres_uuid"]
      }
    }
  }
}

Access Control

Endpoints integrate with Eden's RBAC system:

Permission BitsPermissions
AdminCreate, update, delete endpoints; full data access
WriteRead and write data operations
ReadRead-only data access

Grant Access

bash
curl http://{host}:8000/api/v1/iam/control/endpoints/my_database/subjects/user@company.com \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -X PUT \
  -d '{"perms":"R"}'

Error Handling

Connection Timeout

json
{
  "error": "Connection timeout",
  "details": "Failed to connect to database within 30 seconds",
  "suggestion": "Check network connectivity and database availability"
}

Invalid Query

json
{
  "error": "SQL syntax error",
  "details": "Syntax error at or near 'SELCT'"
}

Insufficient Permissions

json
{
  "error": "Access denied",
  "details": "User does not have Write access to endpoint",
  "perms": "R",
  "required_level": "Write"
}

Pool Exhaustion

json
{
  "error": "Connection pool exhausted",
  "details": "All connections in use",
  "suggestion": "Increase pool_size or optimize query performance"
}

Best Practices

Connection Configuration

  • Pool Sizing: Start with 10-20 connections, monitor and adjust
  • Timeouts: Set appropriate connection and query timeouts
  • SSL/TLS: Always use encrypted connections in production

Query Optimization

  • Parameterized Queries: Always use parameterized queries to prevent SQL injection
  • Connection Reuse: Leverage connection pooling for better performance
  • Transaction Scope: Keep transactions as short as possible

Security

  • Least Privilege: Grant minimum necessary access levels
  • Credential Rotation: Rotate database credentials regularly
  • Audit Logging: Monitor all database operations

Monitoring

  • Health Checks: Implement regular connection health checks
  • Performance Metrics: Track query performance and connection usage
  • Error Alerting: Set up alerts for connection failures
Last updated: July 10, 2026