Get Reported Messages
    • Dark
      Light
    • PDF

    Get Reported Messages

    • Dark
      Light
    • PDF

    Article summary

    Get
    /api/v1/moderation.reportsByUsers

    Retrieves all the reported messages grouped by users. Permission required: view-moderation-console

    Changelog

    VersionDescription
    6.2.0Added
    Header parameters
    X-User-Id
    stringRequired

    The user ID.

    ExampleCkCPNctrgCDfmWLqC
    X-Auth-Token
    stringRequired

    The authentication token.

    Example1Dd4iN_ClKn5jl-xPC36snQ4s9Zd5GZnXCQuCNSKcVE
    Query parameters
    oldest
    string

    It represents the oldest point in time for which you want to retrieve moderation reports.

    Example2021-09-30T09:33:15.621Z
    latest
    string

    It represents the oldest point in time for which you want to retrieve moderation reports.

    Example2023-08-30T09:33:15.621Z
    offset
    integer

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

    Example50
    count
    integer

    How many items to return.

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

    Responses
    200

    OK

    Success Example
    {
      "reports": [
        {
          "rooms": [
            {
              "_id": "6423ce62c29657e5b3ba2675rbAXPnMktTFbNpwtJ",
              "t": "d",
              "federated": true
            }
          ],
          "count": 1,
          "message": "hi",
          "msgId": "tDNLALSFk2LET2JZH",
          "ts": "2023-08-30T09:38:38.792Z",
          "username": "test.test",
          "name": "test test",
          "userId": "rbAXPnMktTFbNpwtJ",
          "isUserDeleted": false
        },
        {
          "rooms": [
            {
              "_id": "5fRTXMt7DMJbpPJfhrbAXPnMktTFbNpwtJ",
              "t": "d"
            }
          ],
          "count": 2,
          "message": "himm",
          "msgId": "xY8cN7yuPQfBgJ9xz",
          "ts": "2023-08-30T09:33:15.621Z",
          "username": "test.test",
          "name": "Testtest",
          "userId": "5fRTXMt7DMJbpPJfh",
          "isUserDeleted": false
        }
      ],
      "count": 2,
      "offset": 0,
      "total": 3,
      "success": true
    }
    Expand All
    object
    reports
    Array of object
    object
    rooms
    Array of object
    object
    _id
    string
    t
    string
    federated
    boolean
    count
    integer
    message
    string
    msgId
    string
    ts
    string
    username
    string
    name
    string
    userId
    string
    isUserDeleted
    boolean
    count
    integer
    offset
    integer
    total
    integer
    success
    boolean
    401

    Unauthorized

    Authorization Error
    {
      "status": "error",
      "message": "You must be logged in to do this."
    }
    object
    status
    string
    message
    string
    403

    Forbidden

    Permission Error
    {
      "success": false,
      "error": "User does not have the permissions required for this action [error-unauthorized]"
    }
    object
    success
    boolean
    error
    string

    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.