import requests
url = "https://app.langwatch.ai/api/v1/query/schema"
headers = {"X-Auth-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Auth-Token': '<api-key>'}};
fetch('https://app.langwatch.ai/api/v1/query/schema', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://app.langwatch.ai/api/v1/query/schema \
--header 'X-Auth-Token: <api-key>'{
"database": "<string>",
"functions": [
"<string>"
],
"views": [
{
"name": "<string>",
"description": "<string>",
"grain": "<string>",
"joinKeys": [
"<string>"
],
"timeColumn": "<string>",
"freshness": "<string>",
"columns": [
{
"name": "<string>",
"type": "<string>",
"description": "<string>",
"unit": "<string>",
"gates": [
"input"
],
"available": true
}
],
"exampleSql": "<string>"
}
],
"appFunctions": [
{
"name": "<string>",
"signature": "<string>",
"description": "<string>",
"returns": "<string>",
"encoding": "<string>",
"keyKind": "<string>",
"kind": "extraction",
"cap": 123,
"gates": [
"input"
],
"available": true,
"exampleSql": "<string>"
}
]
}{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"meta": {},
"trace_id": "<string>",
"span_id": "<string>",
"trace": {
"traceId": "<string>",
"spanId": "<string>",
"traceUrl": "<string>",
"logsUrl": "<string>"
},
"tips": [
"<string>"
],
"docs_url": "<string>",
"fault": "customer",
"reasons": [
"<unknown>"
]
}{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"meta": {},
"trace_id": "<string>",
"span_id": "<string>",
"trace": {
"traceId": "<string>",
"spanId": "<string>",
"traceUrl": "<string>",
"logsUrl": "<string>"
},
"tips": [
"<string>"
],
"docs_url": "<string>",
"fault": "customer",
"reasons": [
"<unknown>"
]
}{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"meta": {},
"trace_id": "<string>",
"span_id": "<string>",
"trace": {
"traceId": "<string>",
"spanId": "<string>",
"traceUrl": "<string>",
"logsUrl": "<string>"
},
"tips": [
"<string>"
],
"docs_url": "<string>",
"fault": "customer",
"reasons": [
"<unknown>"
]
}{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"meta": {},
"trace_id": "<string>",
"span_id": "<string>",
"trace": {
"traceId": "<string>",
"spanId": "<string>",
"traceUrl": "<string>",
"logsUrl": "<string>"
},
"tips": [
"<string>"
],
"docs_url": "<string>",
"fault": "customer",
"reasons": [
"<unknown>"
]
}Discover the queryable LangWatchQL schema
Lists the LangWatchQL analytics views this key may query, with each column’s type, description, the permissions that unlock it, and whether this caller holds them — plus each view’s grain, join keys, partition-pruning time column, freshness and a runnable example query. It also lists, under functions, every function name a query may call.
Under appFunctions it lists the app functions a projection may call, each with its signature, the type and encoding of the value it returns, how many distinct keys one run may read, and the permissions it needs.
Scoped to the projects the credential can read and their permissions: a column or app function this key cannot read in every one of them is listed with available: false rather than hidden, so a caller can see what a wider key would unlock.
Any LangWatch API key — project, organization or personal — reaches every project it can read analytics:view on: an organization or personal key spans its projects, a project key its one. Rows from more than one project come back flagged with the MULTI_PROJECT_RESULT diagnostic — to read a single project, filter inside the statement with WHERE TenantId = '<project id>'.
import requests
url = "https://app.langwatch.ai/api/v1/query/schema"
headers = {"X-Auth-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Auth-Token': '<api-key>'}};
fetch('https://app.langwatch.ai/api/v1/query/schema', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://app.langwatch.ai/api/v1/query/schema \
--header 'X-Auth-Token: <api-key>'{
"database": "<string>",
"functions": [
"<string>"
],
"views": [
{
"name": "<string>",
"description": "<string>",
"grain": "<string>",
"joinKeys": [
"<string>"
],
"timeColumn": "<string>",
"freshness": "<string>",
"columns": [
{
"name": "<string>",
"type": "<string>",
"description": "<string>",
"unit": "<string>",
"gates": [
"input"
],
"available": true
}
],
"exampleSql": "<string>"
}
],
"appFunctions": [
{
"name": "<string>",
"signature": "<string>",
"description": "<string>",
"returns": "<string>",
"encoding": "<string>",
"keyKind": "<string>",
"kind": "extraction",
"cap": 123,
"gates": [
"input"
],
"available": true,
"exampleSql": "<string>"
}
]
}{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"meta": {},
"trace_id": "<string>",
"span_id": "<string>",
"trace": {
"traceId": "<string>",
"spanId": "<string>",
"traceUrl": "<string>",
"logsUrl": "<string>"
},
"tips": [
"<string>"
],
"docs_url": "<string>",
"fault": "customer",
"reasons": [
"<unknown>"
]
}{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"meta": {},
"trace_id": "<string>",
"span_id": "<string>",
"trace": {
"traceId": "<string>",
"spanId": "<string>",
"traceUrl": "<string>",
"logsUrl": "<string>"
},
"tips": [
"<string>"
],
"docs_url": "<string>",
"fault": "customer",
"reasons": [
"<unknown>"
]
}{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"meta": {},
"trace_id": "<string>",
"span_id": "<string>",
"trace": {
"traceId": "<string>",
"spanId": "<string>",
"traceUrl": "<string>",
"logsUrl": "<string>"
},
"tips": [
"<string>"
],
"docs_url": "<string>",
"fault": "customer",
"reasons": [
"<unknown>"
]
}{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"meta": {},
"trace_id": "<string>",
"span_id": "<string>",
"trace": {
"traceId": "<string>",
"spanId": "<string>",
"traceUrl": "<string>",
"logsUrl": "<string>"
},
"tips": [
"<string>"
],
"docs_url": "<string>",
"fault": "customer",
"reasons": [
"<unknown>"
]
}Authorizations
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.
Was this page helpful?