Skip to content

Understanding Your Workspace

What is a Workspace?

In Centrali, a workspace is your isolated environment where all your application's data, functions, and configurations live. When you sign up for Centrali, you get a workspace with a unique identifier that's used in all API calls.

Your Workspace Identifier

Every API call includes your workspace identifier in the URL:

https://api.centrali.io/data/workspace/{your-workspace}/api/v1/records

For example, if your workspace is acme-corp:

https://api.centrali.io/data/workspace/acme-corp/api/v1/records

What's In Your Workspace?

Your workspace contains:

  • Structures - Your data schemas (like database tables)
  • Records - Your actual data entries
  • Compute Functions - Your serverless business logic
  • Triggers - Automation rules
  • Files - Uploaded files and assets
  • Settings - API keys and configurations

Workspace Isolation

Everything in your workspace is completely isolated: - Your data is private and secure - API keys only work for your workspace - Functions can only access your workspace's data - No cross-workspace data access

Using Your Workspace

In API Calls

Always include your workspace identifier:

const workspace = 'your-workspace';
const apiUrl = `https://api.centrali.io/data/workspace/${workspace}/api/v1`;

// Create a record
fetch(`${apiUrl}/records`, {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    structureId: 'str_products',
    data: { name: 'Widget', price: 99.99 }
  })
});

In the Console

When you log into the Centrali Console, you're automatically in your workspace context. All operations in the UI apply to your workspace.

API Authentication

Your API keys are workspace-specific. Each key: - Only works for your workspace - Cannot access other workspaces - Has specific permissions you configure

Best Practices

  1. Keep your workspace identifier handy - You'll use it in every API call
  2. Secure your API keys - They provide full access to your workspace
  3. Use environment variables - Store workspace ID and API keys as environment variables:
// .env file
CENTRALI_WORKSPACE=your-workspace
CENTRALI_API_KEY=your-api-key

// In your code
const workspace = process.env.CENTRALI_WORKSPACE;
const apiKey = process.env.CENTRALI_API_KEY;

Summary

Your workspace is your private space in Centrali where you build your application. All you need to remember is: - Your workspace identifier (used in API URLs) - Your API key (for authentication) - Everything you create stays in your workspace

That's it! Now you're ready to start building with Centrali.