@datafire/exavault
v6.0.0
Published
DataFire integration for ExaVault
Downloads
13
Readme
@datafire/exavault
Client library for ExaVault
Installation and Usage
npm install --save @datafire/exavault
let exavault = require('@datafire/exavault').create();
.then(data => {
console.log(data);
});
Description
ExaVault's API allows you to incorporate ExaVault's suite of file transfer and user management tools into your own application.
ExaVault supports both POST (recommended when requesting large data sets) and GET operations, and requires an API key in order to use.
Actions
authenticateUser
Returns access token in the Response object
exavault.authenticateUser({
"username": "",
"password": ""
}, context)
Input
- input
object
- username required
string
: Name of of user to authenticate - password required
string
: User's password
- username required
Output
- output AuthResponse
checkFilesExist
Requires access token obtained via the authenticateUser operation
exavault.checkFilesExist({
"access_token": "",
"filePaths": []
}, context)
Input
- input
object
- access_token required
string
: Access token required to make the API call - filePaths required
array
: Array containing paths of the files or folders to check
- access_token required
Output
- output ExistingResourcesResponse
copyResources
Requires access token obtained via the authenticateUser operation. Available to users with the 'upload' permission.
exavault.copyResources({
"access_token": "",
"filePaths": [],
"destinationPath": ""
}, context)
Input
- input
object
- access_token required
string
: Access token required to make the API call - filePaths required
array
: Remote paths of the files or folders to copy - destinationPath required
string
: Remote destination path to copy files/folders to
- access_token required
Output
- output ModifiedResourcesResponse
createFolder
Requires access token obtained via the authenticateUser operation. Available to users with the 'upload' permission.
exavault.createFolder({
"access_token": "",
"folderName": "",
"path": ""
}, context)
Input
- input
object
- access_token required
string
: Access token required to make the API call - folderName required
string
: Name of the folder to create - path required
string
: Where to create the folder
- access_token required
Output
- output Response
createNotification
Requires access token obtained via the authenticateUser operation. Available to users with 'notification' permission
exavault.createNotification({
"access_token": "",
"path": "",
"action": "",
"usernames": "",
"sendEmail": true
}, context)
Input
- input
object
- access_token required
string
: Access token required to make the API call - path required
string
: Full path of file/folder where notification is set. - action required
string
: Type of action to filter on: 'upload', 'download', 'delete', 'all' - usernames required
string
: User type to filter on: 'notice_user_all', 'notice_user_all_recipients', 'notice_user_all_users' - sendEmail required
boolean
: Set to true if the user should be notified by email when the notification is triggered. - emails
array
: Email addresses to send notification to. If not specified, sends to owner by default.
- access_token required
Output
- output Response
createShare
Requires access token obtained via the authenticateUser operation. Available to users with the 'share' permission
exavault.createShare({
"access_token": "",
"type": "",
"name": "",
"filePaths": []
}, context)
Input
- input
object
- access_token required
string
: Access token required to make the API call - type required
string
: The type of share to create: shared_folder, send, receive. - name required
string
: Name of the Share. - filePaths required
array
: Array of strings containing the file paths to share. - subject
string
: Share message subject (for email invitations). - message
string
: Share message contents (for email invitations). - emails
array
: Array of strings for email recipients (for email invitations). - ccEmail
string
: Specifies a CC email recipient. - requireEmail
boolean
: Requires a user's email to access (defaults to false if not specified). - accessMode
string
: Type of permissions share recipients have: upload, download, download_upload, download_upload_modify, download_upload_modify_delete. Defaults to download if no option specified. - embed
boolean
: Allows user to embed a widget with the share. Defaults to false if not specified. - isPublic
boolean
: True if share has a public URL, otherwise defaults to false - password
string
: If not null, value of password is required to access this Share - expiration
string
: The date the current Share should expire, formatted YYYY-mm-dd - hasNotification
boolean
: True if the user should be notified about activity on this Share. - notificationEmails
array
: An array of recipients who should receive notification emails. - fileDropCreateFolders
boolean
: If true, all receive folder submissions will be uploaded separate folders (only applicable for Receive folder types)
- access_token required
Output
- output Response
createUser
Requires access token obtained via the authenticateUser operation. Available to users with the 'manage users' permission
exavault.createUser({
"access_token": "",
"username": "",
"destinationFolder": "",
"email": "",
"password": "",
"role": "",
"permissions": "",
"timeZone": ""
}, context)
Input
- input
object
- access_token required
string
: Access token required to make the API call - username required
string
: Name of the subaccount user to create - destinationFolder required
string
: The user's home folder - email required
string
: The user's email address - password required
string
: The user's password - role required
string
: The user's role, i.e: 'user' or 'admin' - permissions required
string
: A CSV string of user permissions. The following values are supported: upload, download, delete, modify, list, changePassword, share, notification. - timeZone required
string
: The user's timezone, used for accurate time display within SWFT. See this page for allowed values - nickname
string
: The user's nickname - expiration
string
: The date when the user should expire, formatted YYYY-mm-dd - locked
boolean
: If true, the user's account is locked by default - welcomeEmail
boolean
: If true, send a user email upon creation
- access_token required
Output
- output Response
deleteNotification
Requires access token obtained via the authenticateUser operation. Available to users with 'notification' permission
exavault.deleteNotification({
"access_token": "",
"id": 0
}, context)
Input
- input
object
- access_token required
string
: Access token required to make the API call - id required
integer
: ID of the Notification to delete.
- access_token required
Output
- output Response
deleteResources
Requires access token obtained via the authenticateUser operation. Available to users with the 'delete' permission
exavault.deleteResources({
"access_token": "",
"filePaths": []
}, context)
Input
- input
object
- access_token required
string
: Access token required to make the API call - filePaths required
array
: Array containing paths of the files or folder to delete
- access_token required
Output
- output DeletedResourcesResponse
deleteShare
Requires access token obtained via the authenticateUser operation. Available to users with 'share' permission
exavault.deleteShare({
"access_token": "",
"id": 0
}, context)
Input
- input
object
- access_token required
string
: Access token required to make the API call - id required
integer
: ID of the Share to delete.
- access_token required
Output
- output Response
deleteUser
Requires access token obtained via the authenticateUser operation. Available to users with 'manage users' permission
exavault.deleteUser({
"access_token": "",
"username": ""
}, context)
Input
- input
object
- access_token required
string
: Access token required to make the API call - username required
string
: Name of the subaccount user to delete
- access_token required
Output
- output Response
getAccount
Requires access token obtained via the authenticateUser operation
exavault.getAccount({
"access_token": ""
}, context)
Input
- input
object
- access_token required
string
: Access token required to make the API call
- access_token required
Output
- output AccountResponse
getCurrentUser
Requires access token obtained via the authenticateUser operation
exavault.getCurrentUser({
"access_token": ""
}, context)
Input
- input
object
- access_token required
string
: Access token required to make the API call
- access_token required
Output
- output UserResponse
getDownloadFileUrl
Requires access token obtained via the authenticateUser operation. URL points at the appropriate storage server for file download.
exavault.getDownloadFileUrl({
"access_token": "",
"filePaths": ""
}, context)
Input
- input
object
- access_token required
string
: Access token required to make the API call - filePaths required
string
: Path of file to be downloaded - downloadName
string
: The name of the file to be downloaded
- access_token required
Output
- output UrlResponse
getFileActivityLogs
Returns a list of account activity. Allows for searching the activity log.
exavault.getFileActivityLogs({
"access_token": ""
}, context)
Input
- input
object
- access_token required
string
: Access token required to make the API call - offset
integer
: Starting record in the result set. Can be used for pagination. - sortBy
string
: Sort method ['sort_logs_date' or 'sort_logs_ip_address' or 'sort_logs_username' or 'sort_logs_file' or 'sort_logs_file_source' or 'sort_logs_operation', or 'sort_logs_duration', or 'sort_logs_size', or 'sort_logs_protocol'] - sortOrder
string
: Sort in either ascending or descending order: asc, desc - filterBy
string
: Field to search on ['filter_logs_date' or 'filter_logs_ip_address' or 'filter_logs_username' or 'filter_logs_operation' or 'filter_logs_file'] - filter
string
: Search criteria. For date ranges, use format 'start_date::end_date' - itemLimit
integer
: Number of logs to return. Can be used for pagination.
- access_token required
Output
- output LogResponse
getFolders
Requires access token obtained via the authenticateUser operation
exavault.getFolders({
"access_token": "",
"path": ""
}, context)
Input
- input
object
- access_token required
string
: Access token required to make the API call - path required
string
: The remote file path
- access_token required
Output
- output ResourcePropertiesResponse
getNotification
Requires access token obtained via the authenticateUser operation. Available to users with the 'notification' permission
exavault.getNotification({
"access_token": "",
"id": 0
}, context)
Input
- input
object
- access_token required
string
: Access token required to make the API call - id required
integer
: ID of the Notification
- access_token required
Output
- output NotificationResponse
getNotificationActivity
Requires access token obtained via the authenticateUser operation. Available to users with the 'notification' permission
exavault.getNotificationActivity({
"access_token": ""
}, context)
Input
- input
object
- access_token required
string
: Access token required to make the API call
- access_token required
Output
- output NotificationActivityResponse
getNotifications
Requires access token obtained via the authenticateUser operation. Available to users with the 'notification' permission
exavault.getNotifications({
"access_token": "",
"type": ""
}, context)
Input
- input
object
- access_token required
string
: Access token required to make the API call - type required
string
: Type of notification to filter on: 'file', 'folder', 'shared_folder', 'send_receipt', 'share_receipt', 'file_drop' - sortBy
string
: Sort by one of the following: 'sort_notifications_folder_name', 'sort_notifications_path', 'sort_notifications_date' - sortOrder
string
: Sort by 'asc' or 'desc' order. - filter
string
: Filter by the provided search terms.
- access_token required
Output
- output NotificationsResponse
getResourceList
Requires access token obtained via the authenticateUser operation. Available to users with 'list files' permission.
exavault.getResourceList({
"access_token": "",
"path": "",
"sortBy": "",
"sortOrder": "",
"offset": 0,
"limit": 0
}, context)
Input
- input
object
- access_token required
string
: Access token required to make the API call - path required
string
: The remote file path - sortBy required
string
: Sort according to attribute: sort_files_name, sort_files_size, sort_files_date, sort_files_type, sort_files_timeline - sortOrder required
string
: Sort in either ascending or descending order: asc, desc - offset required
integer
: Determines which item to start on for pagination - limit required
integer
: The number of files to limit the result - detailed
boolean
: If true, returns sharedFolder, notifications or other objects associated with specified path - pattern
string
: Regex string. If not null, perform a search with specified pattern
- access_token required
Output
- output ResourceResponse
getResourceProperties
Requires access token obtained via the authenticateUser operation
exavault.getResourceProperties({
"access_token": "",
"filePaths": []
}, context)
Input
- input
object
- access_token required
string
: Access token required to make the API call - filePaths required
array
: Array containing paths of the files or folder to get
- access_token required
Output
- output ResourcePropertiesResponse
getShare
Requires access token obtained via the authenticateUser operation. Available to users with the 'share' permission
exavault.getShare({
"access_token": "",
"id": 0
}, context)
Input
- input
object
- access_token required
string
: Access token required to make the API call - id required
integer
: ID of the requested Share
- access_token required
Output
- output ShareResponse
getShareActivity
Requires access token obtained via the authenticateUser operation. Available to users with the 'share' permission
exavault.getShareActivity({
"access_token": "",
"id": 0
}, context)
Input
- input
object
- access_token required
string
: Access token required to make the API call - id required
integer
: ID of the Share
- access_token required
Output
- output ShareActivityResponse
getShares
Requires access token obtained via the authenticateUser operation. Available to users with the 'share' permission
exavault.getShares({
"access_token": ""
}, context)
Input
- input
object
- access_token required
string
: Access token required to make the API call - type
string
: The type of share to return: 'shared_folder', 'send', or 'receive'. If no argument specified, will return all Shares types. - sortBy
string
: Sort by one of the following: 'sort_shares_name', 'sort_shares_date', 'sort_shares_user', 'sort_shares_access_mode'. - sortOrder
string
: Sort by 'asc' or 'desc' order. - filter
string
: Filter by the provided search terms. - include
string
: Filter by all, active-only, or current user's only. - offset
integer
: Start position of results to return, for pagination. - limit
integer
: Maximum number of elements to return or 0 if no limit.
- access_token required
Output
- output SharesResponse
getUploadFileUrl
Requires access token obtained via the authenticateUser operation. Called before an upload is started to get URL to appropriate storage server. Available to users with the 'write' permission.
exavault.getUploadFileUrl({
"access_token": "",
"fileSize": 0,
"destinationPath": ""
}, context)
Input
- input
object
- access_token required
string
: Access token required to make the API call - fileSize required
integer
: Size of the file to upload, in bytes - destinationPath required
string
: Path relative to account's home directory, including file name - allowOverwrite
boolean
: True if the file should be overwritten, false if different file names should be generated - resume
boolean
: True if upload resume is supported, false if it isn't
- access_token required
Output
- output UrlResponse
getUser
Requires access token obtained via the authenticateUser operation
exavault.getUser({
"access_token": "",
"username": ""
}, context)
Input
- input
object
- access_token required
string
: Access token required to make the API call - username required
string
: Name of the subaccount user to get
- access_token required
Output
- output UserResponse
getUsers
Requires access token obtained via the authenticateUser operation. Available to users with the 'manage users' permission set
exavault.getUsers({
"access_token": "",
"sortBy": "",
"sortOrder": ""
}, context)
Input
- input
object
- access_token required
string
: Access token required to make the API call - sortBy required
string
: sort method ['sort_users_username' or 'sort_users_nickname' or 'sort_users_email' or 'sort_users_home_folder'] - sortOrder required
string
: sort order, i.e. 'asc' or 'desc'
- access_token required
Output
- output UsersResponse
logoutUser
Requires access token obtained via the authenticateUser operation
exavault.logoutUser({
"access_token": ""
}, context)
Input
- input
object
- access_token required
string
: Access token required to make the API call
- access_token required
Output
- output Response
moveResources
Requires access token obtained via the authenticateUser operation. Available to users with the 'upload' permission
exavault.moveResources({
"access_token": "",
"filePaths": [],
"destinationPath": ""
}, context)
Input
- input
object
- access_token required
string
: Access token required to make the API call - filePaths required
array
: Remote paths of the files or folders to move - destinationPath required
string
: Remote destination path to move files/folders to
- access_token required
Output
- output ModifiedResourcesResponse
previewFile
Requires access token obtained via authenticateUser operation
exavault.previewFile({
"access_token": "",
"path": "",
"size": ""
}, context)
Input
- input
object
- access_token required
string
: Access token required to make the API call - path required
string
: Path of the image relative to the user's home directory - size required
string
: The size of the image: small, medium, large - width
integer
: Overrides sizes. Sets to a specific width - height
integer
: Overrides sizes. Sets to a specific height - page
integer
: Page number for the document
- access_token required
Output
- output PreviewFileResponse
renameResource
Requires access token obtained via the authenticateUser operation. Available to users with the 'modify' permission
exavault.renameResource({
"access_token": "",
"filePath": "",
"newName": ""
}, context)
Input
- input
object
- access_token required
string
: Access token required to make the API call - filePath required
string
: Remote path of the files or folder to rename - newName required
string
: The new name of the file or folder
- access_token required
Output
- output Response
updateNotification
Requires access token obtained via the authenticateUser operation. Available to users with 'notification' permission
exavault.updateNotification({
"access_token": "",
"id": 0
}, context)
Input
- input
object
- access_token required
string
: Access token required to make the API call - id required
integer
: The notification ID - path
string
: Full path of file/folder where notification is set. - action
string
: Type of action to filter on: 'upload', 'download', 'delete', 'all' - usernames
string
: User type to filter on: 'notice_user_all', 'notice_user_all_recipients', 'notice_user_all_users' - emails
array
: Email addresses to send notification to. If not specified, sends to owner by default. - sendEmail
boolean
: Set to true if the user should be notified by email when the notification is triggered.
- access_token required
Output
- output Response
updateShare
Requires access token obtained via the authenticateUser operation. Available to users with the 'share' permission
exavault.updateShare({
"access_token": "",
"id": 0
}, context)
Input
- input
object
- access_token required
string
: Access token required to make the API call - id required
integer
: The ID of the Share to update. - name
string
: Name of the Share. - filePaths
array
: Array of strings containing the file paths to share. - subject
string
: Share message subject (for email invitations). - message
string
: Share message contents (for email invitations). - emails
array
: Array of strings for email recipients (for email invitations). - ccEmail
string
: Specifies a CC email recipient. - requireEmail
boolean
: Requires a user's email to access. - accessMode
string
: Type of permissions share recipients have: upload, download, download_upload, download_upload_modify, download_upload_modify_delete. - embed
boolean
: Allows user to embed a widget with the share. - isPublic
boolean
: True if share has a public URL, otherwise defaults to false - password
string
: If not null, value of password is required to access this Share - expiration
string
: The date the current Share should expire, formatted YYYY-mm-dd - hasNotification
boolean
: True if the user should be notified about activity on this Share. - notificationEmails
array
: An array of recipients who should receive notification emails. - fileDropCreateFolders
boolean
: If true, all receive folder submissions will be uploaded separate folders (only applicable for Receive folder types)
- access_token required
Output
- output Response
updateUser
Requires access token obtained via the authenticateUser operation. Available to users with 'manage users' permission
exavault.updateUser({
"access_token": "",
"userId": 0
}, context)
Input
- input
object
- access_token required
string
: Access token required to make the API call - userId required
integer
: The user ID, must be obtained from getUser method first - username
string
: Name of the subaccount user to modify - nickname
string
: The user's nickname - expiration
string
: The date when use should expire in format: YYYY-MM-DD - email
string
: The user's email - destinationFolder
string
: The user's home folder - password
string
: The user's password - locked
boolean
: If true, the user's account is locked by default - role
string
: The user's role, i.e: 'user', 'admin', 'master' - permissions
string
: A CSV string of user permissions.
- access_token required
Output
- output Response
userAvailable
Requires access token obtained via the authenticateUser operation. Available to users with the 'manage users' permission
exavault.userAvailable({
"access_token": "",
"username": ""
}, context)
Input
- input
object
- access_token required
string
: Access token required to make the API call - username required
string
: Username to check
- access_token required
Output
- output AvailableUserResponse
Definitions
Account
- Account
object
- appliedTrial required
string
- bandwidthQuotaLimit required
integer
- bandwidthQuotaUsed required
integer
- branding required
boolean
- clientId required
integer
- complexPasswords required
boolean
- created required
string
- customDomain required
boolean
- diskQuotaLimit required
integer
- diskQuotaUsed required
integer
- externalDomains required
string
- freeTrial required
boolean
- id required
integer
- masterAccount required User
- maxUsers required
integer
- modified required
string
- planCode required
string
- quotaNoticeEnabled required
integer
- quotaNoticeThreshold required
integer
- redirect required
string
- secureOnly required
boolean
- showReferralLinks required
boolean
- status required
integer
- userCount required
integer
- username required
string
- appliedTrial required
AccountResponse
Auth
- Auth
object
- accessToken required
string
- clientIp required
string
- mode required
integer
- username required
string
- accessToken required
AuthResponse
AvailableUser
- AvailableUser
object
- available required
boolean
- available required
AvailableUserResponse
- AvailableUserResponse
object
- error required Error
- results required AvailableUser
- success required
integer
DeletedResource
- DeletedResource
object
- file required
string
- size required
integer
- success required
integer
- file required
DeletedResourcesResponse
- DeletedResourcesResponse
object
- error required Error
- results required
array
- items DeletedResource
- success required
integer
Error
- Error
object
- code required
integer
- message required
string
- code required
ExistingResource
- ExistingResource
object
- exists required
boolean
- resource required ResourceProperty
- exists required
ExistingResourcesResponse
- ExistingResourcesResponse
object
- error required Error
- results required
array
- items ExistingResource
- success required
integer
LogEntry
- LogEntry
object
- bytesTransferred required
integer
- created required
string
- duration required
string
- fileName required
string
- fileSource required
string
- id required
integer
- ipAddress required
string
- operation required
string
- protocol required
string
- sessionId required
string
- status required
string
- username required
string
- bytesTransferred required
LogResponse
Message
- Message
object
- body required
string
- created required
string
- id required
integer
- modified required
string
- shareId required
string
- subject required
string
- userId required
integer
- body required
ModifiedResource
- ModifiedResource
object
- destination required
string
- file required
string
- size required
integer
- success required
integer
- destination required
ModifiedResourcesResponse
- ModifiedResourcesResponse
object
- error required Error
- results required
array
- items ModifiedResource
- success required
integer
Notification
- Notification
object
- action required
string
- created required
string
- id required
integer
- modified required
string
- name required
string
- path required
string
- readableDescription required
string
- readableDescriptionWithoutPath required
string
- recipientEmails required
array
- items
string
- items
- recipients required
array
- items Recipient
- sendEmail required
string
- shareId required
string
- type required
string
- userId required
string
- usernames required
array
- items
string
- items
- action required
NotificationActivityResponse
- NotificationActivityResponse
object
- error required Error
- results required
array
- items NotificationMessage
- success required
integer
NotificationMessage
- NotificationMessage
object
- action required
string
- created required
string
- id required
integer
- message required
string
- notificationSetting required Notification
- path required
string
- read required
boolean
- sent required
boolean
- username required
string
- action required
NotificationResponse
- NotificationResponse
object
- error required Error
- results required Notification
- success required
integer
NotificationsResponse
- NotificationsResponse
object
- error required Error
- results required
array
- items Notification
- success required
integer
PreviewFile
- PreviewFile
object
- image required
string
- imageId required
string
- size required
integer
- image required
PreviewFileResponse
- PreviewFileResponse
object
- error required Error
- results required PreviewFile
- success required
integer
Recipient
- Recipient
object
- created required
string
- email required
string
- hash required
string
- id required
integer
- received required
boolean
- sent required
boolean
- shareId required
string
- type required
string
- created required
Resource
- Resource
object
- inheritedNotifications required
string
- inheritedShares required
string
- resources required
array
- items ResourceProperty
- totalFiles required
integer
- inheritedNotifications required
ResourcePropertiesResponse
- ResourcePropertiesResponse
object
- error required Error
- results required
array
- items ResourceProperty
- success required
integer
ResourceProperty
- ResourceProperty
object
- createdBy required
string
- file required
string
- fileCount required
integer
- name required
string
- notificationSettings required
string
- parent required
string
- path required
string
- previewable required
boolean
- shares required
array
- items Share
- size required
integer
- type
string
- uploadDate required
string
- createdBy required
ResourceResponse
Response
- Response
object
- error required Error
- results required
array
- items
string
- items
- success required
integer
Share
- Share
object
- accessDescription required
string
- accessMode required
string
- created required
string
- embed required
boolean
- expiration required
string
- expired required
string
- fileDropCreateFolders required
boolean
- hasNotification required
boolean
- hasPassword required
boolean
- hash required
string
- id required
integer
- inherited required
boolean
- isPublic required
boolean
- messages required
array
- items Message
- modified required
string
- name required
string
- notification required
string
- owner required
integer
- ownerHash required
string
- ownerUsername required
string
- paths required
array
- items
string
- items
- recipients required
array
- items Recipient
- recipientsWithOwner required
array
- items Recipient
- requireEmail required
boolean
- resent required
boolean
- status required
integer
- trackingStatus required
string
- type required
string
- accessDescription required
ShareActivityResponse
- ShareActivityResponse
object
- error required Error
- results required
array
- items ShareLogEntry
- success required
integer
ShareLogEntry
- ShareLogEntry
object
- action required
string
- actionObjectId required
string
- created required
string
- detail required
string
- id required
integer
- shareId required
string
- username required
string
- action required
ShareResponse
SharesResponse
Url
- Url
object
- offset
integer
- url required
string
- offset
UrlResponse
User
- User
object
- accessTimestamp required
string
- changePassword required
boolean
- created required
string
- delete required
boolean
- download required
boolean
- email required
string
- expiration required
string
- gid required
integer
- homeDir required
string
- id required
integer
- list required
boolean
- modified required
string
- modify required
boolean
- nickname required
string
- notification required
boolean
- owningAccountId required
integer
- role required
string
- share required
boolean
- status required
integer
- timeZone required
string
- upload required
boolean
- username required
string
- accessTimestamp required