Installation

Installation

Installation

Install

Beta. The 2026.9 line is a pre-release, published under the beta tag.

npm install @nomad-media/full@beta

@nomad-media/full has the admin and portal endpoints. For the portal/media endpoints only, install
@nomad-media/public@beta instead. Requires Node.js 18 or higher. Upgrading from 1.x? Failed requests now throw an Error (with .status)
instead of logging and returning null, and timed-out writes are not retried. See the SDK changelog
for the full list.

Construct an authenticated client

The default export NomadMediaSDK mirrors the Python SDK and logs in lazily on the first
call when username + password are present.

import NomadMediaSDK from "@nomad-media/full";

const config = {
    serviceApiUrl: "https://nomad-admin-api.yourdomain.com/api",
    apiType: "admin",            // "admin" | "portal"
    username: "<from-config>",   // never hard-code
    password: "<from-config>",   // never hard-code
    debugMode: false,
};

const sdk = new NomadMediaSDK(config);
const asset = await sdk.getAsset("<asset-id>"); // login happens here on first call

Notes / gotchas

  • All catalog methods are async - always await them.
  • Method names are camelCase (createFolderAsset, getAsset). See
    ../reference/naming-map.md.
  • The SDK prints datetime lines on console.log/console.info (one echoes the username).
    In a harness, mute them before constructing the SDK to keep stdout clean and avoid
    leaking the username.
  • apiType must be "admin" for the asset/folder ops in this catalog.
  • search returns false (not an empty object) when there are no hits - see
    ../reference/return-shapes.md.
  • See Authentication for the login/secret-hygiene rules.

Did this page help you?