Skip to content
This repository has been archived by the owner on Jun 27, 2024. It is now read-only.

Latest commit

 

History

History
62 lines (49 loc) · 1.72 KB

File metadata and controls

62 lines (49 loc) · 1.72 KB

List User Teams

HTTP MethodURLRequires Auth
GET/api/v1/users.listTeamsyes

Query Parameters

KeyExample ValueDescription
userId*JxemcN9PDCdfzJeThe user ID.

Example Call

curl --location --request POST 'http://localhost:3000/api/v1/users.listTeams\
--header 'X-Auth-Token: myauth-token' \
--header 'X-User-Id: myuser-name'
-d "userId=JxemcN9PDCdfzJe"

{% hint style="info" %} If the caller has permission to view all teams, there's no need to filter the teams. {% endhint %}

Example Response

Success

{
    "teams": [
        {
            "_id": "612b8ae982d286c3",
            "name": "documentation-team",
            "type": 0,
            "createdAt": "2021-08-29T13:26:01.750Z",
            "createdBy": {
                "_id": "JxemcN9PDCdfzJe",
                "username": "renato.b"
            },
            "_updatedAt": "2021-08-29T13:26:01.762Z",
            "roomId": "GwktYAajqw4RiWiBK",
            "isOwner": true
        }
    ],
    "success": true
}

Errors

The following error can occur upon the endpoint.

  • Authorization: Requires an authentication token for the request to be made.

{% tabs %} {% tab title=" Authorization" %}

{
    "status": "error",
    "message": "You must be logged in to do this."
}

{% endtab %} {% endtabs %}