Overview

The Report API allows users to submit bug reports related to the AccessScan application. These reports are then processed and typically filed as issues in a designated tracking system.

Base URL

The base URL for the Report API depends on the environment:

Status Endpoint

Checks the operational status of the Report API.

Endpoint: GET /status

Description: Returns the current status of the service.

Success Response (200 OK)


{
  "status": "active",
  "service": "report-api",
  "timestamp": "2023-10-27T10:00:00.000Z"
}
                

Submit Bug Report

Submits a new bug report.

Endpoint: POST /

Description: Accepts bug report details and attempts to create an issue in the configured backend system (e.g., GitHub Issues).

Request Body (application/json)

Field Type Required Description
description String Yes A detailed description of the bug.
steps String No Steps to reproduce the bug.
expected String No The expected behavior.
actual String No The actual behavior observed.
url String No The URL or input that was being processed when the bug occurred.
email String No User's email address (optional, for follow-up).
userAgent String No (Auto-collected by frontend) The user agent string of the browser.
pageUrl String No (Auto-collected by frontend) The URL of the page from which the report was submitted.
clientApiMode String No (Auto-collected by frontend) The API mode the client was using ('local' or 'server').
timestamp String (ISO 8601) No (Auto-collected by frontend) The timestamp when the report was generated.

Example Request Body


{
  "description": "The main scan button is not responsive on mobile devices.",
  "steps": "1. Open the site on a mobile browser.\n2. Try to click the 'Scan' button.",
  "expected": "The scan should initiate.",
  "actual": "Nothing happens when the button is tapped.",
  "url": "https://accessscan.sumfall.gay/home/",
  "email": "user@example.com",
  "userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.0 Mobile/15E148 Safari/604.1",
  "pageUrl": "https://accessscan.sumfall.gay/home/",
  "clientApiMode": "server",
  "timestamp": "2023-10-27T12:30:45.123Z"
}
                

Success Response (200 OK)


{
  "success": true,
  "message": "Bug report submitted successfully.",
  "issueUrl": "https://github.com/user/repo/issues/123",
  "issueNumber": 123
}
                

Note: The issueUrl and issueNumber fields provide references to the created issue in the backend tracking system.

Error Responses