Integrations#
Empowerment Center offers several ways for other programs to use its data without a person opening the application: an API to query, a server for AI assistants, embedding documents in other applications and moving the metadata between environments. This part explains what each one does, what has to be configured and how it is protected.
Before you start#
All integrations share three principles:
- They always act on behalf of a real user. There are no technical accounts or anonymous guests. The program comes in with a credential or a token that names an ECenter user, and it sees exactly what that user would see in the application: the same universes (rows) and the same column security.
- Privileges are read on every request. If a user loses a role or is disabled, the integration notices on the next request.
- There is no SQL. No integration lets you write SQL against the client database. A cube query is requested with the catalog identifiers and ECenter calculates it with the same engine as the application.
You need a valid license: without it, all integration surfaces respond 403 LICENSE_INVALID, with no exceptions.
Which integration to use#
| Need | Integration | Who configures it | Credential |
|---|---|---|---|
| A program (a Python report, a spreadsheet, a nightly process) that reads figures | Query API | Each user, for themselves | Personal, Query API scope |
| An AI assistant (Claude, other MCP clients) that answers questions about the data | MCP server | Administration enables the server; each user creates their credential or signs in with the company account | Personal, AI assistants (MCP) scope, or OAuth |
| Showing portal documents or templates inside an intranet, an ERP or a customer portal | Embedding | System administration | The host application's, Embedding scope |
| Taking the metadata from development to production from a script or continuous integration | Metadata exchange without a session | System administration, in the name of whoever administers the metadata | Metadata exchange scope |
| Creating and removing users from the identity provider | SCIM provisioning (see the security chapter) | User administration | User provisioning (SCIM) scope |
All of them, except the MCP server's OAuth, use a service credential: a secret the program sends in the Authorization: Bearer header. Credentials are explained in Service credentials.
Routes of each integration#
Each integration has its own route and only accepts its kind of credential. The application's session cookie does not work in any of them, and their responses never create a session.
| Route | Integration | What it accepts |
|---|---|---|
/api/query/v1/** |
Query API | Credential with the Query API scope |
/api/mcp |
MCP server | Credential with the MCP scope or an OAuth token from the identity provider |
/api/embed/v1/tokens and /api/embed/v1/host/** |
Embedding: the host server | Credential with the Embedding scope |
/api/embed/v1/** (the rest) |
Embedding: the iframe | The embedded session that the token opens |
/embed/{key} and /embed/sdk/v1/ecenter-embed.js |
The iframe page and the SDK | Nothing (they give no data) |
/api/metadata-exchange/v1/** |
Metadata exchange | Credential with the Metadata exchange scope |
/.well-known/oauth-protected-resource/api/mcp |
OAuth metadata of the MCP server | Nothing (public, no data) |
The reverse proxy has to send /api/, /embed/ and /.well-known/oauth-protected-resource/ to the backend. The frontend image already does it; if you use your own proxy, review the installation.
Errors common to all surfaces#
Error responses come in ProblemDetail format (JSON) with a code field, except SCIM's, which come in the SCIM error format:
| HTTP | code |
What it means |
|---|---|---|
| 401 | CREDENTIAL_REQUIRED |
The request does not carry the Authorization: Bearer header. |
| 401 | INVALID_CREDENTIAL |
The credential is not valid: it does not exist, has expired, is revoked, is of another scope or its holder is disabled. The response does not say which of these reasons it is; the audit does. |
| 403 | NOT_ALLOWED |
The holder does not have the privilege the route asks for, or the credential does not include that connection. |
| 403 | LICENSE_INVALID |
The installation does not have a valid license. |
| 403 | INSUFFICIENT_SCOPE |
Only in the MCP server with OAuth: the token lacks the ecenter.mcp scope. |
| 503 | IDENTITY_PROVIDER_UNAVAILABLE |
Only in the MCP server with OAuth: the token could not be checked with the identity provider. It carries Retry-After. |
| 429 | RATE_LIMITED |
Too many requests per minute. Wait for what the Retry-After header indicates. |
Several backend instances#
API and MCP queries, and embedded sessions, are calculated in the memory of the instance serving them. With several instances, the load balancer has to send the requests of the same client to the same instance: by the X-ECenter-Embed-Session header (embedding) and by the Authorization header (API and MCP). The sample configuration for nginx is in the installation chapter.
The per-minute limits and those of concurrent queries are also per instance.
Audit#
Everything the integrations do is recorded in the audit with its channel (API, MCP, EMBED) and a reference to the credential or the session (cred:<id>, oauth:<client>, emb:<session>), never the secret. The first use of each credential in each hour is recorded as an access, and so are the rejections (invalid credential, origin not allowed…). See the audit chapter.
In this part#
- Service credentials: create, revoke and watch credentials.
- Query API: the full walkthrough with examples.
- The cube query: reference of the query body and its extensions.
- API results, limits and errors.
- MCP server: connect an AI assistant.
- MCP with the company account: OAuth with Keycloak or Microsoft Entra ID.
- Embedding: register a host application.
- Integrate the host application: the token, the iframe and the SDK.
- Metadata exchange without a session.