Reporting activity for datasource documents

We allow the option of allowing developers to push activity information for documents (VIEW, EDIT etc.) - that will be used for better ranking of documents for search.

Getting started with the activity endpoint

First note that, the activity endpoint needs to be called with a client API bearer token (as opposed to an indexing API bearer token for other endpoints). This is because, we expect activity to be provided server-to-server on a per-user basis (eg. when a user views a document from a custom datasource, you may report this view back to us from your server).

For pushing activity for any user from your organization, we need a Global client API token scoped to ACTIVITY.

To fetch a scoped client API token, please follow the instructions in the Authentication page for Client API.

Making your first request

Below is a sample activity request for a given user (who needs to be specified in the X-Scio-Actas param).

We record 2 view events: One for and another for We specify the datasource in the params field (so it is correctly matched to the relevant document) and optionally, we also mention the duration of the view if available.

curl -i -X POST \
  '' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'X-Scio-Actas:' \
  -d '{
    "events": [
        "url": "",
        "action": "VIEW",
        "timestamp": "2023-04-05T04:56:07.000Z"
        "params": {
            "datasource": "testdatasource"
        "url": "",
        "action": "VIEW",
        "timestamp": "2023-04-04T04:56:07.000Z",
        "params": {
          "duration": 20,
          "referrer": ""
          "datasource": "testdatasource2"