Get raw network in CX1 format
Returns raw CX1 data as an array of aspects. This data may contain fragmented aspects that need to be assembled into a complete CX1 network model for proper usage. For a fully assembled network object, consider using getNetworkAsCX2Object() instead.
The UUID of the network to retrieve
Access options including optional access key
Promise resolving to raw CX1 data as an array of aspects
Get network summary by UUID
Update network summary
Updates the summary information for an existing network. This allows modification of network metadata such as name, description, visibility, and other summary properties without updating the actual network content (nodes/edges).
The UUID of the network to update
The updated network summary object containing the new metadata
Promise that resolves when the update is complete
// Update network name and description
await networkService.updateNetworkSummary('12345678-1234-1234-1234-123456789abc', {
externalId: '12345678-1234-1234-1234-123456789abc',
name: 'Updated Network Name',
description: 'Updated network description',
nodeCount: 150,
edgeCount: 200,
visibility: 'PUBLIC',
owner: 'username',
ownerUUID: 'user-uuid',
creationTime: 1234567890,
modificationTime: 1234567890,
isReadOnly: false,
isValid: true,
hasLayout: true,
hasSample: false,
updatedBy: 'username'
});
Copy network
Creates a copy of an existing network using the server's copy endpoint. The copied network will have the same content but will be assigned a new UUID and will be owned by the authenticated user.
The UUID of the network to copy
Promise resolving to the URL of the cloned CX1 network
Search networks (migrated from original NDEx.js)
Searches networks using POST request with search parameters in the request body. This implementation matches the original NDEx.js searchNetworks function.
Search string to find networks
Optionalstart: numberStarting offset for pagination (optional)
Optionalsize: numberMaximum number of results to return (optional)
OptionaloptionalParameters: { permission?: string; includeGroups?: boolean; accountName?: string }Additional search filters
Optionalpermission?: stringFilter by permission level
OptionalincludeGroups?: booleanWhether to include group networks
OptionalaccountName?: stringFilter by account name
Promise resolving to search results
Create new network from raw CX1 data
Creates a new network in NDEx from raw CX1 network data. This method handles the server response parsing to extract the network UUID from the location header.
Raw CX1 network data as an array of aspects
Optional options for network creation (visibility settings)
Promise resolving to the UUID string of the newly created network
Update network from raw CX1 data
Updates an existing network in NDEx with new raw CX1 network data. This completely replaces the network content with the provided CX1 data. Uses the legacy v2 endpoint format from the original NDEx.js implementation.
The UUID of the network to update
Raw CX1 network data as an array of aspects
Promise resolving when the update is complete
Delete network
Get network summaries by UUIDs (migrated from original NDEx.js)
Retrieves network summaries for multiple networks in a single batch request. Uses the V2 API batch endpoint for efficient bulk operations.
Array of network UUIDs to retrieve summaries for
OptionalaccessKey: stringOptional access key for private networks
Promise resolving to array of network summaries
Get user's networks
Set network system properties
Set network permissions
Grant network permission to user
Revoke network permission from user
Get network profile (additional metadata)
Set network profile
Make network public
Make network private
Get network sample (if available)
Get network metadata (migrated from original NDEx.js)
Retrieves metadata information about network aspects including element counts, versions, and ID counters for each aspect in the network. This provides an overview of the network's structure and content organization.
The UUID of the network to get metadata for
OptionalaccessKey: stringOptional access key for private networks
Promise resolving to metadata containing aspect information
Get network access key (migrated from original NDEx.js)
Retrieves the current access key for a network. Access keys allow users to share private networks without requiring individual permissions.
The UUID of the network to get access key for
Promise resolving to access key response object
Update network access key (migrated from original NDEx.js)
Enables or disables the access key for a network. When enabled, creates a new access key that can be shared. When disabled, invalidates the current access key.
The UUID of the network to update access key for
Action to perform: 'enable' creates/updates key, 'disable' removes it
Promise resolving to access key response (accessKey will be null when disabled)
// Enable access key
const enabled = await networkService.updateAccessKey('network-uuid', 'enable');
console.log(enabled.accessKey); // "new-access-key-string"
// Disable access key
const disabled = await networkService.updateAccessKey('network-uuid', 'disable');
console.log(disabled.accessKey); // null
NetworkServiceV2 - NDEx API v2 network operations Handles legacy v2 endpoints with modern TypeScript interface