node-red-web-nodes
node-red-web-nodes copied to clipboard
Box.com node
trafficstars
Input
- Watch for changes to box.com:
- node options
filepattern- minimatch/glob pattern to filter files on (optional, default include all files)
- output msg properties
payload- the full path of the changed filefile- the basename of the changed fileevent- the type of event eitheraddordeletedata- the raw change object from the api call response
- node options
Query
- Get box.com file contents
- node options
filename- full path of file to retrievelocalfilename- local file to write content to (optional - defaults to storing content in payload)
- msg options
filename- full path of file to retrievelocalfilename- local file to write content to
- output msg properties
payload- the content of the file (deleted if there is an error)filename- the full path of the file retrievederror- an error object (deleted if the request was successful)
- node options
Outputs
- Write to a file (create/replace)
- node options
filename- filename of the remote box.com filelocalFilename- local filename containing the content to be uploaded to box.com
- msg options
filename- filename of the remote box.com filelocalFilename- local filename containing the content to be uploaded to box.compayload- the content to be uploaded (localFilenametakes priority)
- node options
Authentication
Uses oauth2 with access token with a 1 hour lifetime and a refresh token with a 60-day lifetime. The refresh token is updated every time we update the access token for a request but we might want to make sure the node triggers a refresh of the access token every few days when no other requests have been made to ensure the refresh token remains valid.