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

Authorization
string
header
required

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

Headers

X-Scio-Actas
string

Email address of a user on whose behalf the request is intended to be made (should be non-empty only for global tokens).

X-Glean-Auth-Type
string

Auth type being used to access the endpoint (should be non-empty only for global tokens).

Body

application/json
Information about analytics requested.
documentSpecs
object[]
required

The specification for the documents for which analytics will be retrieved.

dayRange
object
required

The time range analytics is asked for.

withClickerCounts
boolean

Whether response should include click information or not. Default is to not include click information.

withImpressionCounts
boolean

Whether response should include impression information or not. Default is to not include impression information.

withFacetAggregations
boolean

Whether the results will include aggregate counts/info for facets like location, department, etc.

withVisitCounts
boolean

Whether response should include visit counts or not. Default is to return only visitor counts.

Response

200
application/json
OK
results
object[]

Analytics for requested documents. There will be one-to-one mapping for documents included in the request.