Skip to contentSkip to page list

Docs

List a dashboard's widgets

Lists the widgets on one dashboard, each with its React source and named queries.

GET/api/v1/dashboards/{dashboardId}/widgets
Request and response examples
request.py
import osimport requests​origin = "https://app.langwatch.ai"path = "/api/v1/dashboards/<dashboardId>/widgets"api_key = os.environ["LANGWATCH_API_KEY"]headers = {    "X-Auth-Token": api_key,}​response = requests.get(    origin + path,    headers=headers,)print(response.json())

The dashboard's widgets

application/json · Generated from schema

{  "data": [    {      "id": "string",      "name": "string",      "definition": {        "version": 0,        "code": "string",        "queries": [          {            "name": null,            "sql": null,            "parameters": null,            "sources": null,            "projects": null          }        ],        "description": "string",        "prompt": "string",        "source": {          "kind": null,          "catalogueId": null        }      },      "createdAt": "string",      "updatedAt": "string",      "platformUrl": "string",      "dashboardId": "string",      "gridColumn": -9007199254740991,      "gridRow": -9007199254740991,      "colSpan": -9007199254740991,      "rowSpan": -9007199254740991    }  ]}
api-reference/dashboards/list-a-dashboard-s-widgets

Authorization

X-Auth-Tokenstringheaderrequired

Project API key for sending traces and accessing project-scoped resources. Format: sk-lw-... (no underscore). Obtain one by creating a project via the Admin API or the LangWatch UI.

Path parameters

dashboardIdstringrequired
At least 1 character

Responses

200

The dashboard's widgets

application/json

dataobject[]required
idstringrequired
namestringrequired
definitionobjectrequired
createdAtstringrequired
updatedAtstringrequired
platformUrlstringrequired
dashboardIdstring | nullrequired
gridColumnintegerrequired
Minimum -9007199254740991Maximum 9007199254740991
gridRowintegerrequired
Minimum -9007199254740991Maximum 9007199254740991
colSpanintegerrequired
Minimum -9007199254740991Maximum 9007199254740991
rowSpanintegerrequired
Minimum -9007199254740991Maximum 9007199254740991
400

Bad Request

application/json

typestringrequired
codestringrequired
messagestringrequired
retryablebooleanrequired
metaobject
trace_idstring
span_idstring
traceobject
traceIdstring
spanIdstring
traceUrlstring
logsUrlstring
tipsstring[]
docs_urlstring
faultstring
One of"customer""platform""provider""presumed_platform"
reasonsany[]
401

Unauthorized

application/json

typestringrequired
codestringrequired
messagestringrequired
retryablebooleanrequired
metaobject
trace_idstring
span_idstring
traceobject
traceIdstring
spanIdstring
traceUrlstring
logsUrlstring
tipsstring[]
docs_urlstring
faultstring
One of"customer""platform""provider""presumed_platform"
reasonsany[]
403

Forbidden

application/json

typestringrequired
codestringrequired
messagestringrequired
retryablebooleanrequired
metaobject
trace_idstring
span_idstring
traceobject
traceIdstring
spanIdstring
traceUrlstring
logsUrlstring
tipsstring[]
docs_urlstring
faultstring
One of"customer""platform""provider""presumed_platform"
reasonsany[]
404

No dashboard with this id for this key. A dashboard made by POST /api/v1/analytics/reports is an Analytics Report and is not found here.

application/json

typestringrequired
codestringrequired
messagestringrequired
retryablebooleanrequired
metaobject
trace_idstring
span_idstring
traceobject
traceIdstring
spanIdstring
traceUrlstring
logsUrlstring
tipsstring[]
docs_urlstring
faultstring
One of"customer""platform""provider""presumed_platform"
reasonsany[]
500

Internal Server Error

application/json

typestringrequired
codestringrequired
messagestringrequired
retryablebooleanrequired
metaobject
trace_idstring
span_idstring
traceobject
traceIdstring
spanIdstring
traceUrlstring
logsUrlstring
tipsstring[]
docs_urlstring
faultstring
One of"customer""platform""provider""presumed_platform"
reasonsany[]

Documentation