Indexing API
- Documents
- Permissions
- Troubleshooting
- Datasources
- Authentication
- People
- Shortcuts
Client API
- Activity
- Announcements
- Answers
- Authentication
- Calendar
- Chat
- Agents
- Collections
- Displayable Lists
- Documents
- Images
- Insights
- Messages
- Pins
- Search
- Entities
- Shortcuts
- Summarize
- Tools
- User
- Verification
Actions API
- Authentication
- Setup
Read document analytics
Read the document analytics information for the given list of Glean Document IDs or URLs specified in the request
curl --request POST \
--url https://{domain}-be.glean.com/rest/api/v1/getdocumentanalytics \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"documentSpecs": [
{
"url": "<string>"
}
],
"dayRange": {
"minDaysFromNow": 123,
"maxDaysFromNow": 123,
"start": {
"epochSeconds": 123,
"daysFromNow": 123
},
"end": {
"epochSeconds": 123,
"daysFromNow": 123
}
},
"withClickerCounts": true,
"withImpressionCounts": true,
"withFacetAggregations": true,
"withVisitCounts": true
}'
{
"results": [
{
"documentSpec": {
"url": "<string>"
},
"visitorCount": {
"count": 123,
"period": {
"minDaysFromNow": 123,
"maxDaysFromNow": 123,
"start": {
"epochSeconds": 123,
"daysFromNow": 123
},
"end": {
"epochSeconds": 123,
"daysFromNow": 123
}
},
"org": "<string>"
},
"clickerCount": {
"count": 123,
"period": {
"minDaysFromNow": 123,
"maxDaysFromNow": 123,
"start": {
"epochSeconds": 123,
"daysFromNow": 123
},
"end": {
"epochSeconds": 123,
"daysFromNow": 123
}
},
"org": "<string>"
},
"userImpressionCount": {
"count": 123,
"period": {
"minDaysFromNow": 123,
"maxDaysFromNow": 123,
"start": {
"epochSeconds": 123,
"daysFromNow": 123
},
"end": {
"epochSeconds": 123,
"daysFromNow": 123
}
},
"org": "<string>"
},
"visitCount": {
"count": 123,
"period": {
"minDaysFromNow": 123,
"maxDaysFromNow": 123,
"start": {
"epochSeconds": 123,
"daysFromNow": 123
},
"end": {
"epochSeconds": 123,
"daysFromNow": 123
}
},
"org": "<string>"
},
"facetAnalytics": [
{
"facet": {
"fieldName": "type",
"values": [
{
"value": "Spreadsheet",
"relationType": "EQUALS"
},
{
"value": "Presentation",
"relationType": "EQUALS"
}
]
},
"analytics": {}
}
]
}
]
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Headers
Email address of a user on whose behalf the request is intended to be made (should be non-empty only for global tokens).
Auth type being used to access the endpoint (should be non-empty only for global tokens).
Body
The specification for the documents for which analytics will be retrieved.
The URL of the document.
The time range analytics is asked for.
DEPRECATED - The number of days from now in the past to define upper boundary of time period.
DEPRECATED - The number of days from now in the past to define lower boundary of time period.
Whether response should include click information or not. Default is to not include click information.
Whether response should include impression information or not. Default is to not include impression information.
Whether the results will include aggregate counts/info for facets like location, department, etc.
Whether response should include visit counts or not. Default is to return only visitor counts.
Response
Analytics for requested documents. There will be one-to-one mapping for documents included in the request.
Number of visitors to the document. The visits do not need to be explicit (e.g. click), may also include other user actions that we deem as high probablity visit (e.g. seen without any user actions).
The counter value
DEPRECATED - The number of days from now in the past to define upper boundary of time period.
DEPRECATED - The number of days from now in the past to define lower boundary of time period.
The unit of organization over which we did the count aggregation, e.g. org (department) or company
Number of explicit clickers Glean knows about from its surfaces.
The counter value
DEPRECATED - The number of days from now in the past to define upper boundary of time period.
DEPRECATED - The number of days from now in the past to define lower boundary of time period.
The unit of organization over which we did the count aggregation, e.g. org (department) or company
Number of unique user impressions.
The counter value
DEPRECATED - The number of days from now in the past to define upper boundary of time period.
DEPRECATED - The number of days from now in the past to define lower boundary of time period.
The unit of organization over which we did the count aggregation, e.g. org (department) or company
Number of visits to the document. The visits do not need to be explicit (e.g. click), may also include other user actions that we deem as high probablity visit (e.g. seen without any user actions).
The counter value
DEPRECATED - The number of days from now in the past to define upper boundary of time period.
DEPRECATED - The number of days from now in the past to define lower boundary of time period.
The unit of organization over which we did the count aggregation, e.g. org (department) or company
"owner"
Within a single FacetFilter, the values are to be treated like an OR. For example, fieldName type with values [EQUALS Presentation, EQUALS Spreadsheet] means we want to show a document if it's a Presentation OR a Spreadsheet.
"Spreadsheet"
EQUALS
, ID_EQUALS
, LT
, GT
"EQUALS"
DEPRECATED - please use relationType instead
Indicates the value of a facet, if any, that the given facet is grouped under. This is only used for nested facets, for example, fieldName could be owner and groupName would be Spreadsheet if showing all owners for spreadsheets as a nested facet.
"Spreadsheet"
{
"fieldName": "type",
"values": [
{
"value": "Spreadsheet",
"relationType": "EQUALS"
},
{
"value": "Presentation",
"relationType": "EQUALS"
}
]
}
The URL of the document.
Number of visitors to the document. The visits do not need to be explicit (e.g. click), may also include other user actions that we deem as high probablity visit (e.g. seen without any user actions).
The counter value
The unit of organization over which we did the count aggregation, e.g. org (department) or company
Number of explicit clickers Glean knows about from its surfaces.
The counter value
The unit of organization over which we did the count aggregation, e.g. org (department) or company
Number of unique user impressions.
The counter value
The unit of organization over which we did the count aggregation, e.g. org (department) or company
Number of visits to the document. The visits do not need to be explicit (e.g. click), may also include other user actions that we deem as high probablity visit (e.g. seen without any user actions).
curl --request POST \
--url https://{domain}-be.glean.com/rest/api/v1/getdocumentanalytics \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"documentSpecs": [
{
"url": "<string>"
}
],
"dayRange": {
"minDaysFromNow": 123,
"maxDaysFromNow": 123,
"start": {
"epochSeconds": 123,
"daysFromNow": 123
},
"end": {
"epochSeconds": 123,
"daysFromNow": 123
}
},
"withClickerCounts": true,
"withImpressionCounts": true,
"withFacetAggregations": true,
"withVisitCounts": true
}'
{
"results": [
{
"documentSpec": {
"url": "<string>"
},
"visitorCount": {
"count": 123,
"period": {
"minDaysFromNow": 123,
"maxDaysFromNow": 123,
"start": {
"epochSeconds": 123,
"daysFromNow": 123
},
"end": {
"epochSeconds": 123,
"daysFromNow": 123
}
},
"org": "<string>"
},
"clickerCount": {
"count": 123,
"period": {
"minDaysFromNow": 123,
"maxDaysFromNow": 123,
"start": {
"epochSeconds": 123,
"daysFromNow": 123
},
"end": {
"epochSeconds": 123,
"daysFromNow": 123
}
},
"org": "<string>"
},
"userImpressionCount": {
"count": 123,
"period": {
"minDaysFromNow": 123,
"maxDaysFromNow": 123,
"start": {
"epochSeconds": 123,
"daysFromNow": 123
},
"end": {
"epochSeconds": 123,
"daysFromNow": 123
}
},
"org": "<string>"
},
"visitCount": {
"count": 123,
"period": {
"minDaysFromNow": 123,
"maxDaysFromNow": 123,
"start": {
"epochSeconds": 123,
"daysFromNow": 123
},
"end": {
"epochSeconds": 123,
"daysFromNow": 123
}
},
"org": "<string>"
},
"facetAnalytics": [
{
"facet": {
"fieldName": "type",
"values": [
{
"value": "Spreadsheet",
"relationType": "EQUALS"
},
{
"value": "Presentation",
"relationType": "EQUALS"
}
]
},
"analytics": {}
}
]
}
]
}