ManagerUsers

Access this instance at HomeyAPIV3Local.users.

Extends

  • HomeyAPIV3.ManagerUsers

Classes

Instance Methods

createPersonalAccessToken

(async) createPersonalAccessToken(opts): Promise.<any>

Scopes

-

HTTP

POST /api/manager/users/pat

Parameters

Name Type Description
opts
object
name
string

In body

scopes
array

In body

}

Returns

Promise.<any>

createUser

(async) createUser(opts): Promise.<HomeyAPIV3Local.ManagerUsers.User>

Scopes

homey.user

HTTP

POST /api/manager/users/user

Parameters

Name Type Description
opts
object
user
object

In body

role
string
}
}

Returns

deletePersonalAccessToken

(async) deletePersonalAccessToken(opts): Promise.<any>

Scopes

-

HTTP

DELETE /api/manager/users/pat/:id

Parameters

Name Type Description
opts
object
id
string

In path

}

Returns

Promise.<any>

deleteUser

(async) deleteUser(opts)

Scopes

homey.user

HTTP

DELETE /api/manager/users/user/:id

Parameters

Name Type Description
opts
object
id
string

In path

}

deleteUserLocalCredentials

(async) deleteUserLocalCredentials(opts): Promise.<any>

Scopes

-

HTTP

DELETE /api/manager/users/user/:id/local-credentials

Parameters

Name Type Description
opts
object
id
string

In path

}

Returns

Promise.<any>

deleteUserMe

(async) deleteUserMe(): Promise.<any>

Scopes

homey.user.self

HTTP

DELETE /api/manager/users/user/me

Returns

Promise.<any>

deleteUserMeLocalCredentials

(async) deleteUserMeLocalCredentials(): Promise.<any>

Scopes

homey.user.self

HTTP

DELETE /api/manager/users/user/me/local-credentials

Returns

Promise.<any>

deleteUserMeProperties

(async) deleteUserMeProperties(opts): Promise.<any>

Scopes

homey.user.self

HTTP

DELETE /api/manager/users/user/me/properties/:id

Parameters

Name Type Description
opts
object
id
string

In path

}

Returns

Promise.<any>

getPersonalAccessTokens

(async) getPersonalAccessTokens(): Promise.<any>

Scopes

-

HTTP

GET /api/manager/users/pat

Returns

Promise.<any>

getState

(async) getState(): Promise.<any>

Scopes

homey.system.readonly

HTTP

GET /api/manager/users/state

Returns

Promise.<any>

getUser

(async) getUser(opts): Promise.<HomeyAPIV3Local.ManagerUsers.User>

Scopes

homey.user.readonly

HTTP

GET /api/manager/users/user/:id

Parameters

Name Type Description
opts
object
id
string

In path

}

Returns

getUserMe

(async) getUserMe(): Promise.<any>

Scopes

homey.user.self

HTTP

GET /api/manager/users/user/me

Returns

Promise.<any>

getUsers

(async) getUsers(): Promise.<Object.<string, HomeyAPIV3Local.ManagerUsers.User>>

Scopes

homey.user.readonly

HTTP

GET /api/manager/users/user

Returns

Promise.<Object.<string, HomeyAPIV3Local.ManagerUsers.User>>

grantInstallerAccess

(async) grantInstallerAccess(): Promise.<any>

Scopes

-

HTTP

POST /api/manager/users/installer/grant

Returns

Promise.<any>

login

(async) login(opts): Promise.<any>

Scopes

-

HTTP

POST /api/manager/users/login

Parameters

Name Type Description
opts
object
token
string

In body

}

Returns

Promise.<any>

loginLocal

(async) loginLocal(opts): Promise.<any>

Scopes

-

HTTP

POST /api/manager/users/login-local

Parameters

Name Type Description
opts
object
username
string

In body

password
string

In body

clientId
string

In body

clientName
string

In body

}

Returns

Promise.<any>

requestInstallerAccess

(async) requestInstallerAccess(opts): Promise.<any>

Scopes

-

HTTP

POST /api/manager/users/installer/request

Parameters

Name Type Description
opts
object
jwt
string

In body

}

Returns

Promise.<any>

revokeInstallerAccess

(async) revokeInstallerAccess(): Promise.<any>

Scopes

-

HTTP

POST /api/manager/users/installer/revoke

Returns

Promise.<any>

swapOwner

(async) swapOwner(opts): Promise.<any>

Scopes

-

HTTP

POST /api/manager/users/swap-owner

Parameters

Name Type Description
opts
object
newOwnerUserId
string

In body

}

Returns

Promise.<any>

swapOwnerInstaller

(async) swapOwnerInstaller(opts): Promise.<any>

Scopes

-

HTTP

POST /api/manager/users/installer/swap-owner

Parameters

Name Type Description
opts
object
newOwnerUserId
string

In body

jwt
string

In body

}

Returns

Promise.<any>

updateUser

(async) updateUser(opts): Promise.<HomeyAPIV3Local.ManagerUsers.User>

Scopes

homey.user

HTTP

PUT /api/manager/users/user/:id

Parameters

Name Type Description
opts
object
id
string

In path

user
object

In body

role
string <optional>
enabled
boolean <optional>
}
}

Returns

updateUserLocalCredentials

(async) updateUserLocalCredentials(opts): Promise.<any>

Scopes

-

HTTP

PUT /api/manager/users/user/:id/local-credentials

Parameters

Name Type Description
opts
object
id
string

In path

username
string

In body

password
string

In body

}

Returns

Promise.<any>

updateUserMe

(async) updateUserMe(opts): Promise.<any>

Scopes

homey.user.self

HTTP

PUT /api/manager/users/user/me

Parameters

Name Type Description
opts
object
name
string <optional>

In body

}

Returns

Promise.<any>

updateUserMeLocalCredentials

(async) updateUserMeLocalCredentials(opts): Promise.<any>

Scopes

homey.user.self

HTTP

PUT /api/manager/users/user/me/local-credentials

Parameters

Name Type Description
opts
object
username
string

In body

password
string

In body

}

Returns

Promise.<any>

updateUserMeProperties

(async) updateUserMeProperties(opts): Promise.<any>

Scopes

homey.user.self

HTTP

PUT /api/manager/users/user/me/properties/:id

Parameters

Name Type Description
opts
object
id
string

In path

value
object

In body

}

Returns

Promise.<any>

Events

user.create

.on('user.create')

Parameters

Name Type Description
user
HomeyAPIV3Local.ManagerUsers.User

user.delete

.on('user.delete')

Parameters

Name Type Description
user
HomeyAPIV3Local.ManagerUsers.User

user.update

.on('user.update')

Parameters

Name Type Description
user
HomeyAPIV3Local.ManagerUsers.User
info
object
newValues
object

An object with only the new values of the user

oldValues
object

An object with only the old values of the user

changedKeys
Array.<string>

An array of keys of the properties that have changed

}