メインコンテンツへスキップ
GET
/
v2
/
apps
/
{app_id}
/
network
/
logs
ネットワークログ
curl --request GET \
  --url https://api.squarecloud.app/v2/apps/{app_id}/network/logs \
  --header 'Authorization: <authorization>'
import requests

url = "https://api.squarecloud.app/v2/apps/{app_id}/network/logs"

headers = {"Authorization": "<authorization>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: '<authorization>'}};

fetch('https://api.squarecloud.app/v2/apps/{app_id}/network/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.squarecloud.app/v2/apps/{app_id}/network/logs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);

$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 := "https://api.squarecloud.app/v2/apps/{app_id}/network/logs"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "<authorization>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.squarecloud.app/v2/apps/{app_id}/network/logs")
.header("Authorization", "<authorization>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.squarecloud.app/v2/apps/{app_id}/network/logs")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'

response = http.request(request)
puts response.read_body
{
  "status": "success",
  "response": [
    {
      "timestamp": "2025-12-01T12:00:00.000Z",
      "client": {
        "ip": "203.0.113.45",
        "country": "BR",
        "location": "São Paulo",
        "asn": "12345 - Example ISP",
        "agent": "Mozilla/5.0",
        "category": null
      },
      "request": {
        "mitigated": false,
        "method": "GET",
        "host": "my-app.squareweb.app",
        "path": "/api/users",
        "query": "?limit=10",
        "protocol": "HTTP/2",
        "referer": null
      },
      "response": {
        "status": 200,
        "contentType": "application/json",
        "cache": "MISS"
      }
    }
  ]
}
アプリケーションのプライマリドメインおよび設定済みのカスタムドメインに対する、リクエスト単位のエッジログ(HTTP、国、ステータス、バイト数)を返します。最大保持期間は7日間で、開始時刻はアプリケーションの作成日にクランプされます。
Pro および Enterprise プランでのみ利用できます。キャッシュミス時のレート制限: オーナーごとに60秒あたり10リクエスト。
Authorization
string
必須
アカウントの API キーです。これはアカウント設定で確認できます。

パラメータ

app_id
string
必須
アプリケーションのID。アプリケーションのダッシュボードのURLで確認できます。
start
string
必須
ISO 8601 形式の開始タイムスタンプ。アプリケーションの作成日より前、または7日より古い時刻は指定できません。
end
string
必須
ISO 8601 形式の終了タイムスタンプ。start より後である必要があります。

レスポンス

status
string
呼び出しが成功したかどうかを示します。成功した場合は success、失敗した場合は error です。
response
array
レスポンスの内容。
{
  "status": "success",
  "response": [
    {
      "timestamp": "2025-12-01T12:00:00.000Z",
      "client": {
        "ip": "203.0.113.45",
        "country": "BR",
        "location": "São Paulo",
        "asn": "12345 - Example ISP",
        "agent": "Mozilla/5.0",
        "category": null
      },
      "request": {
        "mitigated": false,
        "method": "GET",
        "host": "my-app.squareweb.app",
        "path": "/api/users",
        "query": "?limit=10",
        "protocol": "HTTP/2",
        "referer": null
      },
      "response": {
        "status": 200,
        "contentType": "application/json",
        "cache": "MISS"
      }
    }
  ]
}