Database Views
Update a Database View
Revalidates and transactionally rebuilds a Database View. The version field provides optimistic concurrency; stale versions fail instead of overwriting a newer definition.
PUT
/
api
/
v1
/
databases
/
views
/
{databaseViewId}
Update a Database View
curl --request PUT \
--url https://api.revoengine.com/api/v1/databases/views/{databaseViewId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"restricted": true,
"version": 123
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', restricted: true, version: 123})
};
fetch('https://api.revoengine.com/api/v1/databases/views/{databaseViewId}', 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/{databaseViewId}"
payload = {
"name": "<string>",
"restricted": True,
"version": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)Authorizations
Bearer JWT token or API Key (sk-*).
Path Parameters
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
200
⌘I
Update a Database View
curl --request PUT \
--url https://api.revoengine.com/api/v1/databases/views/{databaseViewId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"restricted": true,
"version": 123
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', restricted: true, version: 123})
};
fetch('https://api.revoengine.com/api/v1/databases/views/{databaseViewId}', 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/{databaseViewId}"
payload = {
"name": "<string>",
"restricted": True,
"version": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)
