Digital UniverseDocumentation

SDK Integration

Build integrations with explicit timeouts and a scoped service identity.

Create a client#

The reference JavaScript SDK provides typed resource methods and normalizes API errors. Inject the endpoint and token through configuration rather than placing credentials in application source.

JavaScript
import { UniverseClient } from "@digital-universe/sdk";

const client = new UniverseClient({
  endpoint: "https://api.universe.example",
  token: process.env.DU_TOKEN,
  timeoutMs: 10000
});

const services = await client.services.list({
  project: "catalog",
  environment: "staging"
});

Keep retries bounded#

Configure a maximum attempt count and an overall deadline. Use idempotency keys for create operations that may be retried after a connection interruption. Do not retry a failed write unless its semantics are understood.

OptionSuggested starting value
timeoutMs10000
maxAttempts3
retryBackoffMs250

Test without production credentials#

Use a mocked transport and fixture responses for unit tests. Integration tests should use an isolated project with a restricted service identity and an explicit cleanup policy.

Digital Universe DocumentationReference edition · v2.4

↑ ↓ to navigateEnter to openEsc to close