Retrieves all the media files from a channel.
Changelog
Version | Description |
---|---|
0.64.0 | Change userId to user object in response |
0.59.0 | Added |
The userId
of the authenticated user.
The authToken
of the authenticated user.
The room ID. It is required if the roomName
is not provided.
The room name. It is required if the roomId
is not provided.
This parameter accepts a JSON object with properties that have a value of 1 or 0 to include or exclude them in the response. For example, to only retrieve the usernames of users: fields={ "username": 1 }
. Refer to the official documentation to learn more.
This parameter allows you to use MongoDB query operators to search for specific data. For example, to query users with a name that contains the letter "g": query={ "name": { "$regex": "g" } }
. Refer to the official documentation to learn more.
List of fields to order by, and in which direction. This is a JSON object, with properties listed in desired order, with values of 1 for ascending, or -1 for descending. For example, {"value": -1, "_id": 1}. Refer to the official documentation to learn more.
Number of items to "skip" in the query, i.e. requests return count items, skipping the first offset items. Refer to the official documentation to learn more.
OK
{
"files": [
{
"_id": "651227bea2f73c7460e18c63",
"name": "Screenshot (317).png",
"size": 288727,
"type": "image/png",
"rid": "siyr2oWQJBjQjhLwr",
"userId": "rbAXPnMktTFbNpwtJ",
"store": "GridFS:Uploads",
"_updatedAt": "2023-09-26T00:37:19.598Z",
"identify": {
"format": "png",
"size": {
"width": 1920,
"height": 1080
}
},
"complete": true,
"etag": "2Q2D8hSxCdhQLzcpx",
"path": "/ufs/GridFS:Uploads/651227bea2f73c7460e18c63/Screenshot%20(317).png",
"progress": 1,
"token": "da2aCAf88a",
"uploadedAt": "2023-09-26T00:37:18.168Z",
"uploading": false,
"url": "http://localhost:3000/ufs/GridFS:Uploads/651227bea2f73c7460e18c63/Screenshot%20(317).png",
"typeGroup": "image",
"user": {
"_id": "rbAXPnMktTFbNpwtJ",
"username": "roxie",
"name": "test test"
}
},
{
"_id": "64b589e6aa5ad4273bfc4db6",
"name": "eicar.zip",
"size": 266,
"type": "application/x-zip-compressed",
"rid": "siyr2oWQJBjQjhLwr",
"userId": "rbAXPnMktTFbNpwtJ",
"store": "GridFS:Uploads",
"_updatedAt": "2023-07-17T18:35:18.242Z",
"complete": true,
"etag": "JYaAzzFQSnxYQ7rWW",
"path": "/ufs/GridFS:Uploads/64b589e6aa5ad4273bfc4db6/eicar.zip",
"progress": 1,
"token": "7a1A38Cb5a",
"uploadedAt": "2023-07-17T18:35:18.216Z",
"uploading": false,
"url": "http://localhost:3000/ufs/GridFS:Uploads/64b589e6aa5ad4273bfc4db6/eicar.zip",
"typeGroup": "application",
"user": {
"_id": "rbAXPnMktTFbNpwtJ",
"username": "roxie",
"name": "test test"
}
}
],
"count": 2,
"offset": 0,
"total": 2,
"success": true
}