Start a conversation

Retrieve Abuse Reports by Members

Learn about how to retrieve abuse reports by members from the Abuse dashboard.

In this guide, you will learn how to retrieve abuse reports by members from the Abuse dashboard using GraphQL API.

The moderators use these abuse reports to filter and moderate the content for their community based on their policies.

To retrieve the abuse reports by members, you must have Moderator role granted to you by your administrator.

Basic Steps

  1. Generate the API session key using the POST/v1/authentication/sessions/login endpoint.
  2. Use this session key and a GraphQL query to authorize and retrieve the abuse reports.
  3. Filter the entity based on your preference and company policies.
  4. Use the entityId to either ban the member or reject the abuse report.

Example

For our example, we are going to retrieve the abuse report from the dashboard.

Generate the API session key using the below query:

https://<YOUR COMPANY DOMAIN>/restapi/v1/authentication/sessions/login?user.login=<USERNAME>&user.password=<YOUR PASSWORD>

The generated session key is <YOUR SESSION KEY>

Use this key to retrieve the session key.

GraphQL Query 1:

query {
    abuseReportedMessages(
        first: 10
    ) {
        pageInfo {
            startCursor
            endCursor
            hasNextPage
        }
        edges
        {
            cursor
            node {
                id
                message {
                    id
                    subject
                    body
                    author {
                        id
                    }
                }
                reportedDate
                reportersCount
            }
        }
    }
}

Retrieve all the abuse private messages:

{
  abuseReportedPrivateMessages(sorts: {reportedDate: {direction: DESC}}) {
    totalCount
    edges {
      node {
        id
        reportedDate
        reportersCount
        entity {
          ... on PrivateNote {
            id
            body
            conversation {
              subject
            }
          }
          ... on PrivateConversation {
            id
            subject
          }
        }
      }
    }
  }
}

Example Response

Response:

{
    "data": {
        "abuseReportedMessages": {
            "pageInfo": {
                "startCursor": null,
                "endCursor": null,
                "hasNextPage": false
            },
            "edges": [
                {
                    "cursor": "MHwzMTUwfDB8MTA7MTB8fA",
                    "node": {
                        "id": "abusereportedmessage:3150",
                        "message": {
                            "id": "message:3150",
                            "subject": "hey",
                            "body": "<P>hi</P>",
                            "author": {
                                "id": "user:642"
                            }
                        },
                        "reportedDate": "2023-05-18T00:35:06.000-07:00",
                        "reportersCount": 1
                    }
                }
            ]
        }
    }
}

Response for the abuse private messages:

{
  "data": {
    "abuseReportedPrivateMessages": {
      "totalCount": 1,
      "edges": [
        {
          "node": {
            "id": "threaded_note:1",
            "reportedDate": "2023-07-25T10:15:22.000+05:30",
            "reportersCount": 1,
            "entity": {
              "id": "threaded_note:1",
              "conversation": {
                "subject": "You've been invited to GH_Close"
              }
            }
          }
        }
      ]
    }
  }
}
Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. ATLAS

  2. Posted
  3. Updated

Comments