---
title: "List all policies"
method: GET
path: "/sqlserver/v1/orgs/{OrgID}/reports/policies"
tags: ["SQLServer"]
---

# List all policies

`GET /sqlserver/v1/orgs/{OrgID}/reports/policies`

## Request

- Base URL: `//apis.druva.com/phoenix` (relative, and the document’s source URL is not known)
- URL: `//apis.druva.com/phoenix/sqlserver/v1/orgs/{OrgID}/reports/policies`
- Auth: API key in header `Authorization`

Returns all policies for SQL Server for the given query parameters.

## Path parameters

- `OrgID` integer, required

## Query parameters

- `pageToken` string

## Response `200`

Success

- SQLGetPoliciesResponse: GetPoliciesResponse is response schema for GetPolicies
  - `nextPageToken` string: The page token value for the next set of API results. The value of this parameter is NULL for the last set of results.
  - `policies` SQLGetPolicies[]
    - `automaticRetry` boolean: Whether the automatic retry option is enabled.
    - `dataLock` boolean: The status indicating if Data Lock is enabled in the backup policy.
    - `description` string: The description of the policy.
    - `ignoreFirstBackupDuration` boolean: Whether the backup duration is to be ignored for the first backup.
    - `maxRetryCount` integer: The maximum retry count for the job operation. This parameter will be skipped if the value is NULL.
    - `maxRetryDuration` string: Specifies the wait interval before the job is retried.
    - `maxRetryDurationInSeconds` integer: Specifies the wait interval in seconds before the job is retried.
    - `policyID` integer: The ID of your backup policy.
    - `policyName` string: The name of the policy.
    - `policyType` string: The type of the policy.
    - `retention` SQLRetentionPolicy: RetentionPolicy struct holds the response for GetPolicies api
      - `allSnapshots` string: The number of days for which the daily backup restore points are to be retained.
      - `ltrEnabled` boolean: The status of the backup set whether enabled for long term retention. For example, True denotes that the backup set is enabled for LTR.
      - `monthly` string: The number of months for which the monthly backup restore points are to be retained.
      - `warmTierDuration` integer: Lists the duration in days for which the snapshot will reside in the warm tier of the AWS storage.
      - `weekly` string: The number of weeks for which the weekly backup restore points are to be retained.
      - `yearly` string: The number of years for which the yearly backup restore points are to be retained.
    - `schedules` SQLSchedules[]: The schedule information for backup. This parameter will be skipped if the value is NULL.
      - `backup Type` string: The type of the backup.
      - `bandwidth` string: Specifies the bandwidth that each resource can consume while backing up data to the Cloud.
      - `bandwidthInKBps` number, double: Specifies the bandwidth in Kilobytes per second that each resource can consume while backing up data to the Cloud.
      - `duration` string: Specifies the duration after which you want backup operations to stop.
      - `durationInSeconds` integer: Specifies the duration in seconds after which you want backup operations to stop.
      - `repeatOn` string[]: JSONStringList is data type to be used in model definition for data that is string:interface map in memory but stored as JSON string in DB
      - `startAt` string: The start hour of the backup operation.
    - `transactionLogsBackup` SQLTransactionlogSchedule[]: The Transaction log schedule information for backup. This parameter will be skipped if the value is NULL.
      - `bandwidth` string: Specifies the bandwidth that each resource can consume while backing up data to the Cloud.
      - `bandwidthInKBps` number, double: Specifies the bandwidth in Kilobytes per second that each resource can consume while backing up data to the Cloud.
      - `duration` string: Specifies the duration after which you want transactionlog backup operations to stop.
      - `durationInSeconds` integer: Specifies the duration in seconds after which you want transactionlog backup operations to stop.
      - `repeatOn` string: The days of week on which the transactional log schedule is to be run.
      - `startAt` string: The start hour of the transactional log backup operation.

## Other responses

- `400`: Bad Request
- `404`: The requested resource was not found.
- `500`: The request was not processed due to an internal error in the Cloud.

---

[API](https://skmtc.dev/druva/apis/enterprise-workloads.md) - [All operations](https://skmtc.dev/druva/apis/enterprise-workloads/llms.txt) - [OpenAPI document](https://skmtc.dev/druva/apis/enterprise-workloads/revisions/18fc75e8229e?raw)
