An object containing client configuration parameters.
Optional
serverUrl?: stringOpen Cloud REST API server URL.
Optional
url?: stringDeprecated since 25.8
. Use serverUrl
instead.
HTTP client instance used to send requests to the REST API server.
Deprecated since 25.3
. Use Viewer.options()
instead to change Viewer
parameters.
Open Cloud REST API server URL. Use configure() to change server URL.
Registers a new listener for the event type.
The type of event to listen to.
The function that gets called when the event is fired.
Creates a new assembly on the server.
List of file IDs.
Assembly name.
Optional
params: {Additional assembly creating parameters.
Optional
interval?: numberThe time, in milliseconds, the function should delay in between checking assembly status.
Optional
onCheckout?: (assembly: Assembly, ready: boolean) => booleanWaiting progress callback. Return true
to cancel waiting.
Optional
signal?: AbortSignalAn AbortController signal, which can be used to abort waiting as desired.
Optional
timeout?: numberThe time, in milliseconds, that the function should wait for the assembly to be created. If the assembly is not created within this time, a TimeoutError exception will be thrown.
Optional
waitForDone?: booleanWait for assembly to be created.
Runs a new job on the server for the sepecified file.
File ID.
The job type. Can be one of:
geometry
- Convert file geometry data to VSFX
format suitable for VisualizeJS
viewer.geometryGltf
- Convert file geometry data to glTF
format suitable for Three.js
viewer.properties
- Extract file properties.validation
- Validate the file. Only for IFC
files.dwg
, obj
, gltf
, glb
, vsf
, pdf
, 3dpdf
- Export file to the one of the supported format.Optional
parameters: string | objectParameters for the job runner. Can be given as command line arguments for the
File Converter tool in form --arg=value
.
Creates a new OAuth client on the server.
Only administrators can create OAuth clients. If the current logged in user is not an administrator, an exception will be thrown.
Client name.
Endpoint to which the OAuth 2.0 server sends the response.
Optional
description: stringClient description.
Creates a new project on the server.
Project name.
Optional
description: stringProject description.
Optional
startDate: string | DateProject start date.
Optional
endDate: string | DateProject end date.
Creates a shared link for the specified file.
File ID.
Optional
permissions: ISharedLinkPermissionsShare permissions.
Creates a new user on the server.
Only administrators can create users. If the current logged in user is not an administrator, an exception will be thrown.
User email. Cannot be empty. Must be unique within the server.
User password. Cannot be empty. Password can only contain latin letters (a-z, A-Z), numbers (0-9), and special characters (~!@#$%^&*()_-+={}[]<>|/'":;.,?).
Additional user data.
Optional
canCreateProject?: booleantrue
if user is allowed to create a project.
Optional
firstName?: stringFirst name.
Optional
isAdmin?: booleantrue
if user is an administrator.
Optional
lastName?: stringLast name.
Optional
projectsLimit?: numberThe maximum number of projects that the user can create.
Optional
storageLimit?: numberThe size of the file storage available to the user in bytes.
Optional
userName?: stringUser name. Cannot be empty or blank if defined. Specify undefined
to use
username
from email.
Deletes the specified assembly from the server.
Assembly ID.
Returns the raw data of a deleted assembly. For more information, see Open Cloud API.
Deletes the specified file and all its versions from the server.
You cannot delete a version file using deleteFile()
, only the original file. To delete a version
file use File.deleteVersion().
File ID.
Returns the raw data of a deleted file. For more information, see Open Cloud Files API.
Deletes the specified job from the server job list. Jobs that are in progress or have already been completed cannot be deleted.
Job ID.
Returns the raw data of a deleted job. For more information, see Open Cloud Jobs API.
Deletes the specified OAuth client from the server.
Only administrators can delete OAuth clients. If the current logged in user is not an administrator, an exception will be thrown.
Client ID.
Returns the raw data of a deleted client. For more information, see Open Cloud OAuth Clients API.
Deletes the specified project from the server.
Project ID.
Returns the raw data of a deleted project. For more information, see Open Cloud Projects API.
Deletes the specified shared link.
Only file owner can delete shared link. If the current logged in user is not a file owner, an exception will be thrown.
Shared link token.
Returns the raw data of a deleted shared link. For more information, see Open Cloud SharedLinks API.
Deletes the specified user from the server.
Only administrators can delete users. If the current logged in user is not an administrator, an exception will be thrown.
Administrators can delete themselves or other administrators. An administrator can only delete themself if they is not the last administrator.
You need to re-login after deleting the current logged in user.
User ID.
Returns the raw data of a deleted user. For more information, see Open Cloud Users API.
Downloads the specified file from the server.
File ID.
Optional
onProgress: (progress: number) => voidDownload progress callback.
Optional
signal: AbortSignalAn AbortController signal. Allows to communicate with a fetch request and abort it if desired.
Fires the event. Alias to emitEvent().
The type of event that gets fired.
The event properties.
Fires the event. Calls each of the listeners registered for the event type event.type
, in the
order they were registered.
The event that gets fired.
Returns a list of assemblies created by the current logged in user.
Optional
start: numberThe starting index in the assembly list. Used for paging.
Optional
limit: numberThe maximum number of assemblies that should be returned per request. Used for paging.
Optional
name: stringFilter the assemblies by part of the name. Case sensitive.
Optional
ids: string | string[]List of assembly IDs to return.
Optional
sortByDesc: booleanAllows to specify the descending order of the result. By default assemblies are sorted by name in ascending order.
Optional
sortField: stringAllows to specify sort field.
Returns a list of files that the current logged in user has uploaded to the server or has access to.
Optional
start: numberThe starting index in the file list. Used for paging.
Optional
limit: numberThe maximum number of files that should be returned per request. Used for paging.
Optional
name: stringFilter the files by part of the name. Case sensitive.
Optional
ext: string | string[]Filter the files by extension. Extension can be dgn
, dwf
, dwg
, dxf
, ifc
,
ifczip
, nwc
, nwd
, obj
, rcs
, rfa
, rvt
, step
, stl
, stp
, vsf
, or any other file
type extension.
Optional
ids: string | string[]List of file IDs to return.
Optional
sortByDesc: booleanAllows to specify the descending order of the result. By default, files are sorted by name in ascending order.
Optional
sortField: stringAllows to specify sort field.
Optional
shared: booleanReturns shared files only.
Returns a list of jobs started by the current logged in user.
Optional
status: string | string[]Filter the jobs by status. Status can be waiting
, inpogress
, done
or failed
.
Optional
limit: numberThe maximum number of jobs that should be returned per request. Used for paging.
Optional
start: numberThe starting index in the job list. Used for paging.
Optional
sortByDesc: booleanAllows to specify the descending order of the result. By default, jobs are sorted by creation time in ascending order.
Optional
sortField: stringAllows to specify sort field.
Returns information about the specified OAuth client.
Only administrators can get OAuth clients. If the current logged in user is not an administrator, an exception will be thrown.
Client ID.
Returns a list of OAuth clients of the server.
Only administrators can get a list of OAuth clients. If the current logged in user is not an administrator, an exception will be thrown.
Optional
start: numberThe starting index in the client list. Used for paging.
Optional
limit: numberThe maximum number of clients that should be returned per request. Used for paging.
Returns a list of projects that the currently logged in user has created or has access to.
Optional
start: numberThe starting index in the project list. Used for paging.
Optional
limit: numberThe maximum number of projects that should be returned per request. Used for paging.
Optional
name: stringFilter the projects by part of the name. Case sensitive.
Optional
ids: string | string[]List of project IDs to return.
Optional
sortByDesc: booleanAllows to specify the descending order of the result. By default projects are sorted by name in ascending order.
Returns the current server settings.
Returns an object with server settings. For more information, see Open Cloud Settings API.
Returns information about a file from a shared link.
Some file features are not available via shared link:
Shared link token.
Optional
password: stringPassword to get access to the file.
Returns information about the specified file shared link.
Shared link token.
Returns information about the specified user.
Only administrators can get other users. If the current logged in user is not an administrator, they can only get themselves, otherwise an exception will be thrown.
User ID.
Removes the listener from an event type. Alias to removeEventListener().
The type of the event that gets removed.
The listener function that gets removed.
Registers a new listener for the event type. Alias to addEventListener()
The type of event to listen to.
The function that gets called when the event is fired.
Registers a new user on the server.
No login is required to register a new user.
User email. Cannot be empty. Must be unique within the server.
User password. Cannot be empty. Password can only contain letters (a-z, A-Z), numbers (0-9), and special characters (~!@#$%^&*()_-+={}[]<>|/'":;.,?).
Optional
userName: stringUser name. Cannot be empty or blank if defined. this to undefined
to use
username
from email.
Removes the listener for the event type.
The type of the event that gets removed.
The listener function that gets removed.
Log in an existing user using access token (API Key).
An access token for authentication request. See User.token for more details.
Log out.
You must log in again using signInWithEmail or signInWithToken to continue making requests to the server
Changes the server settings.
Only administrators can change server settings. If the current logged in user is not an administrator, an exception will be thrown.
An object with the new server settings or part of the settings. For more information, see Open Cloud Settings API.
Returns an object with updated server settings.
Web API File object are
generally retrieved from a FileList
object returned as a result of a user selecting files using the HTML <input>
element.
An object containing upload parameters.
Optional
geometry?: string | booleanCreate job to convert file geometry data. Can be:
true
- Convert file geometry data to VSFX
format to open the file in VisualizeJS
viewer.vsfx
- Convert file geometry data to VSFX
format to open the file in VisualizeJS
viewer.gltf
- Convert file geometry data to glTF
format to open the file in Three.js
viewer.Optional
interval?: numberThe time, in milliseconds, the function should delay in between checking jobs status.
Optional
onProgress?: (progress: number, file: File) => voidUpload progress callback.
Optional
properties?: booleanCreate job to extract file properties.
Optional
signal?: AbortSignalAn AbortController signal, which can be used to abort waiting as desired.
Optional
timeout?: numberThe time, in milliseconds that the function should wait jobs. If no one jobs
are done during this time, the TimeoutError
exception will be thrown.
Optional
waitForDone?: booleanWait for geometry and properties jobs to complete.
Provides methods for managing Open Cloud Server resources such as users, files, assemblies, jobs, projects, etc.