POST
/
api
/
getReports
const response = await fetch('/api/getReports', {

    method: 'POST',

    headers: {

      'Content-Type': 'application/json',

    },

    body: JSON.stringify({ apiKey: 'Your_API_Key' }),

  });


  if (response.ok) {

    const reports = await response.json();

    console.log(reports)

    reports.forEach(report => {

      console.log(report)

    })

  } else {

    console.error('Error fetching reports:', response.status);

  }
[{

  id: "Example_Report_ID",

  data: {

    "reason": "Reason",

    "img": "Image URL",

    "name": "Violator's Name",

    "id": "ID of Submitter",

    "device": "Device Type"

  }

}]


Body

apiKey
string

Your API Key. (Keep this secret!)

Response

Reports
array

An array with JSON objects inside it which include the ID and other information.

const response = await fetch('/api/getReports', {

    method: 'POST',

    headers: {

      'Content-Type': 'application/json',

    },

    body: JSON.stringify({ apiKey: 'Your_API_Key' }),

  });



  if (response.ok) {

    const reports = await response.json();

    console.log(reports)

    reports.forEach(report => {

      console.log(report)

    })

  } else {

    console.error('Error fetching reports:', response.status);

  }
[{

  id: "Example_Report_ID",

  data: {

    "reason": "Reason",

    "img": "Image URL",

    "name": "Violator's Name",

    "id": "ID of Submitter",

    "device": "Device Type"

  }

}]