Create database.
ROLES: RESOURCE_WRITE,RESOURCE_ADMIN USER: true SERVICE ACCOUNT: true
curl --request POST \
--url https://api.revoengine.com/api/v1/databases \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>'})
};
fetch('https://api.revoengine.com/api/v1/databases', 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"
payload = { "name": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(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-*).
Body
Name.
Capture future row inserts, updates, and deletes in database audit history.
Category.
30Description.
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.
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
Name.
1 - 60Expected immutable ID of the parent selected by name. Requires parent; rejects a stale selection after rename or name reuse.
Partition configuration.
Show child attributes
Show child attributes
Advanced structured table options, including composite, expression, covering, and partial indexes.
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 POST \
--url https://api.revoengine.com/api/v1/databases \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>'})
};
fetch('https://api.revoengine.com/api/v1/databases', 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"
payload = { "name": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(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": {}
}
