View Operations

get
Get View Data

https://api.sentenai.com/views/<view-name>/data
The shape of the "events" returned is highly dependent on the particular view. The fields specified during view creation will be present in the returned data.
Request
Response
Request
Path Parameters
view-name
required
string
Name of view
Headers
Auth-Key
required
string
Your Sentenai API key
Query Parameters
limit
optional
integer
Maximum number of events returned
start
optional
string
Only find spans after this timestamp
end
optional
string
Only find spans before this timestamp
sort
optional
number
Sort data "asc" or "desc"
Response
200: OK
{
"events": [
{
"duration": null,
"event": {
"weather:dewPoint": 25.34
},
"id": "GpWlKdKZoWBQd6WOthPHaJCt",
"stream": "7bb66c221bde0e5a",
"ts": "2010-01-01T00:00:00Z"
},
{
"duration": null,
"event": {
"weather:dewPoint": 22.45
},
"id": "Yq0ZPweLA9SNKsn6rxlpcgMD",
"stream": "7bb66c221bde0e5a",
"ts": "2010-01-02T00:00:00Z"
}
],
"streams": {
"7bb66c221bde0e5a": {
"projection": {
"weather:dewPoint": [
{
"var": [
"event",
"dewPoint"
]
}
]
},
"stream": {
"filter": {
"expr": true
},
"name": "weather"
}
}
}
}

get
Get List of Named Views

https://api.sentenai.com/views
Request
Response
Request
Headers
Auth-Key
required
string
Your Sentenai API key
Query Parameters
desc
optional
string
Filter list by regex matching view `description`.
name
optional
string
Filter list by regex matching view `name`.
limit
optional
integer
Maximum number of views returned.
containing
optional
string
The name of a stream. Filters list of views to those containing this stream.
Response
200: OK
[
{
"anonymous": false,
"created": "2019-03-28T17:36:37.951819011Z",
"description": "",
"name": "my-view",
"streams": [
{
"filter": {
"expr": true
},
"name": "weather"
}
],
"view": {
"projection": {
"dew": [
{
"var": [
"event",
"dewPoint"
]
}
]
},
"stream": {
"filter": {
"expr": true
},
"name": "weather"
}
}
}
]

get
Get View by Name

https://api.sentenai.com/views/<view-name>
Request
Response
Request
Path Parameters
view-name
required
string
Name of view
Headers
Auth-Key
required
string
Your Sentenai API key
Response
200: OK
{
"anonymous": false,
"created": "2019-03-28T17:36:37.951819011Z",
"description": "",
"name": "my-view",
"streams": [
{
"filter": {
"expr": true
},
"name": "weather"
}
],
"view": {
"projection": {
"dew": [
{
"var": [
"event",
"dewPoint"
]
}
]
},
"stream": {
"filter": {
"expr": true
},
"name": "weather"
}
}
}
404: Not Found
The given view name doesn't exist.
{
"code": 404
}

delete
Delete View by Name

https://api.sentenai.com/views/<view-name>
Request
Response
Request
Path Parameters
view-name
optional
string
Name of view
Headers
Auth-Key
required
string
Your Sentenai API key
Response
204: No Content
‚Äč