Skip to content
Select theme

Host your own app

AI agent getting started? Read Agents: start here first.

Host your app on infrastructure you choose, and use OpenEngineering for its engineering data, relationships and change control. Build a supplier portal, a verification dashboard or a specialised part review interface over the same objects your team uses in the workspace.

A hosted app is a React bundle published into a project and run inside the OpenEngineering workspace. See hosted apps.

IntegrationIdentity and accessAuthentication
An app people use with their own engineering permissionsThe signed-in person, limited further by the app’s approved scopesA registered OAuth client and the person’s consent
A scheduled job or automation with its own accessA service identity with explicitly assigned grantsExchange a service credential on the backend

For a server app, the browser calls your backend. Your backend calls the OpenEngineering API host through the SDK over HTTPS. You provide the interface and hosting; the platform checks access, validates engineering changes and records their history.

An OAuth registration is specific to one organisation. A person must belong to that organisation to connect. A grant does not add permissions the person lacks, and project and branch protection still apply. A service identity instead uses its own grants; it does not represent each person visiting your app.

Install the SDK for Node.js. You need a backend callback address, a known object to read, and an organisation administrator who can register your client. The hosted API is https://api.openeng.io.

OAuth apps can request object and branch operations. They cannot use that grant to publish types, administer membership or run platform agents.

A person signs in to OpenEngineering and approves the access your app requests. The app receives its own access token and makes SDK calls for that person. It does not receive their workspace session or identity-provider password.

For a confidential backend, generate a key pair once during setup:

import { generateClientKeys } from "@openengio/sdk/admin";
const keys = await generateClientKeys();
  1. Store keys.privateKey in your backend’s secret store.
  2. Give the administrator only keys.publicKeySet, serialized as JSON.
  3. Reuse the client and keys across sign-ins; do not generate new ones each time.
  1. In the intended organisation, open Admin and choose Clients.
  2. Under Register a client, enter a Name, choose Confidential for Type, and enter your callback URL under Redirect addresses, one per line.
  3. Paste keys.publicKeySet, serialized as JSON, into Public key set (JSON).
  4. Select only the scopes the app needs.
  5. Choose Register, then keep the client identifier with the app’s server-side configuration.

Redirect addresses must match the registered addresses. Use your app’s callback address rather than the platform sign-in callback. Registration declares which scopes the app may request; each user still approves their connection.

Register through the administrator’s web session. Agent-operated CLI requests use browser confirmation.

The available scopes are:

ScopeWhat the app may request on the person’s behalf
objects.readRead objects, relationships, history, project types and projects
objects.writeCreate, change and delete objects, and run verbs, validated operations defined for a type
branches.readRead branches, differences, conflicts, history and proposals
branches.writeCreate and abandon branches, submit and refuse proposals, and read branches
branches.manageMerge branches, delete writable branches, and recover changes
offline_accessRefresh the connection while the person is away, for up to seven days

Request only what the workflow needs. An editing workflow that reads objects and submits proposals (branch review requests) will usually need objects.read, objects.write and branches.write. Add branches.manage only if the app must merge or recover operations and the person has that authority. A grant-scope refusal means the requested operation is outside the app’s approved OAuth scopes.

When a person connects, send them through the platform’s authorization flow with the registered client and requested scopes. The consent screen identifies the app, organisation and requested access. A person may approve the request or decline it, and may approve only a subset of the requested scopes. Keep each connection associated with that person’s account in your app; do not share it across people.

The grant can exercise only its approved scopes and the person’s underlying permissions. Request only the access the workflow needs. offline_access allows the connection to be refreshed while the person is away; without it, the person must reconnect when access expires. The token represents delegated API access. Your app still owns its sign-in, account identity and application session.

  1. Start authorization with connectClient from Administration.
  2. Complete the callback.
  3. Use the session’s access token with an Objects client. A selector names the target project and branch or baseline:
import {
connectClient,
type ClientConnection,
type ClientSession,
} from "@openengio/sdk/admin";
import {
createHttpsTransport,
createObjectsTransportClient,
} from "@openengio/sdk/objects";
const connection = await connectClient({
platform: "https://api.openeng.io",
clientId: "client-id",
privateKey: "private-key",
redirectUri: "https://app.example.com/callback",
});
const authorizationUrl = await connection.authorizationUrl(["objects.read", "offline_access"]);
console.log(authorizationUrl);
export function finishConnection(pending: ClientConnection, callbackUrl: string): Promise<ClientSession> {
return pending.finish(callbackUrl);
}
export async function readObject(session: ClientSession, projectId: string, objectId: string) {
const origin = "https://api.openeng.io";
const transport = createHttpsTransport(origin);
const objects = createObjectsTransportClient(transport, origin, await session.accessToken());
return objects.readObject({
selector: { projectId, ref: "main" },
input: { objectId },
});
}

After completing the callback, call readObject with the session and your known object ID. Compare the result with the workspace on main. Preserve any refusal instead of rendering it as an empty record.

For endpoint discovery, PKCE, token exchange and raw HTTP requests, use the OAuth protocol walkthrough.

A person can disconnect the app from Connected apps in their OpenEngineering account settings. This ends the app’s grants for that person. If they later want to use the app again, ask them to connect and consent again; do not reuse a disconnected grant.

An organisation administrator can open Admin → Clients to revoke a client. Revocation ends access for that client across its connected users. Client registration and consent are separate: registration limits what the client may ask for, while each person decides what access to grant.

For a scheduled job with its own grants, follow Authenticate an automation.

  1. Create a working branch.
  2. Make changes on that branch.
  3. Inspect the diff.
  4. Submit a branch merge request.

An OAuth app needs both the appropriate approved scopes and the user’s underlying permissions for each operation.

Honor project protection and type change-control rules. An external interface uses the same merge rules as the workspace.

Handle the platform’s outcomes explicitly:

  • A completed operation updates the interface with its result.
  • A rejected operation shows the reason and preserves the person’s draft.

To recover a write whose completion could not be determined:

  1. Keep the correlation ID you send with an object write.
  2. If you cannot determine whether the write completed, call objects.recover with the same selector and input: { correlationId } before retrying. For example, use the same correlation ID to recover a timed-out objects.mutate.
  3. For an OAuth app, ensure the branches.manage scope is approved; it is listed in the scope table earlier on this page.
  4. For branch operations, use inspectBranchOperation to inspect the outcome. They have no recovery route.

Start with a read-only view over one project. Use OAuth for individual access, or a service identity for deliberately shared automation access. Confirm that the objects match the workspace and that out-of-scope requests are refused.

For an OAuth app, test declining consent and disconnecting from Connected apps before adding writes. Then add a branch-based editing workflow with the required scopes and permissions.

CLI and SDK explains the available interfaces. Access and permissions explains the distinction between memberships, operations a person explicitly authorizes an agent to perform, and app grants.