Databases
Create database.
Roles: RESOURCE_WRITE, RESOURCE_ADMIN
User access: Yes.
Service account access: Yes.
POST
/
api
/
v1
/
databases
Create database.
curl --request POST \
--url https://api.revoengine.com/api/v1/databases \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'idempotency-key: <idempotency-key>' \
--data '
{
"name": "<string>"
}
'const options = {
method: 'POST',
headers: {
'idempotency-key': '<idempotency-key>',
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 = {
"idempotency-key": "<idempotency-key>",
"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": {}
}{
"accepted": true,
"jobId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>"
}Headers
Query Parameters
Body
application/json
Response
⌘I
Create database.
curl --request POST \
--url https://api.revoengine.com/api/v1/databases \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'idempotency-key: <idempotency-key>' \
--data '
{
"name": "<string>"
}
'const options = {
method: 'POST',
headers: {
'idempotency-key': '<idempotency-key>',
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 = {
"idempotency-key": "<idempotency-key>",
"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": {}
}{
"accepted": true,
"jobId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>"
}
