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

    Class WorkspaceService

    WorkspaceService - NDEx CyWeb workspace operations

    Provides methods for managing CyWeb workspaces including creation, retrieval, updates, and deletion of workspaces and their associated networks. All workspace operations use the V3 API.

    Index

    Constructors

    Methods

    • Create a new CyWeb workspace (migrated from original NDEx.js)

      Creates a new workspace with the specified workspace data.

      Parameters

      Returns Promise<string>

      Promise resolving to the response from the server (typically contains workspace location)

      const workspaceData = {
      name: "My Workspace",
      description: "A sample workspace",
      networkIds: []
      };
      const response = await client.workspace.createCyWebWorkspace(workspaceData);
    • Get a CyWeb workspace by ID (migrated from original NDEx.js)

      Retrieves a workspace and its details by workspace ID.

      Parameters

      • workspaceId: string

        The UUID of the workspace to retrieve

      Returns Promise<CyWebWorkspace>

      Promise resolving to the workspace object

      const workspace = await client.workspace.getCyWebWorkspace('workspace-uuid');
      console.log(workspace.name);
    • Delete a CyWeb workspace (migrated from original NDEx.js)

      Deletes the specified workspace permanently.

      Parameters

      • workspaceId: string

        The UUID of the workspace to delete

      Returns Promise<void>

      Promise resolving when the workspace is deleted

      await client.workspace.deleteCyWebWorkspace('workspace-uuid');
      
    • Update a CyWeb workspace (migrated from original NDEx.js)

      Updates a workspace with new data, replacing the entire workspace object.

      Parameters

      • workspaceId: string

        The UUID of the workspace to update

      • workspaceObj: CyWebWorkspace

        The updated workspace object

      Returns Promise<void>

      Promise resolving when the workspace is updated

      const updatedWorkspace = {
      name: "Updated Workspace Name",
      description: "Updated description",
      networkIds: ["network-uuid-1", "network-uuid-2"]
      };
      await client.workspace.updateCyWebWorkspace('workspace-uuid', updatedWorkspace);
    • Update CyWeb workspace name (migrated from original NDEx.js)

      Updates only the name of a workspace.

      Parameters

      • workspaceId: string

        The UUID of the workspace to update

      • newName: string

        The new name for the workspace

      Returns Promise<void>

      Promise resolving when the workspace name is updated

      await client.workspace.updateCyWebWorkspaceName('workspace-uuid', 'New Workspace Name');
      
    • Update CyWeb workspace networks (migrated from original NDEx.js)

      Updates the list of network IDs associated with a workspace.

      Parameters

      • workspaceId: string

        The UUID of the workspace to update

      • networkIds: string[]

        Array of network UUIDs to associate with the workspace

      Returns Promise<void>

      Promise resolving when the workspace networks are updated

      const networkIds = ['network-uuid-1', 'network-uuid-2', 'network-uuid-3'];
      await client.workspace.updateCyWebWorkspaceNetworks('workspace-uuid', networkIds);
    • Get user's CyWeb workspaces (migrated from original NDEx.js)

      Retrieves all workspaces belonging to the currently authenticated user. Requires authentication.

      Returns Promise<CyWebWorkspace[]>

      Promise resolving to array of workspace objects

      const workspaces = await client.workspace.getUserCyWebWorkspaces();
      workspaces.forEach(workspace => {
      console.log(`Workspace: ${workspace.name}`);
      });