Skip to content

Latest commit

 

History

History
2929 lines (2200 loc) · 111 KB

README.md

File metadata and controls

2929 lines (2200 loc) · 111 KB

Classes

Travelling
Audit
AuditUser
Config
Groups
GroupsType
Group
GroupUsers
GroupUser
GroupType
GroupTypeUsers

Both requests are disabled. Dont use.

GroupTypeUser
GroupRequest
GroupRequestUser
Users
UsersDomain
User
UserDomain
UserCurrent
Auth

Auth endpoints

AuthToken
AuthDomain
AuthDomainToken

Functions

SDK(host, opts)

SDK - importing the SDK for use

Travelling

Kind: global class

Travelling.healthCheck(authorization_bearer)

healthCheck - server's health check

Path: health

Kind: static method of Travelling

Param Type Description
authorization_bearer string The client_credentials generated OAUth2 access token.

Travelling.metrics(authorization_bearer)

metrics - servers metrics

Path: metrics

Kind: static method of Travelling

Param Type Description
authorization_bearer string The client_credentials generated OAUth2 access token.

Audit

Kind: global class

Audit.byActionAndSubaction(action, subaction, limit, skip, sort, sortdir, filter, resolve, authorization_bearer)

byActionAndSubaction - Gets audits by action and subaction type.

Filter Params

*Note: you can only use range operators (<, >, >=, <=) on the following columns: created_on.

Param Description
id optional (example: id=415c87e9-eaad-4b8e-8ce8-655c911e20ae)
created_on optional (example: created_on>=2021-06-09)
prop optional (example: prop=email)
old_val optional (example: [email protected])
new_val optional (example: new_val=[email protected])

Path: api/v1/audit/action/:action/subaction/:subaction

Kind: static method of Audit

Param Type Description
action any Audti action type. (example: CREATE)
subaction any Audit subaction type. (example: GROUP)
limit any Number of maximum results. (example: 2) (example: 2)
skip any Number of db rows skipped. (example: 10) (example: 1)
sort any Sort by any user object key (examples: created_on, action, etc.) (example: created_on)
sortdir any Sort direction (example ascending order: ASC) (example: ASC)
filter any Filter parameters (example: action=created_on>2021-06-03,created_on<2021-06-06) (example: created_on>2021-06-03,created_on<2021-06-06)
resolve any Joins users table to obtain 'by_user_firstname' and 'by_user'lastname' fields (example: true)
authorization_bearer string The client_credentials generated OAUth2 access token.

Audit.bySubaction(subaction, limit, skip, sort, sortdir, filter, resolve, authorization_bearer)

bySubaction - Gets audits by subaction type.

Filter Params

*Note: you can only use range operators (<, >, >=, <=) on the following columns: created_on.

Param Description
id optional (example: id=415c87e9-eaad-4b8e-8ce8-655c911e20ae)
created_on optional (example: created_on>=2021-06-09)
prop optional (example: prop=email)
old_val optional (example: [email protected])
new_val optional (example: new_val=[email protected])

Path: api/v1/audit/subaction/:subaction

Kind: static method of Audit

Param Type Description
subaction any Audit subaction type. (example: USER)
limit any Number of maximum results. (example: 2) (example: 2)
skip any Number of db rows skipped. (example: 10) (example: 1)
sort any Sort by any user object key (examples: created_on, action, etc.) (example: created_on)
sortdir any Sort direction (example ascending order: ASC) (example: ASC)
filter any Filter parameters (example: action=created_on>2021-06-03,created_on<2021-06-06) (example: created_on>2021-06-03,created_on<2021-06-06)
resolve any Joins users table to obtain 'by_user_firstname' and 'by_user'lastname' fields (example: true)
authorization_bearer string The client_credentials generated OAUth2 access token.

Audit.byAction(action, limit, skip, sort, sortdir, filter, resolve, authorization_bearer)

byAction - Gets audits by action type.

Filter Params

*Note: you can only use range operators (<, >, >=, <=) on the following columns: created_on.

Param Description
id optional (example: id=415c87e9-eaad-4b8e-8ce8-655c911e20ae)
created_on optional (example: created_on>=2021-06-09)
prop optional (example: prop=email)
old_val optional (example: [email protected])
new_val optional (example: new_val=[email protected])

Path: api/v1/audit/action/:action

Kind: static method of Audit

Param Type Description
action any Audit action type. (example: CREATE)
limit any Number of maximum results. (example: 2) (example: 2)
skip any Number of db rows skipped. (example: 10) (example: 1)
sort any Sort by any user object key (examples: created_on, action, etc.) (example: created_on)
sortdir any Sort direction (example ascending order: ASC) (example: ASC)
filter any Filter parameters (example: action=created_on>2021-06-03,created_on<2021-06-06) (example: created_on>2021-06-03,created_on<2021-06-06)
resolve any Joins users table to obtain 'by_user_firstname' and 'by_user'lastname' fields (example: true)
authorization_bearer string The client_credentials generated OAUth2 access token.

AuditUser

Kind: global class

AuditUser.countByuserId(id, filter, limit, skip, sort, sortdir, selfexclusion, authorization_bearer)

countByuserId - Gets audits by by_user id.

Filter Params

*Note: you can only use range operators (<, >, >=, <=) on the following columns: created_on.

Param Description
id optional (example: id=415c87e9-eaad-4b8e-8ce8-655c911e20ae)
created_on optional (example: created_on>=2021-06-09)
action optional (example: action=CREATE)
subaction optional (example: subaction=USER)
prop optional (example: prop=email)
old_val optional (example: [email protected])
new_val optional (example: new_val=[email protected])

Path: api/v1/audit/count/user/byuser/:id

Kind: static method of AuditUser

Param Type Description
id any Id of user that committed the action. (example: bf1b1e49-a105-43dc-b9a2-32c69a17fb5f)
filter any Filter parameters (example: action=CREATE,subaction=USER,created_on>2021-06-03,created_on<2021-06-06) (example: created_on>2023-01-03,created_on<2023-06-06)
limit any Number of maximum results. (example: 2) (example: 2)
skip any Number of db rows skipped. (example: 10) (example: 1)
sort any Sort by any user object key (examples: created_on, action, etc.) (example: created_on)
sortdir any Sort direction (example ascending order: ASC) (example: ASC)
selfexclusion any Excludes audits with the same of_user_id. (example: true)
authorization_bearer string The client_credentials generated OAUth2 access token.

AuditUser.byuserId(id, filter, limit, skip, sort, sortdir, resolve, selfexclusion, authorization_bearer)

byuserId - Gets audits by by_user id.

Filter Params

*Note: you can only use range operators (<, >, >=, <=) on the following columns: created_on.

Param Description
id optional (example: id=415c87e9-eaad-4b8e-8ce8-655c911e20ae)
created_on optional (example: created_on>=2021-06-09)
action optional (example: action=CREATE)
subaction optional (example: subaction=USER)
prop optional (example: prop=email)
old_val optional (example: [email protected])
new_val optional (example: new_val=[email protected])

Path: api/v1/audit/user/byuser/:id

Kind: static method of AuditUser

Param Type Description
id any Id of user that committed the action. (example: 44aa2ae6-22e9-43ef-a6d3-3d7d39e78064)
filter any Filter parameters (example: action=CREATE,subaction=USER,created_on>2021-06-03,created_on<2021-06-06) (example: created_on>2021-06-03,created_on<2021-06-06)
limit any Number of maximum results. (example: 2) (example: 2)
skip any Number of db rows skipped. (example: 10) (example: 1)
sort any Sort by any user object key (examples: created_on, action, etc.) (example: created_on)
sortdir any Sort direction (example ascending order: ASC) (example: ASC)
resolve any Joins users table to obtain 'by_user_firstname' and 'by_user'lastname' fields (example: true)
selfexclusion any Excludes audits with the same of_user_id. (example: true)
authorization_bearer string The client_credentials generated OAUth2 access token.

AuditUser.countOfuserId(id, filter, limit, skip, sort, sortdir, selfexclusion, authorization_bearer)

countOfuserId - Gets audits by of_user id.

Filter Params

*Note: you can only use range operators (<, >, >=, <=) on the following columns: created_on.

Param Description
id optional (example: id=415c87e9-eaad-4b8e-8ce8-655c911e20ae)
created_on optional (example: created_on>=2021-06-09)
action optional (example: action=CREATE)
subaction optional (example: subaction=USER)
prop optional (example: prop=email)
old_val optional (example: [email protected])
new_val optional (example: new_val=[email protected])

Path: api/v1/audit/count/user/ofuser/:id

Kind: static method of AuditUser

Param Type Description
id any Id of user that committed the action. (example: bf1b1e49-a105-43dc-b9a2-32c69a17fb5f)
filter any Filter parameters (example: action=CREATE,subaction=USER,created_on>2021-06-03,created_on<2021-06-06) (example: created_on>2021-06-03,created_on<2021-06-06)
limit any Number of maximum results. (example: 2) (example: 2)
skip any Number of db rows skipped. (example: 10) (example: 10)
sort any Sort by any user object key (examples: created_on, action, etc.) (example: action)
sortdir any Sort direction (example ascending order: ASC) (example: DESC)
selfexclusion any Excludes audits with the same by_user_id. (example: true)
authorization_bearer string The client_credentials generated OAUth2 access token.

AuditUser.ofuserId(id, filter, limit, skip, sort, sortdir, resolve, selfexclusion, authorization_bearer)

ofuserId - Gets audits by of_user id.

Filter Params

*Note: you can only use range operators (<, >, >=, <=) on the following columns: created_on.

Param Description
id optional (example: id=415c87e9-eaad-4b8e-8ce8-655c911e20ae)
created_on optional (example: created_on>=2021-06-09)
action optional (example: action=CREATE)
subaction optional (example: subaction=USER)
prop optional (example: prop=email)
old_val optional (example: [email protected])
new_val optional (example: new_val=[email protected])

Path: api/v1/audit/user/ofuser/:id

Kind: static method of AuditUser

Param Type Description
id any Id of user that committed the action. (example: 44aa2ae6-22e9-43ef-a6d3-3d7d39e78064)
filter any Filter parameters (example: action=CREATE,subaction=USER,created_on>2021-06-03,created_on<2021-06-06) (example: created_on>2021-06-03,created_on<2021-06-06)
limit any Number of maximum results. (example: 2) (example: 2)
skip any Number of db rows skipped. (example: 10) (example: 10)
sort any Sort by any user object key (examples: created_on, action, etc.) (example: action)
sortdir any Sort direction (example ascending order: ASC) (example: DESC)
resolve any Joins users table to obtain 'by_user_firstname' and 'by_user'lastname' fields (example: true)
selfexclusion any Excludes audits with the same by_user_id. (example: true)
authorization_bearer string The client_credentials generated OAUth2 access token.

Config

Kind: global class

Config.getProperty(property, authorization_bearer)

getProperty - Gets a property from travellings config.

Path: api/v1/config/:property

Kind: static method of Config

Param Type Description
property any (example: password)
authorization_bearer string The client_credentials generated OAUth2 access token.

Groups

Kind: global class

Groups.export(authorization_bearer)

export - Exports all groups in the proper format to be imported.

Path: api/v1/groups/export

Kind: static method of Groups

Param Type Description
authorization_bearer string The client_credentials generated OAUth2 access token.

Groups.import(body, authorization_bearer)

import - Imports all groups from the exported format.

Path: api/v1/groups/import

Kind: static method of Groups

Param Type Description
body Object
authorization_bearer string The client_credentials generated OAUth2 access token.

Example
body

{
  "group": {
    "anonymous": {
      "allowed": [
        {"method": "GET", "route": "/account/portal/*"},
        {"method": "GET", "route": "/account/assets/*"},
        {"method": "GET", "route": "/favicon.ico"},
        {"method": "GET", "route": "/account/api/v1/auth/logout"},
        {"method": "PUT", "route": "/account/api/v1/auth/password/forgot"},
        {"method": "PUT", "route": "/account/api/v1/auth/password/reset"},
        {"method": "GET", "route": "/account/api/v1/auth/activate"},
        {"method": "POST", "route": "/account/api/v1/auth/token"},
        {"method": "GET", "route": "/account/api/v1/auth/login/otp"},
        {"method": "POST","route":"/account/api/v1/auth/oauth/authorize"},
        {"method": "GET","route":"/account/api/v1/auth/oauth/authorize"},
        {"method": "GET", "route": "/account/api/v1/user/me/permission/allowed/*"},
        {"method": "GET", "route": "/account/api/v1/user/me/route/allowed"},
        {"method": "GET", "route": "/account/api/v1/config/password"},
        {"method": "GET", "route": "/account/api/v1/config/portal/webclient"},
        {"method": "GET", "route": "/account/metrics"},
        {"method": "GET", "route": "/account/health"}
      ]
    }
  }
}

Groups.get(authorization_bearer)

get - Get all the groups

Path: api/v1/groups

Kind: static method of Groups

Param Type Description
authorization_bearer string The client_credentials generated OAUth2 access token.

GroupsType

Kind: global class

GroupsType.all(type, authorization_bearer)

all - Gets all groups of a particular type

Path: api/v1/groups/type/:type

Kind: static method of GroupsType

Param Type Description
type any The type of the group
authorization_bearer string The client_credentials generated OAUth2 access token.

GroupsType.getTypesList(authorization_bearer)

getTypesList - Gets all the types of groups currently made.

Path: api/v1/groups/types

Kind: static method of GroupsType

Param Type Description
authorization_bearer string The client_credentials generated OAUth2 access token.

Group

Kind: global class

Group.addPermission(id, permission, authorization_bearer)

addPermission - Adds a permission to a group.

Path: api/v1/group/id/:id/insert/permission/:permission

Kind: static method of Group

Param Type Description
id any Name of the group (example: anonymous)
permission any Permission (example: test-one-two-*)
authorization_bearer string The client_credentials generated OAUth2 access token.

Group.deletePermission(id, permission, authorization_bearer)

deletePermission - Removes a permission/route from a group.

Path: api/v1/group/id/:id/permission/:permission

Kind: static method of Group

Param Type Description
id any Name of the group (example: anonymous)
permission any Name or Route (example: test-one-two-*)
authorization_bearer string The client_credentials generated OAUth2 access token.

Group.addRoute(body, id, authorization_bearer)

addRoute - Adds a route to a group.

{
    "route": "test/permissions/*", // optional
    "host": null, // optional, defaults to travelling host
    "method": "*", // optional, defaults to '*'
    "remove_from_path": 'test/', // optional 
    "name": "test-permissions-*"  // Required and needs to be unqiue, defaults to method + route seperated by '-' instead of `/`
}

Path: api/v1/group/id/:id/insert/route

Kind: static method of Group

Param Type Description
body Object
id any
authorization_bearer string The client_credentials generated OAUth2 access token.

Example
body

{
	"route": "test/permissions/*",
    "host": null, 
    "method": "*", 
    "name": "test-permissions-*"  
}

Group.removeInheritance(id, inherited, grouptype, authorization_bearer)

removeInheritance - Removes an inheritance from a group.

Path: api/v1/group/id/:id/remove/inheritance/:inherited/type/:grouptype

Kind: static method of Group

Param Type Description
id any Name of the group (example: test1234)
inherited any Name of the group to inherit from (example: group4)
grouptype any The type of the inherited group
authorization_bearer string The client_credentials generated OAUth2 access token.

Group.inheritFrom(id, inherited, grouptype, authorization_bearer)

inheritFrom - Adds an inheritance to a group.

Path: api/v1/group/id/:id/inherit/from/:inherited/type/:grouptype

Kind: static method of Group

Param Type Description
id any Name of the group (example: test1234)
inherited any Name of the group to inherit from (example: group4)
grouptype any The type of the inherited group
authorization_bearer string The client_credentials generated OAUth2 access token.

Group.setDefault(id, authorization_bearer)

setDefault - Sets the group to be the default group for new users.

Path: api/v1/group/id/:id/set/default

Kind: static method of Group

Param Type Description
id any id or name (example: group6)
authorization_bearer string The client_credentials generated OAUth2 access token.

Group.delete(id, authorization_bearer)

delete - delete group by its id or name

Path: api/v1/group/id/:id

Kind: static method of Group

Param Type Description
id any id or name (example: group1)
authorization_bearer string The client_credentials generated OAUth2 access token.

Group.edit(body, id, authorization_bearer)

edit - Edits a group

Path: api/v1/group/id/:id

Kind: static method of Group

Param Type Description
body Object
id any (example: ab31efc8-40a5-4d38-a347-adb4e38d0075)
authorization_bearer string The client_credentials generated OAUth2 access token.

Example
body

{
    "allowed": [
        {
            "route": "/travelling/portal/*",
            "host": null,
            "remove_from_path": "/travelling/portal",
            "method": "*",
            "name": "*-travelling-portal-*"
        },
        {
            "route": "/travelling/api/v1/auth/*",
            "host": null,
            "method": "*",
            "name": "*-travelling-api-v1-auth-*"
        },
        {
            "route": "/travelling/api/v1/user/me/route/allowed",
            "host": null,
            "method": "GET",
            "name": "get-travelling-api-v1-user-me-route-allowed"
        },
        {
            "route": "/travelling/api/v1/user/me/permission/allowed/*",
            "host": null,
            "method": "GET",
            "name": "get-travelling-api-v1-user-me-permission-allowed-*"
        },
        {
            "route": "/travelling/assets/*",
            "host": null,
            "remove_from_path": "/travelling/assets/",
            "method": "*",
            "name": "*-travelling-assets-*"
        },
        {
            "route": "travelling/api/v1/config/password",
            "host": null,
            "method": "get"
        }
    ]
}

Group.get(id, authorization_bearer)

get - Get a group by it's id or name.

Path: api/v1/group/id/:id

Kind: static method of Group

Param Type Description
id any id or name (example: group1)
authorization_bearer string The client_credentials generated OAUth2 access token.

Group.createByName(id, authorization_bearer)

createByName - Add a new blank group with the set name.

Path: api/v1/group/id/:id

Kind: static method of Group

Param Type Description
id any Name of the new group (example: test123)
authorization_bearer string The client_credentials generated OAUth2 access token.

Group.create(body, authorization_bearer)

create - Add a new group

Path: api/v1/group

Kind: static method of Group

Param Type Description
body Object
authorization_bearer string The client_credentials generated OAUth2 access token.

Example
body

{
    "name": "group1",
    "type": "testgroup",
    "allowed": [
        {
            "route": "/test",
            "host": "http://127.0.0.1:1237/",
            "remove_from_path": "test",
            "method": "*",
            "name": "all-test"
        }
    ],
    "is_default": false
}

GroupUsers

Kind: global class

GroupUsers.inherited(id)

inherited - Gets all the users that belong to the group and all of its inherited groups.

Optional Query Params
Param Description
id optional (example: 26c6aeff-ab95-4bdd-8260-534cf92d1c23)
username optional (example: user7)
locked optional (example: true)
locked_reason optional (example: Activation Required email your admin to get your account activated)
group_request optional (example: superadmin)
failed_login_attempts optional (example: 0)
change_username optional (example: false)
change_password optional (example: false)
reset_password optional (example: false)
email_verify optional (example: false)
group_id optional (example: 7320292c-627e-4e5a-b059-583eabdd6264)
email optional (example: [email protected])
created_on optional (example: 1568419646794)
last_login optional (example: null)

Path: api/v1/group/id/:id/users/inherited

Kind: static method of GroupUsers

Param Type Description
id any id or name (example: superadmin)

GroupUsers.count(id, filter, limit, skip, authorization_bearer)

count - Gets all the users that belong to the group.

Optional Query Params

*Note: you can only use range operators (<, >, >=, <=) on the following columns: created_on, updated_on, dob.

Param Description
id optional (example: 26c6aeff-ab95-4bdd-8260-534cf92d1c23)
username optional (example: user7)
locked optional (example: true)
locked_reason optional (example: Activation Required email your admin to get your account activated)
group_request optional (example: superadmin)
failed_login_attempts optional (example: 0)
change_username optional (example: false)
change_password optional (example: false)
reset_password optional (example: false)
email_verify optional (example: false)
group_id optional (example: 7320292c-627e-4e5a-b059-583eabdd6264)
email optional (example: [email protected])
created_on optional (example: 1568419646794)
last_login optional (example: null)

Path: api/v1/group/id/:id/users/count

Kind: static method of GroupUsers

Param Type Description
id any Group name or ID. (example: superadmin)
filter any Filter parameters (example: locked=false,created_on>2021-06-03,created_on<2021-06-06) (example: locked=false,created_on>2021-06-03,created_on<2021-06-06)
limit any Number of maximum results. (example: 10) (example: 10)
skip any Number of db rows skipped. (example: 2) (example: 2)
authorization_bearer string The client_credentials generated OAUth2 access token.

GroupUsers.get(id, filter, limit, skip, sort, sortdir, authorization_bearer)

get - Gets all the users that belong to the group.

Optional Query Params

*Note: you can only use range operators (<, >, >=, <=) on the following columns: created_on, updated_on, dob.

Param Description
id optional (example: 26c6aeff-ab95-4bdd-8260-534cf92d1c23)
username optional (example: user7)
locked optional (example: true)
locked_reason optional (example: Activation Required email your admin to get your account activated)
group_request optional (example: superadmin)
failed_login_attempts optional (example: 0)
change_username optional (example: false)
change_password optional (example: false)
reset_password optional (example: false)
email_verify optional (example: false)
group_id optional (example: 7320292c-627e-4e5a-b059-583eabdd6264)
email optional (example: [email protected])
created_on optional (example: 1568419646794)
last_login optional (example: null)

Path: api/v1/group/id/:id/users

Kind: static method of GroupUsers

Param Type Description
id any Group name or ID. (example: superadmin)
filter any Filter parameters (example: locked=false,created_on>2021-06-03,created_on<2021-06-06) (example: locked=false,created_on>2021-06-03,created_on<2021-06-06)
limit any Number of maximum results. (example: 10) (example: 10)
skip any Number of db rows skipped. (example: 2) (example: 2)
sort any Sort by any user object key (examples: id, domain, locked, etc.) (example: created_on)
sortdir any Sort direction (example ascending order: ASC) (example: ASC)
authorization_bearer string The client_credentials generated OAUth2 access token.

GroupUser

Kind: global class

GroupUser.delete(group, type, id, authorization_bearer)

delete - Delete a user by it's id or username from group of a particular type.

Path: api/v1/group/id/:group/type/:type/user/:id

Kind: static method of GroupUser

Param Type Description
group any id or name of the group
type any The type of the group (example: accounts)
id any id or name (example: user7)
authorization_bearer string The client_credentials generated OAUth2 access token.

GroupUser.removeGroupInheritance(group, type, id, inheritgroupid, inheritgrouptype, authorization_bearer)

removeGroupInheritance - Remove a user to a group of a particular type of group.

Path: api/v1/group/id/:group/type/:type/user/:id/inheritance/group/:inheritgroupid/type/:inheritgrouptype

Kind: static method of GroupUser

Param Type Description
group any id or name of the group (example: group1)
type any type of group (example: group)
id any id or name of the user (example: user5)
inheritgroupid any id or name of the group to inherit (example: group2)
inheritgrouptype any type of the group to inherit (example: group)
authorization_bearer string The client_credentials generated OAUth2 access token.

GroupUser.addGroupInheritance(group, type, id, inheritgroupid, inheritgrouptype, authorization_bearer)

addGroupInheritance - Add a group for the current user from a group of a particular type.

Path: api/v1/group/id/:group/type/:type/user/:id/inheritance/group/:inheritgroupid/type/:inheritgrouptype

Kind: static method of GroupUser

Param Type Description
group any id or name of the group (example: group1)
type any type of group (example: group)
id any id or name of the user (example: user5)
inheritgroupid any id or name of the group to inherit (example: group2)
inheritgrouptype any type of the group to inherit (example: group)
authorization_bearer string The client_credentials generated OAUth2 access token.

GroupUser.editPropertyValue(group, type, id, property, value, authorization_bearer)

editPropertyValue - Edit a current user's property data as a path param from a group of a particular type.

Path: api/v1/group/id/:group/type/:type/user/:id/property/:property/:value

Kind: static method of GroupUser

Param Type Description
group any id or name of the group
type any The type of the group (example: group)
id any id or name (example: user5)
property any (example: email)
value any (example: [email protected])
authorization_bearer string The client_credentials generated OAUth2 access token.

GroupUser.editProperty(body, group, type, id, property, authorization_bearer)

editProperty - Edit a user's property by it's id or username from a group of a particular type.

Path: api/v1/group/id/:group/type/:type/user/:id/property/:property

Kind: static method of GroupUser

Param Type Description
body Object
group any id or name of the group
type any The type of the group (example: accounts)
id any id or name (example: user6)
property any (example: email)
authorization_bearer string The client_credentials generated OAUth2 access token.

Example
body

{
	"locked": false
}

GroupUser.edit(body, group, type, id, authorization_bearer)

edit - Edit a user by it's id or username from group of a particular type.

Path: api/v1/group/id/:group/type/:type/user/:id

Kind: static method of GroupUser

Param Type Description
body Object
group any id or name of the group
type any The type of the group (example: accounts)
id any id or name (example: user6)
authorization_bearer string The client_credentials generated OAUth2 access token.

Example
body

{
	"locked": false
}

GroupUser.getProperty(group, type, id, property, authorization_bearer)

getProperty - Get a user's property by it's id or username from group of a particular type.

Path: api/v1/group/id/:group/type/:type/user/:id/property/:property

Kind: static method of GroupUser

Param Type Description
group any id or name of the group
type any The type of the group (example: accounts)
id any id or name (example: user6)
property any (example: email)
authorization_bearer string The client_credentials generated OAUth2 access token.

GroupUser.get(group, type, id, authorization_bearer)

get - Get a user by it's id or username from group of a particular type.

Path: api/v1/group/id/:group/type/:type/user/:id

Kind: static method of GroupUser

Param Type Description
group any id or name of the group
type any The type of the group (example: accounts)
id any id or name (example: user6)
authorization_bearer string The client_credentials generated OAUth2 access token.

GroupType

Kind: global class

GroupType.deletePermission(id, type, permission, authorization_bearer)

deletePermission - Removes a permission/route from a group of a particular type.

Path: api/v1/group/id/:id/type/:type/permission/:permission

Kind: static method of GroupType

Param Type Description
id any Name of the group (example: anonymous)
type any Type of the group (example: group)
permission any Name or Route (example: test-one-three-*)
authorization_bearer string The client_credentials generated OAUth2 access token.

GroupType.addPermission(id, type, permission, authorization_bearer)

addPermission - Adds a permission to a group of a particular type.

Path: api/v1/group/id/:id/type/:type/insert/permission/:permission

Kind: static method of GroupType

Param Type Description
id any Name of the group (example: anonymous)
type any Type of the group (example: group)
permission any Permission (example: test-one-three-*)
authorization_bearer string The client_credentials generated OAUth2 access token.

GroupType.addRoute(body, id, type, authorization_bearer)

addRoute - Adds a route to a group of a particular type.

{
    "route": "test/permissions/*", // optional
    "host": null, // optional, defaults to travelling host
    "method": "*", // optional, defaults to '*'
    "remove_from_path": 'test/', // optional 
    "name": "test-permissions-*"  // Required and needs to be unqiue, defaults to method + route seperated by '-' instead of `/`
}

Path: api/v1/group/id/:id/type/:type/insert/route

Kind: static method of GroupType

Param Type Description
body Object
id any Name of the group
type any
authorization_bearer string The client_credentials generated OAUth2 access token.

Example
body

{
	"route": "test/permissions/*",
    "host": null, 
    "method": "*", 
    "name": "test-permissions-*"  
}

GroupType.removeInheritance(id, type, inherited, grouptype, authorization_bearer)

removeInheritance - Removes an inheritance from a group of a particular type.

Path: api/v1/group/id/:id/type/:type/remove/inheritance/:inherited/type/:grouptype

Kind: static method of GroupType

Param Type Description
id any Name of the group (example: test1234)
type any The type of the group (example: accounts)
inherited any Name of the group to inherit from (example: superadmin)
grouptype any The type of the inherited group
authorization_bearer string The client_credentials generated OAUth2 access token.

GroupType.inheritFrom(id, type, inherited, grouptype, authorization_bearer)

inheritFrom - Adds an inheritance to a group of a particular type.

Path: api/v1/group/id/:id/type/:type/inherit/from/:inherited/type/:grouptype

Kind: static method of GroupType

Param Type Description
id any Name of the group (example: group1)
type any The type of the group (example: testgroup)
inherited any Name of the group to inherit from (example: test123)
grouptype any The type of the inherited group
authorization_bearer string The client_credentials generated OAUth2 access token.

GroupType.setDefault(id, type)

setDefault - Sets the group of a particular type to be the default group for new users.

Path: api/v1/group/id/:id/type/:type/set/default

Kind: static method of GroupType

Param Type Description
id any id or name (example: group1)
type any The type of the group (example: account)

GroupType.delete(id, type, authorization_bearer)

delete - delete group of a particular type by its name or id

Path: api/v1/group/id/:id/type/:type

Kind: static method of GroupType

Param Type Description
id any id or name
type any The type of the group
authorization_bearer string The client_credentials generated OAUth2 access token.

GroupType.get(id, type, authorization_bearer)

get - Get a group by it's id or name of a particular type.

Path: api/v1/group/id/:id/type/:type

Kind: static method of GroupType

Param Type Description
id any id or name (example: group1)
type any The type of the group (example: accounts)
authorization_bearer string The client_credentials generated OAUth2 access token.

GroupType.edit(body, id, type, authorization_bearer)

edit - Edits a group of a particular type

Path: api/v1/group/id/:id/type/:type

Kind: static method of GroupType

Param Type Description
body Object
id any id or name
type any The type of the group
authorization_bearer string The client_credentials generated OAUth2 access token.

Example
body

{"inherited":["a717b880-b17b-4995-9610-cf451a06d015","7ec8c351-7b8a-4ea8-95cc-0d990b225768"]}

GroupType.createByName(id, type, authorization_bearer)

createByName - Add a new blank group with the set name and type

Path: api/v1/group/id/:id/type/:type

Kind: static method of GroupType

Param Type Description
id any Name of the new group (example: test1234)
type any Type of the new group (example: accounts)
authorization_bearer string The client_credentials generated OAUth2 access token.

GroupType.create(body, type, authorization_bearer)

create - Add a new group of a particular type

Path: api/v1/group/type/:type

Kind: static method of GroupType

Param Type Description
body Object
type any The type of the group
authorization_bearer string The client_credentials generated OAUth2 access token.

Example
body

{
    "name": "group1",
    "type": "accounts",
    "allowed": [
        {
            "route": "/test",
            "host": "http://127.0.0.1:1237/",
            "remove_from_path": "test",
            "method": "*",
            "name": "all-test"
        }
    ],
    "is_default": false
}

GroupTypeUsers

Both requests are disabled. Dont use.

Kind: global class

GroupTypeUsers.inherited(id, type)

inherited - Gets all the users that belong to the group of a particular type by its name or id and all of its inherited groups.

Optional Query Params
Param Description
id optional (example: 26c6aeff-ab95-4bdd-8260-534cf92d1c23)
username optional (example: user7)
locked optional (example: true)
locked_reason optional (example: Activation Required email your admin to get your account activated)
group_request optional (example: superadmin)
failed_login_attempts optional (example: 0)
change_username optional (example: false)
change_password optional (example: false)
reset_password optional (example: false)
email_verify optional (example: false)
group_id optional (example: 7320292c-627e-4e5a-b059-583eabdd6264)
email optional (example: [email protected])
created_on optional (example: 1568419646794)
last_login optional (example: null)

Path: api/v1/group/id/:id/type/:type/users/inherited

Kind: static method of GroupTypeUsers

Param Type Description
id any (example: group4)
type any The type of the group (example: groups)

GroupTypeUsers.count(id, type, filter, limit, skip, authorization_bearer)

count - Gets all the users that belong to the group of a particular type by its name or id.

Optional Query Params

*Note: you can only use range operators (<, >, >=, <=) on the following columns: created_on, updated_on, dob.

Param Description
id optional (example: 26c6aeff-ab95-4bdd-8260-534cf92d1c23)
username optional (example: user7)
locked optional (example: true)
locked_reason optional (example: Activation Required email your admin to get your account activated)
group_request optional (example: superadmin)
failed_login_attempts optional (example: 0)
change_username optional (example: false)
change_password optional (example: false)
reset_password optional (example: false)
email_verify optional (example: false)
group_id optional (example: 7320292c-627e-4e5a-b059-583eabdd6264)
email optional (example: [email protected])
created_on optional (example: 1568419646794)
last_login optional (example: null)

Path: api/v1/group/id/:id/type/:type/users/count

Kind: static method of GroupTypeUsers

Param Type Description
id any Group name or ID. (example: superadmin)
type any Group type. (example: group)
filter any Filter parameters (example: locked=false,created_on>2021-06-03,created_on<2021-06-06) (example: locked=false,created_on>2021-06-03,created_on<2021-06-06)
limit any Number of maximum results. (example: 10) (example: 10)
skip any Number of db rows skipped. (example: 2) (example: 2)
authorization_bearer string The client_credentials generated OAUth2 access token.

GroupTypeUsers.get(id, type, filter, limit, skip, sort, sortdir, authorization_bearer)

get - Gets all the users that belong to the group of a particular type by its name or id.

Optional Query Params

*Note: you can only use range operators (<, >, >=, <=) on the following columns: created_on, updated_on, dob.

Param Description
id optional (example: 26c6aeff-ab95-4bdd-8260-534cf92d1c23)
username optional (example: user7)
locked optional (example: true)
locked_reason optional (example: Activation Required email your admin to get your account activated)
group_request optional (example: superadmin)
failed_login_attempts optional (example: 0)
change_username optional (example: false)
change_password optional (example: false)
reset_password optional (example: false)
email_verify optional (example: false)
group_id optional (example: 7320292c-627e-4e5a-b059-583eabdd6264)
email optional (example: [email protected])
created_on optional (example: 1568419646794)
last_login optional (example: null)

Path: api/v1/group/id/:id/type/:type/users

Kind: static method of GroupTypeUsers

Param Type Description
id any Group name or ID. (example: superadmin)
type any Group type. (example: group)
filter any Filter parameters (example: locked=false,created_on>2021-06-03,created_on<2021-06-06) (example: locked=false,created_on>2021-06-03,created_on<2021-06-06)
limit any Number of maximum results. (example: 10) (example: 10)
skip any Number of db rows skipped. (example: 2) (example: 2)
sort any Sort by any user object key (examples: id, domain, locked, etc.) (example: created_on)
sortdir any Sort direction (example ascending order: ASC) (example: ASC)
authorization_bearer string The client_credentials generated OAUth2 access token.

GroupTypeUser

Kind: global class

GroupTypeUser.delete(type, id, authorization_bearer)

delete - Delete a user by it's id or username from group of a particular type.

Path: api/v1/group/type/:type/user/:id

Kind: static method of GroupTypeUser

Param Type Description
type any The type of the group (example: accounts)
id any id or name (example: user7)
authorization_bearer string The client_credentials generated OAUth2 access token.

GroupTypeUser.removeGroupInheritance(type, id, inheritgroupid, inheritgrouptype, authorization_bearer)

removeGroupInheritance - Remove a user to a group of a particular type of group.

Path: api/v1/group/type/:type/user/:id/inheritance/group/:inheritgroupid/type/:inheritgrouptype

Kind: static method of GroupTypeUser

Param Type Description
type any type of group (example: group)
id any id or name of the user (example: user5)
inheritgroupid any id or name of the group to inherit (example: group2)
inheritgrouptype any type of the group to inherit (example: group)
authorization_bearer string The client_credentials generated OAUth2 access token.

GroupTypeUser.addGroupInheritance(type, id, inheritgroupid, inheritgrouptype, authorization_bearer)

addGroupInheritance - Add a user to a group of a particular type of group.

Path: api/v1/group/type/:type/user/:id/inheritance/group/:inheritgroupid/type/:inheritgrouptype

Kind: static method of GroupTypeUser

Param Type Description
type any type of group (example: group)
id any id or name of the user (example: user5)
inheritgroupid any id or name of the group to inherit (example: group2)
inheritgrouptype any type of the group to inherit (example: group)
authorization_bearer string The client_credentials generated OAUth2 access token.

GroupTypeUser.editPropertyValue(type, id, property, value, authorization_bearer)

editPropertyValue - Edit a current user's property data as a path param from a group of a particular type.

Path: api/v1/group/type/:type/user/:id/property/:property/:value

Kind: static method of GroupTypeUser

Param Type Description
type any The type of the group (example: group)
id any id or name (example: user5)
property any (example: email)
value any (example: [email protected])
authorization_bearer string The client_credentials generated OAUth2 access token.

GroupTypeUser.editProperty(body, type, id, property, authorization_bearer)

editProperty - Edit a user's property by it's id or username from a group of a particular type.

Path: api/v1/group/type/:type/user/:id/property/:property

Kind: static method of GroupTypeUser

Param Type Description
body Object
type any The type of the group (example: accounts)
id any id or name (example: user6)
property any (example: email)
authorization_bearer string The client_credentials generated OAUth2 access token.

Example
body

{
	"locked": false
}

GroupTypeUser.edit(body, type, id, authorization_bearer)

edit - Edit a user by it's id or username from group of a particular type.

Path: api/v1/group/type/:type/user/:id

Kind: static method of GroupTypeUser

Param Type Description
body Object
type any The type of the group (example: accounts)
id any id or name (example: user6)
authorization_bearer string The client_credentials generated OAUth2 access token.

Example
body

{
	"locked": false
}

GroupTypeUser.getProperty(type, id, property, authorization_bearer)

getProperty - Get a user's property by it's id or username from group of a particular type.

Path: api/v1/group/type/:type/user/:id/property/:property

Kind: static method of GroupTypeUser

Param Type Description
type any The type of the group (example: accounts)
id any id or name (example: user6)
property any (example: email)
authorization_bearer string The client_credentials generated OAUth2 access token.

GroupTypeUser.get(type, id, authorization_bearer)

get - Get a user by it's id or username from group of a particular type.

Path: api/v1/group/type/:type/user/:id

Kind: static method of GroupTypeUser

Param Type Description
type any The type of the group (example: accounts)
id any id or name (example: user6)
authorization_bearer string The client_credentials generated OAUth2 access token.

GroupRequest

Kind: global class

GroupRequestUser

Kind: global class

GroupRequestUser.delete(body, type, id, authorization_bearer)

delete - Delete a user by it's id or username from the user's group_request of a particular type.

Path: api/v1/group/request/type/:type/user/:id

Kind: static method of GroupRequestUser

Param Type Description
body Object
type any (example: testgroup)
id any (example: user69)
authorization_bearer string The client_credentials generated OAUth2 access token.

Example
body

{
	"locked": false
}

GroupRequestUser.addGroupInheritance(type, id, inheritgroupid, inheritgrouptype, authorization_bearer)

addGroupInheritance - Add a user to a group from the user's group_request of a particular type.

Path: api/v1/group/request/type/:type/user/:id/inheritance/group/:inheritgroupid/type/:inheritgrouptype

Kind: static method of GroupRequestUser

Param Type Description
type any type of group (example: group)
id any id or name of the user (example: user5)
inheritgroupid any id or name of the group to inherit (example: group2)
inheritgrouptype any type of the group to inherit (example: group)
authorization_bearer string The client_credentials generated OAUth2 access token.

GroupRequestUser.editProperty(body, type, id, property, authorization_bearer)

editProperty - Edit a user's property by it's id or username from the user's group_request of a particular type.

Path: api/v1/group/request/type/:type/user/:id/property/:property

Kind: static method of GroupRequestUser

Param Type Description
body Object
type any (example: accounts)
id any (example: user6)
property any (example: email)
authorization_bearer string The client_credentials generated OAUth2 access token.

Example
body

GroupRequestUser.edit(body, type, id, authorization_bearer)

edit - Edit a user by it's id or username from the user's group_request of a particular type.

Path: api/v1/group/request/type/:type/user/:id

Kind: static method of GroupRequestUser

Param Type Description
body Object
type any (example: accounts)
id any (example: user6)
authorization_bearer string The client_credentials generated OAUth2 access token.

Example
body

{
	"locked": false
}

Users

Kind: global class

Users.byGroupRequest(group_request, authorization_bearer)

byGroupRequest - Gets all the users that have the specified group request

Optional Query Params
Param Description
id optional (example: 26c6aeff-ab95-4bdd-8260-534cf92d1c23)
username optional (example: user7)
locked optional (example: true)
locked_reason optional (example: Activation Required email your admin to get your account activated)
group_request optional (example: superadmin)
failed_login_attempts optional (example: 0)
change_username optional (example: false)
change_password optional (example: false)
reset_password optional (example: false)
email_verify optional (example: false)
group_id optional (example: 7320292c-627e-4e5a-b059-583eabdd6264)
email optional (example: [email protected])
created_on optional (example: 1568419646794)
last_login optional (example: null)

Path: api/v1/users/group/request/:group_request

Kind: static method of Users

Param Type Description
group_request any name of the group (example: superadmin)
authorization_bearer string The client_credentials generated OAUth2 access token.

Users.count(limit, skip, filter, ids, authorization_bearer)

count - Gets all the users

Optional Query Params

*Note: you can only use range operators (<, >, >=, <=) on the following columns: created_on, updated_on, dob.

Param Description
id optional (example: 26c6aeff-ab95-4bdd-8260-534cf92d1c23)
username optional (example: user7)
locked optional (example: true)
locked_reason optional (example: Activation Required email your admin to get your account activated)
group_request optional (example: superadmin)
failed_login_attempts optional (example: 0)
change_username optional (example: false)
change_password optional (example: false)
reset_password optional (example: false)
email_verify optional (example: false)
group_id optional (example: 7320292c-627e-4e5a-b059-583eabdd6264)
email optional (example: [email protected])
created_on optional (example: 1568419646794)
last_login optional (example: null)

Path: api/v1/users/count

Kind: static method of Users

Param Type Description
limit any Number of maximum results. (example: 2) (example: 2)
skip any Number of db rows skipped. (example: 10) (example: 10)
filter any Filter parameters (example: locked=false,created_on>2021-06-03,created_on<2021-06-06) (example: created_on>2021-06-06,created_on<2021-06-08)
ids any Comma seperated id values used in inclusion query (example: d0323874-9b24-4bc5-ae38-fb8808c4e453,08c4c17f-317b-4be8-bfbd-451a274a3f7f)
authorization_bearer string The client_credentials generated OAUth2 access token.

Users.get(sort, limit, skip, filter, sortdir, ids, params, authorization_bearer)

get - Gets all the users

Filter Params

*Note: you can only use range operators (<, >, >=, <=) on the following columns: created_on, updated_on, dob.

Param Description
id optional (example: 26c6aeff-ab95-4bdd-8260-534cf92d1c23)
username optional (example: user7)
locked optional (example: true)
locked_reason optional (example: Activation Required email your admin to get your account activated)
group_request optional (example: superadmin)
failed_login_attempts optional (example: 0)
change_username optional (example: false)
change_password optional (example: false)
reset_password optional (example: false)
email_verify optional (example: false)
group_id optional (example: 7320292c-627e-4e5a-b059-583eabdd6264)
email optional (example: [email protected])
created_on optional (example: 1568419646794)
last_login optional (example: null)

Path: api/v1/users

Kind: static method of Users

Param Type Description
sort any Sort by any user object key (examples: id, domain, locked, etc.) (example: created_on)
limit any Number of maximum results. (example: 2) (example: 2)
skip any Number of db rows skipped. (example: 10) (example: 10)
filter any Filter parameters (example: locked=false,created_on>2021-06-03,created_on<2021-06-06) (example: locked=false,created_on>2021-06-03,created_on<2021-06-06)
sortdir any Sort direction (example ascending order: ASC) (example: ASC)
ids any Comma seperated id values used in inclusion query (example: d0323874-9b24-4bc5-ae38-fb8808c4e453,08c4c17f-317b-4be8-bfbd-451a274a3f7f)
params any (example: id)
authorization_bearer string The client_credentials generated OAUth2 access token.

UsersDomain

Kind: global class

UsersDomain.count(domain, limit, skip, filter, ids, authorization_bearer)

count - Gets all the users

Optional Query Params

*Note: you can only use range operators (<, >, >=, <=) on the following columns: created_on, updated_on, dob.

Param Description
id optional (example: 26c6aeff-ab95-4bdd-8260-534cf92d1c23)
username optional (example: user7)
locked optional (example: true)
locked_reason optional (example: Activation Required email your admin to get your account activated)
group_request optional (example: superadmin)
failed_login_attempts optional (example: 0)
change_username optional (example: false)
change_password optional (example: false)
reset_password optional (example: false)
email_verify optional (example: false)
group_id optional (example: 7320292c-627e-4e5a-b059-583eabdd6264)
email optional (example: [email protected])
created_on optional (example: 1568419646794)
last_login optional (example: null)

Path: api/v1/users/domain/:domain/count

Kind: static method of UsersDomain

Param Type Description
domain any (example: dragohm.com)
limit any Number of maximum results. (example: 2) (example: 5)
skip any Number of db rows skipped. (example: 10) (example: 10)
filter any Filter parameters (example: locked=false,created_on>2021-06-03,created_on<2021-06-06) (example: created_on>2022-06-01,created_on<2022-06-08)
ids any Comma seperated id values used in inclusion query (example: d0323874-9b24-4bc5-ae38-fb8808c4e453,08c4c17f-317b-4be8-bfbd-451a274a3f7f)
authorization_bearer string The client_credentials generated OAUth2 access token.

UsersDomain.get(domain, sort, limit, skip, filter, sortdir, ids, params, authorization_bearer)

get - Gets all the users

Filter Params

*Note: you can only use range operators (<, >, >=, <=) on the following columns: created_on, updated_on, dob.

Param Description
id optional (example: 26c6aeff-ab95-4bdd-8260-534cf92d1c23)
username optional (example: user7)
locked optional (example: true)
locked_reason optional (example: Activation Required email your admin to get your account activated)
group_request optional (example: superadmin)
failed_login_attempts optional (example: 0)
change_username optional (example: false)
change_password optional (example: false)
reset_password optional (example: false)
email_verify optional (example: false)
group_id optional (example: 7320292c-627e-4e5a-b059-583eabdd6264)
email optional (example: [email protected])
created_on optional (example: 1568419646794)
last_login optional (example: null)

Path: api/v1/users/domain/:domain

Kind: static method of UsersDomain

Param Type Description
domain any (example: dragohm.com)
sort any Sort by any user object key (examples: id, domain, locked, etc.) (example: created_on)
limit any Number of maximum results. (example: 2) (example: 1)
skip any Number of db rows skipped. (example: 10) (example: 10)
filter any Filter parameters (example: locked=false,created_on>2021-06-03,created_on<2021-06-06) (example: created_on>2021-06-01,created_on<2021-06-08)
sortdir any Sort direction (example ascending order: ASC) (example: ASC)
ids any Comma seperated id values used in inclusion query (example: d0323874-9b24-4bc5-ae38-fb8808c4e453,08c4c17f-317b-4be8-bfbd-451a274a3f7f)
params any (example: id,created_on)
authorization_bearer string The client_credentials generated OAUth2 access token.

User

Kind: global class

User.delete(id, authorization_bearer)

delete - Delete a user by it's Id.

Path: api/v1/user/id/:id

Kind: static method of User

Param Type Description
id any Id or Username (example: 39A2BC37-61AE-434C-B245-A731A27CF8DA)
authorization_bearer string The client_credentials generated OAUth2 access token.

User.removeGroupInheritance(id, inheritgroupid, inheritgrouptype, authorization_bearer)

removeGroupInheritance - Remove a user from a group.

Path: api/v1/user/id/:id/inheritance/group/:inheritgroupid/type/:inheritgrouptype

Kind: static method of User

Param Type Description
id any id or name of the user (example: 99a64193-b5a8-448d-8933-05d27f366094)
inheritgroupid any id or name of the group to inherit (example: group)
inheritgrouptype any type of the group to inherit (example: testgroup)
authorization_bearer string The client_credentials generated OAUth2 access token.

User.addGroupInheritance(id, inheritgroupid, inheritgrouptype, authorization_bearer)

addGroupInheritance - Add a user to a group.

Path: api/v1/user/id/:id/inheritance/group/:inheritgroupid/type/:inheritgrouptype

Kind: static method of User

Param Type Description
id any id or name of the user (example: 99a64193-b5a8-448d-8933-05d27f366094)
inheritgroupid any id or name of the group to inherit (example: group1)
inheritgrouptype any type of the group to inherit (example: testgroup)
authorization_bearer string The client_credentials generated OAUth2 access token.

User.editUserDataPropertyValue(id, property, value, authorization_bearer)

editUserDataPropertyValue - Edit a current user's property data as a path param.

Path: api/v1/user/id/:id/property/userdata/:property/:value

Kind: static method of User

Param Type Description
id any Id or Username (example: 595d3f9a-5383-4da9-a465-b975d8a5e28e)
property any user_data object's property to edit. (example: notes)
value any user_data object's property value. (example: asdfa sdfa sdf)
authorization_bearer string The client_credentials generated OAUth2 access token.

User.editPropertyValue(id, property, value, authorization_bearer)

editPropertyValue - Edit a current user's property data as a path param.

Path: api/v1/user/id/:id/property/:property/:value

Kind: static method of User

Param Type Description
id any Id or Username
property any (example: group_id)
value any (example: 595d3f9a-5383-4da9-a465-b975d8a5e28e)
authorization_bearer string The client_credentials generated OAUth2 access token.

User.editUserDataProperty(body, id, property, authorization_bearer)

editUserDataProperty - Edit a user's property by id.

Path: api/v1/user/id/:id/property/userdata/:property

Kind: static method of User

Param Type Description
body Object
id any Id or Username (example: 39A2BC37-61AE-434C-B245-A731A27CF8DA)
property any user_data object's property to edit. (example: notes)
authorization_bearer string The client_credentials generated OAUth2 access token.

Example
body

asdfasdf

User.editProperty(body, id, property, authorization_bearer)

editProperty - Edit a user's property by id.

Path: api/v1/user/id/:id/property/:property

Kind: static method of User

Param Type Description
body Object
id any Id or Username (example: 39A2BC37-61AE-434C-B245-A731A27CF8DA)
property any
authorization_bearer string The client_credentials generated OAUth2 access token.

Example
body

user6

User.edit(body, id, authorization_bearer)

edit - Edit a user's by id.

Path: api/v1/user/id/:id

Kind: static method of User

Param Type Description
body Object
id any Id or Username (example: 39A2BC37-61AE-434C-B245-A731A27CF8DA)
authorization_bearer string The client_credentials generated OAUth2 access token.

Example
body

{
	"username" : "user6",
	"password" : "Awickednewawesomepasword4242!@"
}

User.getProperty(id, property, authorization_bearer)

getProperty - Get a user's property by it's id.

Path: api/v1/user/id/:id/property/:property

Kind: static method of User

Param Type Description
id any Id or Username (example: 39A2BC37-61AE-434C-B245-A731A27CF8DA)
property any
authorization_bearer string The client_credentials generated OAUth2 access token.

User.get(id, authorization_bearer)

get - Get a user by it's id.

Path: api/v1/user/id/:id

Kind: static method of User

Param Type Description
id any (example: 39A2BC37-61AE-434C-B245-A731A27CF8DA)
authorization_bearer string The client_credentials generated OAUth2 access token.

UserDomain

Kind: global class

UserDomain.delete(domain, id, authorization_bearer)

delete - Delete a user by it's Id.

Path: api/v1/user/domain/:domain/id/:id

Kind: static method of UserDomain

Param Type Description
domain any Domain (example: test.com) (example: test.com)
id any id, username or email. (example: 75d2ed5e-bc5b-4129-a1ec-657cf27e6294)
authorization_bearer string The client_credentials generated OAUth2 access token.

UserDomain.removeGroupInheritance(domain, id, inheritgroupid, inheritgrouptype, authorization_bearer)

removeGroupInheritance - Remove a user from a group.

Path: api/v1/user/domain/:domain/id/:id/inheritance/group/:inheritgroupid/type/:inheritgrouptype

Kind: static method of UserDomain

Param Type Description
domain any Domain (example: test.com) (example: test.com)
id any id, username or email. (example: d1bf9986-9938-4d47-b8aa-79184b37cc16)
inheritgroupid any id or name of the group to inherit (example: group1)
inheritgrouptype any type of the group to inherit (example: testgroup)
authorization_bearer string The client_credentials generated OAUth2 access token.

UserDomain.addGroupInheritance(domain, id, inheritgroupid, inheritgrouptype, authorization_bearer)

addGroupInheritance - Add a user to a group.

Path: api/v1/user/domain/:domain/id/:id/inheritance/group/:inheritgroupid/type/:inheritgrouptype

Kind: static method of UserDomain

Param Type Description
domain any Domain (example: test.com) (example: test.com)
id any id, username or email. (example: user5)
inheritgroupid any id or name of the group to inherit (example: group2)
inheritgrouptype any type of the group to inherit (example: group)
authorization_bearer string The client_credentials generated OAUth2 access token.

UserDomain.editUserDataPropertyValue(domain, id, property, value, authorization_bearer)

editUserDataPropertyValue - Edit a current user's property data as a path param.

Path: api/v1/user/domain/:domain/id/:id/property/userdata/:property/:value

Kind: static method of UserDomain

Param Type Description
domain any Domain (example: test.com) (example: test.com)
id any id, username or email. (example: 75d2ed5e-bc5b-4129-a1ec-657cf27e6294)
property any Property to modify (example: locked) (example: notes)
value any Value to change property to. (example: asdf asdfawsdf)
authorization_bearer string The client_credentials generated OAUth2 access token.

UserDomain.editPropertyValue(domain, id, property, value, authorization_bearer)

editPropertyValue - Edit a current user's property data as a path param.

Path: api/v1/user/domain/:domain/id/:id/property/:property/:value

Kind: static method of UserDomain

Param Type Description
domain any Domain (example: test.com) (example: test.com)
id any id, username or email. (example: 75d2ed5e-bc5b-4129-a1ec-657cf27e6294)
property any Property to modify (example: locked) (example: locked)
value any Value to change property to. (example: true)
authorization_bearer string The client_credentials generated OAUth2 access token.

UserDomain.editUserDataProperty(body, domain, id, property, authorization_bearer)

editUserDataProperty - Edit a user's property by id.

Path: api/v1/user/domain/:domain/id/:id/property/userdata/:property

Kind: static method of UserDomain

Param Type Description
body Object
domain any Domain (example: test.com) (example: test.com)
id any id, username or email. (example: 75d2ed5e-bc5b-4129-a1ec-657cf27e6294)
property any Property to modify (example: locked) (example: notes)
authorization_bearer string The client_credentials generated OAUth2 access token.

Example
body

asdfasdf asdf

UserDomain.editProperty(body, domain, id, property, authorization_bearer)

editProperty - Edit a user's property by id.

Path: api/v1/user/domain/:domain/id/:id/property/:property

Kind: static method of UserDomain

Param Type Description
body Object
domain any Domain (example: test.com) (example: test.com)
id any id, username or email. (example: 75d2ed5e-bc5b-4129-a1ec-657cf27e6294)
property any Property to modify (example: locked) (example: locked)
authorization_bearer string The client_credentials generated OAUth2 access token.

Example
body

false

UserDomain.edit(body, domain, id, authorization_bearer)

edit - Edit a user's by id.

Path: api/v1/user/domain/:domain/id/:id

Kind: static method of UserDomain

Param Type Description
body Object
domain any Domain (example: test.com) (example: test.com)
id any id, username or email. (example: 75d2ed5e-bc5b-4129-a1ec-657cf27e6294)
authorization_bearer string The client_credentials generated OAUth2 access token.

Example
body

{
	"username" : "user6",
	"password" : "Awickednewawesomepasword4242!@"
}

UserDomain.getProperty(domain, id, property, authorization_bearer)

getProperty - Get a user's property by it's id.

Path: api/v1/user/domain/:domain/id/:id/property/:property

Kind: static method of UserDomain

Param Type Description
domain any Domain (example: test.com) (example: test.com)
id any id, username or email. (example: 75d2ed5e-bc5b-4129-a1ec-657cf27e6294)
property any Property to get (example: locked) (example: locked)
authorization_bearer string The client_credentials generated OAUth2 access token.

UserDomain.get(domain, id, authorization_bearer)

get - Get a user by it's id.

Path: api/v1/user/domain/:domain/id/:id

Kind: static method of UserDomain

Param Type Description
domain any Domain (example: test.com) (example: test.com)
id any id, username or email. (example: d1bf9986-9938-4d47-b8aa-79184b37cc16)
authorization_bearer string The client_credentials generated OAUth2 access token.

UserCurrent

Kind: global class

UserCurrent.registerToken(body, authorization_bearer)

registerToken - Registers a new credentials service for client_credentials based access token auth.

Path: api/v1/user/me/token

Kind: static method of UserCurrent

Param Type Description
body Object
authorization_bearer string The client_credentials generated OAUth2 access token.

Example
body

{
    "urls": [
        "http://127.0.0.1",
        "http://dragohm.com"
    ]
}

UserCurrent.removeGroupInheritance(inheritgroupid, inheritgrouptype, authorization_bearer)

removeGroupInheritance - Remove a user from a group.

Path: api/v1/user/me/inheritance/group/:inheritgroupid/type/:inheritgrouptype

Kind: static method of UserCurrent

Param Type Description
inheritgroupid any id or name of the group to inherit (example: group2)
inheritgrouptype any type of the group to inherit (example: group)
authorization_bearer string The client_credentials generated OAUth2 access token.

UserCurrent.addGroupInheritance(inheritgroupid, inheritgrouptype, authorization_bearer)

addGroupInheritance - Add a user to a group.

Path: api/v1/user/me/inheritance/group/:inheritgroupid/type/:inheritgrouptype

Kind: static method of UserCurrent

Param Type Description
inheritgroupid any id or name of the group to inherit (example: group2)
inheritgrouptype any type of the group to inherit (example: group)
authorization_bearer string The client_credentials generated OAUth2 access token.

UserCurrent.editUserDataPropertyValue(property, value, authorization_bearer)

editUserDataPropertyValue - Edit a current user's property data as a path param.

Path: api/v1/user/me/property/userdata/:property/:value

Kind: static method of UserCurrent

Param Type Description
property any user_data object's property to edit. (example: notes)
value any user_data object's property value. (example: asdf asdfasdf asdf )
authorization_bearer string The client_credentials generated OAUth2 access token.

UserCurrent.editPropertyValue(property, value, authorization_bearer)

editPropertyValue - Edit a current user's property data as a path param.

Path: api/v1/user/me/property/:property/:value

Kind: static method of UserCurrent

Param Type Description
property any (example: group_id)
value any (example: 595d3f9a-5383-4da9-a465-b975d8a5e28e)
authorization_bearer string The client_credentials generated OAUth2 access token.

UserCurrent.editUserDataProperty(body, property, authorization_bearer)

editUserDataProperty - Edit a current user's property data.

Path: api/v1/user/me/property/userdata/:property

Kind: static method of UserCurrent

Param Type Description
body Object
property any user_data object's property to edit. (example: notes)
authorization_bearer string The client_credentials generated OAUth2 access token.

Example
body

asdfsasdfdsadf

UserCurrent.editProperty(body, property, authorization_bearer)

editProperty - Edit a current user's property data.

Path: api/v1/user/me/property/:property

Kind: static method of UserCurrent

Param Type Description
body Object
property any (example: password)
authorization_bearer string The client_credentials generated OAUth2 access token.

Example
body

newpasss

UserCurrent.deleteToken(id, authorization_bearer)

deleteToken - Deletes a client_credentials based access token auth.

Path: api/v1/user/me/token/:id

Kind: static method of UserCurrent

Param Type Description
id any id or name of the token (example: 74b3c2f2-3f94-4b5d-b3e2-4b3bd2c5d6fe)
authorization_bearer string The client_credentials generated OAUth2 access token.

UserCurrent.edit(body, authorization_bearer)

edit - Updates the current logged in user.

Path: api/v1/user/me

Kind: static method of UserCurrent

Param Type Description
body Object
authorization_bearer string The client_credentials generated OAUth2 access token.

Example
body

{
    "username": "user6",
    "password": "Awickednewawesomepasword4242!@"
}

UserCurrent.getProperty(property, authorization_bearer)

getProperty - Gets the currently logged in user's single property

Path: api/v1/user/me/property/:property

Kind: static method of UserCurrent

Param Type Description
property any (example: username)
authorization_bearer string The client_credentials generated OAUth2 access token.

UserCurrent.routesCheck(body, authorization_bearer)

routesCheck - Checks if current logged in user can access the routes specified within the body array.

Path: api/v1/user/me/routes/allowed

Kind: static method of UserCurrent

Param Type Description
body Object
authorization_bearer string The client_credentials generated OAUth2 access token.

Example
body

[
    {
        "method": "GET",
        "route": "/account/api/user/me"
    },
    {
        "route": "/t/api/user/me/asdf"
    },
        {
        "method": "*",
        "route": "/account/api/user/me"
    }
]

UserCurrent.routeCheck(method, route, authorization_bearer)

routeCheck - Checks if current logged in user can access the route with method.

Path: api/v1/user/me/route/allowed

Kind: static method of UserCurrent

Param Type Description
method any (example: get)
route any (example: /travelling/api/v1/group/request/type/anonymous/user/)
authorization_bearer string The client_credentials generated OAUth2 access token.

UserCurrent.permissionCheck(permission, authorization_bearer)

permissionCheck - Checks to see if the current user can access content based on permission.

Path: api/v1/user/me/permission/allowed/:permission

Kind: static method of UserCurrent

Param Type Description
permission any name of the route/permission (example: get-travelling)
authorization_bearer string The client_credentials generated OAUth2 access token.

UserCurrent.get(authorization_bearer)

get - Gets the currently logged in user

Path: api/v1/user/me

Kind: static method of UserCurrent

Param Type Description
authorization_bearer string The client_credentials generated OAUth2 access token.

Auth

Auth endpoints

Kind: global class

Auth.accessToken()

accessToken - Oauth2 client_credentials access token flow. Body must be application/x-www-form-urlencoded and must contain the grant_type. client_id & client_secret will be sent in a Basic Authorization header as base64(client_id:client_secret)

Path: api/v1/auth/token

Kind: static method of Auth

Auth.authorize(client_id, response_type, state, redirect_uri, group_request)

authorize - Authorization Code Grant

Path: api/v1/auth/oauth/authorize

Kind: static method of Auth

Param Type
client_id any
response_type any
state any
redirect_uri any
group_request any

Auth.activate(token, authorization_bearer)

activate - Activates and unlocks user

Path: api/v1/auth/activate

Kind: static method of Auth

Param Type Description
token any (example: activation_token)
authorization_bearer string The client_credentials generated OAUth2 access token.

Auth.resetPasswordAutoLogin(body, token, authorization_bearer)

resetPasswordAutoLogin - Resets the password if the recovery token is valid of the user, then authenticates the user and returns cookies.

Path: api/v1/auth/password/reset/login

Kind: static method of Auth

Param Type Description
body Object
token any (example: [thegeneratedtoken])
authorization_bearer string The client_credentials generated OAUth2 access token.

Example
body

{
	"password":"asdf"
}

Auth.resetPassword(body, token, authorization_bearer)

resetPassword - Resets the password if the recovery token is valid of the user.

Path: api/v1/auth/password/reset

Kind: static method of Auth

Param Type Description
body Object
token any (example: [thegeneratedtoken])
authorization_bearer string The client_credentials generated OAUth2 access token.

Example
body

{
	"password":"asdf"
}

Auth.forgotPassword(body, authorization_bearer)

forgotPassword - Generates a recovery token and sends a email to the attached user (if they exist)

Path: api/v1/auth/password/forgot

Kind: static method of Auth

Param Type Description
body Object
authorization_bearer string The client_credentials generated OAUth2 access token.

Example
body

{
	"email": "[email protected]"
}

Auth.logout(authorization_bearer)

logout -

Path: api/v1/auth/logout

Kind: static method of Auth

Param Type Description
authorization_bearer string The client_credentials generated OAUth2 access token.

Auth.loginOtp(token, authorization_bearer)

loginOtp - Login via an OTP

Path: api/v1/auth/login/otp

Kind: static method of Auth

Param Type Description
token any (example: JQHGH9QuIIhpGuFBG920TdnWkSECFp-ONP0NadfPCclsX708wYaXKHFb5nUj1fmZFHcN1KpKqzkOkjfZGYdfsIt0KnWV69mmt5Uqpw3HiMYD1mBfr4SQap2cg8vH78bb
authorization_bearer string The client_credentials generated OAUth2 access token.

Auth.login(body, authorization_bearer)

login - Login a user

Body Properties
Prop Description
email/username required String (example: [email protected])
password required String (example: fakePassword123)
remember optional Boolean if you would like to be logged in automatically (example: true)

Path: api/v1/auth/login

Kind: static method of Auth

Param Type Description
body Object
authorization_bearer string The client_credentials generated OAUth2 access token.

Example
body

{
	"email": "[email protected]",
	"password": "Pas5w0r!d"
}

Auth.register(body, randomPassword, authorization_bearer)

register - Register a user

group_request is optional.

Path: api/v1/auth/register

Kind: static method of Auth

Param Type Description
body Object
randomPassword any Generates a random password on the backend securely if set to true (example: true)
authorization_bearer string The client_credentials generated OAUth2 access token.

Example
body

{
	"username":"test",
	"email": "[email protected]",
    "domain": "default",
    "password": "Pas5w0r!d"

}

AuthToken

Kind: global class

AuthToken.otp(id, authorization_bearer)

otp - Generates a one time use password and returns the token to the attached user (if they exist) instead of sending an email. CAUTION SECURITY RISK: Would not expose this URL publicly or have it be allowed by anyone who is not a superadmin type level*

Path: api/v1/auth/token/otp/id/:id

Kind: static method of AuthToken

Param Type Description
id any (example: [email protected])
authorization_bearer string The client_credentials generated OAUth2 access token.

AuthToken.forgotPassword(body)

forgotPassword - Generates a recovery token and returns the token to the attached user (if they exist) instead of sending an email. CAUTION SECURITY RISK: Would not expose this URL publicly or have it be allowed by anyone who is not a superadmin type level*

Path: api/v1/auth/token/password/forgot

Kind: static method of AuthToken

Param Type
body Object

Example
body

{
	"email": "[email protected]"
}

AuthDomain

Kind: global class

AuthDomain.forgotPassword(body, domain, authorization_bearer)

forgotPassword - Generates a recovery token and sends a email to the attached user (if they exist)

Path: api/v1/auth/password/forgot/domain/:domain

Kind: static method of AuthDomain

Param Type Description
body Object
domain any Domain name (example: test.com) (example: dragohm.com)
authorization_bearer string The client_credentials generated OAUth2 access token.

Example
body

{
	"email": "[email protected]"
}

AuthDomain.login(body, domain, authorization_bearer)

login - Login a user

Body Properties
Prop Description
email/username required String (example: [email protected])
password required String (example: fakePassword123)
domain required String (example: test.com)
remember optional Boolean if you would like to be logged in automatically (example: true)

Path: api/v1/auth/login/domain/:domain

Kind: static method of AuthDomain

Param Type Description
body Object
domain any Domain name (example: test.com) (example: dragohm.com)
authorization_bearer string The client_credentials generated OAUth2 access token.

Example
body

{
    "email": "[email protected]",
	"password": "Pas5w0r!d"
}

AuthDomain.register(body, domain, randomPassword, authorization_bearer)

register - Register a user

group_request is optional.

Path: api/v1/auth/register/domain/:domain

Kind: static method of AuthDomain

Param Type Description
body Object
domain any Domain name (example: test.com) (example: contactsource.com)
randomPassword any Generates a random password on the backend securely if set to true (example: true)
authorization_bearer string The client_credentials generated OAUth2 access token.

Example
body

{
	"email": "[email protected]",
	"password": "dragohm123**"
}

AuthDomainToken

Kind: global class

AuthDomainToken.otp(domain, id, authorization_bearer)

otp - Generates a one time use password and returns the token to the attached user (if they exist) instead of sending an email. CAUTION SECURITY RISK: Would not expose this URL publicly or have it be allowed by anyone who is not a superadmin type level*

Path: api/v1/auth/token/otp/domain/:domain/id/:id

Kind: static method of AuthDomainToken

Param Type Description
domain any (example: dragohm.com)
id any (example: [email protected])
authorization_bearer string The client_credentials generated OAUth2 access token.

AuthDomainToken.forgotPassword(body, domain, authorization_bearer)

forgotPassword - Generates a recovery token and returns the token to the attached user (if they exist) instead of sending an email. CAUTION SECURITY RISK: Would not expose this URL publicly or have it be allowed by anyone who is not a superadmin type level*

Path: api/v1/auth/token/password/forgot/domain/:domain

Kind: static method of AuthDomainToken

Param Type Description
body Object
domain any
authorization_bearer string The client_credentials generated OAUth2 access token.

Example
body

{
	"email": "[email protected]"
}

SDK(host, opts)

SDK - importing the SDK for use

Kind: global function

Param Type Description
host string the hostname to the service (example: http://127.0.0.1)
opts object options that will be appened to every request. Fasquest Lib Options (example: {headers: {'API-KEY':'34098hodf'}})

Example
init

const { Travelling } = require('./sdk.js')('http://127.0.0.1');