Methods
alive() → {Promise}
Send activity signal to keep the session open
- Source:
Returns:
- Type
- Promise
browse(params) → {Promise}
Browse folders and collections
Parameters:
Name | Type | Description |
---|---|---|
params |
Object | Parameters object |
- Source:
Returns:
- Type
- Promise
copy(params) → {Promise}
Copy a folder or a single asset
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
Object |
Properties
|
- Source:
Returns:
- Type
- Promise
create(params) → {Promise}
Create new asset
Parameters:
Name | Type | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
Object | Parameters Properties
|
- Source:
Returns:
- Type
- Promise
createFolder(path) → {Promise}
Create new folder
Parameters:
Name | Type | Description |
---|---|---|
path |
Array | String | Path for folder. If this option is supplied as array, multiple folders will be created with given paths. |
- Source:
Returns:
- Type
- Promise
createRelation(target1Id, target2Id, relationType, metadataopt) → {Promise}
Create relation between two assets
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
target1Id |
String | ID of first asset |
|
target2Id |
String | ID of second asset |
|
relationType |
String | Type of relation e.g: 'related' |
|
metadata |
Object |
<optional> |
Optional metadata fields to write to relation node |
- Source:
Returns:
- Type
- Promise
getProfile() → {Promise}
Get info of current user
- Source:
Returns:
- Type
- Promise
login(params, isSticky) → {Promise}
Login
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
Object | An object contains login parameters Properties
|
||||||||||||||||||||||||||||||||||||||||
isSticky |
Boolean | Sticky session flag; set it true to use one assigned cluster node, false or omit for load balancing |
- Source:
Returns:
- Type
- Promise
logout() → {Promise}
Invalidate current session
- Source:
Returns:
- Type
- Promise
move(params) → {Promise}
Move or rename a folder or a single asset
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
Object | Parameters Properties
|
- Source:
Returns:
- Type
- Promise
preview(assetIdOrPath, extensionopt, optionsopt) → {Promise}
Get previews of assets. Should be used either with assetID or assetPath.
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
assetIdOrPath |
String | Get preview of asset with assetID or assetPath |
|||||||||||||||||||||||||
extension |
String |
<optional> |
File extension. Required if options is provided. |
||||||||||||||||||||||||
options |
Object |
<optional> |
Parameters object Properties
|
- Source:
Returns:
- Type
- Promise
remove(options) → {Promise}
Remove asset
Parameters:
Name | Type | Description |
---|---|---|
options |
Object | An object contains one of these keys:
And optionally |
- Source:
Returns:
- Type
- Promise
removeRelation(relationIds) → {Promise}
Removes relation nodes
Parameters:
Name | Type | Description |
---|---|---|
relationIds |
Array | String | List of relation ids |
- Source:
Returns:
- Type
- Promise
search(params) → {Promise}
Search assets
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
Object | Search parameters Properties
|
- Source:
Returns:
- Type
- Promise
update(id, options) → {Promise}
Update asset
Parameters:
Name | Type | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
String | ID of asset to update |
||||||||||||||||
options |
Object | Update parameters Properties
|
- Source:
Returns:
- Type
- Promise
updateBulk(params) → {Promise}
Update multiple assets at once
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
Object | Bulk update parameters Properties
|
- Source:
Returns:
- Type
- Promise