curl --request POST \
--url https://cloud.cdata.com/api/log/query/list \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"endTime": "2023-11-07T05:31:56Z",
"queryType": 2,
"startTime": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://cloud.cdata.com/api/log/query/list"
payload = {
"endTime": "2023-11-07T05:31:56Z",
"queryType": 2,
"startTime": "2023-11-07T05:31:56Z"
}
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({
endTime: '2023-11-07T05:31:56Z',
queryType: 2,
startTime: '2023-11-07T05:31:56Z'
})
};
fetch('https://cloud.cdata.com/api/log/query/list', 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://cloud.cdata.com/api/log/query/list",
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([
'endTime' => '2023-11-07T05:31:56Z',
'queryType' => 2,
'startTime' => '2023-11-07T05:31:56Z'
]),
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://cloud.cdata.com/api/log/query/list"
payload := strings.NewReader("{\n \"endTime\": \"2023-11-07T05:31:56Z\",\n \"queryType\": 2,\n \"startTime\": \"2023-11-07T05:31:56Z\"\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://cloud.cdata.com/api/log/query/list")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"endTime\": \"2023-11-07T05:31:56Z\",\n \"queryType\": 2,\n \"startTime\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.cdata.com/api/log/query/list")
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 \"endTime\": \"2023-11-07T05:31:56Z\",\n \"queryType\": 2,\n \"startTime\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"queries": [
{
"credential": "prat8897@gmail.com",
"duration": 308,
"drivers": "PostgreSQL",
"errorCode": "QUERY_FAILED",
"errorMessage": "The stored procedure execution failed with the following error:\r\n[500] Could not execute the specified command: Unknown stored function/procedure transferdata\r\n<Query ID: e1af1260-4045-45e4-882b-96fe2575e37b>",
"logFileKey": "x41GvdkvWlJsaEdQrzI2+t7M+TSbimW8iJIfQPv9mK1PqurO1/pzPW3D2ObewKfK6w51T7ui8yecrEYV3JpW9WmsAU+yVv4Vke1D2lB8EeKsv3ab6w2ZXrNZxPBAgaKAZLoRf8zbuHGWDGSQQ9gDJg==",
"logVerbosity": 1,
"query": "PostgreSQL1.public.transferdata",
"queryId": "e1af1260-4045-45e4-882b-96fe2575e37b",
"queryType": 203,
"rowsAffected": -1,
"rowsInput": 1,
"rowsReturned": 0,
"timestamp": "2024-03-19T18:55:34.837Z",
"userAgent": "PostmanRuntime/7.37.0"
}
]
}クエリログ一覧の取得
Retrieves a list of query logs for an account.
The response contains at most 500 queries. If incomplete is true, more queries may match your request. To retrieve them, narrow the time range, or send the request again with endTime set to the timestamp of the oldest query returned. If incomplete is true and no queries are returned, narrow the time range instead. A row that shares the oldest timestamp and was not in the response is skipped when you use endTime. To retrieve it, set startTime to that timestamp and endTime to one millisecond later.
Filters on user names and connection names match exact letter case when the query log is read from the central log store.
When the query log is read from the central log store, logFileKey and timeToFirstRow are always null. A null logFileKey does not mean the query has no logs. Use the Get Query Log operation to download them.
curl --request POST \
--url https://cloud.cdata.com/api/log/query/list \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"endTime": "2023-11-07T05:31:56Z",
"queryType": 2,
"startTime": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://cloud.cdata.com/api/log/query/list"
payload = {
"endTime": "2023-11-07T05:31:56Z",
"queryType": 2,
"startTime": "2023-11-07T05:31:56Z"
}
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({
endTime: '2023-11-07T05:31:56Z',
queryType: 2,
startTime: '2023-11-07T05:31:56Z'
})
};
fetch('https://cloud.cdata.com/api/log/query/list', 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://cloud.cdata.com/api/log/query/list",
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([
'endTime' => '2023-11-07T05:31:56Z',
'queryType' => 2,
'startTime' => '2023-11-07T05:31:56Z'
]),
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://cloud.cdata.com/api/log/query/list"
payload := strings.NewReader("{\n \"endTime\": \"2023-11-07T05:31:56Z\",\n \"queryType\": 2,\n \"startTime\": \"2023-11-07T05:31:56Z\"\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://cloud.cdata.com/api/log/query/list")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"endTime\": \"2023-11-07T05:31:56Z\",\n \"queryType\": 2,\n \"startTime\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.cdata.com/api/log/query/list")
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 \"endTime\": \"2023-11-07T05:31:56Z\",\n \"queryType\": 2,\n \"startTime\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"queries": [
{
"credential": "prat8897@gmail.com",
"duration": 308,
"drivers": "PostgreSQL",
"errorCode": "QUERY_FAILED",
"errorMessage": "The stored procedure execution failed with the following error:\r\n[500] Could not execute the specified command: Unknown stored function/procedure transferdata\r\n<Query ID: e1af1260-4045-45e4-882b-96fe2575e37b>",
"logFileKey": "x41GvdkvWlJsaEdQrzI2+t7M+TSbimW8iJIfQPv9mK1PqurO1/pzPW3D2ObewKfK6w51T7ui8yecrEYV3JpW9WmsAU+yVv4Vke1D2lB8EeKsv3ab6w2ZXrNZxPBAgaKAZLoRf8zbuHGWDGSQQ9gDJg==",
"logVerbosity": 1,
"query": "PostgreSQL1.public.transferdata",
"queryId": "e1af1260-4045-45e4-882b-96fe2575e37b",
"queryType": 203,
"rowsAffected": -1,
"rowsInput": 1,
"rowsReturned": 0,
"timestamp": "2024-03-19T18:55:34.837Z",
"userAgent": "PostmanRuntime/7.37.0"
}
]
}承認
ボディ
The type of query.
| Value | Name |
|---|---|
| 0 | Drivers |
| 1 | DriverInfo |
| 2 | TestConnection |
| 3 | GetOAuthAuthorizationUrl |
| 4 | GetOAuthAccessToken |
| 5 | CustomReportInfo |
| 6 | GenerateCustomReport |
| 7 | GetAPIRootPaths |
| 8 | GetAPIColumns |
| 9 | GetAPIRows |
| 10 | GetTimeCheckColumns |
| 11 | GetDynamicPropValues |
| 20 | DisconnectOAuthAccessToken |
| 100 | Catalogs |
| 101 | Schemas |
| 102 | Tables |
| 103 | Columns |
| 104 | PrimaryKeys |
| 105 | ImportedKeys |
| 106 | ExportedKeys |
| 107 | Procedures |
| 108 | ProcedureParameters |
| 109 | Indexes |
| 200 | Query |
| 201 | QuerySchemaOnly |
| 202 | Batch |
| 203 | Exec |
| 204 | Caching |
| 205 | ScheduledQuery |
| 210 | ODataServiceDocument |
| 211 | ODataMetadata |
| 212 | ODataQuery |
| 220 | OpenAPIDocument |
| 230 | CreateDerivedView |
| 231 | AlterDerivedView |
| 232 | DropDerivedView |
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 20, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 200, 201, 202, 203, 204, 205, 210, 211, 212, 220, 230, 231, 232 このページは役に立ちましたか?