Update database.
ROLES: RESOURCE_WRITE,RESOURCE_ADMIN USER: true SERVICE ACCOUNT: true
curl --request PUT \
--url https://api.revoengine.com/api/v1/databases/{databaseId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"version": 123,
"name": "<string>"
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({version: 123, name: '<string>'})
};
fetch('https://api.revoengine.com/api/v1/databases/{databaseId}', 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/{databaseId}"
payload = {
"version": 123,
"name": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"databaseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"category": "<string>",
"desc": "<string>",
"tags": [
"<string>"
],
"restricted": true,
"audit": true,
"type": "TABLE",
"definition": [
{
"name": "<string>",
"type": "SMALLINT",
"isPrimaryKey": true,
"isArray": true,
"isUnique": true,
"isNullable": true,
"isIndex": true,
"databaseDefinitionId": "<string>",
"desc": "<string>",
"metadata": {},
"default": "<string>",
"foreignReferences": [
{
"reference": [
{
"column": "<string>",
"targetDatabase": "<string>",
"targetColumn": "<string>"
}
],
"onUpdate": "none",
"onDelete": "none"
}
]
}
],
"partition": {},
"groups": [
{}
],
"users": [
{}
],
"parent": "<string>",
"master": "<string>",
"version": 123,
"createdBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"lastUpdateBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lastUpdateAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z",
"deletedBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"metadata": {}
}Authorizations
Bearer JWT token or API Key (sk-*).
Path Parameters
Provide databaseId.
Body
Provide current version.
Enable or disable future row audit capture for the logical table.
Name.
1 - 60Category.
30Description.
1000Replacement 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.
Replacement advanced structured table options.
Show child attributes
Show child attributes
Provide if access should be restricted.
Provide which groups should have access to it, once restricted is true.
Provide which users should have access to it, once restricted is true.
Database definitions.
Show child attributes
Show child attributes
Response
Whether future row mutations are captured for this logical table.
TABLE, TABLE_PARTITIONED Show child attributes
Show child attributes
curl --request PUT \
--url https://api.revoengine.com/api/v1/databases/{databaseId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"version": 123,
"name": "<string>"
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({version: 123, name: '<string>'})
};
fetch('https://api.revoengine.com/api/v1/databases/{databaseId}', 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/{databaseId}"
payload = {
"version": 123,
"name": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"databaseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"category": "<string>",
"desc": "<string>",
"tags": [
"<string>"
],
"restricted": true,
"audit": true,
"type": "TABLE",
"definition": [
{
"name": "<string>",
"type": "SMALLINT",
"isPrimaryKey": true,
"isArray": true,
"isUnique": true,
"isNullable": true,
"isIndex": true,
"databaseDefinitionId": "<string>",
"desc": "<string>",
"metadata": {},
"default": "<string>",
"foreignReferences": [
{
"reference": [
{
"column": "<string>",
"targetDatabase": "<string>",
"targetColumn": "<string>"
}
],
"onUpdate": "none",
"onDelete": "none"
}
]
}
],
"partition": {},
"groups": [
{}
],
"users": [
{}
],
"parent": "<string>",
"master": "<string>",
"version": 123,
"createdBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"lastUpdateBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lastUpdateAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z",
"deletedBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"metadata": {}
}
