Quickstart

Quickstart

Make your first LCE request

Connect to your Lidia environment, authenticate with a JWT and run a read-only query against the Metadata API.

  • Environment base URL
  • Valid JWT access token
  • Tenant identifier

Set your environment values

Replace the example values with the base URL, token and tenant identifier supplied for your project environment.

export LCE_BASE_URL="https://api.example.com"
export LCE_TOKEN="<jwt-token>"
export LCE_TENANT_ID="1"

The API definitions use an environment-specific server placeholder. Do not use localhost defaults outside a local LCE installation.

Query available languages

This request calls POST /metadata/query/languages. It is read-only and returns language metadata available to the current tenant.

curl --request POST \
  --url "$LCE_BASE_URL/metadata/query/languages" \
  --header "Authorization: Bearer $LCE_TOKEN" \
  --header "Content-Type: application/json" \
  --data "{
    \"tenantId\": $LCE_TENANT_ID,
    \"pageIndex\": 0,
    \"pageSize\": 20
  }"

Inspect the response

A successful request returns HTTP 200. The response contains a result collection and count fields. The exact records depend on your environment configuration.

{
  "result": [
    {
      "languageId": 1,
      "name": "English",
      "code": "en",
      "isDefault": true
    }
  ],
  "resultCount": 1,
  "totalCount": 1
}

Abbreviated example; service envelopes can include additional diagnostic fields.

Call the API from JavaScript

const response = await fetch(
  \`${process.env.LCE_BASE_URL}/metadata/query/languages\`,
  {
    method: "POST",
    headers: {
      "Authorization": \`Bearer ${process.env.LCE_TOKEN}\`,
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      tenantId: Number(process.env.LCE_TENANT_ID),
      pageIndex: 0,
      pageSize: 20
    })
  }
);

if (!response.ok) {
  throw new Error(\`LCE request failed: ${response.status}\`);
}

const data = await response.json();
console.log(data.result);

Run privileged integrations on a trusted server or backend-for-frontend. Do not expose long-lived credentials in browser code.

Where to go next

Understand access

Learn how to send JWTs securely and distinguish authentication from authorization.

Explore domain APIs

Choose operations by business capability, then use the API Reference for complete schemas.

Configure environments

Keep base URLs, credentials and provider integrations isolated by environment.

Automate your workflow

Import the OpenAPI definition into your API client or generate a project-owned SDK.