GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — api-client-python/docs/sdks/messages/README.md at main · gleanwork/api-client-python

Expand file tree

/

README.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
55 lines (37 loc) · 10.2 KB
/

README.md

Copy path

File metadata and controls

55 lines (37 loc) · 10.2 KB
Raw
Copy raw file
Download raw file
Outline
Edit and raw actions

Client.Messages

Overview

Available Operations

  • retrieve - Read messages

retrieve

Retrieves list of messages from messaging/chat datasources (e.g. Slack, Teams).

Example Usage

from glean.api_client import Glean, models
import os


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

    res = glean.client.messages.retrieve(id_type=models.IDType.CONVERSATION_ID, id="<id>", datasource=models.Datasource.GCHAT)

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
id_type models.IDType ✔️ Type of the id in the incoming request.
id str ✔️ ID corresponding to the requested idType. Note that channel and threads are represented by the underlying datasource's ID and conversations are represented by their document's ID.
datasource models.Datasource ✔️ The type of the data source.
locale Optional[str] ➖ The client's preferred locale in rfc5646 format (e.g. en, ja, pt-BR). If omitted, the Accept-Language will be used. If not present or not supported, defaults to the closest match or en.
workspace_id Optional[str] ➖ Id for the for the workspace in case of multiple workspaces.
direction Optional[models.Direction] ➖ The direction of the results asked with respect to the reference timestamp. Missing field defaults to OLDER. Only applicable when using a message_id.
timestamp_millis Optional[int] ➖ Timestamp in millis of the reference message. Only applicable when using a message_id.
include_root_message Optional[bool] ➖ Whether to include root message in response.
datasource_instance_display_name Optional[str] ➖ The datasource instance display name from which the document was extracted. This is used for appinstance facet filter for datasources that support multiple instances.
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.MessagesResponse

Errors

Error Type Status Code Content Type
errors.GleanError 4XX, 5XX */*
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.