GET
/
rest
/
api
/
v1
/
governance
/
data
/
policies
/
{id}
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.retrieve(id="<id>")

    # Handle response
    print(res)
{
  "report": {
    "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.

Path Parameters

id
string
required

The id of the policy to fetch.

Query Parameters

version
integer

The version of the policy to fetch. Each time a policy is updated, the older version is still stored. If this is left empty, the latest policy is fetched.

Response

200
application/json

OK

The response is of type object.