Skip to content

Reports ​

Access analysis reports generated by the ShieldCI Laravel package. The list and detail endpoints use different shapes: the list returns summary objects (no per-analyzer results), and the detail endpoint returns the full report including every analyzer's results and issues.

All endpoints require a valid Sanctum token. See Authentication for ability details.

Report IDs are UUIDs

The {report} URL parameter is always the report's UUID (data[].uuid in list responses, data.uuid in the detail response), not the integer id.


List Reports ​

GET /api/v1/projects/{project}/reports

Requires ability: read

Returns a paginated list of reports for a project, ordered by analysis date descending.

Request ​

HeaderValueRequired
AuthorizationBearer shieldci_{token}Yes
Acceptapplication/jsonRecommended
ParameterTypeDescription
projectUUID stringProject UUID (from data[].id in List Projects)
bash
curl "https://shieldci.com/api/v1/projects/550e8400-e29b-41d4-a716-446655440000/reports?page=1" \
  -H "Authorization: Bearer shieldci_{token}" \
  -H "Accept: application/json"

Response ​

json
{
  "data": [
    {
      "id": 42,
      "uuid": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
      "score": 87,
      "total": 100,
      "passed": 87,
      "failed": 8,
      "warnings": 3,
      "skipped": 2,
      "errors": 0,
      "total_issues": 11,
      "issues_by_severity": {
        "critical": 0,
        "high": 1,
        "medium": 4,
        "low": 6,
        "info": 0
      },
      "laravel_version": "12",
      "package_version": "1.2.0",
      "total_execution_time": 14.8,
      "triggered_by": "api",
      "analyzed_at": "2026-05-12T09:00:00+00:00",
      "created_at": "2026-05-12T09:00:00+00:00"
    }
  ],
  "links": { "first": "...", "last": "...", "prev": null, "next": null },
  "meta": { "current_page": 1, "per_page": 20, "total": 10 }
}
FieldTypeDescription
idintegerReport database ID
uuidstring (UUID)Report UUID - use this in report URLs
scoreintegerOverall score (0–100)
totalintegerTotal analyzers run
passedintegerAnalyzers that passed
failedintegerAnalyzers with failures
warningsintegerAnalyzers with warnings
skippedintegerAnalyzers skipped
errorsintegerAnalyzers that errored
total_issuesintegerTotal issues found across all analyzers
issues_by_severityobjectIssue counts by severity: critical, high, medium, low, info
laravel_versionstring|nullLaravel version of the analyzed application
package_versionstring|nullShieldCI package version that ran the analysis
total_execution_timefloat|nullTotal analysis duration in seconds
triggered_bystring|nullHow the analysis was triggered (api, webhook, etc.)
analyzed_atstring|nullISO 8601 timestamp when analysis ran
created_atstring|nullISO 8601 record creation timestamp

Errors ​

StatusCondition
401Missing or invalid token
403Token lacks read ability or no active subscription
404Project not found or user lacks permission to view it

Get Report ​

GET /api/v1/reports/{report}

Requires ability: read

Returns the full detail for a single report, including per-analyzer results and all issues.

Request ​

HeaderValueRequired
AuthorizationBearer shieldci_{token}Yes
Acceptapplication/jsonRecommended
ParameterTypeDescription
reportUUID stringReport UUID (from data[].uuid in the list response)
bash
curl "https://shieldci.com/api/v1/reports/6ba7b810-9dad-11d1-80b4-00c04fd430c8" \
  -H "Authorization: Bearer shieldci_{token}" \
  -H "Accept: application/json"

Response ​

Contains all summary fields plus a results array with per-analyzer detail:

json
{
  "data": {
    "id": 42,
    "uuid": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
    "score": 87,
    "total": 100,
    "passed": 87,
    "failed": 8,
    "warnings": 3,
    "skipped": 2,
    "errors": 0,
    "total_issues": 11,
    "issues_by_severity": { "critical": 0, "high": 1, "medium": 4, "low": 6, "info": 0 },
    "laravel_version": "12",
    "package_version": "1.2.0",
    "total_execution_time": 14.8,
    "triggered_by": "api",
    "analyzed_at": "2026-05-12T09:00:00+00:00",
    "created_at": "2026-05-12T09:00:00+00:00",
    "results": [
      {
        "analyzer_id": "xss-detection",
        "analyzer_name": "XSS Detection",
        "category": "security",
        "status": "failed",
        "execution_time": 1.2,
        "issues": [
          {
            "message": "Unescaped user input passed to {!! !!}",
            "severity": "high",
            "location": { "file": "resources/views/user/profile.blade.php", "line": 42 },
            "recommendation": "Use {{ }} for automatic escaping or sanitize the value before output."
          }
        ]
      },
      {
        "analyzer_id": "sql-injection",
        "analyzer_name": "SQL Injection",
        "category": "security",
        "status": "passed",
        "execution_time": 0.8,
        "issues": []
      }
    ]
  }
}

results[] fields:

FieldTypeDescription
analyzer_idstringAnalyzer identifier (e.g. xss-detection)
analyzer_namestringHuman-readable analyzer name
categorystringCategory (security, performance, reliability, etc.)
statusstringpassed, failed, warning, skipped, or error
execution_timefloat|nullTime this analyzer took in seconds
messagestring|nullThe analyzer's own summary. When status is error this is the reason it could not run. Stored stripped of control characters and capped at 1000 characters
issuesarrayList of issues found (empty array if none)
metadataobjectAnalyzer descriptors — see below

results[].metadata fields:

Only the keys below are stored. Anything else in the object is discarded on ingest.

FieldTypeDescription
descriptionstringWhat the analyzer checks
docsUrlstringLink to this analyzer's documentation
severitystringThe analyzer's default severity
timeToFixintegerEstimated minutes to fix one issue, used for the technical-debt estimate
exceptionstringClass of the throwable that stopped the analyzer. Only present when status is error

Stack traces are not stored

The package also sends a trace key on errored results. The API accepts it and discards it on ingest — it is not part of the stored contract, so do not build against it. Your CI log already has the full trace, which is where output of that size belongs. Use message and exception to diagnose an analyzer that could not run.

results[].issues[] fields:

FieldTypeDescription
messagestringDescription of the issue
severitystringcritical, high, medium, low, or info
locationobject{file: string, line: integer} - may be empty if no location available
recommendationstring|nullSuggested fix

Errors ​

StatusCondition
401Missing or invalid token
403Token lacks read ability or no active subscription
404Report not found, or the report's parent project does not exist

Delete Report ​

DELETE /api/v1/reports/{report}

Requires ability: write

Permanently deletes a single report.

Request ​

HeaderValueRequired
AuthorizationBearer shieldci_{token}Yes
ParameterTypeDescription
reportUUID stringReport UUID
bash
curl -X DELETE "https://shieldci.com/api/v1/reports/6ba7b810-9dad-11d1-80b4-00c04fd430c8" \
  -H "Authorization: Bearer shieldci_{token}"

Response ​

json
{
  "message": "Report deleted successfully."
}

Errors ​

StatusCondition
401Missing or invalid token
403Token lacks write ability, no active subscription, or user lacks permission to delete
404Report not found or the report's parent project does not exist