from glean import Glean
import os


with Glean(
    api_token=os.getenv("GLEAN_API_TOKEN", ""),
) as g_client:

    res = g_client.client.entities.read_people(request={
        "obfuscated_ids": [
            "abc123",
            "abc456",
        ],
    })

    # Handle response
    print(res)
{
  "results": [
    {
      "name": "George Clooney",
      "obfuscatedId": "abc123"
    }
  ],
  "relatedDocuments": [
    {
      "relation": "ATTACHMENT",
      "associatedEntityId": "<string>",
      "querySuggestion": {
        "query": "app:github type:pull author:mortimer",
        "label": "Mortimer's PRs",
        "datasource": "github"
      },
      "documents": [
        {
          "id": "<string>",
          "datasource": "<string>",
          "connectorType": "API_CRAWL",
          "docType": "<string>",
          "content": {
            "fullTextList": [
              "<string>"
            ]
          },
          "containerDocument": {},
          "parentDocument": {},
          "title": "<string>",
          "url": "<string>",
          "metadata": {
            "container": "container",
            "parentId": "JIRA_EN-1337",
            "createTime": "2000-01-23T04:56:07.000Z",
            "datasource": "datasource",
            "author": {
              "name": "name"
            },
            "documentId": "documentId",
            "updateTime": "2000-01-23T04:56:07.000Z",
            "mimeType": "mimeType",
            "objectType": "Feature Request",
            "components": [
              "Backend",
              "Networking"
            ],
            "status": [
              "Done"
            ],
            "customData": {
              "someCustomField": "someCustomValue"
            }
          },
          "sections": [
            {
              "title": "<string>",
              "url": "<string>"
            }
          ]
        }
      ],
      "results": [
        {
          "snippets": [
            {
              "snippet": "snippet",
              "mimeType": "mimeType"
            }
          ],
          "metadata": {
            "container": "container",
            "createTime": "2000-01-23T04:56:07.000Z",
            "datasource": "datasource",
            "author": {
              "name": "name"
            },
            "documentId": "documentId",
            "updateTime": "2000-01-23T04:56:07.000Z",
            "mimeType": "mimeType",
            "objectType": "objectType"
          },
          "title": "title",
          "url": "https://example.com/foo/bar",
          "nativeAppUrl": "slack://foo/bar",
          "mustIncludeSuggestions": [
            {
              "missingTerm": "container",
              "query": "container"
            }
          ]
        }
      ]
    }
  ],
  "errors": [
    "<string>"
  ]
}

Authorizations

Authorization
string
header
required

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

Headers

X-Glean-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
People request

The body is of type object.

Response

200
application/json
OK

The response is of type object.