NetDocuments Soap API wrapper for node.js
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
test
.gitignore
.travis.yml
README.md
index.js
package.json

README.md

node-netdocs Build Status

Purpose

To provide access to the NetDocuments Soap API within node.js applications. Now that NetDocs has a REST API, this is obsolete.

Overview

Javascript functions which accept:

  • variables as described in the NetDocuments API documentation
  • authentication cookies as needed
  • a callback function to be processed after the response

The soap layer is abstracted away and functions return json.

Methods

The API includes both a storage endpoint and a directory endpoint which are reference in the functions below.

Directory

Login

directory.login(username, password, fn)

username = string
password = string

returns an array of cookies

GetAttributes

directory.getAttributes(cookies, objId, aAttr, fn)

cookies = array of cookies
objId = string
aAttr = array of attributes

returns an object

SetAttributes

directory.setAttributes(cookies, objId, oAttr, fn)

cookies = array of cookies
objId = string
oAttr = object of attributes(keys) and values

returns an empty reponse on success

Storage

GetAttributes

storage.getAttributes(cookies, objId, aAttr, fn)

cookies = array of cookies
objId = string
aAttr = array of attributes

returns an object

SetAttributes

storage.setAttributes(cookies, objId, oAttr, fn)

cookies = array of cookies
objId = string
oAttr = object of attributes(keys) and values

returns an empty reponse on success

Search

storage.search(cookies, criteria, aAttr, fn)

cookies = array of cookies
criteria = string
aAttr = array of attributes

returns an object

Create

storage.create(cookies, objType, name, cabGuid, oAttr, fn)

cookies = array of cookies
objType = string
name = string
cabGuid = string
oAttr = object of attributes(keys) and values

returns a string containing new object id

CreateDocumentB

storage.createDocB(cookies, name, base64binary, cabGuid, oAttr, fn)

cookies = array of cookies
name = string
cabGuid = string
base64binary = string
oAttr = object of attributes(keys) and values

returns a string containing new object id

Delete

storage.delete(cookies, objId, fn)

cookies = array of cookies
objId = string

returns an empty reponse on success

PreDelete

storage.preDelete(cookies, objId, fn)

cookies = array of cookies
objId = string

returns an empty reponse on success

FileInFolder

storage.fileInFolder(cookies, folderId, aDocs, fn)

cookies = array of cookies
folderId = string
aDocs = array of document ids

returns an empty reponse on success

RemoveFromFolder

storage.removeFromFolder(cookies, folderId, aDocs, fn)

cookies = array of cookies
folderId = string
aDocs = array of document ids

returns an empty reponse on success

DeleteFolder

storage.deleteFolder(cookies, folderId, deleteFolder, subFoldersAlso, deleteContent, fn)

cookies = array of cookies
folderId = string
deleteFolder = boolean
subFoldersAlso = boolean
deleteContent = boolean

returns an empty reponse on success

RetrieveLookupData

storage.retrieveLookupData(cookies, attrNum, fn)

cookies = array of cookies
attrNum = integer

returns an object