Skip to content

Manage

The User Management API provides REST endpoints for managing user accounts and environments.

Reference Implementation

The Console App is an open-source implementation that uses these APIs. See its API Reference section for real-world usage examples.

Deployment User Management Endpoint Metrics Endpoint
Cloud (SaaS) https://api.log10x.com https://prometheus.log10x.com
Staging https://api-staging.log10x.com https://prometheus-staging.log10x.com
Self-Hosted Your configured endpoint Your configured endpoint

Endpoint Compatibility

Both api.log10x.com and prometheus.log10x.com route to the same API Gateway. The domain separation provides semantic clarity: use api.log10x.com for user management and prometheus.log10x.com for Prometheus queries.

Authenticate using a 10x API key via the X-10X-Auth header.

Authentication

All endpoints require authentication via the X-10X-Auth header. The header accepts two formats:

Format Description
X-10X-Auth: <api_key> Uses the default environment
X-10X-Auth: <api_key>/<env_id> Specifies a target environment
Authentication Header Examples
X-10X-Auth: your-api-key-here
X-10X-Auth: your-api-key-here/00000000-0000-0000-0000-000000000000

Your API key determines your identity and permission level (OWNER, WRITE, or READ) for the target environment.


User Endpoints

Get Current User

Retrieves information about the authenticated user including their environments and metadata.

Property Value
Endpoint GET /api/v1/user
Request Example
curl -s -H "X-10X-Auth: <YOUR-API-KEY>" \
  "https://api.log10x.com/api/v1/user"
Response (200 OK)
{
  "user": {
    "username": "user@example.com",
    "licenses": 1,
    "environments": [
      {
        "is_default": true,
        "name": "Production",
        "owner": "user@example.com",
        "env_id": "00000000-0000-0000-0000-000000000000",
        "permissions": "OWNER"
      }
    ],
    "metadata": {
      "company": "Acme Inc"
    }
  }
}

Update User

Updates the authenticated user's metadata.

Property Value
Endpoint POST /api/v1/user
Content-Type application/json
Request Example
curl -s -X POST \
  -H "X-10X-Auth: <YOUR-API-KEY>" \
  -H "Content-Type: application/json" \
  -d '{"metadata": {"company": "New Company Name"}}' \
  "https://api.log10x.com/api/v1/user"

Request Body:

Field Type Description
metadata object Custom user metadata key-value pairs
Response (200 OK)
{
  "user": {
    "username": "user@example.com",
    "licenses": 1,
    "environments": [...],
    "metadata": {
      "company": "New Company Name"
    }
  }
}

Update AI Settings

Configures AI analysis for the authenticated user via the POST /api/v1/user metadata fields. See AI Analysis for provider details and deployment modes.

Field Type Description
ai_provider string openai, anthropic, xai, custom, or empty to use Log10x managed
ai_api_key string Your provider API key (stored encrypted with enc: prefix)
ai_endpoint string Custom provider URL (required when ai_provider is custom)
ai_model string Model name (required when ai_provider is custom)
ai_temperature number Creativity/determinism, 0.0-1.0
ai_disabled boolean Set true to disable AI entirely

Provider defaults (when ai_endpoint / ai_model are not specified):

Provider Endpoint Default Model
openai https://api.openai.com/v1 gpt-4o
anthropic https://api.anthropic.com claude-sonnet-4-5-20250929
xai https://api.x.ai/v1 grok-4-fast-reasoning
Example: Configure OpenAI BYOK
curl -s -X POST \
  -H "X-10X-Auth: <YOUR-API-KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "metadata": {
      "ai_provider": "openai",
      "ai_api_key": "sk-...",
      "ai_temperature": 0.7
    }
  }' \
  "https://api.log10x.com/api/v1/user"
Example: Configure custom endpoint (Ollama)
curl -s -X POST \
  -H "X-10X-Auth: <YOUR-API-KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "metadata": {
      "ai_provider": "custom",
      "ai_api_key": "ollama",
      "ai_endpoint": "http://localhost:11434/v1",
      "ai_model": "llama3",
      "ai_temperature": 0.5
    }
  }' \
  "https://api.log10x.com/api/v1/user"
Example: Disable AI
curl -s -X POST \
  -H "X-10X-Auth: <YOUR-API-KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "metadata": {
      "ai_disabled": true
    }
  }' \
  "https://api.log10x.com/api/v1/user"

Environment Endpoints

Create Environment

Creates a new environment for the authenticated user.

Property Value
Endpoint POST /api/v1/user/env
Content-Type application/json
Request Example
curl -s -X POST \
  -H "X-10X-Auth: <YOUR-API-KEY>" \
  -H "Content-Type: application/json" \
  -d '{"name": "Staging", "is_default": false}' \
  "https://api.log10x.com/api/v1/user/env"

Request Body:

Field Type Required Description
name string Yes Unique name for the environment
is_default boolean No Set as the default environment
Response (200 OK)
{
  "user": {
    "username": "user@example.com",
    "licenses": 1,
    "environments": [
      {
        "is_default": true,
        "name": "Production",
        "owner": "user@example.com",
        "env_id": "00000000-0000-0000-0000-000000000000",
        "permissions": "OWNER"
      },
      {
        "is_default": false,
        "name": "Staging",
        "owner": "user@example.com",
        "env_id": "11111111-1111-1111-1111-111111111111",
        "permissions": "OWNER"
      }
    ],
    "metadata": {}
  }
}

Update Environment

Updates an existing environment. You must be the owner of the environment.

Property Value
Endpoint PUT /api/v1/user/env
Content-Type application/json
Request Example
curl -s -X PUT \
  -H "X-10X-Auth: <YOUR-API-KEY>" \
  -H "Content-Type: application/json" \
  -d '{"env_id": "11111111-1111-1111-1111-111111111111", "name": "QA Environment", "is_default": false}' \
  "https://api.log10x.com/api/v1/user/env"

Request Body:

Field Type Required Description
env_id string Yes UUID of the environment to update
name string Yes New name for the environment
is_default boolean No Set as the default environment
Response (200 OK)
{
  "user": {
    "username": "user@example.com",
    "licenses": 1,
    "environments": [
      {
        "is_default": false,
        "name": "QA Environment",
        "owner": "user@example.com",
        "env_id": "11111111-1111-1111-1111-111111111111",
        "permissions": "OWNER"
      }
    ],
    "metadata": {}
  }
}

Delete Environment

Deletes an environment. You must be the owner of the environment.

Property Value
Endpoint DELETE /api/v1/user/env
Content-Type application/json
Request Example
curl -s -X DELETE \
  -H "X-10X-Auth: <YOUR-API-KEY>" \
  -H "Content-Type: application/json" \
  -d '{"env_id": "11111111-1111-1111-1111-111111111111"}' \
  "https://api.log10x.com/api/v1/user/env"

Request Body:

Field Type Required Description
env_id string Yes UUID of the environment to delete
Response (200 OK)
{
  "user": {
    "username": "user@example.com",
    "licenses": 1,
    "environments": [
      {
        "is_default": true,
        "name": "Production",
        "owner": "user@example.com",
        "env_id": "00000000-0000-0000-0000-000000000000",
        "permissions": "OWNER"
      }
    ],
    "metadata": {}
  }
}

Data Models

UserInfo

The user object returned by all API endpoints.

Field Type Description
username string User's email address
licenses number Number of licensed environments
environments array List of Environment objects
metadata object Custom user metadata

Environment

Represents a 10x environment within a user's account.

Field Type Description
env_id string Unique UUID identifier
name string Display name
owner string Owner's email address
is_default boolean Whether this is the default environment
permissions string Access level: OWNER, WRITE, or READ

Permission Levels:

Permission Description
OWNER Full access including create, update, and delete
WRITE Can write and update data
READ Read-only access

Error Responses

All endpoints return standard HTTP status codes with JSON error bodies.

Status Description Common Causes
400 Bad Request Missing required fields, invalid JSON
401 Unauthorized Invalid API key, insufficient permissions
404 Not Found Environment does not exist
409 Conflict Duplicate environment name
500 Internal Server Error Service unavailable
Error Response Example
{
  "error": "environment name already exists for this owner"
}

Examples

Full Workflow: Create and Configure Environment
# 1. Get current user info
curl -s -H "X-10X-Auth: <YOUR-API-KEY>" \
  "https://api.log10x.com/api/v1/user"

# 2. Create a new staging environment
curl -s -X POST \
  -H "X-10X-Auth: <YOUR-API-KEY>" \
  -H "Content-Type: application/json" \
  -d '{"name": "Staging", "is_default": false}' \
  "https://api.log10x.com/api/v1/user/env"

# 3. Use the new environment's env_id in subsequent API calls
curl -s -H "X-10X-Auth: <YOUR-API-KEY>/11111111-1111-1111-1111-111111111111" \
  "https://prometheus.log10x.com/api/v1/query?query=tenx_pipeline_up"
Update User Metadata
curl -s -X POST \
  -H "X-10X-Auth: <YOUR-API-KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "metadata": {
      "company": "Acme Corporation",
      "team": "Platform Engineering",
      "notifications": true
    }
  }' \
  "https://api.log10x.com/api/v1/user"