Skip to content
Support

Get a taxonomy run

client.taxonomy.runs.retrieve(stringrunID, RunRetrieveParams { tenant_id } query, RequestOptionsoptions?): Run { id, cluster_count, created_at, 17 more }
GET/v1/taxonomy/runs/{run_id}

Returns a single taxonomy run by ID, scoped to the tenant. Returns 404 if the run does not belong to the tenant.

ParametersExpand Collapse
runID: string
formatuuid
query: RunRetrieveParams { tenant_id }
tenant_id: string

Tenant that owns the run.

minLength1
maxLength255
ReturnsExpand Collapse
Run { id, cluster_count, created_at, 17 more }

A persisted taxonomy generation run.

id: string
formatuuid
cluster_count: number
formatint64
created_at: string
formatdate-time
embedding_count: number
formatint64
field_id: string
node_count: number
formatint64
record_count: number
formatint64
scope_type: "field" | "directory"

Taxonomy input scope. field covers one (source_type, source_id, field_id) field scope. directory covers all text feedback records for the tenant/directory and must not include source_type, source_id, or field_id.

Accepts one of the following:
"field"
"directory"
source_id: string

Empty string is the canonical "no source" bucket.

source_type: string
status: "pending" | "running" | "succeeded" | 2 more

Lifecycle state of a taxonomy run. Allowed transitions are pending -> running|failed|canceled and running -> succeeded|failed|canceled.

Accepts one of the following:
"pending"
"running"
"succeeded"
"failed"
"canceled"
tenant_id: string
updated_at: string
formatdate-time
error?: string

Sanitized failure message; present on failed runs.

error_code?: "insufficient_data" | "service_unavailable" | "generation_failed" | 2 more

Machine-readable reason a taxonomy run failed or a prerequisite was not met.

Accepts one of the following:
"insufficient_data"
"service_unavailable"
"generation_failed"
"invalid_output"
"internal_error"
field_label?: string

Human-readable field label; absent when unknown.

finished_at?: string
formatdate-time
metrics?: Record<string, unknown>

Opaque run metrics recorded by the taxonomy service.

params?: Record<string, unknown>

Opaque run parameters recorded by Hub.

started_at?: string
formatdate-time

Get a taxonomy run

import FormbricksHub from '@formbricks/hub';

const client = new FormbricksHub({
  apiKey: process.env['HUB_API_KEY'], // This is the default and can be omitted
});

const run = await client.taxonomy.runs.retrieve('019f177f-9aa3-705e-8195-cea2aa187268', {
  tenant_id: 'org-123',
});

console.log(run.id);
{
  "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "cluster_count": 0,
  "created_at": "2019-12-27T18:11:19.117Z",
  "embedding_count": 0,
  "field_id": "field_id",
  "node_count": 0,
  "record_count": 0,
  "scope_type": "field",
  "source_id": "source_id",
  "source_type": "source_type",
  "status": "pending",
  "tenant_id": "tenant_id",
  "updated_at": "2019-12-27T18:11:19.117Z",
  "error": "error",
  "error_code": "insufficient_data",
  "field_label": "field_label",
  "finished_at": "2019-12-27T18:11:19.117Z",
  "metrics": {
    "foo": "bar"
  },
  "params": {
    "foo": "bar"
  },
  "started_at": "2019-12-27T18:11:19.117Z"
}
Returns Examples
{
  "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "cluster_count": 0,
  "created_at": "2019-12-27T18:11:19.117Z",
  "embedding_count": 0,
  "field_id": "field_id",
  "node_count": 0,
  "record_count": 0,
  "scope_type": "field",
  "source_id": "source_id",
  "source_type": "source_type",
  "status": "pending",
  "tenant_id": "tenant_id",
  "updated_at": "2019-12-27T18:11:19.117Z",
  "error": "error",
  "error_code": "insufficient_data",
  "field_label": "field_label",
  "finished_at": "2019-12-27T18:11:19.117Z",
  "metrics": {
    "foo": "bar"
  },
  "params": {
    "foo": "bar"
  },
  "started_at": "2019-12-27T18:11:19.117Z"
}