Retrieve a user

Retrieving user information is super simple, however there is some complexity that arises when permissions get involved.

1. Retrieving information about the signed in user e.g. Profile
2. Retrieving basic information about other team members e.g. "Team Members Coming In" widget
3. Retrieving all information about all users e.g. Admin "Users" section
4. Retrieving usage data about a specific user e.g. Reporting

Note: For #2, #3, and #4, the invited user can be an existing user. In those cases, we do not call the Create User method, but rather call Respond to Invitation

Endpoints

Get a single user's full profile information

  • GET /user
    • Permissions: user:profile:read

Response

  • id - string
  • email - string
  • name - string
  • just_created - boolean: If set to true, a new user has been created as a result of login and as such the next request should be performed with a newly issued access token (to pickup any Auth0 role changes)

Example

$ http GET 'http://localhost:5000/user' 'Authorization: Bearer ACCESS_TOKEN'
HTTP/1.1 200 OK
{
"email": "[email protected]",
"id": "user_423a7fb0-9a5d-4abb-b3b7-1a3d92ada5cc",
"name": "Mariano Iglesias",
"just_created": false
}

TODO: Get basic profile information about organization members

Limited permission view for use cases such as team members being able to view team schedules on the dashboard or to populate the organization directory.


Get all users in an organization

This is used by organization admins to manage their users.

  • GET /users
    • Permissions: organization:user:read

Response: Paginated Array

  • id - string
  • email - string
  • name - string
  • just_created - boolean: If set to true, a new user has been created as a result of login and as such the next request should be performed with a newly issued access token (to pickup any Auth0 role changes)
  • role - string

Example

$ http GET 'http://localhost:5000/users' 'Authorization: Bearer ACCESS_TOKEN'
HTTP/1.1 200 OK
{
"cursor": "user_b21da9a0-b1fd-4b99-a12e-f321b93e2f7c",
"elements": [
{
"email": "[email protected]",
"id": "user_2a52dc51-2844-4781-aef5-02f8b5074d06",
"just_created": false,
"name": "Mariano Iglesias",
"role": "owner"
},
{
"email": "[email protected]",
"id": "user_423a7fb0-9a5d-4abb-b3b7-1a3d92ada5cc",
"just_created": false,
"name": "Mariano Iglesias",
"role": "owner"
},
{
"email": "[email protected]",
"id": "user_b21da9a0-b1fd-4b99-a12e-f321b93e2f7c",
"just_created": false,
"name": "Mariano Iglesias",
"role": "member"
}
]
}

TODO: Get all usage data for a specific user

Enables admins to get all Tactic usage data for a user.

Was this page helpful?