Execute a query on the database.
curl --request POST \
--url http://localhost:9090/activeviam/pivot/rest/v9/database/data/tables/{tableName} \
--header 'Content-Type: application/json'import requests
url = "http://localhost:9090/activeviam/pivot/rest/v9/database/data/tables/{tableName}"
headers = {"Content-Type": "application/json"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'Content-Type': 'application/json'}};
fetch('http://localhost:9090/activeviam/pivot/rest/v9/database/data/tables/{tableName}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "9090",
CURLOPT_URL => "http://localhost:9090/activeviam/pivot/rest/v9/database/data/tables/{tableName}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:9090/activeviam/pivot/rest/v9/database/data/tables/{tableName}"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:9090/activeviam/pivot/rest/v9/database/data/tables/{tableName}")
.header("Content-Type", "application/json")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:9090/activeviam/pivot/rest/v9/database/data/tables/{tableName}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
response = http.request(request)
puts response.read_bodyThis example is hosted at https://docs.activeviam.com/products/atoti/server/__BASE_VERSION__/rest/__VERSION__/examples/database-v9/getQueryAnswer.jsonExecute a query on the database
POST
/
activeviam
/
pivot
/
rest
/
v9
/
database
/
data
/
tables
/
{tableName}
Execute a query on the database.
curl --request POST \
--url http://localhost:9090/activeviam/pivot/rest/v9/database/data/tables/{tableName} \
--header 'Content-Type: application/json'import requests
url = "http://localhost:9090/activeviam/pivot/rest/v9/database/data/tables/{tableName}"
headers = {"Content-Type": "application/json"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'Content-Type': 'application/json'}};
fetch('http://localhost:9090/activeviam/pivot/rest/v9/database/data/tables/{tableName}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "9090",
CURLOPT_URL => "http://localhost:9090/activeviam/pivot/rest/v9/database/data/tables/{tableName}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:9090/activeviam/pivot/rest/v9/database/data/tables/{tableName}"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:9090/activeviam/pivot/rest/v9/database/data/tables/{tableName}")
.header("Content-Type", "application/json")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:9090/activeviam/pivot/rest/v9/database/data/tables/{tableName}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
response = http.request(request)
puts response.read_bodyThis example is hosted at https://docs.activeviam.com/products/atoti/server/__BASE_VERSION__/rest/__VERSION__/examples/database-v9/getQueryAnswer.jsonPath Parameters
Desired table name.
Query Parameters
Action flag to indicate a query on this table.
Available options:
count, select The page to return. First page (and default) is 1.
The maximum number of rows in the page. Default is 100.
Body
application/json
Query parameters in JSON format.
Was this page helpful?