c2s-api
node wrapper around cloud2sign REST-ful APIs
All the methods have a single object parameter, used as a way to improve readability and have optional parameters.
All methods return a Promise/A+ but accept an optional Node-style callback(err, data)
parameter.
All methods accept a user
parameter used to specify the user the request is made on the behalf of (to be used if and only if the authentication user is root).
login
Login to the service.
Arguments
username
: the name of the Cloud2Sign user
password
: the password associated to username
Returns
Full session data, with token
to identify the session, and user
data with companies
info and permissions.
logout
Logout from the service.
Arguments
token
: the token associated with the session
Returns
logoutSuccessful
flag.
listWorkflows
Retrieves the workflows list for a given company.
Arguments
token
: the token associated with the session
cid
: company id
dateMin
: the starting date for searching Workflow (mandatory), in "milliseconds since Unix Epoch" format
dateMax
: the ending date for searching Workflow, in "milliseconds since Unix Epoch" format
meta
: optional metadata for searching
Returns
Workflows list.
downloadWorkflow
Retrieves a Buffer with the content of a workflow.
Arguments
token
: the token associated with the session
wfid
: the workflow id to be downloaded
Returns
Full workflow data (in zip format)