APIリクエストログの一覧取得
curl --request POST \
--url https://api.pubrio.com/api_keys/logs \
--header 'Content-Type: application/json' \
--header 'pubrio-api-key: <api-key>' \
--data '
{
"profile_id": 123,
"page": 1,
"per_page": 25,
"order_by": "created_at",
"is_ascending_order": false,
"search_term": "<string>",
"log_types": [
123
],
"log_type_slugs": [
"<string>"
],
"status_codes": [
123
],
"methods": [
"<string>"
]
}
'import requests
url = "https://api.pubrio.com/api_keys/logs"
payload = {
"profile_id": 123,
"page": 1,
"per_page": 25,
"order_by": "created_at",
"is_ascending_order": False,
"search_term": "<string>",
"log_types": [123],
"log_type_slugs": ["<string>"],
"status_codes": [123],
"methods": ["<string>"]
}
headers = {
"pubrio-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'pubrio-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
profile_id: 123,
page: 1,
per_page: 25,
order_by: 'created_at',
is_ascending_order: false,
search_term: '<string>',
log_types: [123],
log_type_slugs: ['<string>'],
status_codes: [123],
methods: ['<string>']
})
};
fetch('https://api.pubrio.com/api_keys/logs', 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.pubrio.com/api_keys/logs",
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([
'profile_id' => 123,
'page' => 1,
'per_page' => 25,
'order_by' => 'created_at',
'is_ascending_order' => false,
'search_term' => '<string>',
'log_types' => [
123
],
'log_type_slugs' => [
'<string>'
],
'status_codes' => [
123
],
'methods' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"pubrio-api-key: <api-key>"
],
]);
$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.pubrio.com/api_keys/logs"
payload := strings.NewReader("{\n \"profile_id\": 123,\n \"page\": 1,\n \"per_page\": 25,\n \"order_by\": \"created_at\",\n \"is_ascending_order\": false,\n \"search_term\": \"<string>\",\n \"log_types\": [\n 123\n ],\n \"log_type_slugs\": [\n \"<string>\"\n ],\n \"status_codes\": [\n 123\n ],\n \"methods\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("pubrio-api-key", "<api-key>")
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.pubrio.com/api_keys/logs")
.header("pubrio-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"profile_id\": 123,\n \"page\": 1,\n \"per_page\": 25,\n \"order_by\": \"created_at\",\n \"is_ascending_order\": false,\n \"search_term\": \"<string>\",\n \"log_types\": [\n 123\n ],\n \"log_type_slugs\": [\n \"<string>\"\n ],\n \"status_codes\": [\n 123\n ],\n \"methods\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pubrio.com/api_keys/logs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["pubrio-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"profile_id\": 123,\n \"page\": 1,\n \"per_page\": 25,\n \"order_by\": \"created_at\",\n \"is_ascending_order\": false,\n \"search_term\": \"<string>\",\n \"log_types\": [\n 123\n ],\n \"log_type_slugs\": [\n \"<string>\"\n ],\n \"status_codes\": [\n 123\n ],\n \"methods\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"metadata": {
"filters": {
"page": 1,
"per_page": 3,
"status_codes": [
200
]
}
},
"data": {
"pagination": {
"page": 1,
"per_page": 3,
"total_entries": 1109,
"total_pages": 370,
"total_display_pages": 250,
"is_timeout": false
},
"query_logs": [
{
"query_log_id": "fc1ce3dd-39f7-4fbd-9d22-569a17115c11",
"created_at": "2026-05-14 12:04:32.243",
"profile_id": 1,
"user_id": "2981d4b3-f8b1-44d8-9759-889f3bfa2faf",
"method": "POST",
"path": "/api_keys/usage/daily",
"status_code": 200,
"duration_ms": 1821,
"log_type_id": 0,
"authentication_type": "pubrio-api-key",
"masked_authentication": "0••••••••••••••••f39",
"response_size": 2180,
"ip": "127.0.0.1",
"email": "[email protected]",
"nickname": "Example User",
"user": {
"user_id": "2981d4b3-f8b1-44d8-9759-889f3bfa2faf",
"nickname": "Example User",
"email": "[email protected]"
},
"log_type_slug": null,
"credits": 0,
"log_type_name": null,
"authentication_type_name": "API Key"
}
]
}
}{
"code": 40001,
"message": "エラーの背景やフィールド単位の情報などを含む追加データオブジェクトです。",
"details": {}
}{
"error": "クライアントはしばらく待ってから再試行することが推奨されます。"
}{
"error": "レスポンスボディには `error` フィールドが含まれ、問題の概要がメッセージとして記載されます。"
}API キー
APIリクエストログ一覧
ワークスペースで実行されたAPIリクエストログをページネーション付きで取得します。各エントリは pubrio-api-key を使用した1件のリクエストを表し、パス、メソッド、ステータスコード、所要時間、レスポンスサイズ、消費クレジットを含みます。特定エントリの完全なリクエスト・レスポンス本文を確認するには、ログ詳細の取得 エンドポイントを利用してください。
POST
/
api_keys
/
logs
APIリクエストログの一覧取得
curl --request POST \
--url https://api.pubrio.com/api_keys/logs \
--header 'Content-Type: application/json' \
--header 'pubrio-api-key: <api-key>' \
--data '
{
"profile_id": 123,
"page": 1,
"per_page": 25,
"order_by": "created_at",
"is_ascending_order": false,
"search_term": "<string>",
"log_types": [
123
],
"log_type_slugs": [
"<string>"
],
"status_codes": [
123
],
"methods": [
"<string>"
]
}
'import requests
url = "https://api.pubrio.com/api_keys/logs"
payload = {
"profile_id": 123,
"page": 1,
"per_page": 25,
"order_by": "created_at",
"is_ascending_order": False,
"search_term": "<string>",
"log_types": [123],
"log_type_slugs": ["<string>"],
"status_codes": [123],
"methods": ["<string>"]
}
headers = {
"pubrio-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'pubrio-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
profile_id: 123,
page: 1,
per_page: 25,
order_by: 'created_at',
is_ascending_order: false,
search_term: '<string>',
log_types: [123],
log_type_slugs: ['<string>'],
status_codes: [123],
methods: ['<string>']
})
};
fetch('https://api.pubrio.com/api_keys/logs', 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.pubrio.com/api_keys/logs",
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([
'profile_id' => 123,
'page' => 1,
'per_page' => 25,
'order_by' => 'created_at',
'is_ascending_order' => false,
'search_term' => '<string>',
'log_types' => [
123
],
'log_type_slugs' => [
'<string>'
],
'status_codes' => [
123
],
'methods' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"pubrio-api-key: <api-key>"
],
]);
$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.pubrio.com/api_keys/logs"
payload := strings.NewReader("{\n \"profile_id\": 123,\n \"page\": 1,\n \"per_page\": 25,\n \"order_by\": \"created_at\",\n \"is_ascending_order\": false,\n \"search_term\": \"<string>\",\n \"log_types\": [\n 123\n ],\n \"log_type_slugs\": [\n \"<string>\"\n ],\n \"status_codes\": [\n 123\n ],\n \"methods\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("pubrio-api-key", "<api-key>")
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.pubrio.com/api_keys/logs")
.header("pubrio-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"profile_id\": 123,\n \"page\": 1,\n \"per_page\": 25,\n \"order_by\": \"created_at\",\n \"is_ascending_order\": false,\n \"search_term\": \"<string>\",\n \"log_types\": [\n 123\n ],\n \"log_type_slugs\": [\n \"<string>\"\n ],\n \"status_codes\": [\n 123\n ],\n \"methods\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pubrio.com/api_keys/logs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["pubrio-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"profile_id\": 123,\n \"page\": 1,\n \"per_page\": 25,\n \"order_by\": \"created_at\",\n \"is_ascending_order\": false,\n \"search_term\": \"<string>\",\n \"log_types\": [\n 123\n ],\n \"log_type_slugs\": [\n \"<string>\"\n ],\n \"status_codes\": [\n 123\n ],\n \"methods\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"metadata": {
"filters": {
"page": 1,
"per_page": 3,
"status_codes": [
200
]
}
},
"data": {
"pagination": {
"page": 1,
"per_page": 3,
"total_entries": 1109,
"total_pages": 370,
"total_display_pages": 250,
"is_timeout": false
},
"query_logs": [
{
"query_log_id": "fc1ce3dd-39f7-4fbd-9d22-569a17115c11",
"created_at": "2026-05-14 12:04:32.243",
"profile_id": 1,
"user_id": "2981d4b3-f8b1-44d8-9759-889f3bfa2faf",
"method": "POST",
"path": "/api_keys/usage/daily",
"status_code": 200,
"duration_ms": 1821,
"log_type_id": 0,
"authentication_type": "pubrio-api-key",
"masked_authentication": "0••••••••••••••••f39",
"response_size": 2180,
"ip": "127.0.0.1",
"email": "[email protected]",
"nickname": "Example User",
"user": {
"user_id": "2981d4b3-f8b1-44d8-9759-889f3bfa2faf",
"nickname": "Example User",
"email": "[email protected]"
},
"log_type_slug": null,
"credits": 0,
"log_type_name": null,
"authentication_type_name": "API Key"
}
]
}
}{
"code": 40001,
"message": "エラーの背景やフィールド単位の情報などを含む追加データオブジェクトです。",
"details": {}
}{
"error": "クライアントはしばらく待ってから再試行することが推奨されます。"
}{
"error": "レスポンスボディには `error` フィールドが含まれ、問題の概要がメッセージとして記載されます。"
}承認
ボディ
application/json
オプション。リクエストを送信するチームを表す識別子です。API キーにワークスペース情報が既に含まれているため、このパラメータは必須ではなくなりました。指定した場合、検索結果が特定のチーム(ワークスペース)に紐づけられ、データ取得およびクレジット利用状況の追跡が可能になります。詳しくは、チーム関連の「ユーザー詳細」エンドポイントを参照してください。
取得したい結果セットのページ番号です。
例:
1
1 ページあたりに返される検索結果件数です。ページサイズを制限することで、レスポンス速度や API パフォーマンスの向上が期待できます。
例:
25
ログ一覧の並び替え対象フィールド。
利用可能なオプション:
created_at, duration_ms, status_code 並び替え方向。true は昇順、false(デフォルト)は降順。
リクエストパス、ログタイプスラッグ、生のリクエストボディに対する自由検索。
ログタイプIDで絞り込み。
ログタイプスラッグで絞り込み(例: people_search、company_search)。
HTTPステータスコードで絞り込み(例: [200, 400, 500])。
HTTPメソッドで絞り込み(例: ["POST", "GET"])。
⌘I

