Fuselage
Powered By GitBook
List users teams
Lists users teams
URL
Requires Auth
HTTP Method
api/v1/users.listTeams
YES
GET

Headers

Argument
Example
Required
Description
X-User-Id
myuser-name
Required
Your username hash (returned after you log in through the API)
X-Auth-Token
myauth-token
Required
Your token (returned after you log in through the API)

Example Call

1
curl --location --request POST 'http://localhost:3000/api/v1/users.listTeams\
2
--header 'X-Auth-Token: myauth-token' \
3
--header 'X-User-Id: myuser-name'
4
-d "userId=JxemcN9PDCdfzJe"
Copied!
If the caller has permission to view all teams, there's no need to filter the teams.

Result

Success

1
{
2
"teams": [
3
{
4
"_id": "612b8ae982d286c3",
5
"name": "documentation-team",
6
"type": 0,
7
"createdAt": "2021-08-29T13:26:01.750Z",
8
"createdBy": {
9
"_id": "JxemcN9PDCdfzJe",
10
"username": "renato.b"
11
},
12
"_updatedAt": "2021-08-29T13:26:01.762Z",
13
"roomId": "GwktYAajqw4RiWiBK",
14
"isOwner": true
15
}
16
],
17
"success": true
18
}
Copied!

Errors

The following error can occur upon the endpoint.
    Authorization: Requires an authentication token for the request to be made.
Authorization
1
{
2
"status": "error",
3
"message": "You must be logged in to do this."
4
}
Copied!
Last modified 21d ago
Export as PDF
Copy link