Skip to content

Latest commit

 

History

History
87 lines (62 loc) · 2.04 KB

organisations.md

File metadata and controls

87 lines (62 loc) · 2.04 KB

Organisations

Overview

The resorces responsible for creating and managing organisations

Available Resources

  1. netField.organisation.get(organisationId, depth, [callback])

  2. netField.organisation.update(organisationId, params, [callback])

  3. netField.organisation.create(organisationId, params, [callback])

  4. netField.organisation.delete(organisationId, [callback])

  5. netField.organisation.getAll(page, limit, sortBy, sortOrder, type [callback])

Resource Usage

getorganisation

Get organisation by organisationId 
/**
 * @param {number} organisationId
 * @param {number} depth
 * @param {function} callback optional
*/
netField.organisation.get(organisationId, depth, [callback])

updateorganisation

Update organisation by organisationId
/**
 * @param {number} organisationId
 * @param {object} params
 * @param {function} callback optional
*/
netField.organisation.update(organisationId, params, [callback])

createorganisation

Create Organisation
/**
 * @param {number} parentOrganisationId
 * @param {object} params
 * @param {function} callback optional
*/
netField.organisation.create(parentOrganisationId, params, [callback])

deleteorganisation

Delete organisation by organisationId
/**
 * @param {number} organisationId
 * @param {function} callback optional
*/
netField.organisation.delete(organisationId, [callback])

getorganisations

Get available organisations
/** 
 * @param {number} page (optional)
 * @param {number} limit (optional)
 * @param {string} sortBy (optional)
 * @param {string} sortOrder asc, desc (optional)
 * @param {string} type tenants, organisations (optional)
 * @param {function} callback (optional)
 */
netField.organisation.getAll(page, limit, sortBy, sortOrder, type, [callback])