Required role: | User |
GET | /sessions/{sessionId}/transcript |
---|
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ChatTranscriptMessage:
date: Optional[str] = None
from_: Optional[str] = field(metadata=config(field_name='from'), default=None)
body: Optional[str] = None
media_uri: Optional[str] = None
media_content_type: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetChatTranscriptResponse:
messages: Optional[List[ChatTranscriptMessage]] = None
# @Api(Description="Gets the specified transcript")
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetChatTranscript(IGet):
"""
Gets the specified transcript
"""
# @ApiMember(Description="the session whose transcript you want to get")
session_id: Optional[str] = None
"""
the session whose transcript you want to get
"""
# @ApiMember(Description="Include previous messages from this chat party")
include_historical: Optional[bool] = None
"""
Include previous messages from this chat party
"""
# @ApiMember(Description="How far back to include in historical messages. Max 6 months in past")
historical_cut_off_date: Optional[str] = None
"""
How far back to include in historical messages. Max 6 months in past
"""
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /sessions/{sessionId}/transcript HTTP/1.1 Host: team.evovoice.io Accept: text/jsv
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { messages: [ { date: String, from: String, body: String, mediaUri: String, mediaContentType: String } ] }