Inhalte von Slack abrufen

Abrufen des Inhalts von Slack

Retrieve the contents of a discussion by ID. A discussion can be a Slack or Discord chat.

get

Returns the content of the discussion with the specified ID. A discussion can be a Slack or Discord chat. The response contains two fields: discussion_content, which includes the main messages of the chat, and thread_contents, which contains the threads of the discussion.

Path parameters
discussion_idintegerRequired

The ID of the discussion to retrieve contents for. Discussions are either Slack or Discord chats.

Query parameters
integration_typestringRequired

Indicate the integration of the discussion. Currently, it can only be "slack" or "discord".

fromstringOptional

Indicate the starting time when we want to retrieve the content of the discussion in ISO 8601 format at GMT+0. If not specified, the default time is now.

tostringOptional

Indicate the ending time when we want to retrieve the content of the discussion in ISO 8601 format at GMT+0. If not specified, it is 7 days before the "from" parameter.

Responses
200

Main and threaded messages of the discussion in a time range.

application/json
get
/discussions/{discussion_id}/contents/
GET /api/v1/discussions/{discussion_id}/contents/?integration_type=text HTTP/1.1
Host: api.rememberizer.ai
Accept: */*
{
  "discussion_content": "",
  "thread_contents": {}
}

Beispielanfragen

curl -X GET \
  "https://api.rememberizer.ai/api/v1/discussions/12345/contents/?integration_type=slack&from=2023-06-01T00:00:00Z&to=2023-06-07T23:59:59Z" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Ersetzen Sie YOUR_JWT_TOKEN durch Ihr tatsächliches JWT-Token und 12345 durch eine tatsächliche Diskussions-ID.

Holen Sie sich Slack-Inhalte der letzten Woche

to_date = datetime.now().isoformat() + "Z" from_date = (datetime.now() - timedelta(days=7)).isoformat() + "Z"

get_slack_contents(12345, from_date, to_date)


{% hint style="info" %}
Ersetzen Sie `YOUR_JWT_TOKEN` durch Ihr tatsächliches JWT-Token und `12345` durch eine tatsächliche Diskussions-ID.
{% endhint %}
{% endtab %}
{% endtabs %}

## Pfadparameter

| Parameter       | Typ     | Beschreibung                                                                 |
|-----------------|---------|-----------------------------------------------------------------------------|
| discussion_id   | integer | **Erforderlich.** Die ID des Slack-Kanals oder der Diskussion, für die Inhalte abgerufen werden sollen. |

## Abfrageparameter

| Parameter | Typ | Beschreibung |
|-----------|------|-------------|
| integration_type | string | **Erforderlich.** Setzen Sie auf "slack", um Slack-Inhalte abzurufen. |
| from | string | Startzeit im ISO 8601-Format bei GMT+0. Wenn nicht angegeben, ist der Standard jetzt. |
| to | string | Endzeit im ISO 8601-Format bei GMT+0. Wenn nicht angegeben, sind es 7 Tage vor dem "from"-Parameter. |

## Antwortformat

```json
{
  "discussion_content": "Benutzer A [2023-06-01 10:30:00]: Guten Morgen Team!\nBenutzer B [2023-06-01 10:32:15]: Morgen! Wie geht es allen heute?\n...",
  "thread_contents": {
    "2023-06-01T10:30:00Z": "Benutzer C [2023-06-01 10:35:00]: @Benutzer A Mir geht's gut, danke der Nachfrage!\nBenutzer A [2023-06-01 10:37:30]: Schön zu hören, @Benutzer C!",
    "2023-06-02T14:15:22Z": "Benutzer D [2023-06-02 14:20:45]: Hier ist das Update zum Projekt...\nBenutzer B [2023-06-02 14:25:10]: Danke für das Update!"
  }
}

Fehlerantworten

Statuscode
Beschreibung

404

Diskussion nicht gefunden

500

Interner Serverfehler

Dieser Endpunkt ruft die Inhalte eines Slack-Kanals oder einer direkten Nachrichtenunterhaltung ab. Er gibt sowohl die Hauptnachrichten des Kanals (discussion_content) als auch die threaded Antworten (thread_contents) zurück. Die Daten sind chronologisch organisiert und enthalten Benutzerinformationen, was es einfach macht, den Kontext von Gesprächen zu verstehen.

Die Zeitbereichsparameter ermöglichen es Ihnen, sich auf bestimmte Zeiträume zu konzentrieren, was besonders nützlich ist, um kürzliche Aktivitäten oder historische Diskussionen zu überprüfen.

Last updated