Databases
Insert database data.
Roles: RESOURCE_WRITE, RESOURCE_ADMIN
User access: Yes.
Service account access: Yes.
POST
/
api
/
v1
/
databases
/
{databaseId}
/
insertData
Insert database data.
curl --request POST \
--url https://api.revoengine.com/api/v1/databases/{databaseId}/insertData \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"upsert": true,
"return": true,
"data": [
{}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({upsert: true, return: true, data: [{}]})
};
fetch('https://api.revoengine.com/api/v1/databases/{databaseId}/insertData', 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}/insertData"
payload = {
"upsert": True,
"return": True,
"data": [{}]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Body
application/json
Response
OK.
⌘I
Insert database data.
curl --request POST \
--url https://api.revoengine.com/api/v1/databases/{databaseId}/insertData \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"upsert": true,
"return": true,
"data": [
{}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({upsert: true, return: true, data: [{}]})
};
fetch('https://api.revoengine.com/api/v1/databases/{databaseId}/insertData', 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}/insertData"
payload = {
"upsert": True,
"return": True,
"data": [{}]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
