Indexing API
- Documents
- Permissions
- Troubleshooting
- Datasources
- Authentication
- People
- Shortcuts
Client API
- Activity
- Announcements
- Answers
- Authentication
- Chat
- Agents
- Collections
- Documents
- Insights
- Messages
- Pins
- Search
- Entities
- Shortcuts
- Summarize
- Verification
- Governance
Governance
Gets specified Policy.
Fetches the specified policy version, or the latest if no version is provided.
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
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
The id of the policy to fetch.
Query Parameters
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
.
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>"
}
}
}
}