Skip to contentSkip to page list

Docs

Create a dashboard

Creates an empty dashboard in the key's project. Add widgets to it with POST /api/v1/dashboards/{dashboardId}/widgets.

POST/api/v1/dashboards
Request and response examples
request.py
import osimport requests​origin = "https://app.langwatch.ai"path = "/api/v1/dashboards"api_key = os.environ["LANGWATCH_API_KEY"]headers = {    "X-Auth-Token": api_key,    "Content-Type": "application/json",}payload = {}​response = requests.post(    origin + path,    headers=headers,    json=payload,)print(response.json())

The dashboard was created

application/json · Generated from schema

{  "id": "string",  "name": "string",  "description": "string",  "scope": "PRIVATE",  "createdById": "string",  "createdAt": "string",  "updatedAt": "string",  "platformUrl": "string"}
api-reference/dashboards/create-a-dashboard

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.

Request body

application/json · Required

namestringrequired
At least 1 characterUp to 255 characters

Responses

201

The dashboard was created

application/json

idstringrequired
At least 1 character
namestringrequired
At least 1 characterUp to 255 characters
descriptionstring | nullrequired
scopestringrequired
One of"PRIVATE""PROJECT""ORGANIZATION"
createdByIdstring | nullrequired
createdAtstringrequired
updatedAtstringrequired
platformUrlstringrequired
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[]
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