---
title: "List file violations"
method: GET
path: "/sdg/v1/fileViolations"
tags: ["Sensitive Data Governance"]
---

# List file violations

`GET /sdg/v1/fileViolations`

Get the list of file violations.

## Query parameters

- `policyID` integer
- `pageToken` string
- `violationType` 'all' | 'critical' | 'nonCritical'
- `violationStatus` 'pendingOnAdmin' | 'pendingOnUser'
- `searchQuery` string
- `resolutionType` 'active' | 'resolved' | 'quarantined'

## Response `200`

OK

- FileViolationsResponse
  - `violations` FileViolation[] — List of file violations.
    - `id` integer — The unique ID of the file violation.
    - `resourceParentID` integer — The unique User ID of the user for which the file violation is reported.
    - `violatedPolicies` integer[] — ID of the Sensitive Data Governance policy(s) based on which the violation was reported.
    - `violatedDatatypes` integer[] — List of ID(s) of the sensitive data type using which the violation was reported.
    - `versionCount` integer — The total number of versions of the file which is reported as a violation.
    - `lastUpdated` string, date-time — The date and time when the file violation was last reported.
    - `datatypeCount` integer — The total count of the sensitive data type(s) using which the violation was reported.
    - `version` integer — The exact file version of the file for which the violation is reported.
    - `resourceID` integer — The unique ID of the device associated with the file for which violation was reported.
    - `violationStatus` string — The current violation status of the file, that is whether it is Pending on User or Pending on Admin.
    - `violatedFilePath` string — The absolute path of the file for which violation was reported.
    - `mimetype` string — Mimetype of the file against which the violation was reported.
    - `severity` string — The severity of the file violation, whether it critical or non-critical.
    - `username` string — The name of the user for whom the violation is reported.
    - `deviceName` string — The name of the device on which the violation is reported.
    - `fileName` string — The name of the file in which the violation is reported.
    - `violatedPoliciesName` string[] — The list of policy names for which violations are reported.
    - `sensitiveDataFound` string — The type of sensitive data found.
    - `resolutionDetails` object — The status of the resolution.
      - `id` integer
      - `resolutionsText` string
    - `comments` string — The additional comment (if any) is attached to the violation.
    - `violationReportedOn` string — The date and time when the violation is reported.
    - `resolvedOn` string — The date and time when the violation is resolved.
  - `pageToken` string — The token to access the next page of results.

## Other responses

- `400` — Bad Request
- `403` — Access denied: Insufficient permissions. User requires specific access rights and minimum permissions. Details: https://help.druva.com/en/articles/15069296
- `500` — An internal error occurred on the server. For more information, check server logs.

---

[API](https://skmtc.net/druva/apis/authentication.md) · [All operations](https://skmtc.net/druva/apis/authentication/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/druva/authentication/revisions/2af2bf148b25/schema)
