node-red-web-nodes icon indicating copy to clipboard operation
node-red-web-nodes copied to clipboard

Box.com node

Open hindessm opened this issue 11 years ago • 0 comments
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 file
      • file - the basename of the changed file
      • event - the type of event either add or delete
      • data - the raw change object from the api call response

Query

  • Get box.com file contents
    • node options
      • filename - full path of file to retrieve
      • localfilename - local file to write content to (optional - defaults to storing content in payload)
    • msg options
      • filename - full path of file to retrieve
      • localfilename - 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 retrieved
      • error - an error object (deleted if the request was successful)

Outputs

  • Write to a file (create/replace)
    • node options
      • filename - filename of the remote box.com file
      • localFilename - local filename containing the content to be uploaded to box.com
    • msg options
      • filename - filename of the remote box.com file
      • localFilename - local filename containing the content to be uploaded to box.com
      • payload - the content to be uploaded (localFilename takes priority)

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.

hindessm avatar Oct 08 '14 11:10 hindessm