Database Views
Create a Database View
Creates a regular or materialized Database View after validating its definition, source access, output columns, ACL, quota, and materialization settings. The exact request contract is generated below.
POST
/
api
/
v1
/
databases
/
views
Create a Database View
curl --request POST \
--url https://api.revoengine.com/api/v1/databases/views \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"restricted": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', restricted: true})
};
fetch('https://api.revoengine.com/api/v1/databases/views', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.revoengine.com/api/v1/databases/views"
payload = {
"name": "<string>",
"restricted": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Authorizations
Bearer JWT token or API Key (sk-*).
Body
application/json
Available options:
STRUCTURED, RAW_SQL Available options:
VIEW, MATERIALIZED_VIEW Optional filters, fields, sorting and paging applied over the preview output.
Required range:
0 <= x <= 1000Optional resource metadata. Values may use any JSON type. Maximum 16 KiB and 64 top-level keys. Top-level keys starting with "__" are reserved for backend use.
Example:
{ "costCenter": "ops" }
Structured composite, expression, covering, or partial indexes created on materialized output.
Show child attributes
Show child attributes
Response
201
⌘I
Create a Database View
curl --request POST \
--url https://api.revoengine.com/api/v1/databases/views \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"restricted": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', restricted: true})
};
fetch('https://api.revoengine.com/api/v1/databases/views', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.revoengine.com/api/v1/databases/views"
payload = {
"name": "<string>",
"restricted": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
