Skip to content

Latest commit

 

History

History
49 lines (30 loc) · 5.11 KB

File metadata and controls

49 lines (30 loc) · 5.11 KB

Entities

Overview

Available Operations

get_person_photo

Returns the profile photo bytes for a person whose photo is stored in Glean (crawled from an identity source or user-uploaded via admin console). Photos hosted externally (e.g. Slack CDN) are not served by this endpoint; callers should follow the photoUrl from /people or /listentities directly. Responses include a Cache-Control header (max-age=3600) to reduce redundant fetches.

Example Usage

from glean.api_client import Glean
import os


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

    res = glean.entities.get_person_photo(person_id="<id>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
person_id str ✔️ The obfuscated ID of the person whose photo to retrieve.
ds Optional[str] Optional datasource override for crawled photos (e.g. AZURE, GDRIVE, OKTA). When omitted, the datasource is derived from the person's stored photo URL or the deployment's primary person datasource.
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.GetPersonPhotoResponse

Errors

Error Type Status Code Content Type
errors.GleanError 4XX, 5XX */*