Skip to main content
GET
/
api
/
v1
/
insights
Typescript (SDK)
import { SyllableSDK } from "syllable-sdk";

const syllableSDK = new SyllableSDK({
  apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
});

async function run() {
  const result = await syllableSDK.insights.list({
    page: 0,
    searchFields: [
      "upload_file_id",
    ],
    searchFieldValues: [
      "Some Object Name",
    ],
    startDatetime: "2023-01-01T00:00:00Z",
    endDatetime: "2024-01-01T00:00:00Z",
  });

  console.log(result);
}

run();
{
  "items": [
    {
      "id": 123,
      "insight_tool_id": 123,
      "insight_tool_version": 123,
      "insight_key": "<string>",
      "json_value": {},
      "session_id": 12341,
      "upload_file_id": 12535,
      "string_value": "This is a summary of the call",
      "numeric_value": 1,
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "upload_file_metadata": "<unknown>"
    }
  ],
  "page": 123,
  "page_size": 123,
  "total_pages": 4,
  "total_count": 100
}

Authorizations

Syllable-API-Key
string
header
required

Query Parameters

page
integer | null
default:0

The page number from which to start (0-based)

Required range: x >= 0
Example:

0

limit
integer
default:25

The maximum number of items to return

Required range: x >= 0
Example:

25

search_fields
enum<string>[]

String names of fields to search. Correspond by index to search field values

Available options:
id,
session_id,
upload_file_id,
workflow_id,
upload_folder_id,
insight_key,
insight_tool_id
Example:

"name"

search_field_values
string[]

Values of fields to search. Correspond by index to search fields. Unless field name contains "list", an individual search field value cannot be a list

Example:

"Some Object Name"

order_by
enum<string> | null

The field whose value should be used to order the results

Available options:
id,
session_id,
upload_file_id,
workflow_id,
upload_folder_id,
insight_key,
insight_tool_id
Example:

"name"

order_by_direction
enum<string> | null

The direction in which to order the results The direction in which to order list results, either ascending or descending.

Available options:
asc,
desc
fields
enum<string>[] | null

The fields to include in the response

Available options:
id,
session_id,
upload_file_id,
workflow_id,
upload_folder_id,
insight_key,
insight_tool_id
start_datetime
string | null

The start datetime for filtering results

Example:

"2023-01-01T00:00:00Z"

end_datetime
string | null

The end datetime for filtering results

Example:

"2024-01-01T00:00:00Z"

Response

Successful Response

items
InsightsOutput · object[]
required

List of items returned from the query

page
integer
required

The page number of the results (0-based)

Example:

0

page_size
integer
required

The number of items returned per page

Example:

25

total_pages
integer | null

The total number of pages of results given the indicated page size

Example:

4

total_count
integer | null

The total number of items returned from the query

Example:

100