Get Channel Files
    • Dark
      Light
    • PDF

    Get Channel Files

    • Dark
      Light
    • PDF

    Article summary

    Get
    /api/v1/channels.files

    Retrieves all the files from a channel.

    Changelog

    VersionDescription
    0.64.0Change userId to user object in response
    0.59.0Added
    Header parameters
    X-User-Id
    stringRequired

    The userId of the authenticated user.

    ExamplerbAXPnMktTFbNpwtJ
    X-Auth-Token
    stringRequired

    The authToken of the authenticated user.

    ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
    Query parameters
    roomId
    string

    The room id. It is required if the roomName is not provided.

    Exampledlpfuijw7ej
    roomName
    string

    The room name. It is required if the roomId is not provided.

    Examplegeneral
    fields
    string

    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 }

    query

    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" } }

    sort

    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}

    count
    integer

    The number of items to return.

    Example50
    offset
    integer

    Number of items to "skip" in the query, i.e. requests return count items, skipping the first offset items.

    Example50
    Responses
    200

    OK

    Example 1
    {
      "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
    }
    Expand All
    object
    files
    Array of object
    object
    _id
    string
    name
    string
    size
    integer
    type
    string
    rid
    string
    userId
    string
    store
    string
    _updatedAt
    string
    identify
    object
    format
    string
    size
    object
    width
    integer
    height
    integer
    complete
    boolean
    etag
    string
    path
    string
    progress
    integer
    token
    string
    uploadedAt
    string
    uploading
    boolean
    url
    string
    typeGroup
    string
    user
    object
    _id
    string
    username
    string
    name
    string
    count
    integer
    offset
    integer
    total
    integer
    success
    boolean

    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.