Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fetch all users belonging to an org #144

Merged
merged 5 commits into from
May 19, 2024
Merged

Conversation

joshtyf
Copy link
Owner

@joshtyf joshtyf commented May 14, 2024

Description

Created an endpoint /api/organization/{orgId}/members to fetch all members of organisation orgId.

Sample response:

{
  "org_id": 1,
  "members": [
    {
      "user_id": "auth0|65ffab5c004e8d1620d06a64",
      "name": "Test User 1",
      "identity_provider": "auth0",
      "created_on": "2024-05-13T13:39:47.646388Z",
      "deleted": false,
      "role": "Owner",
      "joined_on": "2024-05-13T13:39:47.654307Z"
    },
    {
      "user_id": "auth0|66010ad5095367b237799680",
      "name": "Test User 2",
      "identity_provider": "auth0",
      "created_on": "2024-05-13T13:39:47.650646Z",
      "deleted": false,
      "role": "Admin",
      "joined_on": "2024-05-13T13:39:47.662836Z"
    },
    {
      "user_id": "auth0|65e9dabff2dab546ed0c231e",
      "name": "Test User 3",
      "identity_provider": "auth0",
      "created_on": "2024-05-13T13:39:47.65276Z",
      "deleted": false,
      "role": "Member",
      "joined_on": "2024-05-13T13:39:47.665636Z"
    }
  ]
}

Closes #143

@Ziyang-98
Copy link
Collaborator

Should there be a page to see all members in the org to use this API? The page can be used to update member's org membership too.

@joshtyf
Copy link
Owner Author

joshtyf commented May 19, 2024

Should there be a page to see all members in the org to use this API? The page can be used to update member's org membership too.

Yup! We can consider putting it under "View your organisation > View members"

@joshtyf joshtyf merged commit 629e971 into main May 19, 2024
2 checks passed
@joshtyf joshtyf deleted the feat/get-all-users-by-org branch May 19, 2024 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Backend related feature A new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fetch all users
3 participants