Get users
https://api.lytics.io/v2/userGet a list of all users for the account
{
"_meta": {},
"data": [
{
"accounts": [
{
"account_id": "string",
"aid": 0,
"auth0_connections": [
"string"
],
"created": "2019-08-24T14:15:22Z",
"expiration": "2019-08-24T14:15:22Z",
"granted_by": "string",
"login_method_allowed": true,
"name": "string",
"reason": "string",
"roles": [
"string"
],
"updated": "2019-08-24T14:15:22Z"
}
],
"aid": 0,
"auth_type": "password",
"authtoken": "string",
"authy_id": "string",
"cellphone": "string",
"cookie": "string",
"country_code": "string",
"created": "2019-08-24T14:15:22Z",
"email": "string",
"email_verified": "2019-08-24T14:15:22Z",
"has_2fa_session": true,
"id": "string",
"last_logon": "2019-08-24T14:15:22Z",
"last_pwd_change": "2019-08-24T14:15:22Z",
"name": "string",
"needs_2fa": true,
"organization_id": "string",
"updated": "2019-08-24T14:15:22Z"
}
],
"request_id": "string",
"status": 0
}Reset password
https://api.lytics.io/v2/user/me/passwordresetUpdate a user's password
{
"oldpassword": "string",
"password": "string"
}{
"_meta": {},
"data": {
"accounts": [
{
"account_id": "string",
"aid": 0,
"auth0_connections": [
"string"
],
"created": "2019-08-24T14:15:22Z",
"expiration": "2019-08-24T14:15:22Z",
"granted_by": "string",
"login_method_allowed": true,
"name": "string",
"reason": "string",
"roles": [
"string"
],
"updated": "2019-08-24T14:15:22Z"
}
],
"aid": 0,
"auth_type": "password",
"authtoken": "string",
"authy_id": "string",
"cellphone": "string",
"cookie": "string",
"country_code": "string",
"created": "2019-08-24T14:15:22Z",
"email": "string",
"email_verified": "2019-08-24T14:15:22Z",
"has_2fa_session": true,
"id": "string",
"last_logon": "2019-08-24T14:15:22Z",
"last_pwd_change": "2019-08-24T14:15:22Z",
"name": "string",
"needs_2fa": true,
"organization_id": "string",
"updated": "2019-08-24T14:15:22Z"
},
"request_id": "string",
"status": 0
}Get user
https://api.lytics.io/v2/user/{id}Get a user by ID, email address, or the special value me (returns the authenticated user).
{
"_meta": {},
"data": {
"accounts": [
{
"account_id": "string",
"aid": 0,
"auth0_connections": [
"string"
],
"created": "2019-08-24T14:15:22Z",
"expiration": "2019-08-24T14:15:22Z",
"granted_by": "string",
"login_method_allowed": true,
"name": "string",
"reason": "string",
"roles": [
"string"
],
"updated": "2019-08-24T14:15:22Z"
}
],
"aid": 0,
"auth_type": "password",
"authtoken": "string",
"authy_id": "string",
"cellphone": "string",
"cookie": "string",
"country_code": "string",
"created": "2019-08-24T14:15:22Z",
"email": "string",
"email_verified": "2019-08-24T14:15:22Z",
"has_2fa_session": true,
"id": "string",
"last_logon": "2019-08-24T14:15:22Z",
"last_pwd_change": "2019-08-24T14:15:22Z",
"name": "string",
"needs_2fa": true,
"organization_id": "string",
"updated": "2019-08-24T14:15:22Z"
},
"request_id": "string",
"status": 0
}Delete user
https://api.lytics.io/v2/user/{id}Remove a user's access to the account. If the user has no remaining account roles after removal, the user record is deleted entirely.
No Content
Update user roles
https://api.lytics.io/v2/user/{id}/rolesReplace all account roles for a user with the provided list. The body is a bare JSON array of role names, not an object, and it replaces every role the user has on the account, e.g. ["admin","auth_alerts"].
{
"_meta": {},
"data": {
"accounts": [
{
"account_id": "string",
"aid": 0,
"auth0_connections": [
"string"
],
"created": "2019-08-24T14:15:22Z",
"expiration": "2019-08-24T14:15:22Z",
"granted_by": "string",
"login_method_allowed": true,
"name": "string",
"reason": "string",
"roles": [
"string"
],
"updated": "2019-08-24T14:15:22Z"
}
],
"aid": 0,
"auth_type": "password",
"authtoken": "string",
"authy_id": "string",
"cellphone": "string",
"cookie": "string",
"country_code": "string",
"created": "2019-08-24T14:15:22Z",
"email": "string",
"email_verified": "2019-08-24T14:15:22Z",
"has_2fa_session": true,
"id": "string",
"last_logon": "2019-08-24T14:15:22Z",
"last_pwd_change": "2019-08-24T14:15:22Z",
"name": "string",
"needs_2fa": true,
"organization_id": "string",
"updated": "2019-08-24T14:15:22Z"
},
"request_id": "string",
"status": 0
}