Create a View
Create a view.
A view is a tabular projection over the transformations produced by
one or more functions. Each column declares a valueSchemaPath — a JSON
Pointer path into the function's output schema — and the view can
additionally carry filters and aggregations.
Supported for every function type that produces correctable
transformations and an output schema: extract, transform, analyze,
join. Extract works on both vision (PDF/PNG/JPEG/HEIC/HEIF/WebP) and
OCR-routed inputs — the resulting rows surface through views uniformly.
The new view is created at versionNum: 1. Subsequent updates produce
new versions; the version-1 configuration remains addressable.
Authorization
API Key Authenticate using API Key in request header
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://api.bem.ai/v3/views" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "columns": [ { "name": "string", "valueSchemaPath": [ "string" ], "displayOrderIndex": 0 } ], "filters": [ { "columnName": "string", "filterType": "equals_string" } ], "aggregations": [ { "name": "string", "function": "count" } ], "functions": [ {} ] }'{
"viewID": "string",
"name": "string",
"description": "string",
"currentVersionNum": 0,
"columns": [
{
"name": "string",
"valueSchemaPath": [
"string"
],
"displayOrderIndex": 0
}
],
"filters": [
{
"columnName": "string",
"filterType": "equals_string",
"string": "string",
"number": 0.1
}
],
"aggregations": [
{
"name": "string",
"function": "count",
"aggregateColumnName": "string",
"groupByColumnName": "string",
"displayType": "table"
}
],
"functions": [
{
"id": "string",
"name": "string"
}
]
}