NDEx JavaScript Client API Reference - v0.6.0-alpha.5
    Preparing search index...

    Class NDExClient

    NDExClient - Main client class for NDEx API operations

    Provides a unified interface for all NDEx operations with intelligent version routing between v2 and v3 APIs.

    // Basic usage
    const client = new NDExClient({
    baseURL: 'https://www.ndexbio.org',
    debug: true
    });

    // Authenticate (requires auth config in constructor)
    const user = await client.user.authenticate();

    // Search networks
    const results = await client.networks.searchNetworks({ searchString: 'pathway' });

    // Get network as CX2
    const network = await client.networks.getRawCX2Network('network-uuid');

    // User operations
    const profile = await client.user.getCurrentUser();

    // Admin operations (requires admin privileges)
    const stats = await client.admin.getSystemStats();
    Index

    Constructors

    Properties

    Network operations with intelligent v2/v3 routing

    File upload/download and task management

    workspace: WorkspaceService

    Workspace operations (deprecated - most functionality moved to other services)

    User authentication and management

    System administration operations

    Accessors

    Methods

    • Clear authentication

      Returns void

    • Get server status information Can be called by authenticated or anonymous users.

      Parameters

      • Optionalformat: "full"

        Optional format parameter. Use 'full' for detailed information including properties and importers/exporters

      Returns Promise<
          {
              message: string;
              properties?: {
                  ServerVersion: string;
                  Build: string;
                  ServerResultLimit: string;
                  ImporterExporters: {
                      importer: boolean;
                      exporter: boolean;
                      fileExtension: string;
                      name: string;
                      description: string;
                  }[];
              };
              networkCount: number;
              userCount: number;
              groupCount?: number;
          },
      >

      Server status including network/user counts and optional server details

    • Check if client has valid authentication information configured

      Returns boolean

      true if auth is a valid BasicAuth or OAuthAuth object, false otherwise

    • Get current authentication type

      Returns undefined | AuthType

      The type of authentication configured (AuthType), or undefined if no auth is configured

    • Set ID token for OAuth authentication Creates OAuth auth configuration if no auth is currently configured

      Parameters

      • idToken: string

        The ID token to set

      Returns void