GET
/
api
/
v1
/
sessions
/
latency
/
{session_id}
import os
from syllable_sdk import SyllableSDK


with SyllableSDK(
    api_key_header=os.getenv("SYLLABLESDK_API_KEY_HEADER", ""),
) as ss_client:

    res = ss_client.sessions.latency.get_by_id(session_id="<id>")

    # Handle response
    print(res)
{
  "session_id": "<string>",
  "timeline": [
    {
      "timestamp": "2023-11-07T05:31:56Z",
      "measurement_start": "2023-11-07T05:31:56Z",
      "category": "tts",
      "label": "<string>",
      "metadata": [
        "<string>"
      ],
      "unit_type": "minutes",
      "value": 123,
      "value_str": "<string>",
      "time_delta": "<string>"
    }
  ],
  "summary": [
    {
      "category": "tts",
      "sub_category": "<string>",
      "event_count": 123,
      "sum_ms": 123,
      "sum_str": "<string>",
      "average_ms": 123,
      "average_str": "<string>"
    }
  ]
}

Authorizations

Syllable-API-Key
string
header
required

Path Parameters

session_id
string
required

Response

200
application/json
Successful Response

This is a report of the time spent in each operation during this session. It contains a timeline, which lists the operations in the order they were executed, and a summary, which aggregates the operations by category and sub-category.

session_id
string
required
timeline
object[]
required

Data model for latency entries.

summary
object[]

A summary entry is an aggregation of latency entries by category and sub-category. It contains the total and average latency for each category.