Passer au contenu principal
POST
/
table
/
query_stats_batch
Lot de statistiques des requêtes sur le tableau
curl --request POST \
  --url https://api.example.com/table/query_stats_batch \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "project_id": "<string>",
  "digests": "aonareimsvtl13apimtalpa4435rpmgnaemrpgmarltarstaorsnte134avrims",
  "include_storage_size": false
}
'
import requests

url = "https://api.example.com/table/query_stats_batch"

payload = {
"project_id": "<string>",
"digests": "aonareimsvtl13apimtalpa4435rpmgnaemrpgmarltarstaorsnte134avrims",
"include_storage_size": False
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
project_id: '<string>',
digests: 'aonareimsvtl13apimtalpa4435rpmgnaemrpgmarltarstaorsnte134avrims',
include_storage_size: false
})
};

fetch('https://api.example.com/table/query_stats_batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/table/query_stats_batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'project_id' => '<string>',
'digests' => 'aonareimsvtl13apimtalpa4435rpmgnaemrpgmarltarstaorsnte134avrims',
'include_storage_size' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.example.com/table/query_stats_batch"

payload := strings.NewReader("{\n \"project_id\": \"<string>\",\n \"digests\": \"aonareimsvtl13apimtalpa4435rpmgnaemrpgmarltarstaorsnte134avrims\",\n \"include_storage_size\": false\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Basic <encoded-value>")
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("https://api.example.com/table/query_stats_batch")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"project_id\": \"<string>\",\n \"digests\": \"aonareimsvtl13apimtalpa4435rpmgnaemrpgmarltarstaorsnte134avrims\",\n \"include_storage_size\": false\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.example.com/table/query_stats_batch")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"project_id\": \"<string>\",\n \"digests\": \"aonareimsvtl13apimtalpa4435rpmgnaemrpgmarltarstaorsnte134avrims\",\n \"include_storage_size\": false\n}"

response = http.request(request)
puts response.read_body
{
  "tables": [
    {
      "count": 123,
      "digest": "<string>",
      "storage_size_bytes": 123
    }
  ]
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}

Autorisations

Authorization
string
header
requis

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Corps

application/json
project_id
string
requis

L’ID du projet

Exemple:

"my_entity/my_project"

digests
string[] | null

Les empreintes des tableaux à interroger

Exemple:

"aonareimsvtl13apimtalpa4435rpmgnaemrpgmarltarstaorsnte134avrims"

include_storage_size
boolean | null
défaut:false

Si la valeur est true, la colonne storage_size_bytes est renvoyée.

Réponse

Réponse réussie

tables
TableStatsRow · object[]
requis