Fetch Info of a Report

Get more details of a single report. A message can be reported multiple times by various users.

It requires the view-moderation-console permission.

URL

Requires Auth

HTTP Method

/api/v1/moderation.reportInfo

yes

GET

Headers

Argument

Example

Required

Description

X-User-Id

myuser-name

Required

The authenticated user ID.

X-Auth-Token

myauth-token

Required

Auth token.

Query Parameter

Argument

Example

Required

Description

reportId

64ef0f992c26843a68c1f785

Required

The id of the report to fetch details for.

Example Call

curl --location 'http://localhost:3000/api/v1/moderation.reportInfo?reportId=64ef0f992c26843a68c1f785' \
--header 'x-auth-token: aEO8Hw3zorBFQtAEYsNPnr67Li9-lY5kX1foen8UiiS' \
--header 'x-user-id: rbAXPnMktTFbNpwtJ' \
--data ''

Example Result

Success

{
    "report": {
        "_id": "64ef0f992c26843a68c1f785",
        "message": {
            "_id": "EbhcT4vjrCDyZuHKq",
            "rid": "5fRTXMt7DMJbpPJfhrbAXPnMktTFbNpwtJ",
            "msg": "hola",
            "ts": "2023-08-30T09:44:30.805Z",
            "u": {
                "_id": "5fRTXMt7DMJbpPJfh",
                "username": "test.funke",
                "name": "TestFunke"
            },
            "_updatedAt": "2023-08-30T09:44:30.968Z",
            "urls": [],
            "mentions": [],
            "channels": [],
            "md": [
                {
                    "type": "PARAGRAPH",
                    "value": [
                        {
                            "type": "PLAIN_TEXT",
                            "value": "hola"
                        }
                    ]
                }
            ]
        },
        "description": "test report\n",
        "reportedBy": {
            "_id": "rbAXPnMktTFbNpwtJ",
            "username": "funke.olasupo",
            "name": "Funke Olasupo",
            "createdAt": "2023-02-20T13:42:07.119Z"
        },
        "room": {
            "_id": "5fRTXMt7DMJbpPJfhrbAXPnMktTFbNpwtJ",
            "t": "d"
        },
        "ts": "2023-08-30T09:44:57.912Z",
        "_updatedAt": "2023-08-30T09:44:57.912Z"
    },
    "success": true
}

Error

Any of the following errors can occur on the endpoint.

  • Authorization: Requires an authentication token for the request to be made.

  • No Permission: Occurs when the authenticated user doesn't have the view-moderation-console permission.

  • ReportId Required: Occurs when reportId is missing in the request query parameter.

{
    "status": "error",
    "message": "You must be logged in to do this."
}

Change Log

Version

Description

6.2.0

Added

Last updated

Rocket.Chat versions receive support for six months after release.