1.2.1 • Published 3 years ago

travelling-sdk v1.2.1

Weekly downloads
7
License
ISC
Repository
-
Last release
3 years ago

Classes

Functions

Travelling

Kind: global class

Travelling.healthCheck(authorization_bearer)

healthCheck - server's health check

Path: health

Kind: static method of Travelling

ParamTypeDescription
authorization_bearerstringThe client_credentials generated OAUth2 access token.

Travelling.metrics(authorization_bearer)

metrics - servers metrics

Path: metrics

Kind: static method of Travelling

ParamTypeDescription
authorization_bearerstringThe 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

ParamTypeDescription
propertyany(example: password)
authorization_bearerstringThe 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

ParamTypeDescription
authorization_bearerstringThe 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

ParamTypeDescription
bodyObject
authorization_bearerstringThe client_credentials generated OAUth2 access token.

Example
body

{
    "group": {
        "anonymous": {
            "type": "group",
            "allowed": [
                {
                    "route": "/travelling/portal/*",
                    "host": null,
                    "name": "*-travelling-portal-*"
                },
                {
                    "route": "/travelling/api/v1/auth/*",
                    "host": null,
                    "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,
                    "removeFromPath": "/travelling/assets/",
                    "method": "GET",
                    "name": "get-travelling-assets-*"
                },
                {
                    "route": "/travelling/api/v1/config/password",
                    "host": null,
                    "method": "GET",
                    "name": "get-travelling-api-v1-config-password"
                },
                {
                    "route": "/favicon.ico",
                    "host": null,
                    "method": "GET",
                    "name": "get-favicon.ico"
                }
            ],
            "inherited": null,
            "is_default": false
        },
        "group3": {
            "type": "group",
            "allowed": null,
            "inherited": [
                "testgroup|group1",
                "group|group2"
            ],
            "is_default": false
        },
        "superadmin": {
            "type": "group",
            "allowed": [
                {
                    "host": null,
                    "route": "/travelling/*",
                    "name": "*-travelling-*"
                },
                {
                    "name": "test-one-*-three"
                }
            ],
            "inherited": [
                "group|anonymous"
            ],
            "is_default": false
        },
        "group4": {
            "type": "group",
            "allowed": null,
            "inherited": [],
            "is_default": false
        },
        "group2": {
            "type": "group",
            "allowed": [
                {
                    "route": "/test/get",
                    "host": "https://127.0.0.1:4268/:username/:group",
                    "removeFromPath": "/test/get",
                    "method": "GET",
                    "name": "get-test-get"
                },
                {
                    "route": "/test/post",
                    "host": "http://127.0.0.1:4267/?id=:id&permission=:permission",
                    "removeFromPath": "/test/post",
                    "method": "POST",
                    "name": "post-test-post"
                }
            ],
            "inherited": [
                "testgroup|group1"
            ],
            "is_default": false
        },
        "group5": {
            "type": "group",
            "allowed": [
                {
                    "route": "/test/delete/:grouptype",
                    "host": "https://127.0.0.1:4268",
                    "removeFromPath": "/test/delete",
                    "method": "DELETE",
                    "name": "delete-test-delete-:grouptype"
                }
            ],
            "inherited": [
                "group|group4",
                "group|superadmin"
            ],
            "is_default": true
        },
        "group1": {
            "type": "group",
            "allowed": null,
            "inherited": null,
            "is_default": false
        }
    },
    "testgroup": {
        "group1": {
            "type": "testgroup",
            "allowed": null,
            "inherited": [
                "group|group4"
            ],
            "is_default": false
        },
        "superadmin": {
            "type": "testgroup",
            "allowed": null,
            "inherited": null,
            "is_default": false
        }
    }
}

Groups.get(authorization_bearer)

get - Get all the groups

Path: api/v1/groups

Kind: static method of Groups

ParamTypeDescription
authorization_bearerstringThe 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

ParamTypeDescription
typeanyThe type of the group
authorization_bearerstringThe 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

ParamTypeDescription
authorization_bearerstringThe 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

ParamTypeDescription
idanyName of the group (example: anonymous)
permissionanyPermission (example: test-one-two-*)
authorization_bearerstringThe 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

ParamTypeDescription
idanyName of the group (example: anonymous)
permissionanyName or Route (example: test-one-two-*)
authorization_bearerstringThe 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

ParamTypeDescription
bodyObject
idany
authorization_bearerstringThe 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

ParamTypeDescription
idanyName of the group (example: test1234)
inheritedanyName of the group to inherit from (example: group4)
grouptypeanyThe type of the inherited group
authorization_bearerstringThe 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

ParamTypeDescription
idanyName of the group (example: test1234)
inheritedanyName of the group to inherit from (example: group4)
grouptypeanyThe type of the inherited group
authorization_bearerstringThe 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

ParamTypeDescription
idanyid or name (example: group6)
authorization_bearerstringThe 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

ParamTypeDescription
idanyid or name
authorization_bearerstringThe 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

ParamTypeDescription
bodyObject
idany(example: ab31efc8-40a5-4d38-a347-adb4e38d0075)
authorization_bearerstringThe 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

ParamTypeDescription
idanyid or name (example: group1)
authorization_bearerstringThe 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

ParamTypeDescription
idanyName of the new group (example: test123)
authorization_bearerstringThe 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

ParamTypeDescription
bodyObject
authorization_bearerstringThe 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
}

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
ParamDescription
idoptional (example: 26c6aeff-ab95-4bdd-8260-534cf92d1c23)
usernameoptional (example: user7)
lockedoptional (example: true)
locked_reasonoptional (example: Activation Required email your admin to get your account activated)
group_requestoptional (example: superadmin)
failed_login_attemptsoptional (example: 0)
change_usernameoptional (example: false)
change_passwordoptional (example: false)
reset_passwordoptional (example: false)
email_verifyoptional (example: false)
group_idoptional (example: 7320292c-627e-4e5a-b059-583eabdd6264)
emailoptional (example: test@test.ai)
created_onoptional (example: 1568419646794)
last_loginoptional (example: null)

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

Kind: static method of GroupUsers

ParamTypeDescription
idanyid or name (example: superadmin)

GroupUsers.get(id)

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

Optional Query Params
ParamDescription
idoptional (example: 26c6aeff-ab95-4bdd-8260-534cf92d1c23)
usernameoptional (example: user7)
lockedoptional (example: true)
locked_reasonoptional (example: Activation Required email your admin to get your account activated)
group_requestoptional (example: superadmin)
failed_login_attemptsoptional (example: 0)
change_usernameoptional (example: false)
change_passwordoptional (example: false)
reset_passwordoptional (example: false)
email_verifyoptional (example: false)
group_idoptional (example: 7320292c-627e-4e5a-b059-583eabdd6264)
emailoptional (example: test@test.ai)
created_onoptional (example: 1568419646794)
last_loginoptional (example: null)

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

Kind: static method of GroupUsers

ParamTypeDescription
idanyid or name (example: superadmin)

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

ParamTypeDescription
groupanyid or name of the group
typeanyThe type of the group (example: accounts)
idanyid or name (example: user7)
authorization_bearerstringThe 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

ParamTypeDescription
groupanyid or name of the group (example: group1)
typeanytype of group (example: group)
idanyid or name of the user (example: user5)
inheritgroupidanyid or name of the group to inherit (example: group2)
inheritgrouptypeanytype of the group to inherit (example: group)
authorization_bearerstringThe 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

ParamTypeDescription
groupanyid or name of the group (example: group1)
typeanytype of group (example: group)
idanyid or name of the user (example: user5)
inheritgroupidanyid or name of the group to inherit (example: group2)
inheritgrouptypeanytype of the group to inherit (example: group)
authorization_bearerstringThe 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

ParamTypeDescription
groupanyid or name of the group
typeanyThe type of the group (example: group)
idanyid or name (example: user5)
propertyany(example: email)
valueany(example: swag@yolo.com)
authorization_bearerstringThe 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

ParamTypeDescription
bodyObject
groupanyid or name of the group
typeanyThe type of the group (example: accounts)
idanyid or name (example: user6)
propertyany(example: email)
authorization_bearerstringThe 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

ParamTypeDescription
bodyObject
groupanyid or name of the group
typeanyThe type of the group (example: accounts)
idanyid or name (example: user6)
authorization_bearerstringThe 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

ParamTypeDescription
groupanyid or name of the group
typeanyThe type of the group (example: accounts)
idanyid or name (example: user6)
propertyany(example: email)
authorization_bearerstringThe 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

ParamTypeDescription
groupanyid or name of the group
typeanyThe type of the group (example: accounts)
idanyid or name (example: user6)
authorization_bearerstringThe 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

ParamTypeDescription
idanyName of the group (example: anonymous)
typeanyType of the group (example: group)
permissionanyName or Route (example: test-one-three-*)
authorization_bearerstringThe 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

ParamTypeDescription
idanyName of the group (example: anonymous)
typeanyType of the group (example: group)
permissionanyPermission (example: test-one-three-*)
authorization_bearerstringThe 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

ParamTypeDescription
bodyObject
idanyName of the group
typeany
authorization_bearerstringThe 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

ParamTypeDescription
idanyName of the group (example: test1234)
typeanyThe type of the group (example: accounts)
inheritedanyName of the group to inherit from (example: superadmin)
grouptypeanyThe type of the inherited group
authorization_bearerstringThe 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

ParamTypeDescription
idanyName of the group (example: group1)
typeanyThe type of the group (example: testgroup)
inheritedanyName of the group to inherit from (example: test123)
grouptypeanyThe type of the inherited group
authorization_bearerstringThe 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

ParamTypeDescription
idanyid or name (example: group1)
typeanyThe 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

ParamTypeDescription
idanyid or name
typeanyThe type of the group
authorization_bearerstringThe 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

ParamTypeDescription
idanyid or name (example: group1)
typeanyThe type of the group (example: accounts)
authorization_bearerstringThe 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

ParamTypeDescription
bodyObject
idanyid or name
typeanyThe type of the group
authorization_bearerstringThe 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

ParamTypeDescription
idanyName of the new group (example: test1234)
typeanyType of the new group (example: accounts)
authorization_bearerstringThe 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

ParamTypeDescription
bodyObject
typeanyThe type of the group
authorization_bearerstringThe 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.get(id, type)

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

Optional Query Params
ParamDescription
idoptional (example: 26c6aeff-ab95-4bdd-8260-534cf92d1c23)
usernameoptional (example: user7)
lockedoptional (example: true)
locked_reasonoptional (example: Activation Required email your admin to get your account activated)
group_requestoptional (example: superadmin)
failed_login_attemptsoptional (example: 0)
change_usernameoptional (example: false)
change_passwordoptional (example: false)
reset_passwordoptional (example: false)
email_verifyoptional (example: false)
group_idoptional (example: 7320292c-627e-4e5a-b059-583eabdd6264)
emailoptional (example: test@test.ai)
created_onoptional (example: 1568419646794)
last_loginoptional (example: null)

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

Kind: static method of GroupTypeUsers

ParamType
idany
typeany

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
ParamDescription
idoptional (example: 26c6aeff-ab95-4bdd-8260-534cf92d1c23)
usernameoptional (example: user7)
lockedoptional (example: true)
locked_reasonoptional (example: Activation Required email your admin to get your account activated)
group_requestoptional (example: superadmin)
failed_login_attemptsoptional (example: 0)
change_usernameoptional (example: false)
change_passwordoptional (example: false)
reset_passwordoptional (example: false)
email_verifyoptional (example: false)
group_idoptional (example: 7320292c-627e-4e5a-b059-583eabdd6264)
emailoptional (example: test@test.ai)
created_onoptional (example: 1568419646794)
last_loginoptional (example: null)

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

Kind: static method of GroupTypeUsers

ParamTypeDescription
idany(example: group4)
typeanyThe type of the group (example: groups)

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

ParamTypeDescription
typeanyThe type of the group (example: accounts)
idanyid or name (example: user7)
authorization_bearerstringThe 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

ParamTypeDescription
typeanytype of group (example: group)
idanyid or name of the user (example: user5)
inheritgroupidanyid or name of the group to inherit (example: group2)
inheritgrouptypeanytype of the group to inherit (example: group)
authorization_bearerstringThe 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

ParamTypeDescription
typeanytype of group (example: group)
idanyid or name of the user (example: user5)
inheritgroupidanyid or name of the group to inherit (example: group2)
inheritgrouptypeanytype of the group to inherit (example: group)
authorization_bearerstringThe 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

ParamTypeDescription
typeanyThe type of the group (example: group)
idanyid or name (example: user5)
propertyany(example: email)
valueany(example: swag@yolo.com)
authorization_bearerstringThe 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

ParamTypeDescription
bodyObject
typeanyThe type of the group (example: accounts)
idanyid or name (example: user6)
propertyany(example: email)
authorization_bearerstringThe 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

ParamTypeDescription
bodyObject
typeanyThe type of the group (example: accounts)
idanyid or name (example: user6)
authorization_bearerstringThe 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

ParamTypeDescription
typeanyThe type of the group (example: accounts)
idanyid or name (example: user6)
propertyany(example: email)
authorization_bearerstringThe 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

ParamTypeDescription
typeanyThe type of the group (example: accounts)
idanyid or name (example: user6)
authorization_bearerstringThe 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

ParamTypeDescription
bodyObject
typeany(example: testgroup)
idany(example: user69)
authorization_bearerstringThe 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

ParamTypeDescription
typeanytype of group (example: group)
idanyid or name of the user (example: user5)
inheritgroupidanyid or name of the group to inherit (example: group2)
inheritgrouptypeanytype of the group to inherit (example: group)
authorization_bearerstringThe 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

ParamTypeDescription
bodyObject
typeany(example: accounts)
idany(example: user6)
propertyany(example: email)
authorization_bearerstringThe client_credentials generated OAUth2 access token.

Example
body

"chad@yolo.com"

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

ParamTypeDescription
bodyObject
typeany(example: accounts)
idany(example: user6)
authorization_bearerstringThe 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
ParamDescription
idoptional (example: 26c6aeff-ab95-4bdd-8260-534cf92d1c23)
usernameoptional (example: user7)
lockedoptional (example: true)
locked_reasonoptional (example: Activation Required email your admin to get your account activated)
group_requestoptional (example: superadmin)
failed_login_attemptsoptional (example: 0)
change_usernameoptional (example: false)
change_passwordoptional (example: false)
reset_passwordoptional (example: false)
email_verifyoptional (example: false)
group_idoptional (example: 7320292c-627e-4e5a-b059-583eabdd6264)
emailoptional (example: test@test.ai)
created_onoptional (example: 1568419646794)
last_loginoptional (example: null)

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

Kind: static method of Users

ParamTypeDescription
group_requestanyname of the group (example: superadmin)
authorization_bearerstringThe client_credentials generated OAUth2 access token.

Users.get(sort, limit, filter, sortdir, authorization_bearer)

get - Gets all the users

Optional Query Params
ParamDescription
idoptional (example: 26c6aeff-ab95-4bdd-8260-534cf92d1c23)
usernameoptional (example: user7)
lockedoptional (example: true)
locked_reasonoptional (example: Activation Required email your admin to get your account activated)
group_requestoptional (example: superadmin)
failed_login_attemptsoptional (example: 0)
change_usernameoptional (example: false)
change_passwordoptional (example: false)
reset_passwordoptional (example: false)
email_verifyoptional (example: false)
group_idoptional (example: 7320292c-627e-4e5a-b059-583eabdd6264)
emailoptional (example: test@test.ai)
created_onoptional (example: 1568419646794)
last_loginoptional (example: null)

Path: api/v1/users

Kind: static method of Users

ParamTypeDescription
sortany(example: created_on)
limitany(example: 200)
filterany(example: locked=false)
sortdirany(example: ASC)
authorization_bearerstringThe client_credentials generated OAUth2 access token.

UsersDomain

Kind: global class

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

get - Gets all the users

Optional Query Params
ParamDescription
idoptional (example: 26c6aeff-ab95-4bdd-8260-534cf92d1c23)
usernameoptional (example: user7)
lockedoptional (example: true)
locked_reasonoptional (example: Activation Required email your admin to get your account activated)
group_requestoptional (example: superadmin)
failed_login_attemptsoptional (example: 0)
change_usernameoptional (example: false)
change_passwordoptional (example: false)
reset_passwordoptional (example: false)
email_verifyoptional (example: false)
group_idoptional (example: 7320292c-627e-4e5a-b059-583eabdd6264)
emailoptional (example: test@test.ai)
created_onoptional (example: 1568419646794)
last_loginoptional (example: null)

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

Kind: static method of UsersDomain

ParamTypeDescription
domainany(example: traziventures.com)
sortany(example: created_on)
limitany(example: 200)
filterany(example: locked=false)
sortdirany(example: ASC)
authorization_bearerstringThe 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

ParamTypeDescription
idanyId or Username (example: 39A2BC37-61AE-434C-B245-A731A27CF8DA)
authorization_bearerstringThe 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

ParamTypeDescription
idanyid or name of the user (example: user5)
inheritgroupidanyid or name of the group to inherit (example: group2)
inheritgrouptypeanytype of the group to inherit (example: group)
authorization_bearerstringThe 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

ParamTypeDescription
idanyid or name of the user (example: user5)
inheritgroupidanyid or name of the group to inherit (example: group2)
inheritgrouptypeanytype of the group to inherit (example: group)
authorization_bearerstringThe 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

ParamTypeDescription
idanyId or Username
propertyany(example: group_id)
valueany(example: 595d3f9a-5383-4da9-a465-b975d8a5e28e)
authorization_bearerstringThe client_credentials generated OAUth2 access token.

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

ParamTypeDescription
bodyObject
idanyId or Username (example: 39A2BC37-61AE-434C-B245-A731A27CF8DA)
propertyany
authorization_bearerstringThe 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

ParamTypeDescription
bodyObject
idanyId or Username (example: 39A2BC37-61AE-434C-B245-A731A27CF8DA)
authorization_bearerstringThe 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

ParamTypeDescription
idanyId or Username (example: 39A2BC37-61AE-434C-B245-A731A27CF8DA)
propertyany
authorization_bearerstringThe 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

ParamTypeDescription
idany(example: 39A2BC37-61AE-434C-B245-A731A27CF8DA)
authorization_bearerstringThe 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

ParamTypeDescription
bodyObject
authorization_bearerstringThe client_credentials generated OAUth2 access token.

Example
body

{
	"name": "conversate"
}

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

ParamTypeDescription
inheritgroupidanyid or name of the group to inherit (example: group2)
inheritgrouptypeanytype of the group to inherit (example: group)
authorization_bearerstringThe 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

ParamTypeDescription
inheritgroupidanyid or name of the group to inherit (example: group2)
inheritgrouptypeanytype of the group to inherit (example: group)
authorization_bearerstringThe 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

ParamTypeDescription
propertyany(example: group_id)
valueany(example: 595d3f9a-5383-4da9-a465-b975d8a5e28e)
authorization_bearerstringThe client_credentials generated OAUth2 access token.

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

ParamTypeDescription
bodyObject
propertyany(example: user_data)
authorization_bearerstringThe client_credentials generated OAUth2 access token.

Example
body

{
	"test": 123
}

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

ParamTypeDescription
idanyid or name of the token
authorization_bearerstringThe 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

ParamTypeDescription
bodyObject
authorization_bearerstringThe 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

ParamTypeDescription
propertyany(example: username)
authorization_bearerstringThe client_credentials generated OAUth2 access token.

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

ParamTypeDescription
methodany(example: get)
routeany(example: /travelling/api/v1/group/request/type/anonymous/user/)
authorization_bearerstringThe client_credentials generated OAUth2 access token.

UserCurrent

1.2.0

3 years ago

1.2.1

3 years ago

1.1.0

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago