Retrieves the files from a channel.
| HTTP Method | URL | Requires Auth |
|---|---|---|
GET | /api/v1/channels.files | yes |
This endpoint supports the optional #pagination parameters, alongside the #query-and-fields parameters. Additional parameters are as follows:
| Key | Example Value | Description |
|---|---|---|
roomId* or roomName* | ByehQjC44FwMeiLbX or general | The channel ID or name that you want to delete. You must enter at least one of the parameters. |
With room ID:
curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
-H "X-User-Id: aobEdbYhXfu5hkeqG" \
http://localhost:3000/api/v1/channels.files?roomId=ByehQjC44FwMeiLbXWith room name:
curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
-H "X-User-Id: aobEdbYhXfu5hkeqG" \
https://localhost:3000/api/v1/channels.files?roomName=test{
"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
}| Version | Description |
|---|---|
| 0.64.0 | Change userId to user object in response |
| 0.59.0 | Added |