GET
/
rest
/
api
/
v1
/
governance
/
data
/
policies
from glean import Glean
import os


with Glean(
    api_token=os.getenv("GLEAN_API_TOKEN", ""),
) as g_client:

    res = g_client.client.governance.data.policies.list()

    # Handle response
    print(res)
{
  "reports": [
    {
      "id": "<string>",
      "name": "<string>",
      "config": {
        "version": 123,
        "sensitiveInfoTypes": [
          {
            "likelihoodThreshold": "LIKELY",
            "infoType": "<string>"
          }
        ],
        "inputOptions": {
          "urlGreenlist": [
            "<string>"
          ],
          "datasourcesType": "ALL",
          "datasources": [
            "<string>"
          ],
          "datasourceInstances": [
            "<string>"
          ],
          "timePeriodType": "ALL_TIME",
          "customTimeRange": {
            "startTime": "2023-11-07T05:31:56Z",
            "endTime": "2023-11-07T05:31:56Z"
          }
        },
        "externalSharingOptions": {
          "enabled": true,
          "threshold": 123,
          "thresholdEnabled": true,
          "anyoneWithLinkEnabled": true,
          "anyoneInternalEnabled": true,
          "anonymousAccessEnabled": true,
          "userAccessEnabled": true,
          "userIds": [
            "<string>"
          ],
          "domainAccessEnabled": true
        },
        "broadSharingOptions": {
          "enabled": true,
          "threshold": 123,
          "thresholdEnabled": true,
          "anyoneWithLinkEnabled": true,
          "anyoneInternalEnabled": true,
          "anonymousAccessEnabled": true,
          "userAccessEnabled": true,
          "userIds": [
            "<string>"
          ]
        },
        "sensitiveContentOptions": {
          "sensitiveInfoTypes": [
            {
              "likelihoodThreshold": "LIKELY",
              "infoType": "<string>"
            }
          ],
          "sensitiveTerms": [
            {
              "expression": "<string>",
              "hotwords": [
                {
                  "regex": "<string>",
                  "proximity": {
                    "windowBefore": 123,
                    "windowAfter": 123
                  }
                }
              ]
            }
          ],
          "sensitiveRegexes": [
            {
              "expression": "<string>",
              "hotwords": [
                {
                  "regex": "<string>",
                  "proximity": {
                    "windowBefore": 123,
                    "windowAfter": 123
                  }
                }
              ]
            }
          ]
        },
        "reportName": "<string>",
        "frequency": "<string>",
        "createdBy": {
          "name": "<string>",
          "obfuscatedId": "<string>",
          "metadata": {
            "firstName": "<string>",
            "email": "<string>"
          }
        },
        "createdAt": "<string>",
        "redactQuote": true,
        "autoHideDocs": true,
        "allowlistOptions": {
          "terms": [
            "<string>"
          ]
        }
      },
      "frequency": "ONCE",
      "status": "ACTIVE",
      "createdBy": {
        "name": "<string>",
        "obfuscatedId": "<string>",
        "metadata": {
          "firstName": "<string>",
          "email": "<string>"
        }
      },
      "createdAt": "<string>",
      "lastUpdatedAt": "<string>",
      "autoHideDocs": true,
      "lastScanStatus": "PENDING",
      "lastScanStartTime": "<string>",
      "updatedBy": {
        "name": "<string>",
        "obfuscatedId": "<string>",
        "metadata": {
          "firstName": "<string>",
          "email": "<string>"
        }
      }
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

autoHide
boolean

Filter to return reports with a given value of auto-hide.

frequency
string

Filter to return reports with a given frequency.

Response

200
application/json

OK

The response is of type object.