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

Latest commit

 

History

History
71 lines (57 loc) · 2.63 KB

File metadata and controls

71 lines (57 loc) · 2.63 KB

Get Groups Files

Retrieves the files from a group/channel.

HTTP MethodURLRequires Auth
GET/api/v1/groups.filesyes

Query Parameters

This endpoint supports the#pagination parameters, alongside the#query-and-fields parameters.

KeyExample ValueDescription
roomId* or roomName*ByehQjC44FwMeiLbX
test
The room ID or the room name.

Example Call

With the roomId parameter:

curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
     -H "X-User-Id: aobEdbYhXfu5hkeqG" \
     http://localhost:3000/api/v1/groups.files?roomId=ByehQjC44FwMeiLbX

With the roomName parameter:

curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
     -H "X-User-Id: aobEdbYhXfu5hkeqG" \
     http://localhost:3000/api/v1/groups.files?roomName=test

Example Response

{
    "files": [
        {
            "_id": "S78TNnvaWGwdYRaCD",
            "name": "images.jpeg",
            "size": 9778,
            "type": "image/jpeg",
            "rid": "GENERAL",
            "description": "",
            "store": "GridFS:Uploads",
            "complete": true,
            "uploading": false,
            "extension": "jpeg",
            "progress": 1,
            "user": {
                "_id": "ksKsKmrjvxzkzxkww",
                "username": "rocket.cat",
                "name": "Rocket Cat"
            },
            "_updatedAt": "2018-03-08T14:47:37.003Z",
            "instanceId": "uZG54xuoKauKHykbQ",
            "etag": "jPaviS9qG22xC5sDC",
            "path": "/ufs/GridFS:Uploads/S78TNnvaWGwdYRaCD/images.jpeg",
            "token": "28cAb868d9",
            "uploadedAt": "2018-03-08T14:47:37.295Z",
            "url": "/ufs/GridFS:Uploads/S78TNnvaWGwdYRaCD/images.jpeg"
        }
    ],
    "count": 1,
    "offset": 0,
    "total": 1,
    "success": true
}

Change Log

VersionDescription
0.64.0Change userId to user object in response
0.59.0Added