Analytics REST API
The Privatus Analytics REST API: add .json to any app URL and send a token. Conventions and a reference of every operation, generated from the code.
Every page and action in Privatus Analytics is also an API endpoint. There's no
separate /api/v1: add .json to a URL and send an API token.
curl https://privatusanalytics.com/sites/pa_7Q2K9XH3AB/stats/aggregate.json?period=7d \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"data": {
"period": { "from": "2026-09-23T00:00:00Z", "to": "2026-09-30T00:00:00Z" },
"metrics": {
"visitors": 1840, "visits": 2310, "pageviews": 5122,
"views_per_visit": 2.22, "bounce_rate": 41.3,
"visit_duration": 48000, "revenue": 129900
}
}
}
The reference below lists every operation with its method, path, permission, input schema and response schema. It's generated from the running code, as is the OpenAPI 3.1 document, so neither can drift from what the server does. The same operations are MCP tools.
Conventions#
| Base URL | https://privatusanalytics.com |
| Format | JSON. Add .json to the path (or send Accept: application/json) |
| Auth | Authorization: Bearer pat_… (Authentication) |
| Ids | Public ids with a prefix: ws_… workspaces, pa_… sites, seg_… segments, wh_… webhooks |
| Reads | GET with query parameters |
| Writes | POST, PATCH, DELETE with a JSON body of flat fields |
| Success | { "data": … }, plus "meta" for lists |
| Errors | { "error": { "code", "message", "details" } } (Errors) |
| Lists | page and per_page (max 100) (Pagination) |
| Times | ISO 8601 in UTC. Date parameters (from, to) are days in the site's timezone |
| Money | Minor units (cents) in the site currency, e.g. revenue: 129900 = 1,299.00 |
| Durations | Milliseconds |
Common tasks#
| Task | Operation |
|---|---|
| List workspaces | GET /workspaces.json |
| List sites | GET /workspaces/{workspace_id}/sites.json |
| Headline metrics | GET /sites/{site_id}/stats/aggregate.json |
| Chart data | GET /sites/{site_id}/stats/timeseries.json |
| Top pages, sources, countries… | GET /sites/{site_id}/breakdown/{dimension}.json |
| Everything on the Overview | GET /sites/{site_id}/overview.json |
| Live visitors | GET /sites/{site_id}/live.json |
| Add a note (e.g. a deploy) | POST /sites/{site_id}/notes.json |
See Stats endpoints and Examples.
In this section#
Authentication · Errors · Pagination · Rate limits · Filters · Stats endpoints · Examples · Webhooks · Changelog and deprecation
Sending data in is a different API: see Server-side ingest.
すべての操作
Authorization: Bearer pat_… を送信します。トークンはワークスペース設定のAPIトークンで作成します。認証ガイド。
どのパスにも .json を付けられます。レスポンスは { "data": … }、エラーは { "error": { "code", "message" } } です。エラー。
同じトークンで https://privatusanalytics.com/mcp にJSON-RPCをPOSTします。以下の各操作がツールになります。MCPガイド。
openapi.json をダウンロード · 285件の操作
APIトークン
POST
/workspaces/:workspace_id/api_tokens.json
APIトークンを作成(トークンは一度だけ返されます)
api_tokens_create
権限: member
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/api_tokens.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "トークンを識別するための名前",
"examples": [
"CI deploys"
]
},
"permissions": {
"type": "array",
"items": {
"type": "string",
"enum": [
"analytics.read",
"analytics.export",
"content.write",
"sites.manage",
"uptime.manage",
"members.manage",
"tokens.manage",
"billing.manage",
"workspace.manage"
]
},
"description": "権限(省略すると自分の権限すべて。空のリストは拒否されます)"
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "これらのサイトIDに制限する(pa_…)。空 = すべて",
"default": []
},
"expires_at": {
"type": "string",
"format": "date-time",
"description": "有効期限(ISO 8601)。空 = 無期限"
},
"allowed_ips": {
"type": "array",
"items": {
"type": "string"
},
"description": "これらのIP/CIDRからのリクエストのみ受け付ける",
"default": []
},
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
}
},
"required": [
"name",
"workspace_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"name": {
"type": "string"
},
"token": {
"anyOf": [
{
"type": "string",
"description": "トークン本体: 作成時にのみ返されます"
},
{
"type": "null"
}
]
},
"token_prefix": {
"type": "string",
"description": "トークンを見分けるための先頭の文字"
},
"owner": {
"type": "string",
"description": "所有するメンバーのメールアドレス"
},
"permissions": {
"type": "array",
"items": {
"type": "string"
}
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "これらのサイトに制限(空 = すべて)"
},
"allowed_ips": {
"type": "array",
"items": {
"type": "string"
}
},
"oauth_client": {
"anyOf": [
{
"type": "string",
"description": "トークンを受け取ったMCPクライアント"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"description": "active、expired、revoked のいずれか"
},
"expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_used_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"revoked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/workspaces/:workspace_id/api_tokens/:id.json
APIトークンを無効化
api_tokens_delete
権限: member
curl -X DELETE https://privatusanalytics.com/workspaces/:workspace_id/api_tokens/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"workspace_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"name": {
"type": "string"
},
"token": {
"anyOf": [
{
"type": "string",
"description": "トークン本体: 作成時にのみ返されます"
},
{
"type": "null"
}
]
},
"token_prefix": {
"type": "string",
"description": "トークンを見分けるための先頭の文字"
},
"owner": {
"type": "string",
"description": "所有するメンバーのメールアドレス"
},
"permissions": {
"type": "array",
"items": {
"type": "string"
}
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "これらのサイトに制限(空 = すべて)"
},
"allowed_ips": {
"type": "array",
"items": {
"type": "string"
}
},
"oauth_client": {
"anyOf": [
{
"type": "string",
"description": "トークンを受け取ったMCPクライアント"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"description": "active、expired、revoked のいずれか"
},
"expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_used_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"revoked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/workspaces/:workspace_id/api_tokens.json
APIトークンを一覧表示
api_tokens_list
権限: member
curl https://privatusanalytics.com/workspaces/:workspace_id/api_tokens.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"include_revoked": {
"type": "boolean",
"description": "無効化済みと期限切れのトークンも一覧に含める",
"default": false
},
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
},
"page": {
"type": "integer",
"description": "ページ(1から)"
},
"per_page": {
"type": "integer",
"description": "1ページあたりの結果数(最大100)"
}
},
"required": [
"workspace_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"name": {
"type": "string"
},
"token": {
"anyOf": [
{
"type": "string",
"description": "トークン本体: 作成時にのみ返されます"
},
{
"type": "null"
}
]
},
"token_prefix": {
"type": "string",
"description": "トークンを見分けるための先頭の文字"
},
"owner": {
"type": "string",
"description": "所有するメンバーのメールアドレス"
},
"permissions": {
"type": "array",
"items": {
"type": "string"
}
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "これらのサイトに制限(空 = すべて)"
},
"allowed_ips": {
"type": "array",
"items": {
"type": "string"
}
},
"oauth_client": {
"anyOf": [
{
"type": "string",
"description": "トークンを受け取ったMCPクライアント"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"description": "active、expired、revoked のいずれか"
},
"expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_used_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"revoked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
}
SCIM
POST
/scim/v2/Users.json
ユーザーをプロビジョニング
scim_users_create
権限: public
· HTTPのみ(MCPツールではありません)
curl -X POST https://privatusanalytics.com/scim/v2/Users.json \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"userName": {
"type": "string",
"description": "メールアドレス"
},
"name": {
"type": "object",
"additionalProperties": true,
"description": "givenName、familyName、formatted",
"default": {}
},
"active": {
"type": "boolean",
"description": "ワークスペースのメンバー",
"default": true
}
},
"required": [
"userName"
]
}
{
"type": "object"
}
DELETE
/scim/v2/Users/:id.json
ユーザーのプロビジョニングを解除
scim_users_delete
権限: public
· HTTPのみ(MCPツールではありません)
curl -X DELETE https://privatusanalytics.com/scim/v2/Users/:id.json \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"id"
]
}
{
"type": "object"
}
GET
/scim/v2/Users.json
プロビジョニング済みのユーザーを一覧表示
scim_users_list
権限: public
· HTTPのみ(MCPツールではありません)
curl https://privatusanalytics.com/scim/v2/Users.json
{
"type": "object",
"properties": {
"scim_filter": {
"type": "string",
"description": "SCIMフィルター(クエリパラメーター `filter`)。例: userName eq \"[email protected]\""
},
"startIndex": {
"type": "integer",
"description": "最初の結果の1始まりのインデックス",
"default": 1
},
"count": {
"type": "integer",
"description": "ページサイズ(最大200)",
"default": 100
}
},
"required": []
}
{
"type": "object"
}
GET
/scim/v2/Users/:id.json
プロビジョニング済みのユーザーを取得
scim_users_get
権限: public
· HTTPのみ(MCPツールではありません)
curl https://privatusanalytics.com/scim/v2/Users/:id.json
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"id"
]
}
{
"type": "object"
}
PATCH
/scim/v2/Users/:id.json
ユーザーを更新(active、name をPATCH)
scim_users_update
権限: public
· HTTPのみ(MCPツールではありません)
curl -X PATCH https://privatusanalytics.com/scim/v2/Users/:id.json \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"Operations": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
},
"description": "SCIMのPatchOp操作"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"Operations",
"id"
]
}
{
"type": "object"
}
SSO
POST
/workspaces/:workspace_id/sso/activate.json
テスト済みのSSO設定を有効化
sso_activate
権限: workspace.manage
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/sso/activate.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
}
},
"required": [
"workspace_id"
]
}
{
"type": "object",
"properties": {
"protocol": {
"type": "string",
"description": "saml または oidc"
},
"status": {
"type": "string",
"description": "draft、testing、tested、active のいずれか"
},
"enforced": {
"type": "boolean",
"description": "SSOが唯一のログイン方法(オーナーを除く)"
},
"domains": {
"type": "array",
"items": {
"type": "string"
},
"description": "確認済みのメールドメイン"
},
"idp_sso_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"idp_entity_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"idp_cert_present": {
"type": "boolean"
},
"oidc_issuer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"oidc_client_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"oidc_client_secret_present": {
"type": "boolean"
},
"default_role": {
"type": "string"
},
"jit_provisioning": {
"type": "boolean"
},
"scim_enabled": {
"type": "boolean"
}
}
}
POST
/workspaces/:workspace_id/sso/deactivate.json
SSOをオフにする(下書きに戻す)
sso_deactivate
権限: workspace.manage
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/sso/deactivate.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
}
},
"required": [
"workspace_id"
]
}
{
"type": "object",
"properties": {
"protocol": {
"type": "string",
"description": "saml または oidc"
},
"status": {
"type": "string",
"description": "draft、testing、tested、active のいずれか"
},
"enforced": {
"type": "boolean",
"description": "SSOが唯一のログイン方法(オーナーを除く)"
},
"domains": {
"type": "array",
"items": {
"type": "string"
},
"description": "確認済みのメールドメイン"
},
"idp_sso_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"idp_entity_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"idp_cert_present": {
"type": "boolean"
},
"oidc_issuer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"oidc_client_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"oidc_client_secret_present": {
"type": "boolean"
},
"default_role": {
"type": "string"
},
"jit_provisioning": {
"type": "boolean"
},
"scim_enabled": {
"type": "boolean"
}
}
}
POST
/workspaces/:workspace_id/sso/scim_token.json
新しいSCIMトークンを生成(一度だけ表示されます)
sso_scim_token
権限: workspace.manage
· HTTPのみ(MCPツールではありません)
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/sso/scim_token.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
}
},
"required": [
"workspace_id"
]
}
{
"type": "object"
}
GET
/workspaces/:workspace_id/sso.json
SSO設定を取得
sso_get
権限: workspace.manage
curl https://privatusanalytics.com/workspaces/:workspace_id/sso.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
}
},
"required": [
"workspace_id"
]
}
{
"type": "object",
"properties": {
"protocol": {
"type": "string",
"description": "saml または oidc"
},
"status": {
"type": "string",
"description": "draft、testing、tested、active のいずれか"
},
"enforced": {
"type": "boolean",
"description": "SSOが唯一のログイン方法(オーナーを除く)"
},
"domains": {
"type": "array",
"items": {
"type": "string"
},
"description": "確認済みのメールドメイン"
},
"idp_sso_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"idp_entity_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"idp_cert_present": {
"type": "boolean"
},
"oidc_issuer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"oidc_client_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"oidc_client_secret_present": {
"type": "boolean"
},
"default_role": {
"type": "string"
},
"jit_provisioning": {
"type": "boolean"
},
"scim_enabled": {
"type": "boolean"
}
}
}
PATCH
/workspaces/:workspace_id/sso.json
SSO設定を作成または更新
sso_update
権限: workspace.manage
curl -X PATCH https://privatusanalytics.com/workspaces/:workspace_id/sso.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"protocol": {
"type": "string",
"description": "saml または oidc",
"enum": [
"saml",
"oidc"
]
},
"idp_sso_url": {
"type": "string",
"description": "SAML: IdPのシングルサインオンURL"
},
"idp_entity_id": {
"type": "string",
"description": "SAML: IdPのエンティティID(issuer)"
},
"idp_cert": {
"type": "string",
"description": "SAML: IdPのX.509署名証明書(PEM)"
},
"oidc_issuer": {
"type": "string",
"description": "OIDC: issuerのURL(ディスカバリー)"
},
"oidc_client_id": {
"type": "string",
"description": "OIDC: クライアントID"
},
"oidc_client_secret": {
"type": "string",
"description": "OIDC: クライアントシークレット(書き込み専用)"
},
"domains": {
"type": "array",
"items": {
"type": "string"
},
"description": "このSSOを使用する確認済みのメールドメイン"
},
"default_role": {
"type": "string",
"description": "JITまたはSCIMで作成されるメンバーのロール",
"enum": [
"admin",
"editor",
"analyst",
"viewer",
"billing"
]
},
"jit_provisioning": {
"type": "boolean",
"description": "初回のSSOログイン時にメンバーを作成する"
},
"enforced": {
"type": "boolean",
"description": "SSOログインのみを許可する(有効な設定が必要)"
},
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
}
},
"required": [
"workspace_id"
]
}
{
"type": "object",
"properties": {
"protocol": {
"type": "string",
"description": "saml または oidc"
},
"status": {
"type": "string",
"description": "draft、testing、tested、active のいずれか"
},
"enforced": {
"type": "boolean",
"description": "SSOが唯一のログイン方法(オーナーを除く)"
},
"domains": {
"type": "array",
"items": {
"type": "string"
},
"description": "確認済みのメールドメイン"
},
"idp_sso_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"idp_entity_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"idp_cert_present": {
"type": "boolean"
},
"oidc_issuer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"oidc_client_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"oidc_client_secret_present": {
"type": "boolean"
},
"default_role": {
"type": "string"
},
"jit_provisioning": {
"type": "boolean"
},
"scim_enabled": {
"type": "boolean"
}
}
}
Webhook
GET
/workspaces/:workspace_id/webhooks/:webhook_id/deliveries.json
Webhookの配信を一覧表示
webhook_deliveries_list
権限: workspace.manage
curl https://privatusanalytics.com/workspaces/:workspace_id/webhooks/:webhook_id/deliveries.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"status": {
"type": "string",
"description": "成功または失敗した配信のみ",
"enum": [
"succeeded",
"failed"
]
},
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
},
"webhook_id": {
"type": "string",
"description": "リソースの Webhook"
},
"page": {
"type": "integer",
"description": "ページ(1から)"
},
"per_page": {
"type": "integer",
"description": "1ページあたりの結果数(最大100)"
}
},
"required": [
"workspace_id",
"webhook_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "配信ID(例: whd_123)"
},
"event": {
"type": "string"
},
"status": {
"type": "string",
"description": "pending、succeeded、failed のいずれか"
},
"status_code": {
"anyOf": [
{
"type": "integer",
"description": "最後の試行のHTTPステータス"
},
{
"type": "null"
}
]
},
"error": {
"anyOf": [
{
"type": "string",
"description": "最後の試行の接続エラー"
},
{
"type": "null"
}
]
},
"attempt": {
"type": "integer"
},
"duration_ms": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"payload": {
"type": "object"
},
"response_body": {
"anyOf": [
{
"type": "string",
"description": "最初の2,000文字"
},
{
"type": "null"
}
]
},
"delivered_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
}
POST
/workspaces/:workspace_id/webhooks/:webhook_id/deliveries/:id/redeliver.json
配信を再送信
webhook_deliveries_redeliver
権限: workspace.manage
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/webhooks/:webhook_id/deliveries/:id/redeliver.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
},
"webhook_id": {
"type": "string",
"description": "リソースの Webhook"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"workspace_id",
"webhook_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "配信ID(例: whd_123)"
},
"event": {
"type": "string"
},
"status": {
"type": "string",
"description": "pending、succeeded、failed のいずれか"
},
"status_code": {
"anyOf": [
{
"type": "integer",
"description": "最後の試行のHTTPステータス"
},
{
"type": "null"
}
]
},
"error": {
"anyOf": [
{
"type": "string",
"description": "最後の試行の接続エラー"
},
{
"type": "null"
}
]
},
"attempt": {
"type": "integer"
},
"duration_ms": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"payload": {
"type": "object"
},
"response_body": {
"anyOf": [
{
"type": "string",
"description": "最初の2,000文字"
},
{
"type": "null"
}
]
},
"delivered_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
POST
/workspaces/:workspace_id/webhooks.json
Webhookエンドポイントを追加
webhooks_create
権限: workspace.manage
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/webhooks.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "POSTされたJSONを受け取るHTTPSエンドポイント",
"examples": [
"https://example.com/hooks/privatus"
]
},
"events": {
"type": "array",
"items": {
"type": "string",
"enum": [
"alert.triggered",
"alert.resolved",
"goal.completed_threshold",
"uptime.down",
"uptime.up",
"export.ready",
"import.completed",
"import.failed",
"site.created",
"site.deleted",
"member.added",
"usage.threshold"
]
},
"description": "送信するイベント"
},
"enabled": {
"type": "boolean",
"description": "配信を送信する",
"default": true
},
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
}
},
"required": [
"url",
"events",
"workspace_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "WebhookのID(例: wh_7Q2K9XH3AB)"
},
"url": {
"type": "string"
},
"events": {
"type": "array",
"items": {
"type": "string"
}
},
"enabled": {
"type": "boolean"
},
"status": {
"type": "string",
"description": "active、failing、disabled のいずれか"
},
"secret": {
"type": "string",
"description": "Privatus Analytics-Signature用の署名シークレット"
},
"consecutive_failures": {
"type": "integer"
},
"last_success_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_failure_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/workspaces/:workspace_id/webhooks/:id.json
Webhookを削除
webhooks_delete
権限: workspace.manage
curl -X DELETE https://privatusanalytics.com/workspaces/:workspace_id/webhooks/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"workspace_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "WebhookのID(例: wh_7Q2K9XH3AB)"
},
"url": {
"type": "string"
},
"events": {
"type": "array",
"items": {
"type": "string"
}
},
"enabled": {
"type": "boolean"
},
"status": {
"type": "string",
"description": "active、failing、disabled のいずれか"
},
"secret": {
"type": "string",
"description": "Privatus Analytics-Signature用の署名シークレット"
},
"consecutive_failures": {
"type": "integer"
},
"last_success_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_failure_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/workspaces/:workspace_id/webhooks.json
Webhookを一覧表示
webhooks_list
権限: workspace.manage
curl https://privatusanalytics.com/workspaces/:workspace_id/webhooks.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
},
"page": {
"type": "integer",
"description": "ページ(1から)"
},
"per_page": {
"type": "integer",
"description": "1ページあたりの結果数(最大100)"
}
},
"required": [
"workspace_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "WebhookのID(例: wh_7Q2K9XH3AB)"
},
"url": {
"type": "string"
},
"events": {
"type": "array",
"items": {
"type": "string"
}
},
"enabled": {
"type": "boolean"
},
"status": {
"type": "string",
"description": "active、failing、disabled のいずれか"
},
"secret": {
"type": "string",
"description": "Privatus Analytics-Signature用の署名シークレット"
},
"consecutive_failures": {
"type": "integer"
},
"last_success_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_failure_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
}
GET
/workspaces/:workspace_id/webhooks/:id.json
Webhookを取得
webhooks_get
権限: workspace.manage
curl https://privatusanalytics.com/workspaces/:workspace_id/webhooks/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"workspace_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "WebhookのID(例: wh_7Q2K9XH3AB)"
},
"url": {
"type": "string"
},
"events": {
"type": "array",
"items": {
"type": "string"
}
},
"enabled": {
"type": "boolean"
},
"status": {
"type": "string",
"description": "active、failing、disabled のいずれか"
},
"secret": {
"type": "string",
"description": "Privatus Analytics-Signature用の署名シークレット"
},
"consecutive_failures": {
"type": "integer"
},
"last_success_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_failure_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
POST
/workspaces/:workspace_id/webhooks/:id/test.json
テスト配信を送信
webhooks_test
権限: workspace.manage
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/webhooks/:id/test.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"workspace_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "配信ID(例: whd_123)"
},
"event": {
"type": "string"
},
"status": {
"type": "string",
"description": "pending、succeeded、failed のいずれか"
},
"status_code": {
"anyOf": [
{
"type": "integer",
"description": "最後の試行のHTTPステータス"
},
{
"type": "null"
}
]
},
"error": {
"anyOf": [
{
"type": "string",
"description": "最後の試行の接続エラー"
},
{
"type": "null"
}
]
},
"attempt": {
"type": "integer"
},
"duration_ms": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"payload": {
"type": "object"
},
"response_body": {
"anyOf": [
{
"type": "string",
"description": "最初の2,000文字"
},
{
"type": "null"
}
]
},
"delivered_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
PATCH
/workspaces/:workspace_id/webhooks/:id.json
Webhookを更新(イベント、URL、有効化、シークレットのローテーション)
webhooks_update
権限: workspace.manage
curl -X PATCH https://privatusanalytics.com/workspaces/:workspace_id/webhooks/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "HTTPSエンドポイント"
},
"events": {
"type": "array",
"items": {
"type": "string",
"enum": [
"alert.triggered",
"alert.resolved",
"goal.completed_threshold",
"uptime.down",
"uptime.up",
"export.ready",
"import.completed",
"import.failed",
"site.created",
"site.deleted",
"member.added",
"usage.threshold"
]
},
"description": "送信するイベント"
},
"enabled": {
"type": "boolean",
"description": "配信を送信する"
},
"rotate_secret": {
"type": "boolean",
"description": "署名シークレットを置き換える",
"default": false
},
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"workspace_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "WebhookのID(例: wh_7Q2K9XH3AB)"
},
"url": {
"type": "string"
},
"events": {
"type": "array",
"items": {
"type": "string"
}
},
"enabled": {
"type": "boolean"
},
"status": {
"type": "string",
"description": "active、failing、disabled のいずれか"
},
"secret": {
"type": "string",
"description": "Privatus Analytics-Signature用の署名シークレット"
},
"consecutive_failures": {
"type": "integer"
},
"last_success_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_failure_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
アカウント
GET
/account.json
プロフィールと設定を取得
account_get
権限: member
curl https://privatusanalytics.com/account.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {},
"required": []
}
{
"type": "object",
"properties": {
"email": {
"type": "string"
},
"unconfirmed_email": {
"anyOf": [
{
"type": "string",
"description": "確認待ちの新しいメールアドレス"
},
{
"type": "null"
}
]
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"theme": {
"type": "string"
},
"default_landing": {
"type": "string"
},
"locale": {
"type": "string",
"description": "このアカウントのアプリの言語コード(デフォルトは en)"
},
"timezone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"shortcuts_enabled": {
"type": "boolean"
},
"reduce_motion": {
"type": "boolean"
},
"product_emails": {
"type": "boolean"
},
"marketing_emails": {
"type": "boolean",
"description": "マーケティングメール(ドリップキャンペーン)を送信してよいかどうか。配信停止後は false"
},
"newsletter": {
"type": "boolean"
},
"two_factor": {
"type": "boolean"
},
"passkeys": {
"type": "integer"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
PATCH
/account.json
プロフィールと設定を更新
account_update
権限: member
curl -X PATCH https://privatusanalytics.com/account.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "お名前"
},
"email": {
"type": "string",
"description": "新しいメールアドレス(先にメールで確認されます)"
},
"theme": {
"type": "string",
"description": "カラーテーマ",
"enum": [
"system",
"light",
"dark"
]
},
"default_landing": {
"type": "string",
"description": "ログイン後のページ: sites または last_site",
"enum": [
"sites",
"last_site"
]
},
"locale": {
"type": "string",
"description": "サインイン時のアプリの言語を示す言語コード(en、de、fr など)。公開ページとAPIは変わりません",
"enum": [
"en",
"de",
"es",
"fr",
"it",
"nl",
"pt",
"pl",
"sv",
"da",
"no",
"fi",
"ja",
"ko",
"zh-CN",
"zh-TW"
]
},
"timezone": {
"type": "string",
"description": "タイムゾーン(IANA名)"
},
"shortcuts_enabled": {
"type": "boolean",
"description": "キーボードショートカット"
},
"reduce_motion": {
"type": "boolean",
"description": "アニメーションを減らす"
},
"product_emails": {
"type": "boolean",
"description": "製品アップデートとヒントのメール"
},
"marketing_emails": {
"type": "boolean",
"description": "オンボーディングのヒントなどのマーケティングメール。配信停止後に再びオンにするには、サインイン済みのブラウザーが必要です"
},
"newsletter": {
"type": "boolean",
"description": "月刊ニュースレター"
}
},
"required": []
}
{
"type": "object",
"properties": {
"email": {
"type": "string"
},
"unconfirmed_email": {
"anyOf": [
{
"type": "string",
"description": "確認待ちの新しいメールアドレス"
},
{
"type": "null"
}
]
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"theme": {
"type": "string"
},
"default_landing": {
"type": "string"
},
"locale": {
"type": "string",
"description": "このアカウントのアプリの言語コード(デフォルトは en)"
},
"timezone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"shortcuts_enabled": {
"type": "boolean"
},
"reduce_motion": {
"type": "boolean"
},
"product_emails": {
"type": "boolean"
},
"marketing_emails": {
"type": "boolean",
"description": "マーケティングメール(ドリップキャンペーン)を送信してよいかどうか。配信停止後は false"
},
"newsletter": {
"type": "boolean"
},
"two_factor": {
"type": "boolean"
},
"passkeys": {
"type": "integer"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
アシスタント
POST
/sites/:site_id/ask.json
新しい会話で質問する(月間のAI質問数の上限に含まれます)
assistant_ask
権限: analytics.read
curl -X POST https://privatusanalytics.com/sites/:site_id/ask.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"question": {
"type": "string",
"description": "日常の言葉で書いた最初の質問",
"examples": [
"How many visitors did we have last week?"
]
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"question",
"site_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "会話ID(例: ask_7Q2K9XH3AB)"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "サイトID"
},
{
"type": "null"
}
]
},
"title": {
"anyOf": [
{
"type": "string",
"description": "最初の質問を短くしたもの"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time",
"description": "最後のメッセージの日時"
},
"expires_at": {
"type": "string",
"format": "date-time",
"description": "この日時以降に自動削除されます(最後のメッセージから30日後)"
},
"messages": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "会話内のメッセージID"
},
"role": {
"type": "string",
"description": "user(質問)または assistant(回答)"
},
"content": {
"type": "string",
"description": "質問、またはMarkdown形式の回答"
},
"queries": {
"type": "array",
"items": {
"type": "object"
},
"description": "回答の根拠: 回答の裏付けとなった正確なAPIクエリ。[{tool, input, status, error}] の形式"
},
"chart": {
"anyOf": [
{
"type": "object",
"description": "回答のグラフ: {type: line, labels, series, comparison, metric, format} または {type: table, columns, rows}"
},
{
"type": "null"
}
]
},
"goal_draft": {
"anyOf": [
{
"type": "object",
"description": "アシスタントが提案したゴール。goals_create で確定します"
},
{
"type": "null"
}
]
},
"input_tokens": {
"anyOf": [
{
"type": "integer",
"description": "使用したモデルの入力トークン数"
},
{
"type": "null"
}
]
},
"output_tokens": {
"anyOf": [
{
"type": "integer",
"description": "使用したモデルの出力トークン数"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
},
"description": "質問と回答(古い順)"
}
}
}
DELETE
/sites/:site_id/ask/:id.json
質問の会話とそのメッセージを削除
assistant_conversations_delete
権限: analytics.read
curl -X DELETE https://privatusanalytics.com/sites/:site_id/ask/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "会話ID(例: ask_7Q2K9XH3AB)"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "サイトID"
},
{
"type": "null"
}
]
},
"title": {
"anyOf": [
{
"type": "string",
"description": "最初の質問を短くしたもの"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time",
"description": "最後のメッセージの日時"
},
"expires_at": {
"type": "string",
"format": "date-time",
"description": "この日時以降に自動削除されます(最後のメッセージから30日後)"
}
}
}
GET
/sites/:site_id/ask.json
サイトの質問の会話を一覧表示
assistant_conversations_list
権限: analytics.read
curl https://privatusanalytics.com/sites/:site_id/ask.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
},
"page": {
"type": "integer",
"description": "ページ(1から)"
},
"per_page": {
"type": "integer",
"description": "1ページあたりの結果数(最大100)"
}
},
"required": [
"site_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "会話ID(例: ask_7Q2K9XH3AB)"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "サイトID"
},
{
"type": "null"
}
]
},
"title": {
"anyOf": [
{
"type": "string",
"description": "最初の質問を短くしたもの"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time",
"description": "最後のメッセージの日時"
},
"expires_at": {
"type": "string",
"format": "date-time",
"description": "この日時以降に自動削除されます(最後のメッセージから30日後)"
}
}
}
}
GET
/sites/:site_id/ask/:id.json
質問の会話: 質問、回答、その根拠となったクエリ、グラフ
assistant_conversations_get
権限: analytics.read
curl https://privatusanalytics.com/sites/:site_id/ask/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "会話ID(例: ask_7Q2K9XH3AB)"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "サイトID"
},
{
"type": "null"
}
]
},
"title": {
"anyOf": [
{
"type": "string",
"description": "最初の質問を短くしたもの"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time",
"description": "最後のメッセージの日時"
},
"expires_at": {
"type": "string",
"format": "date-time",
"description": "この日時以降に自動削除されます(最後のメッセージから30日後)"
},
"messages": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "会話内のメッセージID"
},
"role": {
"type": "string",
"description": "user(質問)または assistant(回答)"
},
"content": {
"type": "string",
"description": "質問、またはMarkdown形式の回答"
},
"queries": {
"type": "array",
"items": {
"type": "object"
},
"description": "回答の根拠: 回答の裏付けとなった正確なAPIクエリ。[{tool, input, status, error}] の形式"
},
"chart": {
"anyOf": [
{
"type": "object",
"description": "回答のグラフ: {type: line, labels, series, comparison, metric, format} または {type: table, columns, rows}"
},
{
"type": "null"
}
]
},
"goal_draft": {
"anyOf": [
{
"type": "object",
"description": "アシスタントが提案したゴール。goals_create で確定します"
},
{
"type": "null"
}
]
},
"input_tokens": {
"anyOf": [
{
"type": "integer",
"description": "使用したモデルの入力トークン数"
},
{
"type": "null"
}
]
},
"output_tokens": {
"anyOf": [
{
"type": "integer",
"description": "使用したモデルの出力トークン数"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
},
"description": "質問と回答(古い順)"
}
}
}
POST
/sites/:site_id/ask/:ask_conversation_id/messages.json
会話でフォローアップの質問をする(月間のAI質問数の上限に含まれます)。回答を返します。
assistant_ask_followup
権限: analytics.read
curl -X POST https://privatusanalytics.com/sites/:site_id/ask/:ask_conversation_id/messages.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"question": {
"type": "string",
"description": "日常の言葉で書いた質問",
"examples": [
"Which pages had the most visitors last week?"
]
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
},
"ask_conversation_id": {
"type": "string",
"description": "リソースの Ask conversation"
}
},
"required": [
"question",
"site_id",
"ask_conversation_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "会話内のメッセージID"
},
"role": {
"type": "string",
"description": "user(質問)または assistant(回答)"
},
"content": {
"type": "string",
"description": "質問、またはMarkdown形式の回答"
},
"queries": {
"type": "array",
"items": {
"type": "object"
},
"description": "回答の根拠: 回答の裏付けとなった正確なAPIクエリ。[{tool, input, status, error}] の形式"
},
"chart": {
"anyOf": [
{
"type": "object",
"description": "回答のグラフ: {type: line, labels, series, comparison, metric, format} または {type: table, columns, rows}"
},
{
"type": "null"
}
]
},
"goal_draft": {
"anyOf": [
{
"type": "object",
"description": "アシスタントが提案したゴール。goals_create で確定します"
},
{
"type": "null"
}
]
},
"input_tokens": {
"anyOf": [
{
"type": "integer",
"description": "使用したモデルの入力トークン数"
},
{
"type": "null"
}
]
},
"output_tokens": {
"anyOf": [
{
"type": "integer",
"description": "使用したモデルの出力トークン数"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
アップタイム
POST
/sites/:site_id/uptime.json
サイトのアップタイムチェックを追加
uptime_checks_create
権限: uptime.manage
curl -X POST https://privatusanalytics.com/sites/:site_id/uptime.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "表示名(デフォルトは対象)"
},
"kind": {
"type": "string",
"description": "http(ステータスコード)、keyword(本文に含まれる)、tcp(host:port)、dns(名前解決できる)のいずれか",
"enum": [
"http",
"keyword",
"tcp",
"dns"
],
"default": "http"
},
"url": {
"type": "string",
"description": "http/keywordチェック用のURL",
"examples": [
"https://example.com/health"
]
},
"host": {
"type": "string",
"description": "tcp/dnsチェック用のホスト名"
},
"port": {
"type": "integer",
"description": "tcpチェック用のTCPポート"
},
"keyword": {
"type": "string",
"description": "レスポンス本文に含まれている必要があるテキスト(keyword)"
},
"expected_status": {
"type": "integer",
"description": "期待するHTTPステータスコード",
"default": 200
},
"http_method": {
"type": "string",
"description": "HTTPメソッド",
"enum": [
"GET",
"HEAD"
],
"default": "GET"
},
"interval_seconds": {
"type": "integer",
"description": "チェックの間隔(秒)(プランの最小値が適用されます。デフォルトは300または最小値)"
},
"timeout_seconds": {
"type": "integer",
"description": "プローブがタイムアウトするまでの秒数(1〜30)",
"default": 20
},
"public": {
"type": "boolean",
"description": "公開ステータスページに表示してよい",
"default": false
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"site_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "チェックID(upc_…)"
},
"workspace_id": {
"type": "string"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "チェックが属するサイト"
},
{
"type": "null"
}
]
},
"name": {
"type": "string"
},
"kind": {
"type": "string",
"description": "http、keyword、tcp、dns のいずれか"
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"host": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"port": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"keyword": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"expected_status": {
"type": "integer"
},
"http_method": {
"type": "string"
},
"interval_seconds": {
"type": "integer"
},
"timeout_seconds": {
"type": "integer"
},
"status": {
"type": "string",
"description": "up、down、pending、paused のいずれか"
},
"enabled": {
"type": "boolean"
},
"public": {
"type": "boolean",
"description": "ステータスページに表示してよい"
},
"last_checked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"next_check_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_response_ms": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"ssl_expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"ssl_issuer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"domain_expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/uptime/checks/:id.json
アップタイムチェックとその履歴を削除
uptime_checks_delete
権限: uptime.manage
curl -X DELETE https://privatusanalytics.com/uptime/checks/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "チェックID(upc_…)"
},
"workspace_id": {
"type": "string"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "チェックが属するサイト"
},
{
"type": "null"
}
]
},
"name": {
"type": "string"
},
"kind": {
"type": "string",
"description": "http、keyword、tcp、dns のいずれか"
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"host": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"port": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"keyword": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"expected_status": {
"type": "integer"
},
"http_method": {
"type": "string"
},
"interval_seconds": {
"type": "integer"
},
"timeout_seconds": {
"type": "integer"
},
"status": {
"type": "string",
"description": "up、down、pending、paused のいずれか"
},
"enabled": {
"type": "boolean"
},
"public": {
"type": "boolean",
"description": "ステータスページに表示してよい"
},
"last_checked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"next_check_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_response_ms": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"ssl_expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"ssl_issuer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"domain_expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/sites/:site_id/uptime.json
サイトのアップタイムチェックを一覧表示
uptime_checks_list
権限: analytics.read
curl https://privatusanalytics.com/sites/:site_id/uptime.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"status": {
"type": "string",
"description": "この状態のチェックのみ",
"enum": [
"up",
"down",
"pending",
"paused"
]
},
"query": {
"type": "string",
"description": "名前または対象で絞り込む"
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
},
"page": {
"type": "integer",
"description": "ページ(1から)"
},
"per_page": {
"type": "integer",
"description": "1ページあたりの結果数(最大100)"
}
},
"required": [
"site_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "チェックID(upc_…)"
},
"workspace_id": {
"type": "string"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "チェックが属するサイト"
},
{
"type": "null"
}
]
},
"name": {
"type": "string"
},
"kind": {
"type": "string",
"description": "http、keyword、tcp、dns のいずれか"
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"host": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"port": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"keyword": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"expected_status": {
"type": "integer"
},
"http_method": {
"type": "string"
},
"interval_seconds": {
"type": "integer"
},
"timeout_seconds": {
"type": "integer"
},
"status": {
"type": "string",
"description": "up、down、pending、paused のいずれか"
},
"enabled": {
"type": "boolean"
},
"public": {
"type": "boolean",
"description": "ステータスページに表示してよい"
},
"last_checked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"next_check_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_response_ms": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"ssl_expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"ssl_issuer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"domain_expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
}
POST
/uptime/checks/:id/pause.json
アップタイムチェックを一時停止
uptime_checks_pause
権限: uptime.manage
curl -X POST https://privatusanalytics.com/uptime/checks/:id/pause.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "チェックID(upc_…)"
},
"workspace_id": {
"type": "string"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "チェックが属するサイト"
},
{
"type": "null"
}
]
},
"name": {
"type": "string"
},
"kind": {
"type": "string",
"description": "http、keyword、tcp、dns のいずれか"
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"host": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"port": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"keyword": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"expected_status": {
"type": "integer"
},
"http_method": {
"type": "string"
},
"interval_seconds": {
"type": "integer"
},
"timeout_seconds": {
"type": "integer"
},
"status": {
"type": "string",
"description": "up、down、pending、paused のいずれか"
},
"enabled": {
"type": "boolean"
},
"public": {
"type": "boolean",
"description": "ステータスページに表示してよい"
},
"last_checked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"next_check_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_response_ms": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"ssl_expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"ssl_issuer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"domain_expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
POST
/uptime/checks/:id/resume.json
一時停止中のアップタイムチェックを再開
uptime_checks_resume
権限: uptime.manage
curl -X POST https://privatusanalytics.com/uptime/checks/:id/resume.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "チェックID(upc_…)"
},
"workspace_id": {
"type": "string"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "チェックが属するサイト"
},
{
"type": "null"
}
]
},
"name": {
"type": "string"
},
"kind": {
"type": "string",
"description": "http、keyword、tcp、dns のいずれか"
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"host": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"port": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"keyword": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"expected_status": {
"type": "integer"
},
"http_method": {
"type": "string"
},
"interval_seconds": {
"type": "integer"
},
"timeout_seconds": {
"type": "integer"
},
"status": {
"type": "string",
"description": "up、down、pending、paused のいずれか"
},
"enabled": {
"type": "boolean"
},
"public": {
"type": "boolean",
"description": "ステータスページに表示してよい"
},
"last_checked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"next_check_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_response_ms": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"ssl_expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"ssl_issuer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"domain_expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/uptime/checks/:id.json
アップタイムチェックを取得: 24時間・7日・30日のアップタイム、応答時間、インシデント
uptime_checks_get
権限: analytics.read
curl https://privatusanalytics.com/uptime/checks/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"range": {
"type": "string",
"description": "応答時間グラフのウィンドウ",
"enum": [
"24h",
"7d",
"30d"
],
"default": "24h"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"check": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "チェックID(upc_…)"
},
"workspace_id": {
"type": "string"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "チェックが属するサイト"
},
{
"type": "null"
}
]
},
"name": {
"type": "string"
},
"kind": {
"type": "string",
"description": "http、keyword、tcp、dns のいずれか"
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"host": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"port": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"keyword": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"expected_status": {
"type": "integer"
},
"http_method": {
"type": "string"
},
"interval_seconds": {
"type": "integer"
},
"timeout_seconds": {
"type": "integer"
},
"status": {
"type": "string",
"description": "up、down、pending、paused のいずれか"
},
"enabled": {
"type": "boolean"
},
"public": {
"type": "boolean",
"description": "ステータスページに表示してよい"
},
"last_checked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"next_check_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_response_ms": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"ssl_expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"ssl_issuer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"domain_expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
},
"uptime": {
"type": "object",
"description": "24時間、7日、30日のアップタイム(%)"
},
"range": {
"type": "string",
"description": "response_times のウィンドウ"
},
"response_times": {
"type": "object",
"description": "バケットごとの平均応答時間(ミリ秒): {unit, labels, series: {location: [ms…]}}"
},
"incidents": {
"type": "array",
"items": {
"type": "object",
"properties": {
"started_at": {
"type": "string",
"format": "date-time"
},
"resolved_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"duration_seconds": {
"type": "integer",
"description": "まだ継続中の場合は、これまでの時間"
},
"cause": {
"anyOf": [
{
"type": "string",
"description": "最も多いエラー(例: timeout または status_503)"
},
{
"type": "null"
}
]
},
"failed_locations": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
}
PATCH
/uptime/checks/:id.json
アップタイムチェックを変更
uptime_checks_update
権限: uptime.manage
curl -X PATCH https://privatusanalytics.com/uptime/checks/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "表示名(デフォルトは対象)"
},
"kind": {
"type": "string",
"description": "http(ステータスコード)、keyword(本文に含まれる)、tcp(host:port)、dns(名前解決できる)のいずれか",
"enum": [
"http",
"keyword",
"tcp",
"dns"
]
},
"url": {
"type": "string",
"description": "http/keywordチェック用のURL",
"examples": [
"https://example.com/health"
]
},
"host": {
"type": "string",
"description": "tcp/dnsチェック用のホスト名"
},
"port": {
"type": "integer",
"description": "tcpチェック用のTCPポート"
},
"keyword": {
"type": "string",
"description": "レスポンス本文に含まれている必要があるテキスト(keyword)"
},
"expected_status": {
"type": "integer",
"description": "期待するHTTPステータスコード"
},
"http_method": {
"type": "string",
"description": "HTTPメソッド",
"enum": [
"GET",
"HEAD"
]
},
"interval_seconds": {
"type": "integer",
"description": "チェックの間隔(秒)(プランの最小値が適用されます。デフォルトは300または最小値)"
},
"timeout_seconds": {
"type": "integer",
"description": "プローブがタイムアウトするまでの秒数(1〜30)"
},
"public": {
"type": "boolean",
"description": "公開ステータスページに表示してよい"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "チェックID(upc_…)"
},
"workspace_id": {
"type": "string"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "チェックが属するサイト"
},
{
"type": "null"
}
]
},
"name": {
"type": "string"
},
"kind": {
"type": "string",
"description": "http、keyword、tcp、dns のいずれか"
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"host": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"port": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"keyword": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"expected_status": {
"type": "integer"
},
"http_method": {
"type": "string"
},
"interval_seconds": {
"type": "integer"
},
"timeout_seconds": {
"type": "integer"
},
"status": {
"type": "string",
"description": "up、down、pending、paused のいずれか"
},
"enabled": {
"type": "boolean"
},
"public": {
"type": "boolean",
"description": "ステータスページに表示してよい"
},
"last_checked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"next_check_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_response_ms": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"ssl_expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"ssl_issuer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"domain_expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/uptime/probes.json
プローブのデータセンター、User-Agent、送信元IP範囲(アップタイムプローブを許可リストに登録するため)
uptime_probes_list
権限: public
· HTTPのみ(MCPツールではありません)
curl https://privatusanalytics.com/uptime/probes.json
{
"type": "object",
"properties": {},
"required": []
}
{
"type": "object"
}
POST
/uptime/probes/results.json
外部プローブエージェントからの結果を送信(Bearerのアップタイムプローブトークン)
uptime_probes_results
権限: public
· HTTPのみ(MCPツールではありません)
curl -X POST https://privatusanalytics.com/uptime/probes/results.json \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"results": {
"type": "array",
"items": {
"type": "object",
"properties": {
"check_id": {
"type": "string"
},
"location": {
"type": "string"
},
"ok": {
"type": "boolean"
},
"status_code": {
"type": "integer"
},
"response_ms": {
"type": "integer"
},
"error": {
"type": "string"
},
"checked_at": {
"type": "string",
"format": "date-time"
}
}
},
"description": "プローブの結果: [{check_id, location, ok, status_code, response_ms, error, checked_at}]"
}
},
"required": [
"results"
]
}
{
"type": "object"
}
POST
/workspaces/:workspace_id/uptime.json
ワークスペースのアップタイムチェックを追加(サイトに紐付けません)
workspace_uptime_checks_create
権限: uptime.manage
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/uptime.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "表示名(デフォルトは対象)"
},
"kind": {
"type": "string",
"description": "http(ステータスコード)、keyword(本文に含まれる)、tcp(host:port)、dns(名前解決できる)のいずれか",
"enum": [
"http",
"keyword",
"tcp",
"dns"
],
"default": "http"
},
"url": {
"type": "string",
"description": "http/keywordチェック用のURL",
"examples": [
"https://example.com/health"
]
},
"host": {
"type": "string",
"description": "tcp/dnsチェック用のホスト名"
},
"port": {
"type": "integer",
"description": "tcpチェック用のTCPポート"
},
"keyword": {
"type": "string",
"description": "レスポンス本文に含まれている必要があるテキスト(keyword)"
},
"expected_status": {
"type": "integer",
"description": "期待するHTTPステータスコード",
"default": 200
},
"http_method": {
"type": "string",
"description": "HTTPメソッド",
"enum": [
"GET",
"HEAD"
],
"default": "GET"
},
"interval_seconds": {
"type": "integer",
"description": "チェックの間隔(秒)(プランの最小値が適用されます。デフォルトは300または最小値)"
},
"timeout_seconds": {
"type": "integer",
"description": "プローブがタイムアウトするまでの秒数(1〜30)",
"default": 20
},
"public": {
"type": "boolean",
"description": "公開ステータスページに表示してよい",
"default": false
},
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
}
},
"required": [
"workspace_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "チェックID(upc_…)"
},
"workspace_id": {
"type": "string"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "チェックが属するサイト"
},
{
"type": "null"
}
]
},
"name": {
"type": "string"
},
"kind": {
"type": "string",
"description": "http、keyword、tcp、dns のいずれか"
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"host": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"port": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"keyword": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"expected_status": {
"type": "integer"
},
"http_method": {
"type": "string"
},
"interval_seconds": {
"type": "integer"
},
"timeout_seconds": {
"type": "integer"
},
"status": {
"type": "string",
"description": "up、down、pending、paused のいずれか"
},
"enabled": {
"type": "boolean"
},
"public": {
"type": "boolean",
"description": "ステータスページに表示してよい"
},
"last_checked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"next_check_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_response_ms": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"ssl_expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"ssl_issuer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"domain_expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/workspaces/:workspace_id/uptime.json
ワークスペース内のすべてのアップタイムチェックを一覧表示
workspace_uptime_checks_list
権限: analytics.read
curl https://privatusanalytics.com/workspaces/:workspace_id/uptime.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"status": {
"type": "string",
"description": "この状態のチェックのみ",
"enum": [
"up",
"down",
"pending",
"paused"
]
},
"query": {
"type": "string",
"description": "名前または対象で絞り込む"
},
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
},
"page": {
"type": "integer",
"description": "ページ(1から)"
},
"per_page": {
"type": "integer",
"description": "1ページあたりの結果数(最大100)"
}
},
"required": [
"workspace_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "チェックID(upc_…)"
},
"workspace_id": {
"type": "string"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "チェックが属するサイト"
},
{
"type": "null"
}
]
},
"name": {
"type": "string"
},
"kind": {
"type": "string",
"description": "http、keyword、tcp、dns のいずれか"
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"host": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"port": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"keyword": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"expected_status": {
"type": "integer"
},
"http_method": {
"type": "string"
},
"interval_seconds": {
"type": "integer"
},
"timeout_seconds": {
"type": "integer"
},
"status": {
"type": "string",
"description": "up、down、pending、paused のいずれか"
},
"enabled": {
"type": "boolean"
},
"public": {
"type": "boolean",
"description": "ステータスページに表示してよい"
},
"last_checked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"next_check_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_response_ms": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"ssl_expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"ssl_issuer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"domain_expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
}
アナリティクス
GET
/sites/:site_id/overview.json
サイト概要: 指標、グラフ系列、上位パネル、ライブ訪問者、メモ
stats_overview
権限: analytics.read
curl https://privatusanalytics.com/sites/:site_id/overview.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"period": {
"type": "string",
"description": "期間のプリセット。from/to を使うには custom を指定",
"enum": [
"today",
"yesterday",
"24h",
"7d",
"14d",
"28d",
"30d",
"90d",
"mtd",
"last_month",
"qtd",
"last_quarter",
"ytd",
"12mo",
"last_year",
"all",
"custom"
],
"default": "30d"
},
"from": {
"type": "string",
"format": "date",
"description": "カスタム期間の開始(サイトのタイムゾーン)"
},
"to": {
"type": "string",
"format": "date",
"description": "カスタム期間の終了(この日を含む)"
},
"compare": {
"type": "string",
"description": "比較期間",
"enum": [
"none",
"previous_period",
"previous_year",
"custom"
],
"default": "none"
},
"compare_from": {
"type": "string",
"format": "date",
"description": "カスタム比較の開始"
},
"compare_to": {
"type": "string",
"format": "date",
"description": "カスタム比較の終了"
},
"match_weekday": {
"type": "boolean",
"description": "比較する日の曜日をそろえる",
"default": false
},
"filters": {
"type": "array",
"items": {},
"description": "フィルター: [[\"dimension\",\"operator\",\"value\"], …]。演算子: is、is_not、any_of、none_of、contains、not_contains、starts_with、regex、not_regex、gt、lt、between。OR条件にする場合は {\"any\": [...]} で条件をまとめます。",
"default": []
},
"segment_id": {
"type": "string",
"description": "保存済みのセグメントを適用(seg_…)"
},
"include_imported": {
"type": "boolean",
"description": "インポートした過去データを追加(最初のネイティブイベントより前の日付が対象。フィルターやセグメントを適用している場合は無視されます)",
"default": false
},
"interval": {
"type": "string",
"description": "グラフのバケットサイズ",
"enum": [
"auto",
"minute",
"hour",
"day",
"week",
"month",
"quarter",
"year"
],
"default": "auto"
},
"panels": {
"type": "array",
"items": {
"type": "string"
},
"description": "上位の値を含めるディメンション",
"default": [
"channel",
"referrer",
"page",
"entry_page",
"country",
"device",
"browser",
"os",
"utm_campaign",
"event",
"goal"
]
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"site_id"
]
}
{
"type": "object"
}
GET
/sites/:site_id/experiments.json
実験レポート: バリアントごとのコンバージョン率、コントロールとの差、有意性(2標本比率のz検定)
experiments_report
権限: analytics.read
curl https://privatusanalytics.com/sites/:site_id/experiments.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"period": {
"type": "string",
"description": "期間のプリセット。from/to を使うには custom を指定",
"enum": [
"today",
"yesterday",
"24h",
"7d",
"14d",
"28d",
"30d",
"90d",
"mtd",
"last_month",
"qtd",
"last_quarter",
"ytd",
"12mo",
"last_year",
"all",
"custom"
],
"default": "30d"
},
"from": {
"type": "string",
"format": "date",
"description": "カスタム期間の開始(サイトのタイムゾーン)"
},
"to": {
"type": "string",
"format": "date",
"description": "カスタム期間の終了(この日を含む)"
},
"compare": {
"type": "string",
"description": "比較期間",
"enum": [
"none",
"previous_period",
"previous_year",
"custom"
],
"default": "none"
},
"compare_from": {
"type": "string",
"format": "date",
"description": "カスタム比較の開始"
},
"compare_to": {
"type": "string",
"format": "date",
"description": "カスタム比較の終了"
},
"match_weekday": {
"type": "boolean",
"description": "比較する日の曜日をそろえる",
"default": false
},
"filters": {
"type": "array",
"items": {},
"description": "フィルター: [[\"dimension\",\"operator\",\"value\"], …]。演算子: is、is_not、any_of、none_of、contains、not_contains、starts_with、regex、not_regex、gt、lt、between。OR条件にする場合は {\"any\": [...]} で条件をまとめます。",
"default": []
},
"segment_id": {
"type": "string",
"description": "保存済みのセグメントを適用(seg_…)"
},
"include_imported": {
"type": "boolean",
"description": "インポートした過去データを追加(最初のネイティブイベントより前の日付が対象。フィルターやセグメントを適用している場合は無視されます)",
"default": false
},
"property": {
"type": "string",
"description": "バリアントを保持するイベントプロパティ(例: variant)",
"examples": [
"variant"
]
},
"goal_id": {
"type": "string",
"description": "コンバージョンとしてカウントするゴール(goal_…)"
},
"control": {
"type": "string",
"description": "コントロールのバリアント(存在すれば \"control\" がデフォルト、なければ訪問数が最も多いバリアント)"
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"property",
"goal_id",
"site_id"
]
}
{
"type": "object"
}
GET
/sites/:site_id/insights.json
前の期間と比べた注目すべき変化を、日常の言葉で説明(大きな変動、ゴールコンバージョンの変化)
insights_get
権限: analytics.read
curl https://privatusanalytics.com/sites/:site_id/insights.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"period": {
"type": "string",
"description": "昨日までの完全な日数を、その前の同じ日数と比較",
"enum": [
"7d",
"14d",
"28d",
"30d"
],
"default": "7d"
},
"limit": {
"type": "integer",
"description": "インサイトの最大件数(1〜20)",
"default": 8
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"site_id"
]
}
{
"type": "object"
}
GET
/sites/:site_id/journeys.json
ジャーニー: ページ(または任意の入口)の後、またはページやゴールの前の、上位3ステップの経路
journeys_explore
権限: analytics.read
curl https://privatusanalytics.com/sites/:site_id/journeys.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"period": {
"type": "string",
"description": "期間のプリセット。from/to を使うには custom を指定",
"enum": [
"today",
"yesterday",
"24h",
"7d",
"14d",
"28d",
"30d",
"90d",
"mtd",
"last_month",
"qtd",
"last_quarter",
"ytd",
"12mo",
"last_year",
"all",
"custom"
],
"default": "30d"
},
"from": {
"type": "string",
"format": "date",
"description": "カスタム期間の開始(サイトのタイムゾーン)"
},
"to": {
"type": "string",
"format": "date",
"description": "カスタム期間の終了(この日を含む)"
},
"compare": {
"type": "string",
"description": "比較期間",
"enum": [
"none",
"previous_period",
"previous_year",
"custom"
],
"default": "none"
},
"compare_from": {
"type": "string",
"format": "date",
"description": "カスタム比較の開始"
},
"compare_to": {
"type": "string",
"format": "date",
"description": "カスタム比較の終了"
},
"match_weekday": {
"type": "boolean",
"description": "比較する日の曜日をそろえる",
"default": false
},
"filters": {
"type": "array",
"items": {},
"description": "フィルター: [[\"dimension\",\"operator\",\"value\"], …]。演算子: is、is_not、any_of、none_of、contains、not_contains、starts_with、regex、not_regex、gt、lt、between。OR条件にする場合は {\"any\": [...]} で条件をまとめます。",
"default": []
},
"segment_id": {
"type": "string",
"description": "保存済みのセグメントを適用(seg_…)"
},
"include_imported": {
"type": "boolean",
"description": "インポートした過去データを追加(最初のネイティブイベントより前の日付が対象。フィルターやセグメントを適用している場合は無視されます)",
"default": false
},
"mode": {
"type": "string",
"description": "forward: 開始ページの後のページ、reverse: 終了ページまたはゴールに至るページ",
"enum": [
"forward",
"reverse"
],
"default": "forward"
},
"path": {
"type": "string",
"description": "開始ページ(forward)または終了ページ(reverse)。空欄は任意の入口(forwardのみ)"
},
"goal_id": {
"type": "string",
"description": "reverseモード: ページの代わりにこのゴール(goal_…)で終了する"
},
"limit": {
"type": "integer",
"description": "ステップごとに表示するページ数(最大12)",
"default": 6
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"site_id"
]
}
{
"type": "object"
}
GET
/sites/:site_id/pages/detail.json
ページ詳細: 1つのパスについての指標、前後のページ、流入元、Web Vitals、イベント、クリックマップ
pages_detail
権限: analytics.read
curl https://privatusanalytics.com/sites/:site_id/pages/detail.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"period": {
"type": "string",
"description": "期間のプリセット。from/to を使うには custom を指定",
"enum": [
"today",
"yesterday",
"24h",
"7d",
"14d",
"28d",
"30d",
"90d",
"mtd",
"last_month",
"qtd",
"last_quarter",
"ytd",
"12mo",
"last_year",
"all",
"custom"
],
"default": "30d"
},
"from": {
"type": "string",
"format": "date",
"description": "カスタム期間の開始(サイトのタイムゾーン)"
},
"to": {
"type": "string",
"format": "date",
"description": "カスタム期間の終了(この日を含む)"
},
"compare": {
"type": "string",
"description": "比較期間",
"enum": [
"none",
"previous_period",
"previous_year",
"custom"
],
"default": "none"
},
"compare_from": {
"type": "string",
"format": "date",
"description": "カスタム比較の開始"
},
"compare_to": {
"type": "string",
"format": "date",
"description": "カスタム比較の終了"
},
"match_weekday": {
"type": "boolean",
"description": "比較する日の曜日をそろえる",
"default": false
},
"filters": {
"type": "array",
"items": {},
"description": "フィルター: [[\"dimension\",\"operator\",\"value\"], …]。演算子: is、is_not、any_of、none_of、contains、not_contains、starts_with、regex、not_regex、gt、lt、between。OR条件にする場合は {\"any\": [...]} で条件をまとめます。",
"default": []
},
"segment_id": {
"type": "string",
"description": "保存済みのセグメントを適用(seg_…)"
},
"include_imported": {
"type": "boolean",
"description": "インポートした過去データを追加(最初のネイティブイベントより前の日付が対象。フィルターやセグメントを適用している場合は無視されます)",
"default": false
},
"path": {
"type": "string",
"description": "ページのパス(例: /pricing)",
"examples": [
"/pricing"
]
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"path",
"site_id"
]
}
{
"type": "object"
}
GET
/sites/:site_id/stats/aggregate.json
期間ごとの主要指標(比較付き)
stats_aggregate
権限: analytics.read
curl https://privatusanalytics.com/sites/:site_id/stats/aggregate.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"period": {
"type": "string",
"description": "期間のプリセット。from/to を使うには custom を指定",
"enum": [
"today",
"yesterday",
"24h",
"7d",
"14d",
"28d",
"30d",
"90d",
"mtd",
"last_month",
"qtd",
"last_quarter",
"ytd",
"12mo",
"last_year",
"all",
"custom"
],
"default": "30d"
},
"from": {
"type": "string",
"format": "date",
"description": "カスタム期間の開始(サイトのタイムゾーン)"
},
"to": {
"type": "string",
"format": "date",
"description": "カスタム期間の終了(この日を含む)"
},
"compare": {
"type": "string",
"description": "比較期間",
"enum": [
"none",
"previous_period",
"previous_year",
"custom"
],
"default": "none"
},
"compare_from": {
"type": "string",
"format": "date",
"description": "カスタム比較の開始"
},
"compare_to": {
"type": "string",
"format": "date",
"description": "カスタム比較の終了"
},
"match_weekday": {
"type": "boolean",
"description": "比較する日の曜日をそろえる",
"default": false
},
"filters": {
"type": "array",
"items": {},
"description": "フィルター: [[\"dimension\",\"operator\",\"value\"], …]。演算子: is、is_not、any_of、none_of、contains、not_contains、starts_with、regex、not_regex、gt、lt、between。OR条件にする場合は {\"any\": [...]} で条件をまとめます。",
"default": []
},
"segment_id": {
"type": "string",
"description": "保存済みのセグメントを適用(seg_…)"
},
"include_imported": {
"type": "boolean",
"description": "インポートした過去データを追加(最初のネイティブイベントより前の日付が対象。フィルターやセグメントを適用している場合は無視されます)",
"default": false
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"site_id"
]
}
{
"type": "object"
}
GET
/sites/:site_id/breakdown/:dimension.json
ディメンション(ページ、流入元、国など)の上位の値
stats_breakdown
権限: analytics.read
curl https://privatusanalytics.com/sites/:site_id/breakdown/:dimension.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"period": {
"type": "string",
"description": "期間のプリセット。from/to を使うには custom を指定",
"enum": [
"today",
"yesterday",
"24h",
"7d",
"14d",
"28d",
"30d",
"90d",
"mtd",
"last_month",
"qtd",
"last_quarter",
"ytd",
"12mo",
"last_year",
"all",
"custom"
],
"default": "30d"
},
"from": {
"type": "string",
"format": "date",
"description": "カスタム期間の開始(サイトのタイムゾーン)"
},
"to": {
"type": "string",
"format": "date",
"description": "カスタム期間の終了(この日を含む)"
},
"compare": {
"type": "string",
"description": "比較期間",
"enum": [
"none",
"previous_period",
"previous_year",
"custom"
],
"default": "none"
},
"compare_from": {
"type": "string",
"format": "date",
"description": "カスタム比較の開始"
},
"compare_to": {
"type": "string",
"format": "date",
"description": "カスタム比較の終了"
},
"match_weekday": {
"type": "boolean",
"description": "比較する日の曜日をそろえる",
"default": false
},
"filters": {
"type": "array",
"items": {},
"description": "フィルター: [[\"dimension\",\"operator\",\"value\"], …]。演算子: is、is_not、any_of、none_of、contains、not_contains、starts_with、regex、not_regex、gt、lt、between。OR条件にする場合は {\"any\": [...]} で条件をまとめます。",
"default": []
},
"segment_id": {
"type": "string",
"description": "保存済みのセグメントを適用(seg_…)"
},
"include_imported": {
"type": "boolean",
"description": "インポートした過去データを追加(最初のネイティブイベントより前の日付が対象。フィルターやセグメントを適用している場合は無視されます)",
"default": false
},
"dimension": {
"type": "string",
"description": "リソースの Dimension"
},
"limit": {
"type": "integer",
"description": "1ページあたりの行数(最大1000)",
"default": 10
},
"page": {
"type": "integer",
"description": "ページ番号",
"default": 1
},
"sort": {
"type": "string",
"description": "並べ替えの指標",
"enum": [
"visitors",
"visits",
"pageviews",
"revenue"
]
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"dimension",
"site_id"
]
}
{
"type": "object"
}
GET
/sites/:site_id/stats/timeseries.json
グラフ用の時間バケットごとの指標
stats_timeseries
権限: analytics.read
curl https://privatusanalytics.com/sites/:site_id/stats/timeseries.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"period": {
"type": "string",
"description": "期間のプリセット。from/to を使うには custom を指定",
"enum": [
"today",
"yesterday",
"24h",
"7d",
"14d",
"28d",
"30d",
"90d",
"mtd",
"last_month",
"qtd",
"last_quarter",
"ytd",
"12mo",
"last_year",
"all",
"custom"
],
"default": "30d"
},
"from": {
"type": "string",
"format": "date",
"description": "カスタム期間の開始(サイトのタイムゾーン)"
},
"to": {
"type": "string",
"format": "date",
"description": "カスタム期間の終了(この日を含む)"
},
"compare": {
"type": "string",
"description": "比較期間",
"enum": [
"none",
"previous_period",
"previous_year",
"custom"
],
"default": "none"
},
"compare_from": {
"type": "string",
"format": "date",
"description": "カスタム比較の開始"
},
"compare_to": {
"type": "string",
"format": "date",
"description": "カスタム比較の終了"
},
"match_weekday": {
"type": "boolean",
"description": "比較する日の曜日をそろえる",
"default": false
},
"filters": {
"type": "array",
"items": {},
"description": "フィルター: [[\"dimension\",\"operator\",\"value\"], …]。演算子: is、is_not、any_of、none_of、contains、not_contains、starts_with、regex、not_regex、gt、lt、between。OR条件にする場合は {\"any\": [...]} で条件をまとめます。",
"default": []
},
"segment_id": {
"type": "string",
"description": "保存済みのセグメントを適用(seg_…)"
},
"include_imported": {
"type": "boolean",
"description": "インポートした過去データを追加(最初のネイティブイベントより前の日付が対象。フィルターやセグメントを適用している場合は無視されます)",
"default": false
},
"interval": {
"type": "string",
"description": "バケットサイズ。auto は期間に応じて自動で選びます",
"enum": [
"auto",
"minute",
"hour",
"day",
"week",
"month",
"quarter",
"year"
],
"default": "auto"
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"site_id"
]
}
{
"type": "object"
}
アフィリエイトプログラム
GET
/account/affiliate/commissions.json
アフィリエイトのコミッションを一覧表示
affiliate_commissions_list
コミッション、返金やチャージバックによる取り消し、およびその差し戻しを新しい順に返します。金額はセント単位です。
権限: member
curl https://privatusanalytics.com/account/affiliate/commissions.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"status": {
"type": "string",
"description": "このステータスのコミッションのみ",
"enum": [
"pending",
"approved",
"paid",
"void"
]
},
"page": {
"type": "integer",
"description": "ページ(1から)"
},
"per_page": {
"type": "integer",
"description": "1ページあたりの結果数(最大100)"
}
},
"required": []
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "コミッションID"
},
"kind": {
"type": "string",
"description": "commission、clawback(返金またはチャージバック)、reversal のいずれか"
},
"status": {
"type": "string",
"description": "pending(保留中)、approved(支払い可能)、paid、void のいずれか"
},
"amount_cents": {
"type": "integer",
"description": "あなたの取り分(セント単位。clawback の場合は負の値)"
},
"basis_cents": {
"type": "integer",
"description": "計算の基になった税抜きの正味支払額(セント単位)"
},
"currency": {
"type": "string",
"description": "ISO通貨コード"
},
"earned_at": {
"type": "string",
"format": "date-time",
"description": "支払い(または返金)が発生した日時"
},
"approved_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "支払い可能になった日時"
},
{
"type": "null"
}
]
},
"paid_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "支払われた日時"
},
{
"type": "null"
}
]
}
}
}
}
GET
/account/affiliate/signup-box.json
アフィリエイトの登録ボックスのコードと結果を取得
affiliate_signup_box_get
選択したテーマ用の登録ボックスの埋め込みコード(スクリプトと通常の iframe)、フォームを事前入力する属性、スクリプトがページ上で発火するイベント、ボックスの数値(確認待ちの登録、確認済みの登録、有料顧客)。アフィリエイト申請が承認されるまで available は false です。
権限: member
curl https://privatusanalytics.com/account/affiliate/signup-box.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"theme": {
"type": "string",
"description": "ボックスのテーマ: auto(訪問者のデバイスに合わせる)、light、dark",
"enum": [
"auto",
"light",
"dark"
],
"examples": [
"auto"
],
"default": "auto"
}
},
"required": []
}
{
"type": "object",
"properties": {
"available": {
"type": "boolean",
"description": "登録ボックスがあるかどうか(承認済みアフィリエイトのみ)"
},
"theme": {
"type": "string",
"description": "コードの生成に使われたテーマ"
},
"frame_url": {
"anyOf": [
{
"type": "string",
"description": "ボックスのアドレス(通常の iframe 用)"
},
{
"type": "null"
}
]
},
"script": {
"anyOf": [
{
"type": "string",
"description": "スクリプトの埋め込みコード: 要素とローダースクリプト"
},
{
"type": "null"
}
]
},
"iframe": {
"anyOf": [
{
"type": "string",
"description": "通常の iframe の埋め込みコード"
},
{
"type": "null"
}
]
},
"prefill_attributes": {
"type": "array",
"description": "ログイン中の訪問者向けにフォームを事前入力する、要素の属性"
},
"events": {
"type": "array",
"description": "スクリプトが要素上で発火する DOM イベント"
},
"waiting": {
"type": "integer",
"description": "メールのリンクがまだ開かれていない登録"
},
"signups": {
"type": "integer",
"description": "ボックス経由の確認済み登録"
},
"customers": {
"type": "integer",
"description": "有料顧客になった登録"
}
}
}
GET
/account/affiliate.json
アフィリエイトのステータス、紹介リンク、統計を取得
affiliate_get
アフィリエイト申請のステータス、紹介リンク、紹介した登録数と有料顧客数、通貨ごとの残高(保留中、支払い可能、支払い済み)。申請していない場合、status は none です。
権限: member
curl https://privatusanalytics.com/account/affiliate.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {},
"required": []
}
{
"type": "object",
"properties": {
"status": {
"type": "string",
"description": "none(未申請)、pending、approved、rejected、suspended のいずれか"
},
"code": {
"anyOf": [
{
"type": "string",
"description": "あなたの紹介コード"
},
{
"type": "null"
}
]
},
"referral_url": {
"anyOf": [
{
"type": "string",
"description": "共有するリンク(承認済みのアフィリエイトのみ)"
},
{
"type": "null"
}
]
},
"payout_method": {
"anyOf": [
{
"type": "string",
"description": "wise または credit"
},
{
"type": "null"
}
]
},
"rejection_reason": {
"anyOf": [
{
"type": "string",
"description": "直近の申請が却下された理由"
},
{
"type": "null"
}
]
},
"applied_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "申請日時"
},
{
"type": "null"
}
]
},
"approved_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "申請が承認された日時"
},
{
"type": "null"
}
]
},
"credit_blocked": {
"anyOf": [
{
"type": "string",
"description": "アカウントクレジットが保留されている理由: program(ワークスペースが割引プログラムに参加中)、no_subscription、no_workspace。妨げるものがない場合は null"
},
{
"type": "null"
}
]
},
"signups": {
"type": "integer",
"description": "あなたのリンクまたはコード経由で作成されたアカウント"
},
"customers": {
"type": "integer",
"description": "紹介したワークスペースのうち、支払いのあったもの"
},
"balances": {
"type": "array",
"description": "通貨ごと: pending_cents(保留中)、approved_cents(支払い可能)、paid_cents"
},
"payouts": {
"type": "array",
"description": "最近の支払い。amount_cents、currency、payout_method、status(applied: 次回更新を待っているアカウントクレジット、または paid)、applied_at、paid_at を含みます"
},
"terms": {
"type": "object",
"description": "コミッション率、月数、保留日数、Wiseでの支払いの最低額(セント単位)"
}
}
}
アラート
POST
/alerts/:id/acknowledge.json
最新のインシデントを確認済みにする
alerts_acknowledge
権限: analytics.read
curl -X POST https://privatusanalytics.com/alerts/:id/acknowledge.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "アラートID(例: alr_7Q2K9XH3AB)"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "サイトID(使用量アラートでは null)"
},
{
"type": "null"
}
]
},
"name": {
"type": "string"
},
"kind": {
"type": "string",
"description": "threshold、anomaly、goal、no_data、usage、uptime、ssl、vitals のいずれか"
},
"metric": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"operator": {
"anyOf": [
{
"type": "string",
"description": "gt、gte、lt、lte のいずれか"
},
{
"type": "null"
}
]
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"window_minutes": {
"type": "integer"
},
"sensitivity": {
"type": "string",
"description": "anomalyの感度"
},
"goal_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"channel_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "通知チャネルID"
},
"state": {
"type": "string",
"description": "ok または triggered"
},
"enabled": {
"type": "boolean"
},
"muted_until": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_triggered_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_evaluated_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
POST
/workspaces/:workspace_id/alerts.json
アラートを作成
alerts_create
権限: content.write
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/alerts.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "サイトID(pa_…)。使用量アラート以外では必須"
},
"metric": {
"type": "string",
"description": "threshold/anomaly: visitors、visits、pageviews、bounce_rate、conversion。vitals: lcp、inp、cls、fcp、ttfb"
},
"operator": {
"type": "string",
"description": "比較演算子(gt、gte、lt、lte)。anomaly: lt は低下のみ、gt は急増のみ、空欄は両方",
"enum": [
"gt",
"gte",
"lt",
"lte"
]
},
"threshold": {
"type": "number",
"description": "threshold: 指標の値、goal: 完了数、no_data: 時間、usage: パーセント、ssl: 日数、vitals: ミリ秒(CLS: スコア)"
},
"window_minutes": {
"type": "integer",
"description": "評価ウィンドウ(分、5〜10080)"
},
"sensitivity": {
"type": "string",
"description": "anomaly: low、medium、high",
"enum": [
"low",
"medium",
"high"
]
},
"goal_id": {
"type": "string",
"description": "goal と conversion のアラート: ゴールID(goal_…)"
},
"uptime_check_id": {
"type": "string",
"description": "uptime/ssl: チェックID(デフォルト: サイトのすべてのチェック)"
},
"channel_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "通知チャネルID(nch_…)"
},
"enabled": {
"type": "boolean",
"description": "このアラートを評価する"
},
"name": {
"type": "string",
"description": "アラート名",
"examples": [
"Traffic dropped"
]
},
"kind": {
"type": "string",
"description": "threshold、anomaly、goal、no_data、usage、uptime、ssl、vitals のいずれか",
"enum": [
"threshold",
"anomaly",
"goal",
"no_data",
"usage",
"uptime",
"ssl",
"vitals"
]
},
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
}
},
"required": [
"name",
"kind",
"workspace_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "アラートID(例: alr_7Q2K9XH3AB)"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "サイトID(使用量アラートでは null)"
},
{
"type": "null"
}
]
},
"name": {
"type": "string"
},
"kind": {
"type": "string",
"description": "threshold、anomaly、goal、no_data、usage、uptime、ssl、vitals のいずれか"
},
"metric": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"operator": {
"anyOf": [
{
"type": "string",
"description": "gt、gte、lt、lte のいずれか"
},
{
"type": "null"
}
]
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"window_minutes": {
"type": "integer"
},
"sensitivity": {
"type": "string",
"description": "anomalyの感度"
},
"goal_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"channel_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "通知チャネルID"
},
"state": {
"type": "string",
"description": "ok または triggered"
},
"enabled": {
"type": "boolean"
},
"muted_until": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_triggered_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_evaluated_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/alerts/:id.json
アラートを削除
alerts_delete
権限: content.write
curl -X DELETE https://privatusanalytics.com/alerts/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "アラートID(例: alr_7Q2K9XH3AB)"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "サイトID(使用量アラートでは null)"
},
{
"type": "null"
}
]
},
"name": {
"type": "string"
},
"kind": {
"type": "string",
"description": "threshold、anomaly、goal、no_data、usage、uptime、ssl、vitals のいずれか"
},
"metric": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"operator": {
"anyOf": [
{
"type": "string",
"description": "gt、gte、lt、lte のいずれか"
},
{
"type": "null"
}
]
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"window_minutes": {
"type": "integer"
},
"sensitivity": {
"type": "string",
"description": "anomalyの感度"
},
"goal_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"channel_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "通知チャネルID"
},
"state": {
"type": "string",
"description": "ok または triggered"
},
"enabled": {
"type": "boolean"
},
"muted_until": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_triggered_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_evaluated_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/alerts/:id/history.json
アラートのインシデント履歴
alerts_history
権限: analytics.read
curl https://privatusanalytics.com/alerts/:id/history.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"open": {
"type": "boolean",
"description": "未解決のインシデントのみ",
"default": false
},
"id": {
"type": "string",
"description": "リソースの Id"
},
"page": {
"type": "integer",
"description": "ページ(1から)"
},
"per_page": {
"type": "integer",
"description": "1ページあたりの結果数(最大100)"
}
},
"required": [
"id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"triggered_at": {
"type": "string",
"format": "date-time"
},
"resolved_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"value": {
"anyOf": [
{
"type": "number",
"description": "発生時に測定された値"
},
{
"type": "null"
}
]
},
"message": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"acknowledged_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"acknowledged_by": {
"anyOf": [
{
"type": "string",
"description": "確認したメンバーの名前"
},
{
"type": "null"
}
]
}
}
}
}
GET
/workspaces/:workspace_id/alerts.json
アラートを一覧表示
alerts_list
権限: analytics.read
curl https://privatusanalytics.com/workspaces/:workspace_id/alerts.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "このサイトのアラートのみ(pa_…)"
},
"state": {
"type": "string",
"description": "ok または triggered のアラートのみ",
"enum": [
"ok",
"triggered"
]
},
"kind": {
"type": "string",
"description": "この種類のみ",
"enum": [
"threshold",
"anomaly",
"goal",
"no_data",
"usage",
"uptime",
"ssl",
"vitals"
]
},
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
},
"page": {
"type": "integer",
"description": "ページ(1から)"
},
"per_page": {
"type": "integer",
"description": "1ページあたりの結果数(最大100)"
}
},
"required": [
"workspace_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "アラートID(例: alr_7Q2K9XH3AB)"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "サイトID(使用量アラートでは null)"
},
{
"type": "null"
}
]
},
"name": {
"type": "string"
},
"kind": {
"type": "string",
"description": "threshold、anomaly、goal、no_data、usage、uptime、ssl、vitals のいずれか"
},
"metric": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"operator": {
"anyOf": [
{
"type": "string",
"description": "gt、gte、lt、lte のいずれか"
},
{
"type": "null"
}
]
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"window_minutes": {
"type": "integer"
},
"sensitivity": {
"type": "string",
"description": "anomalyの感度"
},
"goal_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"channel_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "通知チャネルID"
},
"state": {
"type": "string",
"description": "ok または triggered"
},
"enabled": {
"type": "boolean"
},
"muted_until": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_triggered_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_evaluated_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
}
POST
/alerts/:id/mute.json
アラートの通知をミュート(またはミュート解除)
alerts_mute
権限: content.write
curl -X POST https://privatusanalytics.com/alerts/:id/mute.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"minutes": {
"type": "integer",
"description": "この分数だけミュートする(0でミュート解除、最大30日)",
"default": 60
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "アラートID(例: alr_7Q2K9XH3AB)"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "サイトID(使用量アラートでは null)"
},
{
"type": "null"
}
]
},
"name": {
"type": "string"
},
"kind": {
"type": "string",
"description": "threshold、anomaly、goal、no_data、usage、uptime、ssl、vitals のいずれか"
},
"metric": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"operator": {
"anyOf": [
{
"type": "string",
"description": "gt、gte、lt、lte のいずれか"
},
{
"type": "null"
}
]
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"window_minutes": {
"type": "integer"
},
"sensitivity": {
"type": "string",
"description": "anomalyの感度"
},
"goal_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"channel_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "通知チャネルID"
},
"state": {
"type": "string",
"description": "ok または triggered"
},
"enabled": {
"type": "boolean"
},
"muted_until": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_triggered_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_evaluated_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/alerts/:id.json
アラートを取得
alerts_get
権限: analytics.read
curl https://privatusanalytics.com/alerts/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "アラートID(例: alr_7Q2K9XH3AB)"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "サイトID(使用量アラートでは null)"
},
{
"type": "null"
}
]
},
"name": {
"type": "string"
},
"kind": {
"type": "string",
"description": "threshold、anomaly、goal、no_data、usage、uptime、ssl、vitals のいずれか"
},
"metric": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"operator": {
"anyOf": [
{
"type": "string",
"description": "gt、gte、lt、lte のいずれか"
},
{
"type": "null"
}
]
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"window_minutes": {
"type": "integer"
},
"sensitivity": {
"type": "string",
"description": "anomalyの感度"
},
"goal_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"channel_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "通知チャネルID"
},
"state": {
"type": "string",
"description": "ok または triggered"
},
"enabled": {
"type": "boolean"
},
"muted_until": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_triggered_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_evaluated_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
PATCH
/alerts/:id.json
アラートを更新
alerts_update
権限: content.write
curl -X PATCH https://privatusanalytics.com/alerts/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "サイトID(pa_…)。使用量アラート以外では必須"
},
"metric": {
"type": "string",
"description": "threshold/anomaly: visitors、visits、pageviews、bounce_rate、conversion。vitals: lcp、inp、cls、fcp、ttfb"
},
"operator": {
"type": "string",
"description": "比較演算子(gt、gte、lt、lte)。anomaly: lt は低下のみ、gt は急増のみ、空欄は両方",
"enum": [
"gt",
"gte",
"lt",
"lte"
]
},
"threshold": {
"type": "number",
"description": "threshold: 指標の値、goal: 完了数、no_data: 時間、usage: パーセント、ssl: 日数、vitals: ミリ秒(CLS: スコア)"
},
"window_minutes": {
"type": "integer",
"description": "評価ウィンドウ(分、5〜10080)"
},
"sensitivity": {
"type": "string",
"description": "anomaly: low、medium、high",
"enum": [
"low",
"medium",
"high"
]
},
"goal_id": {
"type": "string",
"description": "goal と conversion のアラート: ゴールID(goal_…)"
},
"uptime_check_id": {
"type": "string",
"description": "uptime/ssl: チェックID(デフォルト: サイトのすべてのチェック)"
},
"channel_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "通知チャネルID(nch_…)"
},
"enabled": {
"type": "boolean",
"description": "このアラートを評価する"
},
"name": {
"type": "string",
"description": "アラート名"
},
"kind": {
"type": "string",
"description": "アラートの種類",
"enum": [
"threshold",
"anomaly",
"goal",
"no_data",
"usage",
"uptime",
"ssl",
"vitals"
]
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "アラートID(例: alr_7Q2K9XH3AB)"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "サイトID(使用量アラートでは null)"
},
{
"type": "null"
}
]
},
"name": {
"type": "string"
},
"kind": {
"type": "string",
"description": "threshold、anomaly、goal、no_data、usage、uptime、ssl、vitals のいずれか"
},
"metric": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"operator": {
"anyOf": [
{
"type": "string",
"description": "gt、gte、lt、lte のいずれか"
},
{
"type": "null"
}
]
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"window_minutes": {
"type": "integer"
},
"sensitivity": {
"type": "string",
"description": "anomalyの感度"
},
"goal_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"channel_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "通知チャネルID"
},
"state": {
"type": "string",
"description": "ok または triggered"
},
"enabled": {
"type": "boolean"
},
"muted_until": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_triggered_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_evaluated_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/sites/:site_id/alerts.json
サイトのアラートを一覧表示
site_alerts_list
権限: analytics.read
curl https://privatusanalytics.com/sites/:site_id/alerts.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"state": {
"type": "string",
"description": "ok または triggered のアラートのみ",
"enum": [
"ok",
"triggered"
]
},
"kind": {
"type": "string",
"description": "この種類のみ",
"enum": [
"threshold",
"anomaly",
"goal",
"no_data",
"usage",
"uptime",
"ssl",
"vitals"
]
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
},
"page": {
"type": "integer",
"description": "ページ(1から)"
},
"per_page": {
"type": "integer",
"description": "1ページあたりの結果数(最大100)"
}
},
"required": [
"site_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "アラートID(例: alr_7Q2K9XH3AB)"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "サイトID(使用量アラートでは null)"
},
{
"type": "null"
}
]
},
"name": {
"type": "string"
},
"kind": {
"type": "string",
"description": "threshold、anomaly、goal、no_data、usage、uptime、ssl、vitals のいずれか"
},
"metric": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"operator": {
"anyOf": [
{
"type": "string",
"description": "gt、gte、lt、lte のいずれか"
},
{
"type": "null"
}
]
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"window_minutes": {
"type": "integer"
},
"sensitivity": {
"type": "string",
"description": "anomalyの感度"
},
"goal_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"channel_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "通知チャネルID"
},
"state": {
"type": "string",
"description": "ok または triggered"
},
"enabled": {
"type": "boolean"
},
"muted_until": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_triggered_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_evaluated_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
}
イベント
GET
/sites/:site_id/events/properties.json
過去30日間に検出されたイベントプロパティのキーを一覧表示
event_properties_list
権限: analytics.read
curl https://privatusanalytics.com/sites/:site_id/events/properties.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"event": {
"type": "string",
"description": "この生のイベント名で検出されたキーのみ"
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"site_id"
]
}
{
"type": "object"
}
PATCH
/sites/:site_id/events/properties.json
イベントプロパティのキーの名前を変更、または非表示にする
event_properties_update
権限: sites.manage
curl -X PATCH https://privatusanalytics.com/sites/:site_id/events/properties.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"key": {
"type": "string",
"description": "保存されているプロパティのキー(例: plan)"
},
"display_name": {
"type": "string",
"description": "代わりに表示するラベル(空欄で削除)"
},
"hidden": {
"type": "boolean",
"description": "このキーをレポートから非表示にする"
},
"export_safe": {
"type": "boolean",
"description": "このキーには個人データが含まれないため、生データのエクスポートとウェアハウス同期に含める"
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"key",
"site_id"
]
}
{
"type": "object"
}
DELETE
/sites/:site_id/events.json
イベントとその履歴を削除(バックグラウンドで実行され、名前を入力して確認します)
events_delete
権限: sites.manage
curl -X DELETE https://privatusanalytics.com/sites/:site_id/events.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "削除する生のイベント名"
},
"confirm": {
"type": "string",
"description": "確認のためイベント名をもう一度入力してください"
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"name",
"confirm",
"site_id"
]
}
{
"type": "object"
}
GET
/sites/:site_id/events.json
完了数、訪問数、コンバージョン率、初回・最終検出日時を含むイベントを一覧表示
events_list
権限: analytics.read
curl https://privatusanalytics.com/sites/:site_id/events.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"period": {
"type": "string",
"description": "期間のプリセット。from/to を使うには custom を指定",
"enum": [
"today",
"yesterday",
"24h",
"7d",
"14d",
"28d",
"30d",
"90d",
"mtd",
"last_month",
"qtd",
"last_quarter",
"ytd",
"12mo",
"last_year",
"all",
"custom"
],
"default": "30d"
},
"from": {
"type": "string",
"format": "date",
"description": "カスタム期間の開始(サイトのタイムゾーン)"
},
"to": {
"type": "string",
"format": "date",
"description": "カスタム期間の終了(この日を含む)"
},
"compare": {
"type": "string",
"description": "比較期間",
"enum": [
"none",
"previous_period",
"previous_year",
"custom"
],
"default": "none"
},
"compare_from": {
"type": "string",
"format": "date",
"description": "カスタム比較の開始"
},
"compare_to": {
"type": "string",
"format": "date",
"description": "カスタム比較の終了"
},
"match_weekday": {
"type": "boolean",
"description": "比較する日の曜日をそろえる",
"default": false
},
"filters": {
"type": "array",
"items": {},
"description": "フィルター: [[\"dimension\",\"operator\",\"value\"], …]。演算子: is、is_not、any_of、none_of、contains、not_contains、starts_with、regex、not_regex、gt、lt、between。OR条件にする場合は {\"any\": [...]} で条件をまとめます。",
"default": []
},
"segment_id": {
"type": "string",
"description": "保存済みのセグメントを適用(seg_…)"
},
"include_imported": {
"type": "boolean",
"description": "インポートした過去データを追加(最初のネイティブイベントより前の日付が対象。フィルターやセグメントを適用している場合は無視されます)",
"default": false
},
"search": {
"type": "string",
"description": "名前にこれを含むイベントのみ"
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"site_id"
]
}
{
"type": "object"
}
POST
/sites/:site_id/events/merge.json
複数のイベントを1つの表示名に統合
events_merge
権限: sites.manage
curl -X POST https://privatusanalytics.com/sites/:site_id/events/merge.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"names": {
"type": "array",
"items": {
"type": "string"
},
"description": "統合する生のイベント名"
},
"into": {
"type": "string",
"description": "統合後のイベントの表示名",
"examples": [
"Signup"
]
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"names",
"into",
"site_id"
]
}
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "トラッカーが送信した生のイベント名"
},
"display_name": {
"anyOf": [
{
"type": "string",
"description": "レポートに表示される名前"
},
{
"type": "null"
}
]
},
"hidden": {
"type": "boolean",
"description": "レポートから非表示"
},
"currency": {
"anyOf": [
{
"type": "string",
"description": "収益の通貨"
},
{
"type": "null"
}
]
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/sites/:site_id/events/detail.json
1つのイベント: グラフ、プロパティのピボット、数値プロパティの集計、ページ、流入元
events_get
権限: analytics.read
curl https://privatusanalytics.com/sites/:site_id/events/detail.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"period": {
"type": "string",
"description": "期間のプリセット。from/to を使うには custom を指定",
"enum": [
"today",
"yesterday",
"24h",
"7d",
"14d",
"28d",
"30d",
"90d",
"mtd",
"last_month",
"qtd",
"last_quarter",
"ytd",
"12mo",
"last_year",
"all",
"custom"
],
"default": "30d"
},
"from": {
"type": "string",
"format": "date",
"description": "カスタム期間の開始(サイトのタイムゾーン)"
},
"to": {
"type": "string",
"format": "date",
"description": "カスタム期間の終了(この日を含む)"
},
"compare": {
"type": "string",
"description": "比較期間",
"enum": [
"none",
"previous_period",
"previous_year",
"custom"
],
"default": "none"
},
"compare_from": {
"type": "string",
"format": "date",
"description": "カスタム比較の開始"
},
"compare_to": {
"type": "string",
"format": "date",
"description": "カスタム比較の終了"
},
"match_weekday": {
"type": "boolean",
"description": "比較する日の曜日をそろえる",
"default": false
},
"filters": {
"type": "array",
"items": {},
"description": "フィルター: [[\"dimension\",\"operator\",\"value\"], …]。演算子: is、is_not、any_of、none_of、contains、not_contains、starts_with、regex、not_regex、gt、lt、between。OR条件にする場合は {\"any\": [...]} で条件をまとめます。",
"default": []
},
"segment_id": {
"type": "string",
"description": "保存済みのセグメントを適用(seg_…)"
},
"include_imported": {
"type": "boolean",
"description": "インポートした過去データを追加(最初のネイティブイベントより前の日付が対象。フィルターやセグメントを適用している場合は無視されます)",
"default": false
},
"name": {
"type": "string",
"description": "表示されるイベント名(名前変更後)",
"examples": [
"Signup"
]
},
"properties": {
"type": "array",
"items": {
"type": "string"
},
"description": "ピボットに使うプロパティのキー(最大3個)",
"default": []
},
"interval": {
"type": "string",
"description": "グラフのバケットサイズ",
"enum": [
"auto",
"minute",
"hour",
"day",
"week",
"month",
"quarter",
"year"
],
"default": "auto"
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"name",
"site_id"
]
}
{
"type": "object"
}
PATCH
/sites/:site_id/events/settings.json
イベントの名前変更、非表示・再表示、または通貨の設定
events_update
権限: sites.manage
curl -X PATCH https://privatusanalytics.com/sites/:site_id/events/settings.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "トラッカーが送信した生のイベント名",
"examples": [
"signup_click"
]
},
"display_name": {
"type": "string",
"description": "代わりに表示する名前(空欄で名前変更を解除)"
},
"hidden": {
"type": "boolean",
"description": "レポートから非表示にする(データは保持されます)"
},
"currency": {
"type": "string",
"description": "このイベントの収益に使う通貨(ISO 4217)"
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"name",
"site_id"
]
}
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "トラッカーが送信した生のイベント名"
},
"display_name": {
"anyOf": [
{
"type": "string",
"description": "レポートに表示される名前"
},
{
"type": "null"
}
]
},
"hidden": {
"type": "boolean",
"description": "レポートから非表示"
},
"currency": {
"anyOf": [
{
"type": "string",
"description": "収益の通貨"
},
{
"type": "null"
}
]
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
インポート
GET
/sites/:site_id/imports/google/properties.json
インポート可能なGoogle Analytics 4のプロパティを一覧表示
imports_google_properties
権限: sites.manage
curl https://privatusanalytics.com/sites/:site_id/imports/google/properties.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"site_id"
]
}
{
"type": "object"
}
POST
/sites/:site_id/imports.json
インポートを開始(GA4プロパティまたはCSVアップロード)
imports_create
権限: sites.manage
curl -X POST https://privatusanalytics.com/sites/:site_id/imports.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"source": {
"type": "string",
"description": "ga4(Google Analytics 4 API)、またはCSVエクスポートをアップロードするツール",
"enum": [
"ga4",
"universal_analytics",
"fathom",
"simple_analytics",
"plausible",
"matomo",
"umami",
"clicky"
]
},
"property_id": {
"type": "string",
"description": "GA4プロパティ(例: properties/123。imports_google_properties を参照)。ga4では必須",
"examples": [
"properties/123456789"
]
},
"date_from": {
"type": "string",
"format": "date",
"description": "インポートする最初の日。ga4では必須。日付列のないCSVファイルでは、すべての行がこの日付になります"
},
"date_to": {
"type": "string",
"format": "date",
"description": "インポートする最後の日(ga4のデフォルトは、最初に計測されたイベントの前日、または昨日)"
},
"file": {
"type": "string",
"format": "binary",
"description": "CSVエクスポート(multipartアップロード、最大50 MB)。CSVソースでは必須"
},
"dimension": {
"type": "string",
"description": "CSVの行が何の内訳か(自動検出より優先。Matomoの「Label」エクスポートで必要)",
"enum": [
"total",
"page",
"source",
"country",
"device",
"browser",
"os"
]
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"source",
"site_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "インポートID"
},
"site_id": {
"type": "string"
},
"source": {
"type": "string",
"description": "ga4、universal_analytics、fathom、simple_analytics、plausible、matomo、umami、clicky のいずれか"
},
"status": {
"type": "string",
"description": "queued、running、complete、failed のいずれか"
},
"date_from": {
"anyOf": [
{
"type": "string",
"format": "date",
"description": "インポートされた最初の日"
},
{
"type": "null"
}
]
},
"date_to": {
"anyOf": [
{
"type": "string",
"format": "date",
"description": "インポートされた最後の日"
},
{
"type": "null"
}
]
},
"rows_imported": {
"type": "integer",
"description": "保存された日次の行数"
},
"error": {
"anyOf": [
{
"type": "string",
"description": "インポートが失敗した理由"
},
{
"type": "null"
}
]
},
"completed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/sites/:site_id/imports/:id.json
インポートと、そのインポート済みデータをすべて削除
imports_delete
権限: sites.manage
curl -X DELETE https://privatusanalytics.com/sites/:site_id/imports/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "インポートID"
},
"site_id": {
"type": "string"
},
"source": {
"type": "string",
"description": "ga4、universal_analytics、fathom、simple_analytics、plausible、matomo、umami、clicky のいずれか"
},
"status": {
"type": "string",
"description": "queued、running、complete、failed のいずれか"
},
"date_from": {
"anyOf": [
{
"type": "string",
"format": "date",
"description": "インポートされた最初の日"
},
{
"type": "null"
}
]
},
"date_to": {
"anyOf": [
{
"type": "string",
"format": "date",
"description": "インポートされた最後の日"
},
{
"type": "null"
}
]
},
"rows_imported": {
"type": "integer",
"description": "保存された日次の行数"
},
"error": {
"anyOf": [
{
"type": "string",
"description": "インポートが失敗した理由"
},
{
"type": "null"
}
]
},
"completed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/sites/:site_id/imports.json
サイトのインポートを一覧表示
imports_list
権限: analytics.read
curl https://privatusanalytics.com/sites/:site_id/imports.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"status": {
"type": "string",
"description": "このステータスのインポートのみ",
"enum": [
"queued",
"running",
"complete",
"failed"
]
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
},
"page": {
"type": "integer",
"description": "ページ(1から)"
},
"per_page": {
"type": "integer",
"description": "1ページあたりの結果数(最大100)"
}
},
"required": [
"site_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "インポートID"
},
"site_id": {
"type": "string"
},
"source": {
"type": "string",
"description": "ga4、universal_analytics、fathom、simple_analytics、plausible、matomo、umami、clicky のいずれか"
},
"status": {
"type": "string",
"description": "queued、running、complete、failed のいずれか"
},
"date_from": {
"anyOf": [
{
"type": "string",
"format": "date",
"description": "インポートされた最初の日"
},
{
"type": "null"
}
]
},
"date_to": {
"anyOf": [
{
"type": "string",
"format": "date",
"description": "インポートされた最後の日"
},
{
"type": "null"
}
]
},
"rows_imported": {
"type": "integer",
"description": "保存された日次の行数"
},
"error": {
"anyOf": [
{
"type": "string",
"description": "インポートが失敗した理由"
},
{
"type": "null"
}
]
},
"completed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
}
GET
/sites/:site_id/imports/:id.json
インポートとそのステータスを取得
imports_get
権限: analytics.read
curl https://privatusanalytics.com/sites/:site_id/imports/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "インポートID"
},
"site_id": {
"type": "string"
},
"source": {
"type": "string",
"description": "ga4、universal_analytics、fathom、simple_analytics、plausible、matomo、umami、clicky のいずれか"
},
"status": {
"type": "string",
"description": "queued、running、complete、failed のいずれか"
},
"date_from": {
"anyOf": [
{
"type": "string",
"format": "date",
"description": "インポートされた最初の日"
},
{
"type": "null"
}
]
},
"date_to": {
"anyOf": [
{
"type": "string",
"format": "date",
"description": "インポートされた最後の日"
},
{
"type": "null"
}
]
},
"rows_imported": {
"type": "integer",
"description": "保存された日次の行数"
},
"error": {
"anyOf": [
{
"type": "string",
"description": "インポートが失敗した理由"
},
{
"type": "null"
}
]
},
"completed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
ウェアハウス同期
POST
/workspaces/:workspace_id/warehouses.json
ウェアハウスの送信先を追加
warehouse_destinations_create
権限: workspace.manage
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/warehouses.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "表示名(例: データレイク)"
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "送信するサイト(pa_…)。空の場合はすべてのサイトを送信"
},
"bucket": {
"type": "string",
"description": "s3: バケット名"
},
"region": {
"type": "string",
"description": "s3: リージョン(例: us-east-1。R2は auto)"
},
"prefix": {
"type": "string",
"description": "s3/azure: パスのプレフィックス(例: privatus/events)"
},
"endpoint": {
"type": "string",
"description": "s3: S3互換ストレージ(GCS相互運用、R2、MinIO)のhttpsエンドポイント"
},
"access_key_id": {
"type": "string",
"description": "s3: アクセスキーID"
},
"secret_access_key": {
"type": "string",
"description": "s3: シークレットアクセスキー(書き込み専用)"
},
"service_account_json": {
"type": "string",
"description": "bigquery: BigQuery データ編集者権限を持つサービスアカウントのJSONキー(書き込み専用)"
},
"project_id": {
"type": "string",
"description": "bigquery: プロジェクトID(デフォルト: キーから取得)"
},
"dataset": {
"type": "string",
"description": "bigquery: データセットID"
},
"table": {
"type": "string",
"description": "bigquery/snowflake: テーブル名(列: スキーマv1)"
},
"account": {
"type": "string",
"description": "snowflake: アカウント識別子(例: xy12345.us-east-1 または myorg-myaccount)"
},
"user": {
"type": "string",
"description": "snowflake: キーペア認証を使うユーザー"
},
"private_key": {
"type": "string",
"description": "snowflake: PEM形式のRSA秘密鍵(書き込み専用)"
},
"database": {
"type": "string",
"description": "snowflake: データベース"
},
"schema": {
"type": "string",
"description": "snowflake: スキーマ"
},
"warehouse": {
"type": "string",
"description": "snowflake: 仮想ウェアハウス"
},
"role": {
"type": "string",
"description": "snowflake: ロール(任意)"
},
"sas_url": {
"type": "string",
"description": "azure: 作成/書き込み権限を持つコンテナのSAS URL(書き込み専用)"
},
"kind": {
"type": "string",
"description": "s3(GCS/R2/MinIOも含む)、bigquery、snowflake、azure のいずれか",
"enum": [
"s3",
"bigquery",
"snowflake",
"azure"
]
},
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
}
},
"required": [
"kind",
"workspace_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "送信先ID(例: whd_7Q2K9XH3AB)"
},
"kind": {
"type": "string",
"description": "s3、bigquery、snowflake、azure のいずれか"
},
"name": {
"type": "string"
},
"target": {
"type": "string",
"description": "データの送信先: s3://bucket/prefix、project.dataset.table、account/database.schema.table、またはAzureのコンテナ"
},
"configured": {
"type": "array",
"items": {
"type": "string"
},
"description": "入力済みの設定名(値は返されません)"
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "送信するサイト(pa_…)。空はすべてのサイト"
},
"schedule": {
"type": "string",
"description": "daily: 02:00 UTC、前日のUTCの日を送信"
},
"schema_version": {
"type": "string",
"description": "送信される行のスキーマ"
},
"last_run_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"next_run_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/warehouses/:id.json
ウェアハウスの送信先を削除
warehouse_destinations_delete
権限: workspace.manage
curl -X DELETE https://privatusanalytics.com/warehouses/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "送信先ID(例: whd_7Q2K9XH3AB)"
},
"kind": {
"type": "string",
"description": "s3、bigquery、snowflake、azure のいずれか"
},
"name": {
"type": "string"
},
"target": {
"type": "string",
"description": "データの送信先: s3://bucket/prefix、project.dataset.table、account/database.schema.table、またはAzureのコンテナ"
},
"configured": {
"type": "array",
"items": {
"type": "string"
},
"description": "入力済みの設定名(値は返されません)"
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "送信するサイト(pa_…)。空はすべてのサイト"
},
"schedule": {
"type": "string",
"description": "daily: 02:00 UTC、前日のUTCの日を送信"
},
"schema_version": {
"type": "string",
"description": "送信される行のスキーマ"
},
"last_run_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"next_run_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/workspaces/:workspace_id/warehouses.json
ウェアハウスの送信先を一覧表示
warehouse_destinations_list
権限: workspace.manage
curl https://privatusanalytics.com/workspaces/:workspace_id/warehouses.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"description": "この種類の送信先のみ",
"enum": [
"s3",
"bigquery",
"snowflake",
"azure"
]
},
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
},
"page": {
"type": "integer",
"description": "ページ(1から)"
},
"per_page": {
"type": "integer",
"description": "1ページあたりの結果数(最大100)"
}
},
"required": [
"workspace_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "送信先ID(例: whd_7Q2K9XH3AB)"
},
"kind": {
"type": "string",
"description": "s3、bigquery、snowflake、azure のいずれか"
},
"name": {
"type": "string"
},
"target": {
"type": "string",
"description": "データの送信先: s3://bucket/prefix、project.dataset.table、account/database.schema.table、またはAzureのコンテナ"
},
"configured": {
"type": "array",
"items": {
"type": "string"
},
"description": "入力済みの設定名(値は返されません)"
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "送信するサイト(pa_…)。空はすべてのサイト"
},
"schedule": {
"type": "string",
"description": "daily: 02:00 UTC、前日のUTCの日を送信"
},
"schema_version": {
"type": "string",
"description": "送信される行のスキーマ"
},
"last_run_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"next_run_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
}
GET
/warehouses/:id.json
ウェアハウスの送信先を取得(シークレットは含まれません)
warehouse_destinations_get
権限: workspace.manage
curl https://privatusanalytics.com/warehouses/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "送信先ID(例: whd_7Q2K9XH3AB)"
},
"kind": {
"type": "string",
"description": "s3、bigquery、snowflake、azure のいずれか"
},
"name": {
"type": "string"
},
"target": {
"type": "string",
"description": "データの送信先: s3://bucket/prefix、project.dataset.table、account/database.schema.table、またはAzureのコンテナ"
},
"configured": {
"type": "array",
"items": {
"type": "string"
},
"description": "入力済みの設定名(値は返されません)"
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "送信するサイト(pa_…)。空はすべてのサイト"
},
"schedule": {
"type": "string",
"description": "daily: 02:00 UTC、前日のUTCの日を送信"
},
"schema_version": {
"type": "string",
"description": "送信される行のスキーマ"
},
"last_run_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"next_run_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
POST
/warehouses/:id/sync.json
1日分の同期を今すぐキューに追加
warehouse_destinations_sync
権限: workspace.manage
curl -X POST https://privatusanalytics.com/warehouses/:id/sync.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"date": {
"type": "string",
"format": "date",
"description": "送信するUTCの日(例: 2026-09-28。デフォルト: 昨日)"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "送信先ID(例: whd_7Q2K9XH3AB)"
},
"kind": {
"type": "string",
"description": "s3、bigquery、snowflake、azure のいずれか"
},
"name": {
"type": "string"
},
"target": {
"type": "string",
"description": "データの送信先: s3://bucket/prefix、project.dataset.table、account/database.schema.table、またはAzureのコンテナ"
},
"configured": {
"type": "array",
"items": {
"type": "string"
},
"description": "入力済みの設定名(値は返されません)"
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "送信するサイト(pa_…)。空はすべてのサイト"
},
"schedule": {
"type": "string",
"description": "daily: 02:00 UTC、前日のUTCの日を送信"
},
"schema_version": {
"type": "string",
"description": "送信される行のスキーマ"
},
"last_run_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"next_run_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
PATCH
/warehouses/:id.json
ウェアハウスの送信先を更新(空欄のシークレットは維持されます)
warehouse_destinations_update
権限: workspace.manage
curl -X PATCH https://privatusanalytics.com/warehouses/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "表示名(例: データレイク)"
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "送信するサイト(pa_…)。空の場合はすべてのサイトを送信"
},
"bucket": {
"type": "string",
"description": "s3: バケット名"
},
"region": {
"type": "string",
"description": "s3: リージョン(例: us-east-1。R2は auto)"
},
"prefix": {
"type": "string",
"description": "s3/azure: パスのプレフィックス(例: privatus/events)"
},
"endpoint": {
"type": "string",
"description": "s3: S3互換ストレージ(GCS相互運用、R2、MinIO)のhttpsエンドポイント"
},
"access_key_id": {
"type": "string",
"description": "s3: アクセスキーID"
},
"secret_access_key": {
"type": "string",
"description": "s3: シークレットアクセスキー(書き込み専用)"
},
"service_account_json": {
"type": "string",
"description": "bigquery: BigQuery データ編集者権限を持つサービスアカウントのJSONキー(書き込み専用)"
},
"project_id": {
"type": "string",
"description": "bigquery: プロジェクトID(デフォルト: キーから取得)"
},
"dataset": {
"type": "string",
"description": "bigquery: データセットID"
},
"table": {
"type": "string",
"description": "bigquery/snowflake: テーブル名(列: スキーマv1)"
},
"account": {
"type": "string",
"description": "snowflake: アカウント識別子(例: xy12345.us-east-1 または myorg-myaccount)"
},
"user": {
"type": "string",
"description": "snowflake: キーペア認証を使うユーザー"
},
"private_key": {
"type": "string",
"description": "snowflake: PEM形式のRSA秘密鍵(書き込み専用)"
},
"database": {
"type": "string",
"description": "snowflake: データベース"
},
"schema": {
"type": "string",
"description": "snowflake: スキーマ"
},
"warehouse": {
"type": "string",
"description": "snowflake: 仮想ウェアハウス"
},
"role": {
"type": "string",
"description": "snowflake: ロール(任意)"
},
"sas_url": {
"type": "string",
"description": "azure: 作成/書き込み権限を持つコンテナのSAS URL(書き込み専用)"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "送信先ID(例: whd_7Q2K9XH3AB)"
},
"kind": {
"type": "string",
"description": "s3、bigquery、snowflake、azure のいずれか"
},
"name": {
"type": "string"
},
"target": {
"type": "string",
"description": "データの送信先: s3://bucket/prefix、project.dataset.table、account/database.schema.table、またはAzureのコンテナ"
},
"configured": {
"type": "array",
"items": {
"type": "string"
},
"description": "入力済みの設定名(値は返されません)"
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "送信するサイト(pa_…)。空はすべてのサイト"
},
"schedule": {
"type": "string",
"description": "daily: 02:00 UTC、前日のUTCの日を送信"
},
"schema_version": {
"type": "string",
"description": "送信される行のスキーマ"
},
"last_run_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"next_run_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
ウェブサイト
GET
/changelog.json
更新履歴のエントリを一覧表示
changelog_list
公開された製品アップデートを新しい順に表示します。/changelog.rss ではRSSでも取得できます。
権限: public
curl https://privatusanalytics.com/changelog.json
{
"type": "object",
"properties": {
"area": {
"type": "string",
"description": "この製品領域のエントリのみ",
"enum": [
"product",
"dashboard",
"tracker",
"privacy",
"api",
"integrations",
"billing",
"docs"
]
},
"page": {
"type": "integer",
"description": "ページ(1から)"
},
"per_page": {
"type": "integer",
"description": "1ページあたりの結果数(最大100)"
}
},
"required": []
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "エントリID(例: chg_7Q2K9XH3AB)"
},
"title": {
"type": "string",
"description": "見出し"
},
"area": {
"type": "string",
"description": "製品領域(例: dashboard、tracker、api)"
},
"body": {
"type": "string",
"description": "Markdown形式の本文"
},
"published_at": {
"type": "string",
"format": "date-time",
"description": "公開日時"
},
"url": {
"type": "string",
"description": "パーマリンク"
}
}
}
}
GET
/changelog/:id.json
更新履歴のエントリを取得
changelog_get
権限: public
curl https://privatusanalytics.com/changelog/:id.json
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "エントリID(例: chg_7Q2K9XH3AB)"
},
"title": {
"type": "string",
"description": "見出し"
},
"area": {
"type": "string",
"description": "製品領域(例: dashboard、tracker、api)"
},
"body": {
"type": "string",
"description": "Markdown形式の本文"
},
"published_at": {
"type": "string",
"format": "date-time",
"description": "公開日時"
},
"url": {
"type": "string",
"description": "パーマリンク"
}
}
}
POST
/contact.json
Privatus Analyticsチームにメッセージを送信
contact_create
ブラウザクライアントは Cloudflare Turnstile のトークンを `cf-turnstile-response` として送信します。APIトークンを使うリクエストでは不要です。
権限: public
· HTTPのみ(MCPツールではありません)
curl -X POST https://privatusanalytics.com/contact.json \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "お名前",
"examples": [
"Ada Lovelace"
]
},
"email": {
"type": "string",
"description": "返信先",
"examples": [
"[email protected]"
]
},
"company": {
"type": "string",
"description": "会社または組織(任意)"
},
"topic": {
"type": "string",
"description": "メッセージの内容",
"enum": [
"general",
"sales",
"support",
"privacy",
"security",
"partnerships",
"press"
],
"default": "general"
},
"message": {
"type": "string",
"description": "メッセージ(10〜5,000文字)"
},
"website": {
"type": "string",
"description": "空欄のままにしてください。ボット対策のスパムトラップです。入力された送信は破棄されます"
}
},
"required": [
"name",
"email",
"message"
]
}
{
"type": "object",
"properties": {
"received": {
"type": "boolean",
"description": "送信が受け付けられた場合は常に true"
},
"message": {
"type": "string",
"description": "この後の流れ"
}
}
}
POST
/newsletter/confirm.json
ニュースレターの購読を確認(署名付きトークン)
newsletter_confirm
権限: public
· HTTPのみ(MCPツールではありません)
curl -X POST https://privatusanalytics.com/newsletter/confirm.json \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"token": {
"type": "string",
"description": "確認メールに記載された署名付きトークン"
}
},
"required": [
"token"
]
}
{
"type": "object",
"properties": {
"received": {
"type": "boolean",
"description": "送信が受け付けられた場合は常に true"
},
"message": {
"type": "string",
"description": "この後の流れ"
}
}
}
POST
/newsletter.json
メールアドレスをニュースレターに登録
newsletter_subscribe
ブラウザクライアントは Cloudflare Turnstile のトークンを `cf-turnstile-response` として送信します。APIトークンを使うリクエストでは不要です。
権限: public
· HTTPのみ(MCPツールではありません)
curl -X POST https://privatusanalytics.com/newsletter.json \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"email": {
"type": "string",
"description": "購読するメールアドレス。確認リンクがメールで届きます",
"examples": [
"[email protected]"
]
},
"website": {
"type": "string",
"description": "空欄のままにしてください。ボット対策のスパムトラップです。入力された送信は破棄されます"
}
},
"required": [
"email"
]
}
{
"type": "object",
"properties": {
"received": {
"type": "boolean",
"description": "送信が受け付けられた場合は常に true"
},
"message": {
"type": "string",
"description": "この後の流れ"
}
}
}
POST
/newsletter/unsubscribe.json
署名付きリンクのトークンで購読を解除
newsletter_unsubscribe
権限: public
· HTTPのみ(MCPツールではありません)
curl -X POST https://privatusanalytics.com/newsletter/unsubscribe.json \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"token": {
"type": "string",
"description": "配信停止リンクの署名付きトークン"
},
"list": {
"type": "string",
"description": "newsletter(デフォルト: リンクの対象のリスト)または marketing(すべてのマーケティングメール)",
"enum": [
"newsletter",
"marketing"
]
}
},
"required": [
"token"
]
}
{
"type": "object",
"properties": {
"received": {
"type": "boolean",
"description": "送信が受け付けられた場合は常に true"
},
"message": {
"type": "string",
"description": "この後の流れ"
}
}
}
GET
/pricing.json
プラン、料金、プランの上限を取得
pricing_get
料金ページと同じデータです。イベント数の段階、各プランの上限、イベントとしてカウントされるもの。events を渡すと該当するティアが返ります。
権限: public
curl https://privatusanalytics.com/pricing.json
{
"type": "object",
"properties": {
"events": {
"type": "integer",
"description": "想定される月間のページビューとカスタムイベントの合計。該当するティアを `recommendation` として返します",
"examples": [
750000
]
},
"interval": {
"type": "string",
"description": "表示する料金の請求間隔: month、または year(月額の10倍)",
"enum": [
"month",
"year"
],
"default": "month"
}
},
"required": []
}
{
"type": "object",
"properties": {
"currency": {
"type": "string",
"description": "すべての料金の通貨(USD)"
},
"tax_included": {
"type": "boolean",
"description": "常に true。料金にはVATまたは売上税が含まれるため、表示価格がそのままお支払い額です"
},
"interval": {
"type": "string",
"description": "month または year。料金はこの間隔のものです"
},
"annual_multiplier": {
"type": "integer",
"description": "年額 = 月額 × この値(2か月分無料)"
},
"free_events": {
"type": "integer",
"description": "無料プランに含まれる月間イベント数"
},
"badge_bonus": {
"type": "integer",
"description": "任意のバッジを表示した場合に追加される無料の月間イベント数"
},
"tiers": {
"type": "array",
"items": {
"type": "object"
},
"description": "イベント数の段階: この間隔の { events, pro, business } の料金(Businessのみの段階では pro は null)、および月額料金"
},
"plans": {
"type": "array",
"items": {
"type": "object"
},
"description": "{ id, name, from_price, limits } を持つプラン。limits が null の場合は無制限"
},
"counted": {
"type": "array",
"items": {
"type": "string"
},
"description": "課金対象のイベントとしてカウントされるもの"
},
"not_counted": {
"type": "array",
"items": {
"type": "string"
},
"description": "使用量に一切カウントされないもの"
},
"recommendation": {
"anyOf": [
{
"type": "object",
"description": "`events` 入力に対する { events, plan, tier_events, price }。ボリュームが指定されていない場合は null"
},
{
"type": "null"
}
]
}
}
}
GET
/status.json
現在のシステムステータスを取得
status_get
データベース、Redis、バックグラウンドジョブの状態を確認します。チェックは15秒に1回までです。
権限: public
curl https://privatusanalytics.com/status.json
{
"type": "object",
"properties": {
"fresh": {
"type": "boolean",
"description": "15秒のキャッシュを使わず、今すぐ再チェックする",
"default": false
}
},
"required": []
}
{
"type": "object",
"properties": {
"status": {
"type": "string",
"description": "全体: operational、degraded、outage のいずれか"
},
"checked_at": {
"type": "string",
"format": "date-time",
"description": "チェックを実行した日時(最大15秒キャッシュ)"
},
"components": {
"type": "array",
"items": {
"type": "object"
},
"description": "コンポーネントごと: { id, name, status, detail, latency_ms }。キューには queue_latency_s と queue_depth も含まれます"
}
}
}
GET
/tools/consent-gap.json
同意ベースのアナリティクスで取りこぼされるトラフィックを推定
tools_consent_gap
権限: public
curl https://privatusanalytics.com/tools/consent-gap.json
{
"type": "object",
"properties": {
"monthly_visitors": {
"type": "integer",
"description": "月間の訪問者数(サーバーログまたは現在のアナリティクスから)",
"examples": [
50000
]
},
"consent_rate": {
"type": "number",
"description": "バナーでアナリティクスCookieを承諾する訪問者の割合(0〜100)",
"examples": [
55
]
},
"adblock_share": {
"type": "number",
"description": "ブロッカーがアナリティクススクリプトを止める訪問者の割合(0〜100)",
"default": 25.0
}
},
"required": [
"monthly_visitors",
"consent_rate"
]
}
{
"type": "object",
"properties": {
"monthly_visitors": {
"type": "integer",
"description": "入力: 月間の訪問者数"
},
"consent_rate": {
"type": "number",
"description": "入力: アナリティクスCookieを承諾する割合(%)"
},
"adblock_share": {
"type": "number",
"description": "入力: ブロッカーがスクリプトを止める割合(%)"
},
"measured_with_consent": {
"type": "integer",
"description": "同意ベースのツールが計測できる訪問者数"
},
"missed": {
"type": "integer",
"description": "取りこぼされる訪問者数"
},
"missed_percent": {
"type": "number",
"description": "取りこぼされる訪問者の割合(%)"
},
"measured_cookieless": {
"type": "integer",
"description": "バナー不要のCookieレスツールが計測できる訪問者数(同じ割合でブロックされた場合)"
},
"recovered_by_cookieless": {
"type": "integer",
"description": "Cookieレスと同意ベースの推定値の差"
}
}
}
GET
/tools/header-checker.json
アナリティクス向けに、ページのReferrer-PolicyとCSPを確認
tools_header_check
権限: public
curl https://privatusanalytics.com/tools/header-checker.json
{
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "チェックする公開ページ(httpまたはhttps)",
"examples": [
"https://example.com"
]
}
},
"required": [
"url"
]
}
{
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "リダイレクト後の最終URL"
},
"status": {
"type": "integer",
"description": "最終レスポンスのHTTPステータス"
},
"findings": {
"type": "array",
"items": {
"type": "object"
},
"description": "チェック: { check, value, level (ok、warn、info), note }"
}
}
}
GET
/tools/privacy-policy-generator.json
Privatus Analytics 向けのプライバシーポリシーの段落を下書き
tools_privacy_policy
権限: public
curl https://privatusanalytics.com/tools/privacy-policy-generator.json
{
"type": "object",
"properties": {
"site_name": {
"type": "string",
"description": "ウェブサイトまたは会社の名前",
"examples": [
"Example Books"
]
},
"contact_email": {
"type": "string",
"description": "記載するプライバシー窓口(任意)"
},
"honors_gpc": {
"type": "boolean",
"description": "Do Not TrackとGlobal Privacy Controlを尊重しているかどうか(デフォルト)",
"default": true
}
},
"required": [
"site_name"
]
}
{
"type": "object",
"properties": {
"site_name": {
"type": "string",
"description": "入力: サイトまたは会社の名前"
},
"paragraphs": {
"type": "array",
"items": {
"type": "string"
},
"description": "ポリシーのテキスト(1項目につき1段落)"
},
"text": {
"type": "string",
"description": "空行でつないだ段落"
}
}
}
GET
/tools/qr-code.json
QRコードをSVGで生成
tools_qr_code
権限: public
curl https://privatusanalytics.com/tools/qr-code.json
{
"type": "object",
"properties": {
"text": {
"type": "string",
"description": "エンコードするURLまたはテキスト(最大1,000文字)",
"examples": [
"https://example.com/?utm_source=poster"
]
},
"level": {
"type": "string",
"description": "誤り訂正: l (7%)、m (15%)、q (25%)、h (30%)",
"enum": [
"l",
"m",
"q",
"h"
],
"default": "m"
}
},
"required": [
"text"
]
}
{
"type": "object",
"properties": {
"text": {
"type": "string",
"description": "エンコードされたテキスト"
},
"level": {
"type": "string",
"description": "誤り訂正レベル"
},
"size": {
"type": "integer",
"description": "1辺あたりのモジュール数"
},
"svg": {
"type": "string",
"description": "単体のSVGドキュメント"
}
}
}
GET
/tools/tracker-scanner.json
ページ上のCookieと既知のトラッカーを一覧表示
tools_tracker_scan
権限: public
curl https://privatusanalytics.com/tools/tracker-scanner.json
{
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "スキャンする公開ページ(httpまたはhttps)",
"examples": [
"https://example.com"
]
}
},
"required": [
"url"
]
}
{
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "リダイレクト後の最終URL"
},
"status": {
"type": "integer",
"description": "最終レスポンスのHTTPステータス"
},
"truncated": {
"type": "boolean",
"description": "ページが1 MBを超え、最初の1 MBのみをスキャンした場合は true"
},
"cookies": {
"type": "array",
"items": {
"type": "object"
},
"description": "HTTPレスポンスで設定されたCookie: { name, domain, path, expires, secure, http_only, same_site }。値は返されません"
},
"trackers": {
"type": "array",
"items": {
"type": "object"
},
"description": "ページが参照している既知のツール: { name, category, match, evidence }"
},
"third_party_hosts": {
"type": "array",
"items": {
"type": "string"
},
"description": "ページがリソースを読み込む他のドメイン"
}
}
}
GET
/tools/utm-builder.json
UTMパラメーター付きのキャンペーンURLを作成
tools_utm_builder
権限: public
curl https://privatusanalytics.com/tools/utm-builder.json
{
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "ランディングページのURL",
"examples": [
"https://example.com/pricing"
]
},
"source": {
"type": "string",
"description": "utm_source: トラフィックの流入元",
"examples": [
"newsletter"
]
},
"medium": {
"type": "string",
"description": "utm_medium: チャネル(例: email、cpc、social)",
"examples": [
"email"
]
},
"campaign": {
"type": "string",
"description": "utm_campaign: キャンペーン名",
"examples": [
"fall_launch"
]
},
"term": {
"type": "string",
"description": "utm_term: 有料検索のキーワード(任意)"
},
"content": {
"type": "string",
"description": "utm_content: どのリンクまたはクリエイティブか(任意)"
}
},
"required": [
"url",
"source",
"medium",
"campaign"
]
}
{
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "UTMパラメーター付きのランディングページURL"
},
"params": {
"type": "object",
"description": "追加されたUTMパラメーター"
},
"warnings": {
"type": "array",
"items": {
"type": "string"
},
"description": "修正したほうがよい問題(大文字小文字、スペース、個人データ)"
}
}
}
POST
/waitlist.json
ウェイトリストに参加(EUホスティング)
waitlist_join
ブラウザクライアントは Cloudflare Turnstile のトークンを `cf-turnstile-response` として送信します。APIトークンを使うリクエストでは不要です。
権限: public
· HTTPのみ(MCPツールではありません)
curl -X POST https://privatusanalytics.com/waitlist.json \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"email": {
"type": "string",
"description": "通知先のメールアドレス",
"examples": [
"[email protected]"
]
},
"list": {
"type": "string",
"description": "参加するウェイトリスト",
"enum": [
"eu_hosting"
],
"default": "eu_hosting"
},
"website": {
"type": "string",
"description": "空欄のままにしてください。ボット対策のスパムトラップです。入力された送信は破棄されます"
}
},
"required": [
"email"
]
}
{
"type": "object",
"properties": {
"received": {
"type": "boolean",
"description": "送信が受け付けられた場合は常に true"
},
"message": {
"type": "string",
"description": "この後の流れ"
}
}
}
エクスポート
POST
/workspaces/:workspace_id/exports.json
エクスポートをキューに追加(バックグラウンドで作成)
exports_create
権限: analytics.export
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/exports.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "エクスポートするサイト(pa_…)",
"examples": [
"pa_7Q2K9XH3AB"
]
},
"kind": {
"type": "string",
"description": "aggregated: 時間バケットとディメンションごとの指標。pageviews/events/raw: ヒットごとに1行(Pro以上)。imported: インポートした日次統計。dashboard: 概要パネルのZIP",
"enum": [
"aggregated",
"pageviews",
"events",
"imported",
"raw",
"dashboard"
],
"default": "aggregated"
},
"file_format": {
"type": "string",
"description": "csv、json、xlsx(aggregated、pageviews、events、imported)、csv または ndjson(raw)、zip(dashboard)",
"enum": [
"csv",
"json",
"xlsx",
"ndjson",
"zip"
],
"default": "csv"
},
"from": {
"type": "string",
"format": "date",
"description": "最初の日(エクスポートのタイムゾーン)",
"examples": [
"2026-09-01"
]
},
"to": {
"type": "string",
"format": "date",
"description": "最後の日(この日を含む。最大400日、rawは93日)",
"examples": [
"2026-09-28"
]
},
"timezone": {
"type": "string",
"description": "日付とグループ化のタイムゾーン(例: America/New_York。デフォルト: サイトのタイムゾーン)"
},
"grouping": {
"type": "string",
"description": "集計エクスポートの時間バケット",
"enum": [
"hour",
"day",
"week",
"month",
"quarter",
"year"
],
"default": "day"
},
"dimensions": {
"type": "array",
"items": {
"type": "string"
},
"description": "集計エクスポートをグループ化する訪問のディメンション(最大6個。例: country、channel、entry_page)。インポートのエクスポートでは、含めるインポート済みディメンション",
"default": []
},
"metrics": {
"type": "array",
"items": {
"type": "string"
},
"description": "集計エクスポートの指標(デフォルトはすべて): visitors、visits、pageviews、bounce_rate、visit_duration、views_per_visit、revenue",
"default": []
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "pageviews/events/raw エクスポートの列(デフォルトは visit_id、vital_value、selector 以外のすべて): occurred_at, kind, name, visit_id, hostname, path, referrer_host, referrer_path, channel, utm_source, utm_medium, utm_campaign, utm_content, utm_term, ref, paid_click, country, language, device, browser, browser_major, os, os_major, screen_bucket, engaged_ms, scroll_depth, revenue_minor, currency, vital_value, selector, props",
"default": []
},
"filters": {
"type": "array",
"items": {},
"description": "フィルター(統計APIと同じ形式): [[\"dimension\",\"operator\",\"value\"], …]",
"default": []
},
"segment_id": {
"type": "string",
"description": "保存済みのセグメントを適用(seg_…)"
},
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
}
},
"required": [
"site_id",
"from",
"to",
"workspace_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "エクスポートID(例: exp_7Q2K9XH3AB)"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "エクスポートしたサイト(pa_…)"
},
{
"type": "null"
}
]
},
"kind": {
"type": "string",
"description": "aggregated、pageviews、events、imported、raw、dashboard のいずれか"
},
"format": {
"type": "string",
"description": "csv、json、xlsx、ndjson、zip のいずれか"
},
"status": {
"type": "string",
"description": "queued、running、complete、failed、expired のいずれか"
},
"params": {
"type": "object",
"description": "エクスポートの定義(日付、タイムゾーン、グループ化、ディメンション、指標、フィールド、フィルター)"
},
"row_count": {
"anyOf": [
{
"type": "integer",
"description": "書き込まれた行数"
},
{
"type": "null"
}
]
},
"error": {
"anyOf": [
{
"type": "string",
"description": "エクスポートが失敗した理由"
},
{
"type": "null"
}
]
},
"completed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "ファイルが削除される日時"
},
{
"type": "null"
}
]
},
"download_url": {
"anyOf": [
{
"type": "string",
"description": "有効期間の短い署名付きファイルリンクを返すパス(exports_download)"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/exports/:id.json
エクスポートとそのファイルを削除
exports_delete
権限: analytics.export
curl -X DELETE https://privatusanalytics.com/exports/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "エクスポートID(例: exp_7Q2K9XH3AB)"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "エクスポートしたサイト(pa_…)"
},
{
"type": "null"
}
]
},
"kind": {
"type": "string",
"description": "aggregated、pageviews、events、imported、raw、dashboard のいずれか"
},
"format": {
"type": "string",
"description": "csv、json、xlsx、ndjson、zip のいずれか"
},
"status": {
"type": "string",
"description": "queued、running、complete、failed、expired のいずれか"
},
"params": {
"type": "object",
"description": "エクスポートの定義(日付、タイムゾーン、グループ化、ディメンション、指標、フィールド、フィルター)"
},
"row_count": {
"anyOf": [
{
"type": "integer",
"description": "書き込まれた行数"
},
{
"type": "null"
}
]
},
"error": {
"anyOf": [
{
"type": "string",
"description": "エクスポートが失敗した理由"
},
{
"type": "null"
}
]
},
"completed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "ファイルが削除される日時"
},
{
"type": "null"
}
]
},
"download_url": {
"anyOf": [
{
"type": "string",
"description": "有効期間の短い署名付きファイルリンクを返すパス(exports_download)"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/exports/:id/download.json
ファイルへの署名付きリンクを取得(10分間有効)
exports_download
権限: analytics.export
curl https://privatusanalytics.com/exports/:id/download.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"id"
]
}
{
"type": "object"
}
GET
/workspaces/:workspace_id/exports.json
エクスポートを一覧表示(ジョブキュー)
exports_list
権限: analytics.export
curl https://privatusanalytics.com/workspaces/:workspace_id/exports.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "このサイトのエクスポートのみ(pa_…)"
},
"status": {
"type": "string",
"description": "このステータスのエクスポートのみ",
"enum": [
"queued",
"running",
"complete",
"failed",
"expired"
]
},
"kind": {
"type": "string",
"description": "この種類のエクスポートのみ",
"enum": [
"aggregated",
"pageviews",
"events",
"imported",
"raw",
"dashboard"
]
},
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
},
"page": {
"type": "integer",
"description": "ページ(1から)"
},
"per_page": {
"type": "integer",
"description": "1ページあたりの結果数(最大100)"
}
},
"required": [
"workspace_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "エクスポートID(例: exp_7Q2K9XH3AB)"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "エクスポートしたサイト(pa_…)"
},
{
"type": "null"
}
]
},
"kind": {
"type": "string",
"description": "aggregated、pageviews、events、imported、raw、dashboard のいずれか"
},
"format": {
"type": "string",
"description": "csv、json、xlsx、ndjson、zip のいずれか"
},
"status": {
"type": "string",
"description": "queued、running、complete、failed、expired のいずれか"
},
"params": {
"type": "object",
"description": "エクスポートの定義(日付、タイムゾーン、グループ化、ディメンション、指標、フィールド、フィルター)"
},
"row_count": {
"anyOf": [
{
"type": "integer",
"description": "書き込まれた行数"
},
{
"type": "null"
}
]
},
"error": {
"anyOf": [
{
"type": "string",
"description": "エクスポートが失敗した理由"
},
{
"type": "null"
}
]
},
"completed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "ファイルが削除される日時"
},
{
"type": "null"
}
]
},
"download_url": {
"anyOf": [
{
"type": "string",
"description": "有効期間の短い署名付きファイルリンクを返すパス(exports_download)"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
}
POST
/workspaces/:workspace_id/exports/preview.json
エクスポートのプレビュー: 最初の20行と推定行数
exports_preview
権限: analytics.export
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/exports/preview.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "エクスポートするサイト(pa_…)",
"examples": [
"pa_7Q2K9XH3AB"
]
},
"kind": {
"type": "string",
"description": "aggregated: 時間バケットとディメンションごとの指標。pageviews/events/raw: ヒットごとに1行(Pro以上)。imported: インポートした日次統計。dashboard: 概要パネルのZIP",
"enum": [
"aggregated",
"pageviews",
"events",
"imported",
"raw",
"dashboard"
],
"default": "aggregated"
},
"file_format": {
"type": "string",
"description": "csv、json、xlsx(aggregated、pageviews、events、imported)、csv または ndjson(raw)、zip(dashboard)",
"enum": [
"csv",
"json",
"xlsx",
"ndjson",
"zip"
],
"default": "csv"
},
"from": {
"type": "string",
"format": "date",
"description": "最初の日(エクスポートのタイムゾーン)",
"examples": [
"2026-09-01"
]
},
"to": {
"type": "string",
"format": "date",
"description": "最後の日(この日を含む。最大400日、rawは93日)",
"examples": [
"2026-09-28"
]
},
"timezone": {
"type": "string",
"description": "日付とグループ化のタイムゾーン(例: America/New_York。デフォルト: サイトのタイムゾーン)"
},
"grouping": {
"type": "string",
"description": "集計エクスポートの時間バケット",
"enum": [
"hour",
"day",
"week",
"month",
"quarter",
"year"
],
"default": "day"
},
"dimensions": {
"type": "array",
"items": {
"type": "string"
},
"description": "集計エクスポートをグループ化する訪問のディメンション(最大6個。例: country、channel、entry_page)。インポートのエクスポートでは、含めるインポート済みディメンション",
"default": []
},
"metrics": {
"type": "array",
"items": {
"type": "string"
},
"description": "集計エクスポートの指標(デフォルトはすべて): visitors、visits、pageviews、bounce_rate、visit_duration、views_per_visit、revenue",
"default": []
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "pageviews/events/raw エクスポートの列(デフォルトは visit_id、vital_value、selector 以外のすべて): occurred_at, kind, name, visit_id, hostname, path, referrer_host, referrer_path, channel, utm_source, utm_medium, utm_campaign, utm_content, utm_term, ref, paid_click, country, language, device, browser, browser_major, os, os_major, screen_bucket, engaged_ms, scroll_depth, revenue_minor, currency, vital_value, selector, props",
"default": []
},
"filters": {
"type": "array",
"items": {},
"description": "フィルター(統計APIと同じ形式): [[\"dimension\",\"operator\",\"value\"], …]",
"default": []
},
"segment_id": {
"type": "string",
"description": "保存済みのセグメントを適用(seg_…)"
},
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
}
},
"required": [
"site_id",
"from",
"to",
"workspace_id"
]
}
{
"type": "object"
}
GET
/exports/:id.json
エクスポートとそのステータスを取得
exports_get
権限: analytics.export
curl https://privatusanalytics.com/exports/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "エクスポートID(例: exp_7Q2K9XH3AB)"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "エクスポートしたサイト(pa_…)"
},
{
"type": "null"
}
]
},
"kind": {
"type": "string",
"description": "aggregated、pageviews、events、imported、raw、dashboard のいずれか"
},
"format": {
"type": "string",
"description": "csv、json、xlsx、ndjson、zip のいずれか"
},
"status": {
"type": "string",
"description": "queued、running、complete、failed、expired のいずれか"
},
"params": {
"type": "object",
"description": "エクスポートの定義(日付、タイムゾーン、グループ化、ディメンション、指標、フィールド、フィルター)"
},
"row_count": {
"anyOf": [
{
"type": "integer",
"description": "書き込まれた行数"
},
{
"type": "null"
}
]
},
"error": {
"anyOf": [
{
"type": "string",
"description": "エクスポートが失敗した理由"
},
{
"type": "null"
}
]
},
"completed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "ファイルが削除される日時"
},
{
"type": "null"
}
]
},
"download_url": {
"anyOf": [
{
"type": "string",
"description": "有効期間の短い署名付きファイルリンクを返すパス(exports_download)"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
キャンペーン
POST
/sites/:site_id/campaigns/costs.json
月ごとのキャンペーン費用を設定
campaign_costs_create
権限: content.write
curl -X POST https://privatusanalytics.com/sites/:site_id/campaigns/costs.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"campaign": {
"type": "string",
"description": "費用が属する utm_campaign の値",
"examples": [
"spring_sale"
]
},
"month": {
"type": "string",
"description": "月(YYYY-MM)",
"examples": [
"2026-09"
]
},
"amount": {
"type": "number",
"description": "費用(通貨の主単位、例: 1250.50)"
},
"currency": {
"type": "string",
"description": "ISO 4217の通貨(デフォルトはサイトの通貨)"
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"campaign",
"month",
"amount",
"site_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "費用エントリID"
},
"campaign": {
"type": "string",
"description": "utm_campaign の値"
},
"month": {
"type": "string",
"description": "月(YYYY-MM)"
},
"amount_minor": {
"type": "integer",
"description": "費用(最小単位)"
},
"currency": {
"type": "string",
"description": "金額のISO 4217通貨"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/sites/:site_id/campaigns/costs/:id.json
キャンペーン費用のエントリを削除
campaign_costs_delete
権限: content.write
curl -X DELETE https://privatusanalytics.com/sites/:site_id/campaigns/costs/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "費用エントリID"
},
"campaign": {
"type": "string",
"description": "utm_campaign の値"
},
"month": {
"type": "string",
"description": "月(YYYY-MM)"
},
"amount_minor": {
"type": "integer",
"description": "費用(最小単位)"
},
"currency": {
"type": "string",
"description": "金額のISO 4217通貨"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
POST
/sites/:site_id/campaigns/costs/import.json
CSVからキャンペーン費用をインポート(campaign,month,amount[,currency])
campaign_costs_import
権限: content.write
curl -X POST https://privatusanalytics.com/sites/:site_id/campaigns/costs/import.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"file": {
"type": "string",
"format": "binary",
"description": "CSVファイルのアップロード(multipartフォーム)"
},
"csv": {
"type": "string",
"description": "CSVテキスト: campaign,month,amount[,currency]"
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"site_id"
]
}
{
"type": "object",
"properties": {
"imported": {
"type": "integer",
"description": "保存された行数"
},
"failed": {
"type": "integer",
"description": "スキップされた行数"
},
"errors": {
"type": "array",
"items": {
"type": "string"
},
"description": "行がスキップされた理由(最初の50件)"
}
}
}
GET
/sites/:site_id/campaigns/costs.json
キャンペーン費用のエントリを一覧表示
campaign_costs_list
権限: analytics.read
curl https://privatusanalytics.com/sites/:site_id/campaigns/costs.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"campaign": {
"type": "string",
"description": "このキャンペーンのみ"
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
},
"page": {
"type": "integer",
"description": "ページ(1から)"
},
"per_page": {
"type": "integer",
"description": "1ページあたりの結果数(最大100)"
}
},
"required": [
"site_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "費用エントリID"
},
"campaign": {
"type": "string",
"description": "utm_campaign の値"
},
"month": {
"type": "string",
"description": "月(YYYY-MM)"
},
"amount_minor": {
"type": "integer",
"description": "費用(最小単位)"
},
"currency": {
"type": "string",
"description": "金額のISO 4217通貨"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
}
PATCH
/sites/:site_id/campaigns/costs/:id.json
キャンペーン費用のエントリを変更
campaign_costs_update
権限: content.write
curl -X PATCH https://privatusanalytics.com/sites/:site_id/campaigns/costs/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"campaign": {
"type": "string",
"description": "utm_campaign の値"
},
"month": {
"type": "string",
"description": "月(YYYY-MM)"
},
"amount": {
"type": "number",
"description": "費用(通貨の主単位)"
},
"currency": {
"type": "string",
"description": "ISO 4217の通貨"
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "費用エントリID"
},
"campaign": {
"type": "string",
"description": "utm_campaign の値"
},
"month": {
"type": "string",
"description": "月(YYYY-MM)"
},
"amount_minor": {
"type": "integer",
"description": "費用(最小単位)"
},
"currency": {
"type": "string",
"description": "金額のISO 4217通貨"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/sites/:site_id/campaigns/builder.json
UTMタグ付きURLを作成して検証
campaigns_builder
権限: analytics.read
curl https://privatusanalytics.com/sites/:site_id/campaigns/builder.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"destination": {
"type": "string",
"description": "ランディングページのURL(https://…)",
"examples": [
"https://example.com/pricing"
]
},
"preset": {
"type": "string",
"description": "空欄の場合、チャネルに合わせて utm_source/utm_medium を補完",
"enum": [
"newsletter",
"social",
"paid_search",
"paid_social",
"print",
"partner"
]
},
"utm_source": {
"type": "string",
"description": "トラフィックの流入元"
},
"utm_medium": {
"type": "string",
"description": "マーケティングのメディア(例: email、cpc)"
},
"utm_campaign": {
"type": "string",
"description": "キャンペーン名(例: spring_sale)"
},
"utm_content": {
"type": "string",
"description": "バリアント(例: header_button)"
},
"utm_term": {
"type": "string",
"description": "有料検索のキーワード"
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"site_id"
]
}
{
"type": "object",
"properties": {
"url": {
"anyOf": [
{
"type": "string",
"description": "タグ付きURL(エラーがある間は null)"
},
{
"type": "null"
}
]
},
"valid": {
"type": "boolean",
"description": "エラーがない場合は true"
},
"destination": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"preset": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"utm_source": {
"anyOf": [
{
"type": "string",
"description": "正規化された utm_source"
},
{
"type": "null"
}
]
},
"utm_medium": {
"anyOf": [
{
"type": "string",
"description": "正規化された utm_medium"
},
{
"type": "null"
}
]
},
"utm_campaign": {
"anyOf": [
{
"type": "string",
"description": "正規化された utm_campaign"
},
{
"type": "null"
}
]
},
"utm_content": {
"anyOf": [
{
"type": "string",
"description": "正規化された utm_content"
},
{
"type": "null"
}
]
},
"utm_term": {
"anyOf": [
{
"type": "string",
"description": "正規化された utm_term"
},
{
"type": "null"
}
]
},
"issues": {
"type": "array",
"items": {
"type": "object"
},
"description": "field、level(error または warning)、message"
},
"presets": {
"type": "object",
"description": "チャネルのプリセット: プリセットごとの utm_source/utm_medium"
}
}
}
GET
/sites/:site_id/campaigns/hygiene.json
UTMの整合性: ほぼ重複する値、表記の問題、不明な流入元
campaigns_hygiene
権限: analytics.read
curl https://privatusanalytics.com/sites/:site_id/campaigns/hygiene.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"period": {
"type": "string",
"description": "期間のプリセット。from/to を使うには custom を指定",
"enum": [
"today",
"yesterday",
"24h",
"7d",
"14d",
"28d",
"30d",
"90d",
"mtd",
"last_month",
"qtd",
"last_quarter",
"ytd",
"12mo",
"last_year",
"all",
"custom"
],
"default": "30d"
},
"from": {
"type": "string",
"format": "date",
"description": "カスタム期間の開始(サイトのタイムゾーン)"
},
"to": {
"type": "string",
"format": "date",
"description": "カスタム期間の終了(この日を含む)"
},
"compare": {
"type": "string",
"description": "比較期間",
"enum": [
"none",
"previous_period",
"previous_year",
"custom"
],
"default": "none"
},
"compare_from": {
"type": "string",
"format": "date",
"description": "カスタム比較の開始"
},
"compare_to": {
"type": "string",
"format": "date",
"description": "カスタム比較の終了"
},
"match_weekday": {
"type": "boolean",
"description": "比較する日の曜日をそろえる",
"default": false
},
"filters": {
"type": "array",
"items": {},
"description": "フィルター: [[\"dimension\",\"operator\",\"value\"], …]。演算子: is、is_not、any_of、none_of、contains、not_contains、starts_with、regex、not_regex、gt、lt、between。OR条件にする場合は {\"any\": [...]} で条件をまとめます。",
"default": []
},
"segment_id": {
"type": "string",
"description": "保存済みのセグメントを適用(seg_…)"
},
"include_imported": {
"type": "boolean",
"description": "インポートした過去データを追加(最初のネイティブイベントより前の日付が対象。フィルターやセグメントを適用している場合は無視されます)",
"default": false
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"site_id"
]
}
{
"type": "object",
"properties": {
"period": {
"type": "object",
"description": "期間の from/to(UTC)"
},
"duplicates": {
"type": "array",
"items": {
"type": "object"
},
"description": "ほぼ重複する値: field、suggestion、variants [{value, visits}]"
},
"style_issues": {
"type": "array",
"items": {
"type": "object"
},
"description": "小文字とアンダースコアではない値: field、value、visits、suggestion"
},
"unknown_sources": {
"type": "array",
"items": {
"type": "object"
},
"description": "認識できない utm_source の値: value、visits"
}
}
}
GET
/sites/:site_id/campaigns.json
コンバージョン、収益、費用、CPA、ROASを含むキャンペーンの集計
campaigns_list
権限: analytics.read
curl https://privatusanalytics.com/sites/:site_id/campaigns.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"period": {
"type": "string",
"description": "期間のプリセット。from/to を使うには custom を指定",
"enum": [
"today",
"yesterday",
"24h",
"7d",
"14d",
"28d",
"30d",
"90d",
"mtd",
"last_month",
"qtd",
"last_quarter",
"ytd",
"12mo",
"last_year",
"all",
"custom"
],
"default": "30d"
},
"from": {
"type": "string",
"format": "date",
"description": "カスタム期間の開始(サイトのタイムゾーン)"
},
"to": {
"type": "string",
"format": "date",
"description": "カスタム期間の終了(この日を含む)"
},
"compare": {
"type": "string",
"description": "比較期間",
"enum": [
"none",
"previous_period",
"previous_year",
"custom"
],
"default": "none"
},
"compare_from": {
"type": "string",
"format": "date",
"description": "カスタム比較の開始"
},
"compare_to": {
"type": "string",
"format": "date",
"description": "カスタム比較の終了"
},
"match_weekday": {
"type": "boolean",
"description": "比較する日の曜日をそろえる",
"default": false
},
"filters": {
"type": "array",
"items": {},
"description": "フィルター: [[\"dimension\",\"operator\",\"value\"], …]。演算子: is、is_not、any_of、none_of、contains、not_contains、starts_with、regex、not_regex、gt、lt、between。OR条件にする場合は {\"any\": [...]} で条件をまとめます。",
"default": []
},
"segment_id": {
"type": "string",
"description": "保存済みのセグメントを適用(seg_…)"
},
"include_imported": {
"type": "boolean",
"description": "インポートした過去データを追加(最初のネイティブイベントより前の日付が対象。フィルターやセグメントを適用している場合は無視されます)",
"default": false
},
"goal_id": {
"type": "string",
"description": "コンバージョンをカウントするゴール(goal_…)。デフォルトは最初の有効なゴール"
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"site_id"
]
}
{
"type": "object",
"properties": {
"period": {
"type": "object",
"description": "期間の from/to(UTC)"
},
"currency": {
"type": "string",
"description": "収益と費用のサイトの通貨"
},
"goal_id": {
"anyOf": [
{
"type": "string",
"description": "コンバージョンとしてカウントされるゴール"
},
{
"type": "null"
}
]
},
"goal_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"campaigns": {
"type": "array",
"items": {
"type": "object"
},
"description": "utm_campaign ごと: visitors、visits、conversions、conversion_rate、revenue、cost、cpa(最小単位)、roas(収益 ÷ 費用)、sources [{source, medium, visitors, visits, conversions, conversion_rate, revenue}]"
},
"totals": {
"type": "object",
"description": "一覧表示されたすべてのキャンペーンの合計"
}
}
}
POST
/sites/:site_id/campaigns/links.json
UTMタグ付きリンクをライブラリに保存
links_create
権限: content.write
curl -X POST https://privatusanalytics.com/sites/:site_id/campaigns/links.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "リンク名",
"examples": [
"Spring newsletter"
]
},
"destination": {
"type": "string",
"description": "ランディングページのURL(https://…)",
"examples": [
"https://example.com/pricing"
]
},
"utm_source": {
"type": "string",
"description": "utm_source の値(小文字に変換され、スペースはアンダースコアになります)"
},
"utm_medium": {
"type": "string",
"description": "utm_medium の値(小文字に変換され、スペースはアンダースコアになります)"
},
"utm_campaign": {
"type": "string",
"description": "utm_campaign の値(小文字に変換され、スペースはアンダースコアになります)"
},
"utm_content": {
"type": "string",
"description": "utm_content の値(小文字に変換され、スペースはアンダースコアになります)"
},
"utm_term": {
"type": "string",
"description": "utm_term の値(小文字に変換され、スペースはアンダースコアになります)"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"description": "タグ。カンマ区切りの値は分割されます",
"default": []
},
"notes": {
"type": "string",
"description": "自由記述のメモ"
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"name",
"destination",
"site_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "リンクID(例: lnk_7Q2K9XH3AB)"
},
"name": {
"type": "string"
},
"destination": {
"type": "string",
"description": "ランディングページのURL"
},
"utm_source": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"utm_medium": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"utm_campaign": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"utm_content": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"utm_term": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"url": {
"type": "string",
"description": "共有するタグ付きの完全なURL"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"notes": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/sites/:site_id/campaigns/links/:id.json
保存済みリンクを削除
links_delete
権限: content.write
curl -X DELETE https://privatusanalytics.com/sites/:site_id/campaigns/links/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "リンクID(例: lnk_7Q2K9XH3AB)"
},
"name": {
"type": "string"
},
"destination": {
"type": "string",
"description": "ランディングページのURL"
},
"utm_source": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"utm_medium": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"utm_campaign": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"utm_content": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"utm_term": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"url": {
"type": "string",
"description": "共有するタグ付きの完全なURL"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"notes": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/sites/:site_id/campaigns/links.json
保存済みのキャンペーンリンクを一覧表示
links_list
権限: analytics.read
curl https://privatusanalytics.com/sites/:site_id/campaigns/links.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "名前、宛先、キャンペーンを検索"
},
"tag": {
"type": "string",
"description": "このタグのリンクのみ"
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
},
"page": {
"type": "integer",
"description": "ページ(1から)"
},
"per_page": {
"type": "integer",
"description": "1ページあたりの結果数(最大100)"
}
},
"required": [
"site_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "リンクID(例: lnk_7Q2K9XH3AB)"
},
"name": {
"type": "string"
},
"destination": {
"type": "string",
"description": "ランディングページのURL"
},
"utm_source": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"utm_medium": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"utm_campaign": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"utm_content": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"utm_term": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"url": {
"type": "string",
"description": "共有するタグ付きの完全なURL"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"notes": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
}
GET
/sites/:site_id/campaigns/links/:id/qr.json
保存済みリンクのQRコード(SVG)
links_qr
権限: analytics.read
curl https://privatusanalytics.com/sites/:site_id/campaigns/links/:id/qr.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"size": {
"type": "integer",
"description": "モジュールのサイズ(ピクセル、2〜20)",
"default": 6
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"link_id": {
"type": "string",
"description": "リンクID"
},
"url": {
"type": "string",
"description": "エンコードされた(タグ付き)URL"
},
"svg": {
"type": "string",
"description": "QRコードの単体のSVGドキュメント"
}
}
}
GET
/sites/:site_id/campaigns/links/:id.json
保存済みのキャンペーンリンクを取得
links_get
権限: analytics.read
curl https://privatusanalytics.com/sites/:site_id/campaigns/links/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "リンクID(例: lnk_7Q2K9XH3AB)"
},
"name": {
"type": "string"
},
"destination": {
"type": "string",
"description": "ランディングページのURL"
},
"utm_source": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"utm_medium": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"utm_campaign": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"utm_content": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"utm_term": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"url": {
"type": "string",
"description": "共有するタグ付きの完全なURL"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"notes": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
PATCH
/sites/:site_id/campaigns/links/:id.json
保存済みリンクを変更
links_update
権限: content.write
curl -X PATCH https://privatusanalytics.com/sites/:site_id/campaigns/links/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "リンク名",
"examples": [
"Spring newsletter"
]
},
"destination": {
"type": "string",
"description": "ランディングページのURL(https://…)",
"examples": [
"https://example.com/pricing"
]
},
"utm_source": {
"type": "string",
"description": "utm_source の値(小文字に変換され、スペースはアンダースコアになります)"
},
"utm_medium": {
"type": "string",
"description": "utm_medium の値(小文字に変換され、スペースはアンダースコアになります)"
},
"utm_campaign": {
"type": "string",
"description": "utm_campaign の値(小文字に変換され、スペースはアンダースコアになります)"
},
"utm_content": {
"type": "string",
"description": "utm_content の値(小文字に変換され、スペースはアンダースコアになります)"
},
"utm_term": {
"type": "string",
"description": "utm_term の値(小文字に変換され、スペースはアンダースコアになります)"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"description": "タグ。カンマ区切りの値は分割されます"
},
"notes": {
"type": "string",
"description": "自由記述のメモ"
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "リンクID(例: lnk_7Q2K9XH3AB)"
},
"name": {
"type": "string"
},
"destination": {
"type": "string",
"description": "ランディングページのURL"
},
"utm_source": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"utm_medium": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"utm_campaign": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"utm_content": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"utm_term": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"url": {
"type": "string",
"description": "共有するタグ付きの完全なURL"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"notes": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
クローラー
POST
/sites/:site_id/crawlers/connection.json
Cloudflare ゾーンから AI クローラーのヒットを同期(ブラウザでの Cloudflare 許可が必要)
crawlers_cloudflare_connect
権限: sites.manage
curl -X POST https://privatusanalytics.com/sites/:site_id/crawlers/connection.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"zone_id": {
"type": "string",
"description": "Cloudflare ゾーン ID(crawlers_cloudflare_zones から取得)",
"examples": [
"023e105f4ecef8ad9ca31a8372d0c353"
]
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"zone_id",
"site_id"
]
}
{
"type": "object",
"properties": {
"zone_id": {
"type": "string",
"description": "Cloudflare ゾーン ID"
},
"zone_name": {
"type": "string",
"description": "Cloudflare ゾーン名(例: example.com)"
},
"status": {
"type": "string",
"description": "active または error"
},
"last_synced_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "クローラーのヒットが最後にインポートされた日時。最初のインポート前は null"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/sites/:site_id/crawlers/connection.json
Cloudflare の接続を解除し、インポートしたクローラーのヒットを削除
crawlers_cloudflare_disconnect
権限: sites.manage
curl -X DELETE https://privatusanalytics.com/sites/:site_id/crawlers/connection.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"site_id"
]
}
{
"type": "object",
"properties": {
"zone_id": {
"type": "string",
"description": "Cloudflare ゾーン ID"
},
"zone_name": {
"type": "string",
"description": "Cloudflare ゾーン名(例: example.com)"
},
"status": {
"type": "string",
"description": "active または error"
},
"last_synced_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "クローラーのヒットが最後にインポートされた日時。最初のインポート前は null"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
POST
/sites/:site_id/crawlers/sync.json
Cloudflare からクローラーのヒットを今すぐインポート
crawlers_cloudflare_sync
権限: sites.manage
curl -X POST https://privatusanalytics.com/sites/:site_id/crawlers/sync.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"site_id"
]
}
{
"type": "object",
"properties": {
"zone_id": {
"type": "string",
"description": "Cloudflare ゾーン ID"
},
"zone_name": {
"type": "string",
"description": "Cloudflare ゾーン名(例: example.com)"
},
"status": {
"type": "string",
"description": "active または error"
},
"last_synced_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "クローラーのヒットが最後にインポートされた日時。最初のインポート前は null"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/sites/:site_id/crawlers/zones.json
接続できる Cloudflare ゾーンを一覧表示(ブラウザでの Cloudflare 許可が必要)
crawlers_cloudflare_zones
権限: sites.manage
curl https://privatusanalytics.com/sites/:site_id/crawlers/zones.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"site_id"
]
}
{
"type": "object"
}
GET
/sites/:site_id/crawlers.json
AIクローラーのレポート: クローラーごとのヒット数の推移、クローラーごとの上位パス、カテゴリ別
crawlers_report
権限: analytics.read
curl https://privatusanalytics.com/sites/:site_id/crawlers.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"period": {
"type": "string",
"description": "期間のプリセット。from/to を使うには custom を指定",
"enum": [
"today",
"yesterday",
"24h",
"7d",
"14d",
"28d",
"30d",
"90d",
"mtd",
"last_month",
"qtd",
"last_quarter",
"ytd",
"12mo",
"last_year",
"all",
"custom"
],
"default": "30d"
},
"from": {
"type": "string",
"format": "date",
"description": "カスタム期間の開始(サイトのタイムゾーン)"
},
"to": {
"type": "string",
"format": "date",
"description": "カスタム期間の終了(この日を含む)"
},
"category": {
"type": "string",
"description": "ai、search、seo、other、all のいずれか",
"enum": [
"all",
"ai",
"search",
"seo",
"other"
],
"default": "ai"
},
"crawler": {
"type": "string",
"description": "このクローラーのみ(例: GPTBot)"
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"site_id"
]
}
{
"type": "object"
}
ゴール
POST
/sites/:site_id/goals/:id/archive.json
ゴールをアーカイブ(レポートから非表示)
goals_archive
権限: content.write
curl -X POST https://privatusanalytics.com/sites/:site_id/goals/:id/archive.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ゴールID(例: goal_7Q2K9XH3AB)"
},
"name": {
"type": "string"
},
"kind": {
"type": "string",
"description": "page、event、engagement、outbound、download のいずれか"
},
"match_type": {
"type": "string",
"description": "exact、prefix、glob、regex のいずれか"
},
"pattern": {
"anyOf": [
{
"type": "string",
"description": "パス、ドメイン、ファイルのパターン"
},
{
"type": "null"
}
]
},
"hostname": {
"anyOf": [
{
"type": "string",
"description": "ホスト名の制限(pageゴール)"
},
{
"type": "null"
}
]
},
"event_name": {
"anyOf": [
{
"type": "string",
"description": "カスタムイベント名(eventゴール)"
},
{
"type": "null"
}
]
},
"conditions": {
"type": "array",
"items": {
"type": "object"
},
"description": "イベントプロパティの条件"
},
"scroll_threshold": {
"anyOf": [
{
"type": "integer",
"description": "engagement: スクロール(%)"
},
{
"type": "null"
}
]
},
"time_threshold_seconds": {
"anyOf": [
{
"type": "integer",
"description": "engagement: ページ滞在時間(秒)"
},
{
"type": "null"
}
]
},
"value_mode": {
"type": "string",
"description": "none、fixed、revenue のいずれか"
},
"fixed_value_minor": {
"anyOf": [
{
"type": "integer",
"description": "固定値(最小単位)"
},
{
"type": "null"
}
]
},
"count_mode": {
"type": "string",
"description": "once_per_visit または every"
},
"archived": {
"type": "boolean"
},
"archived_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"stats": {
"anyOf": [
{
"type": "object",
"properties": {
"completions": {
"type": "integer",
"description": "一致したイベント(繰り返しを含む)"
},
"conversions": {
"type": "integer",
"description": "完了が1回以上ある訪問"
},
"conversion_rate": {
"type": "number",
"description": "コンバージョン ÷ 訪問数(サイトの設定によっては ÷ 訪問者数)(%)"
},
"value": {
"type": "integer",
"description": "サイトの通貨の最小単位でのゴールの価値"
},
"change": {
"anyOf": [
{
"type": "number",
"description": "前の期間と比べたコンバージョンの変化(%)"
},
{
"type": "null"
}
]
}
},
"description": "期間の統計(一覧のみ)"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
POST
/sites/:site_id/goals.json
ゴールを作成
goals_create
権限: content.write
curl -X POST https://privatusanalytics.com/sites/:site_id/goals.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "ゴール名",
"examples": [
"Signed up"
]
},
"kind": {
"type": "string",
"description": "page(ページを訪問)、event(カスタムイベント)、engagement(スクロールまたはページ滞在時間)、outbound(外部リンクのクリック)、download(ファイルのダウンロード)",
"enum": [
"page",
"event",
"engagement",
"outbound",
"download"
]
},
"match_type": {
"type": "string",
"description": "patternがパス(page、engagement)、リンクのドメイン(outbound)、ファイル(download)に一致する方法: exact、prefix、glob (*)、regex",
"enum": [
"exact",
"prefix",
"glob",
"regex"
],
"default": "exact"
},
"pattern": {
"type": "string",
"description": "パス、ドメイン、ファイルのパターン(例: /pricing、/blog/*、stripe.com、*.pdf)"
},
"hostname": {
"type": "string",
"description": "このホスト名のページのみカウント(pageゴール)"
},
"event_name": {
"type": "string",
"description": "カスタムイベント名(eventゴール)"
},
"conditions": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
},
"description": "イベントプロパティの条件: [{\"key\": \"plan\", \"operator\": \"is|is_not|contains|gt|lt\", \"value\": \"pro\"}]",
"default": []
},
"scroll_threshold": {
"type": "integer",
"description": "engagement: 到達すべきスクロール深度(%)"
},
"time_threshold_seconds": {
"type": "integer",
"description": "engagement: ページ滞在時間(秒)"
},
"value_mode": {
"type": "string",
"description": "none、fixed(コンバージョンごとに fixed_value)、revenue(イベントの収益)のいずれか",
"enum": [
"none",
"fixed",
"revenue"
],
"default": "none"
},
"fixed_value": {
"type": "number",
"description": "サイトの通貨でのコンバージョン1件あたりの固定値(例: 50.0)"
},
"count_mode": {
"type": "string",
"description": "値のカウント方法。once_per_visit または every completion",
"enum": [
"once_per_visit",
"every"
],
"default": "once_per_visit"
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"name",
"kind",
"site_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ゴールID(例: goal_7Q2K9XH3AB)"
},
"name": {
"type": "string"
},
"kind": {
"type": "string",
"description": "page、event、engagement、outbound、download のいずれか"
},
"match_type": {
"type": "string",
"description": "exact、prefix、glob、regex のいずれか"
},
"pattern": {
"anyOf": [
{
"type": "string",
"description": "パス、ドメイン、ファイルのパターン"
},
{
"type": "null"
}
]
},
"hostname": {
"anyOf": [
{
"type": "string",
"description": "ホスト名の制限(pageゴール)"
},
{
"type": "null"
}
]
},
"event_name": {
"anyOf": [
{
"type": "string",
"description": "カスタムイベント名(eventゴール)"
},
{
"type": "null"
}
]
},
"conditions": {
"type": "array",
"items": {
"type": "object"
},
"description": "イベントプロパティの条件"
},
"scroll_threshold": {
"anyOf": [
{
"type": "integer",
"description": "engagement: スクロール(%)"
},
{
"type": "null"
}
]
},
"time_threshold_seconds": {
"anyOf": [
{
"type": "integer",
"description": "engagement: ページ滞在時間(秒)"
},
{
"type": "null"
}
]
},
"value_mode": {
"type": "string",
"description": "none、fixed、revenue のいずれか"
},
"fixed_value_minor": {
"anyOf": [
{
"type": "integer",
"description": "固定値(最小単位)"
},
{
"type": "null"
}
]
},
"count_mode": {
"type": "string",
"description": "once_per_visit または every"
},
"archived": {
"type": "boolean"
},
"archived_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"stats": {
"anyOf": [
{
"type": "object",
"properties": {
"completions": {
"type": "integer",
"description": "一致したイベント(繰り返しを含む)"
},
"conversions": {
"type": "integer",
"description": "完了が1回以上ある訪問"
},
"conversion_rate": {
"type": "number",
"description": "コンバージョン ÷ 訪問数(サイトの設定によっては ÷ 訪問者数)(%)"
},
"value": {
"type": "integer",
"description": "サイトの通貨の最小単位でのゴールの価値"
},
"change": {
"anyOf": [
{
"type": "number",
"description": "前の期間と比べたコンバージョンの変化(%)"
},
{
"type": "null"
}
]
}
},
"description": "期間の統計(一覧のみ)"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/sites/:site_id/goals/:id.json
ゴールを削除(データは保持されます)
goals_delete
権限: content.write
curl -X DELETE https://privatusanalytics.com/sites/:site_id/goals/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ゴールID(例: goal_7Q2K9XH3AB)"
},
"name": {
"type": "string"
},
"kind": {
"type": "string",
"description": "page、event、engagement、outbound、download のいずれか"
},
"match_type": {
"type": "string",
"description": "exact、prefix、glob、regex のいずれか"
},
"pattern": {
"anyOf": [
{
"type": "string",
"description": "パス、ドメイン、ファイルのパターン"
},
{
"type": "null"
}
]
},
"hostname": {
"anyOf": [
{
"type": "string",
"description": "ホスト名の制限(pageゴール)"
},
{
"type": "null"
}
]
},
"event_name": {
"anyOf": [
{
"type": "string",
"description": "カスタムイベント名(eventゴール)"
},
{
"type": "null"
}
]
},
"conditions": {
"type": "array",
"items": {
"type": "object"
},
"description": "イベントプロパティの条件"
},
"scroll_threshold": {
"anyOf": [
{
"type": "integer",
"description": "engagement: スクロール(%)"
},
{
"type": "null"
}
]
},
"time_threshold_seconds": {
"anyOf": [
{
"type": "integer",
"description": "engagement: ページ滞在時間(秒)"
},
{
"type": "null"
}
]
},
"value_mode": {
"type": "string",
"description": "none、fixed、revenue のいずれか"
},
"fixed_value_minor": {
"anyOf": [
{
"type": "integer",
"description": "固定値(最小単位)"
},
{
"type": "null"
}
]
},
"count_mode": {
"type": "string",
"description": "once_per_visit または every"
},
"archived": {
"type": "boolean"
},
"archived_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"stats": {
"anyOf": [
{
"type": "object",
"properties": {
"completions": {
"type": "integer",
"description": "一致したイベント(繰り返しを含む)"
},
"conversions": {
"type": "integer",
"description": "完了が1回以上ある訪問"
},
"conversion_rate": {
"type": "number",
"description": "コンバージョン ÷ 訪問数(サイトの設定によっては ÷ 訪問者数)(%)"
},
"value": {
"type": "integer",
"description": "サイトの通貨の最小単位でのゴールの価値"
},
"change": {
"anyOf": [
{
"type": "number",
"description": "前の期間と比べたコンバージョンの変化(%)"
},
{
"type": "null"
}
]
}
},
"description": "期間の統計(一覧のみ)"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
POST
/sites/:site_id/goals/:id/duplicate.json
ゴールをコピー
goals_duplicate
権限: content.write
curl -X POST https://privatusanalytics.com/sites/:site_id/goals/:id/duplicate.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "コピーの名前"
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ゴールID(例: goal_7Q2K9XH3AB)"
},
"name": {
"type": "string"
},
"kind": {
"type": "string",
"description": "page、event、engagement、outbound、download のいずれか"
},
"match_type": {
"type": "string",
"description": "exact、prefix、glob、regex のいずれか"
},
"pattern": {
"anyOf": [
{
"type": "string",
"description": "パス、ドメイン、ファイルのパターン"
},
{
"type": "null"
}
]
},
"hostname": {
"anyOf": [
{
"type": "string",
"description": "ホスト名の制限(pageゴール)"
},
{
"type": "null"
}
]
},
"event_name": {
"anyOf": [
{
"type": "string",
"description": "カスタムイベント名(eventゴール)"
},
{
"type": "null"
}
]
},
"conditions": {
"type": "array",
"items": {
"type": "object"
},
"description": "イベントプロパティの条件"
},
"scroll_threshold": {
"anyOf": [
{
"type": "integer",
"description": "engagement: スクロール(%)"
},
{
"type": "null"
}
]
},
"time_threshold_seconds": {
"anyOf": [
{
"type": "integer",
"description": "engagement: ページ滞在時間(秒)"
},
{
"type": "null"
}
]
},
"value_mode": {
"type": "string",
"description": "none、fixed、revenue のいずれか"
},
"fixed_value_minor": {
"anyOf": [
{
"type": "integer",
"description": "固定値(最小単位)"
},
{
"type": "null"
}
]
},
"count_mode": {
"type": "string",
"description": "once_per_visit または every"
},
"archived": {
"type": "boolean"
},
"archived_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"stats": {
"anyOf": [
{
"type": "object",
"properties": {
"completions": {
"type": "integer",
"description": "一致したイベント(繰り返しを含む)"
},
"conversions": {
"type": "integer",
"description": "完了が1回以上ある訪問"
},
"conversion_rate": {
"type": "number",
"description": "コンバージョン ÷ 訪問数(サイトの設定によっては ÷ 訪問者数)(%)"
},
"value": {
"type": "integer",
"description": "サイトの通貨の最小単位でのゴールの価値"
},
"change": {
"anyOf": [
{
"type": "number",
"description": "前の期間と比べたコンバージョンの変化(%)"
},
{
"type": "null"
}
]
}
},
"description": "期間の統計(一覧のみ)"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/sites/:site_id/goals.json
期間ごとの完了数、コンバージョン、率、価値を含むゴールを一覧表示
goals_list
権限: analytics.read
curl https://privatusanalytics.com/sites/:site_id/goals.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"period": {
"type": "string",
"description": "期間のプリセット。from/to を使うには custom を指定",
"enum": [
"today",
"yesterday",
"24h",
"7d",
"14d",
"28d",
"30d",
"90d",
"mtd",
"last_month",
"qtd",
"last_quarter",
"ytd",
"12mo",
"last_year",
"all",
"custom"
],
"default": "30d"
},
"from": {
"type": "string",
"format": "date",
"description": "カスタム期間の開始(サイトのタイムゾーン)"
},
"to": {
"type": "string",
"format": "date",
"description": "カスタム期間の終了(この日を含む)"
},
"compare": {
"type": "string",
"description": "比較期間",
"enum": [
"none",
"previous_period",
"previous_year",
"custom"
],
"default": "none"
},
"compare_from": {
"type": "string",
"format": "date",
"description": "カスタム比較の開始"
},
"compare_to": {
"type": "string",
"format": "date",
"description": "カスタム比較の終了"
},
"match_weekday": {
"type": "boolean",
"description": "比較する日の曜日をそろえる",
"default": false
},
"filters": {
"type": "array",
"items": {},
"description": "フィルター: [[\"dimension\",\"operator\",\"value\"], …]。演算子: is、is_not、any_of、none_of、contains、not_contains、starts_with、regex、not_regex、gt、lt、between。OR条件にする場合は {\"any\": [...]} で条件をまとめます。",
"default": []
},
"segment_id": {
"type": "string",
"description": "保存済みのセグメントを適用(seg_…)"
},
"include_imported": {
"type": "boolean",
"description": "インポートした過去データを追加(最初のネイティブイベントより前の日付が対象。フィルターやセグメントを適用している場合は無視されます)",
"default": false
},
"status": {
"type": "string",
"description": "active、archived、all のゴール",
"enum": [
"active",
"archived",
"all"
],
"default": "active"
},
"page": {
"type": "integer",
"description": "ページ番号",
"default": 1
},
"per_page": {
"type": "integer",
"description": "1ページあたりのゴール数(最大100)",
"default": 25
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"site_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ゴールID(例: goal_7Q2K9XH3AB)"
},
"name": {
"type": "string"
},
"kind": {
"type": "string",
"description": "page、event、engagement、outbound、download のいずれか"
},
"match_type": {
"type": "string",
"description": "exact、prefix、glob、regex のいずれか"
},
"pattern": {
"anyOf": [
{
"type": "string",
"description": "パス、ドメイン、ファイルのパターン"
},
{
"type": "null"
}
]
},
"hostname": {
"anyOf": [
{
"type": "string",
"description": "ホスト名の制限(pageゴール)"
},
{
"type": "null"
}
]
},
"event_name": {
"anyOf": [
{
"type": "string",
"description": "カスタムイベント名(eventゴール)"
},
{
"type": "null"
}
]
},
"conditions": {
"type": "array",
"items": {
"type": "object"
},
"description": "イベントプロパティの条件"
},
"scroll_threshold": {
"anyOf": [
{
"type": "integer",
"description": "engagement: スクロール(%)"
},
{
"type": "null"
}
]
},
"time_threshold_seconds": {
"anyOf": [
{
"type": "integer",
"description": "engagement: ページ滞在時間(秒)"
},
{
"type": "null"
}
]
},
"value_mode": {
"type": "string",
"description": "none、fixed、revenue のいずれか"
},
"fixed_value_minor": {
"anyOf": [
{
"type": "integer",
"description": "固定値(最小単位)"
},
{
"type": "null"
}
]
},
"count_mode": {
"type": "string",
"description": "once_per_visit または every"
},
"archived": {
"type": "boolean"
},
"archived_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"stats": {
"anyOf": [
{
"type": "object",
"properties": {
"completions": {
"type": "integer",
"description": "一致したイベント(繰り返しを含む)"
},
"conversions": {
"type": "integer",
"description": "完了が1回以上ある訪問"
},
"conversion_rate": {
"type": "number",
"description": "コンバージョン ÷ 訪問数(サイトの設定によっては ÷ 訪問者数)(%)"
},
"value": {
"type": "integer",
"description": "サイトの通貨の最小単位でのゴールの価値"
},
"change": {
"anyOf": [
{
"type": "number",
"description": "前の期間と比べたコンバージョンの変化(%)"
},
{
"type": "null"
}
]
}
},
"description": "期間の統計(一覧のみ)"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
}
GET
/sites/:site_id/goals/:id.json
ゴールレポート: 指標、グラフ、内訳、コンバージョンに至るまでのジャーニー
goals_get
権限: analytics.read
curl https://privatusanalytics.com/sites/:site_id/goals/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"period": {
"type": "string",
"description": "期間のプリセット。from/to を使うには custom を指定",
"enum": [
"today",
"yesterday",
"24h",
"7d",
"14d",
"28d",
"30d",
"90d",
"mtd",
"last_month",
"qtd",
"last_quarter",
"ytd",
"12mo",
"last_year",
"all",
"custom"
],
"default": "30d"
},
"from": {
"type": "string",
"format": "date",
"description": "カスタム期間の開始(サイトのタイムゾーン)"
},
"to": {
"type": "string",
"format": "date",
"description": "カスタム期間の終了(この日を含む)"
},
"compare": {
"type": "string",
"description": "比較期間",
"enum": [
"none",
"previous_period",
"previous_year",
"custom"
],
"default": "none"
},
"compare_from": {
"type": "string",
"format": "date",
"description": "カスタム比較の開始"
},
"compare_to": {
"type": "string",
"format": "date",
"description": "カスタム比較の終了"
},
"match_weekday": {
"type": "boolean",
"description": "比較する日の曜日をそろえる",
"default": false
},
"filters": {
"type": "array",
"items": {},
"description": "フィルター: [[\"dimension\",\"operator\",\"value\"], …]。演算子: is、is_not、any_of、none_of、contains、not_contains、starts_with、regex、not_regex、gt、lt、between。OR条件にする場合は {\"any\": [...]} で条件をまとめます。",
"default": []
},
"segment_id": {
"type": "string",
"description": "保存済みのセグメントを適用(seg_…)"
},
"include_imported": {
"type": "boolean",
"description": "インポートした過去データを追加(最初のネイティブイベントより前の日付が対象。フィルターやセグメントを適用している場合は無視されます)",
"default": false
},
"interval": {
"type": "string",
"description": "グラフのバケットサイズ",
"enum": [
"auto",
"minute",
"hour",
"day",
"week",
"month",
"quarter",
"year"
],
"default": "auto"
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"period": {
"type": "object",
"description": "期間の from/to(UTC)"
},
"goal": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ゴールID(例: goal_7Q2K9XH3AB)"
},
"name": {
"type": "string"
},
"kind": {
"type": "string",
"description": "page、event、engagement、outbound、download のいずれか"
},
"match_type": {
"type": "string",
"description": "exact、prefix、glob、regex のいずれか"
},
"pattern": {
"anyOf": [
{
"type": "string",
"description": "パス、ドメイン、ファイルのパターン"
},
{
"type": "null"
}
]
},
"hostname": {
"anyOf": [
{
"type": "string",
"description": "ホスト名の制限(pageゴール)"
},
{
"type": "null"
}
]
},
"event_name": {
"anyOf": [
{
"type": "string",
"description": "カスタムイベント名(eventゴール)"
},
{
"type": "null"
}
]
},
"conditions": {
"type": "array",
"items": {
"type": "object"
},
"description": "イベントプロパティの条件"
},
"scroll_threshold": {
"anyOf": [
{
"type": "integer",
"description": "engagement: スクロール(%)"
},
{
"type": "null"
}
]
},
"time_threshold_seconds": {
"anyOf": [
{
"type": "integer",
"description": "engagement: ページ滞在時間(秒)"
},
{
"type": "null"
}
]
},
"value_mode": {
"type": "string",
"description": "none、fixed、revenue のいずれか"
},
"fixed_value_minor": {
"anyOf": [
{
"type": "integer",
"description": "固定値(最小単位)"
},
{
"type": "null"
}
]
},
"count_mode": {
"type": "string",
"description": "once_per_visit または every"
},
"archived": {
"type": "boolean"
},
"archived_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"stats": {
"anyOf": [
{
"type": "object",
"properties": {
"completions": {
"type": "integer",
"description": "一致したイベント(繰り返しを含む)"
},
"conversions": {
"type": "integer",
"description": "完了が1回以上ある訪問"
},
"conversion_rate": {
"type": "number",
"description": "コンバージョン ÷ 訪問数(サイトの設定によっては ÷ 訪問者数)(%)"
},
"value": {
"type": "integer",
"description": "サイトの通貨の最小単位でのゴールの価値"
},
"change": {
"anyOf": [
{
"type": "number",
"description": "前の期間と比べたコンバージョンの変化(%)"
},
{
"type": "null"
}
]
}
},
"description": "期間の統計(一覧のみ)"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
},
"description": "ゴールの定義"
},
"metrics": {
"type": "object",
"description": "completions、conversions、conversion_rate(%)、value(最小単位)"
},
"comparison_period": {
"anyOf": [
{
"type": "object",
"description": "比較の from/to"
},
{
"type": "null"
}
]
},
"comparison": {
"anyOf": [
{
"type": "object",
"description": "比較期間の指標"
},
{
"type": "null"
}
]
},
"change": {
"anyOf": [
{
"type": "object",
"description": "比較との変化(指標ごとの%)"
},
{
"type": "null"
}
]
},
"interval": {
"type": "string",
"description": "グラフのバケットサイズ"
},
"series": {
"type": "array",
"items": {
"type": "object"
},
"description": "バケットごと: date、completions、conversions、conversion_rate"
},
"breakdowns": {
"type": "object",
"description": "channel、utm_campaign、entry_page、country、device ごとのコンバージョン数上位の値: value、completions、conversions、conversion_rate"
},
"journey": {
"anyOf": [
{
"type": "object",
"description": "converting_visits、median_seconds_to_convert、median_pages_before、pages_before(コンバージョンした訪問が、その訪問内でそれ以前に閲覧したページ)"
},
{
"type": "null"
}
]
}
}
}
POST
/sites/:site_id/goals/:id/unarchive.json
アーカイブしたゴールを復元
goals_unarchive
権限: content.write
curl -X POST https://privatusanalytics.com/sites/:site_id/goals/:id/unarchive.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ゴールID(例: goal_7Q2K9XH3AB)"
},
"name": {
"type": "string"
},
"kind": {
"type": "string",
"description": "page、event、engagement、outbound、download のいずれか"
},
"match_type": {
"type": "string",
"description": "exact、prefix、glob、regex のいずれか"
},
"pattern": {
"anyOf": [
{
"type": "string",
"description": "パス、ドメイン、ファイルのパターン"
},
{
"type": "null"
}
]
},
"hostname": {
"anyOf": [
{
"type": "string",
"description": "ホスト名の制限(pageゴール)"
},
{
"type": "null"
}
]
},
"event_name": {
"anyOf": [
{
"type": "string",
"description": "カスタムイベント名(eventゴール)"
},
{
"type": "null"
}
]
},
"conditions": {
"type": "array",
"items": {
"type": "object"
},
"description": "イベントプロパティの条件"
},
"scroll_threshold": {
"anyOf": [
{
"type": "integer",
"description": "engagement: スクロール(%)"
},
{
"type": "null"
}
]
},
"time_threshold_seconds": {
"anyOf": [
{
"type": "integer",
"description": "engagement: ページ滞在時間(秒)"
},
{
"type": "null"
}
]
},
"value_mode": {
"type": "string",
"description": "none、fixed、revenue のいずれか"
},
"fixed_value_minor": {
"anyOf": [
{
"type": "integer",
"description": "固定値(最小単位)"
},
{
"type": "null"
}
]
},
"count_mode": {
"type": "string",
"description": "once_per_visit または every"
},
"archived": {
"type": "boolean"
},
"archived_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"stats": {
"anyOf": [
{
"type": "object",
"properties": {
"completions": {
"type": "integer",
"description": "一致したイベント(繰り返しを含む)"
},
"conversions": {
"type": "integer",
"description": "完了が1回以上ある訪問"
},
"conversion_rate": {
"type": "number",
"description": "コンバージョン ÷ 訪問数(サイトの設定によっては ÷ 訪問者数)(%)"
},
"value": {
"type": "integer",
"description": "サイトの通貨の最小単位でのゴールの価値"
},
"change": {
"anyOf": [
{
"type": "number",
"description": "前の期間と比べたコンバージョンの変化(%)"
},
{
"type": "null"
}
]
}
},
"description": "期間の統計(一覧のみ)"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
PATCH
/sites/:site_id/goals/:id.json
ゴールを更新
goals_update
権限: content.write
curl -X PATCH https://privatusanalytics.com/sites/:site_id/goals/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "ゴール名",
"examples": [
"Signed up"
]
},
"kind": {
"type": "string",
"description": "page(ページを訪問)、event(カスタムイベント)、engagement(スクロールまたはページ滞在時間)、outbound(外部リンクのクリック)、download(ファイルのダウンロード)",
"enum": [
"page",
"event",
"engagement",
"outbound",
"download"
]
},
"match_type": {
"type": "string",
"description": "patternがパス(page、engagement)、リンクのドメイン(outbound)、ファイル(download)に一致する方法: exact、prefix、glob (*)、regex",
"enum": [
"exact",
"prefix",
"glob",
"regex"
]
},
"pattern": {
"type": "string",
"description": "パス、ドメイン、ファイルのパターン(例: /pricing、/blog/*、stripe.com、*.pdf)"
},
"hostname": {
"type": "string",
"description": "このホスト名のページのみカウント(pageゴール)"
},
"event_name": {
"type": "string",
"description": "カスタムイベント名(eventゴール)"
},
"conditions": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
},
"description": "イベントプロパティの条件: [{\"key\": \"plan\", \"operator\": \"is|is_not|contains|gt|lt\", \"value\": \"pro\"}]"
},
"scroll_threshold": {
"type": "integer",
"description": "engagement: 到達すべきスクロール深度(%)"
},
"time_threshold_seconds": {
"type": "integer",
"description": "engagement: ページ滞在時間(秒)"
},
"value_mode": {
"type": "string",
"description": "none、fixed(コンバージョンごとに fixed_value)、revenue(イベントの収益)のいずれか",
"enum": [
"none",
"fixed",
"revenue"
]
},
"fixed_value": {
"type": "number",
"description": "サイトの通貨でのコンバージョン1件あたりの固定値(例: 50.0)"
},
"count_mode": {
"type": "string",
"description": "値のカウント方法。once_per_visit または every completion",
"enum": [
"once_per_visit",
"every"
]
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ゴールID(例: goal_7Q2K9XH3AB)"
},
"name": {
"type": "string"
},
"kind": {
"type": "string",
"description": "page、event、engagement、outbound、download のいずれか"
},
"match_type": {
"type": "string",
"description": "exact、prefix、glob、regex のいずれか"
},
"pattern": {
"anyOf": [
{
"type": "string",
"description": "パス、ドメイン、ファイルのパターン"
},
{
"type": "null"
}
]
},
"hostname": {
"anyOf": [
{
"type": "string",
"description": "ホスト名の制限(pageゴール)"
},
{
"type": "null"
}
]
},
"event_name": {
"anyOf": [
{
"type": "string",
"description": "カスタムイベント名(eventゴール)"
},
{
"type": "null"
}
]
},
"conditions": {
"type": "array",
"items": {
"type": "object"
},
"description": "イベントプロパティの条件"
},
"scroll_threshold": {
"anyOf": [
{
"type": "integer",
"description": "engagement: スクロール(%)"
},
{
"type": "null"
}
]
},
"time_threshold_seconds": {
"anyOf": [
{
"type": "integer",
"description": "engagement: ページ滞在時間(秒)"
},
{
"type": "null"
}
]
},
"value_mode": {
"type": "string",
"description": "none、fixed、revenue のいずれか"
},
"fixed_value_minor": {
"anyOf": [
{
"type": "integer",
"description": "固定値(最小単位)"
},
{
"type": "null"
}
]
},
"count_mode": {
"type": "string",
"description": "once_per_visit または every"
},
"archived": {
"type": "boolean"
},
"archived_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"stats": {
"anyOf": [
{
"type": "object",
"properties": {
"completions": {
"type": "integer",
"description": "一致したイベント(繰り返しを含む)"
},
"conversions": {
"type": "integer",
"description": "完了が1回以上ある訪問"
},
"conversion_rate": {
"type": "number",
"description": "コンバージョン ÷ 訪問数(サイトの設定によっては ÷ 訪問者数)(%)"
},
"value": {
"type": "integer",
"description": "サイトの通貨の最小単位でのゴールの価値"
},
"change": {
"anyOf": [
{
"type": "number",
"description": "前の期間と比べたコンバージョンの変化(%)"
},
{
"type": "null"
}
]
}
},
"description": "期間の統計(一覧のみ)"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
サイト
POST
/sites/:site_id/data_reset.json
日付範囲内のすべてのイベントと訪問を削除(バックグラウンドで実行され、元に戻せません)
sites_reset_data
権限: sites.manage
curl -X POST https://privatusanalytics.com/sites/:site_id/data_reset.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"from": {
"type": "string",
"format": "date",
"description": "削除する最初の日(サイトのタイムゾーン)"
},
"to": {
"type": "string",
"format": "date",
"description": "削除する最後の日(この日を含む)"
},
"confirm": {
"type": "string",
"description": "確認のためドメインを入力してください"
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"from",
"to",
"confirm",
"site_id"
]
}
{
"type": "object"
}
GET
/sites/:site_id/filter_stats.json
フィルターされたトラフィックの概要: ボット、トラフィックルール、PII除去を理由と国別に集計(件数のみ)
sites_filter_stats
権限: analytics.read
curl https://privatusanalytics.com/sites/:site_id/filter_stats.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"description": "bot(フィルターされたボット)、rule(トラフィックルール)、redaction(PIIスクラバー)のいずれか",
"enum": [
"bot",
"rule",
"redaction"
],
"default": "bot"
},
"days": {
"type": "integer",
"description": "さかのぼる日数(1〜395)",
"default": 30
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"site_id"
]
}
{
"type": "object"
}
GET
/sites/:site_id/access.json
メンバーと、そのサイトを閲覧できるかどうかを一覧表示
sites_access_list
権限: members.manage
curl https://privatusanalytics.com/sites/:site_id/access.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"site_id"
]
}
{
"type": "object",
"properties": {
"membership_id": {
"type": "string",
"format": "uuid",
"description": "メンバーシップID"
},
"email": {
"type": "string"
},
"name": {
"type": "string"
},
"role": {
"type": "string"
},
"access": {
"type": "boolean",
"description": "このサイトを閲覧できる"
},
"locked": {
"type": "boolean",
"description": "オーナーと管理者は常にアクセスできます"
}
}
}
PATCH
/sites/:site_id/access.json
1人のメンバーのこのサイトへのアクセス権を付与または削除
sites_access_update
権限: members.manage
curl -X PATCH https://privatusanalytics.com/sites/:site_id/access.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"membership_id": {
"type": "string",
"description": "sites_access_list のメンバーシップID"
},
"access": {
"type": "boolean",
"description": "true でアクセス権を付与、false で削除"
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"membership_id",
"access",
"site_id"
]
}
{
"type": "object",
"properties": {
"membership_id": {
"type": "string",
"format": "uuid",
"description": "メンバーシップID"
},
"email": {
"type": "string"
},
"name": {
"type": "string"
},
"role": {
"type": "string"
},
"access": {
"type": "boolean",
"description": "このサイトを閲覧できる"
},
"locked": {
"type": "boolean",
"description": "オーナーと管理者は常にアクセスできます"
}
}
}
POST
/sites/:site_id/favorite.json
サイトにスターを付ける(すべてのサイトの先頭に固定)
sites_favorite
権限: analytics.read
curl -X POST https://privatusanalytics.com/sites/:site_id/favorite.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"site_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "計測スニペットで使用するサイトID"
},
"workspace_id": {
"type": "string"
},
"domain": {
"type": "string"
},
"name": {
"type": "string"
},
"extra_domains": {
"type": "array",
"items": {
"type": "string"
}
},
"multi_domain_mode": {
"type": "string"
},
"timezone": {
"type": "string"
},
"currency": {
"type": "string"
},
"week_start": {
"type": "integer"
},
"labels": {
"type": "array",
"items": {
"type": "string"
}
},
"honor_dnt": {
"type": "boolean"
},
"honor_gpc": {
"type": "boolean"
},
"pii_scrubber": {
"type": "boolean"
},
"redaction_rules": {
"type": "array"
},
"allowed_params": {
"type": "array",
"items": {
"type": "string"
}
},
"path_masks": {
"type": "array"
},
"retention_months": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"bot_filtering": {
"type": "boolean"
},
"traffic_rule_modes": {
"type": "object"
},
"vitals_sample_rate": {
"type": "integer"
},
"conversion_denominator": {
"type": "string"
},
"public_dashboard": {
"type": "boolean"
},
"public_indexable": {
"type": "boolean"
},
"ingest_key_prefix": {
"anyOf": [
{
"type": "string",
"description": "サーバー用インジェストキーの先頭部分"
},
{
"type": "null"
}
]
},
"verified_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"first_event_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_event_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"snippet": {
"type": "string",
"description": "HTMLの計測スニペット"
},
"favorite": {
"type": "boolean",
"description": "自分がスターを付けた"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/sites/:site_id/favorite.json
サイトのスターを外す
sites_unfavorite
権限: analytics.read
curl -X DELETE https://privatusanalytics.com/sites/:site_id/favorite.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"site_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "計測スニペットで使用するサイトID"
},
"workspace_id": {
"type": "string"
},
"domain": {
"type": "string"
},
"name": {
"type": "string"
},
"extra_domains": {
"type": "array",
"items": {
"type": "string"
}
},
"multi_domain_mode": {
"type": "string"
},
"timezone": {
"type": "string"
},
"currency": {
"type": "string"
},
"week_start": {
"type": "integer"
},
"labels": {
"type": "array",
"items": {
"type": "string"
}
},
"honor_dnt": {
"type": "boolean"
},
"honor_gpc": {
"type": "boolean"
},
"pii_scrubber": {
"type": "boolean"
},
"redaction_rules": {
"type": "array"
},
"allowed_params": {
"type": "array",
"items": {
"type": "string"
}
},
"path_masks": {
"type": "array"
},
"retention_months": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"bot_filtering": {
"type": "boolean"
},
"traffic_rule_modes": {
"type": "object"
},
"vitals_sample_rate": {
"type": "integer"
},
"conversion_denominator": {
"type": "string"
},
"public_dashboard": {
"type": "boolean"
},
"public_indexable": {
"type": "boolean"
},
"ingest_key_prefix": {
"anyOf": [
{
"type": "string",
"description": "サーバー用インジェストキーの先頭部分"
},
{
"type": "null"
}
]
},
"verified_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"first_event_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_event_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"snippet": {
"type": "string",
"description": "HTMLの計測スニペット"
},
"favorite": {
"type": "boolean",
"description": "自分がスターを付けた"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/sites/:site_id/setup.json
サイトのインストール状況とスニペット
sites_setup_get
権限: analytics.read
curl https://privatusanalytics.com/sites/:site_id/setup.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"site_id"
]
}
{
"type": "object"
}
POST
/transfers/:token/accept.json
サイトの移管を、自分のワークスペースのいずれかに受け入れる
site_transfers_accept
権限: public
curl -X POST https://privatusanalytics.com/transfers/:token/accept.json \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "サイトの移管先のワークスペース(ws_…)"
},
"token": {
"type": "string",
"description": "リソースの Token"
}
},
"required": [
"workspace_id",
"token"
]
}
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "移管中のサイト"
},
"site_domain": {
"type": "string"
},
"from_workspace": {
"type": "string",
"description": "現在のワークスペース名"
},
"to_workspace_id": {
"anyOf": [
{
"type": "string",
"description": "受け取り側のワークスペース"
},
{
"type": "null"
}
]
},
"to_email": {
"type": "string",
"description": "受信者のメールアドレス"
},
"status": {
"type": "string",
"description": "pending、accepted、canceled のいずれか"
},
"expires_at": {
"type": "string",
"format": "date-time"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
POST
/sites/:site_id/transfer.json
サイトを別のワークスペースへの移管を開始(受信者にメールが届きます)
sites_transfer_start
権限: sites.manage
curl -X POST https://privatusanalytics.com/sites/:site_id/transfer.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"email": {
"type": "string",
"description": "サイトを受け取る人のメールアドレス(本人が自分のワークスペースから選択します)"
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"email",
"site_id"
]
}
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "移管中のサイト"
},
"site_domain": {
"type": "string"
},
"from_workspace": {
"type": "string",
"description": "現在のワークスペース名"
},
"to_workspace_id": {
"anyOf": [
{
"type": "string",
"description": "受け取り側のワークスペース"
},
{
"type": "null"
}
]
},
"to_email": {
"type": "string",
"description": "受信者のメールアドレス"
},
"status": {
"type": "string",
"description": "pending、accepted、canceled のいずれか"
},
"expires_at": {
"type": "string",
"format": "date-time"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/sites/:site_id/transfer.json
保留中のサイト移管をキャンセル
sites_transfer_cancel
権限: sites.manage
curl -X DELETE https://privatusanalytics.com/sites/:site_id/transfer.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"site_id"
]
}
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "移管中のサイト"
},
"site_domain": {
"type": "string"
},
"from_workspace": {
"type": "string",
"description": "現在のワークスペース名"
},
"to_workspace_id": {
"anyOf": [
{
"type": "string",
"description": "受け取り側のワークスペース"
},
{
"type": "null"
}
]
},
"to_email": {
"type": "string",
"description": "受信者のメールアドレス"
},
"status": {
"type": "string",
"description": "pending、accepted、canceled のいずれか"
},
"expires_at": {
"type": "string",
"format": "date-time"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/transfers/:token.json
メールで届いたトークンから保留中の移管を取得
site_transfers_get
権限: public
curl https://privatusanalytics.com/transfers/:token.json
{
"type": "object",
"properties": {
"token": {
"type": "string",
"description": "リソースの Token"
}
},
"required": [
"token"
]
}
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "移管中のサイト"
},
"site_domain": {
"type": "string"
},
"from_workspace": {
"type": "string",
"description": "現在のワークスペース名"
},
"to_workspace_id": {
"anyOf": [
{
"type": "string",
"description": "受け取り側のワークスペース"
},
{
"type": "null"
}
]
},
"to_email": {
"type": "string",
"description": "受信者のメールアドレス"
},
"status": {
"type": "string",
"description": "pending、accepted、canceled のいずれか"
},
"expires_at": {
"type": "string",
"format": "date-time"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
POST
/workspaces/:workspace_id/sites.json
サイトを追加
sites_create
権限: sites.manage
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/sites.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"domain": {
"type": "string",
"description": "プライマリドメイン(例: example.com)",
"examples": [
"example.com"
]
},
"name": {
"type": "string",
"description": "表示名(デフォルトはドメイン)"
},
"timezone": {
"type": "string",
"description": "レポートのタイムゾーン"
},
"currency": {
"type": "string",
"description": "収益の通貨(ISO 4217)"
},
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
}
},
"required": [
"domain",
"workspace_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "計測スニペットで使用するサイトID"
},
"workspace_id": {
"type": "string"
},
"domain": {
"type": "string"
},
"name": {
"type": "string"
},
"extra_domains": {
"type": "array",
"items": {
"type": "string"
}
},
"multi_domain_mode": {
"type": "string"
},
"timezone": {
"type": "string"
},
"currency": {
"type": "string"
},
"week_start": {
"type": "integer"
},
"labels": {
"type": "array",
"items": {
"type": "string"
}
},
"honor_dnt": {
"type": "boolean"
},
"honor_gpc": {
"type": "boolean"
},
"pii_scrubber": {
"type": "boolean"
},
"redaction_rules": {
"type": "array"
},
"allowed_params": {
"type": "array",
"items": {
"type": "string"
}
},
"path_masks": {
"type": "array"
},
"retention_months": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"bot_filtering": {
"type": "boolean"
},
"traffic_rule_modes": {
"type": "object"
},
"vitals_sample_rate": {
"type": "integer"
},
"conversion_denominator": {
"type": "string"
},
"public_dashboard": {
"type": "boolean"
},
"public_indexable": {
"type": "boolean"
},
"ingest_key_prefix": {
"anyOf": [
{
"type": "string",
"description": "サーバー用インジェストキーの先頭部分"
},
{
"type": "null"
}
]
},
"verified_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"first_event_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_event_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"snippet": {
"type": "string",
"description": "HTMLの計測スニペット"
},
"favorite": {
"type": "boolean",
"description": "自分がスターを付けた"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/sites/:id.json
サイトを削除(7日後に完全消去)
sites_delete
権限: sites.manage
curl -X DELETE https://privatusanalytics.com/sites/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"confirm": {
"type": "string",
"description": "確認のためドメインを入力してください"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"confirm",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "計測スニペットで使用するサイトID"
},
"workspace_id": {
"type": "string"
},
"domain": {
"type": "string"
},
"name": {
"type": "string"
},
"extra_domains": {
"type": "array",
"items": {
"type": "string"
}
},
"multi_domain_mode": {
"type": "string"
},
"timezone": {
"type": "string"
},
"currency": {
"type": "string"
},
"week_start": {
"type": "integer"
},
"labels": {
"type": "array",
"items": {
"type": "string"
}
},
"honor_dnt": {
"type": "boolean"
},
"honor_gpc": {
"type": "boolean"
},
"pii_scrubber": {
"type": "boolean"
},
"redaction_rules": {
"type": "array"
},
"allowed_params": {
"type": "array",
"items": {
"type": "string"
}
},
"path_masks": {
"type": "array"
},
"retention_months": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"bot_filtering": {
"type": "boolean"
},
"traffic_rule_modes": {
"type": "object"
},
"vitals_sample_rate": {
"type": "integer"
},
"conversion_denominator": {
"type": "string"
},
"public_dashboard": {
"type": "boolean"
},
"public_indexable": {
"type": "boolean"
},
"ingest_key_prefix": {
"anyOf": [
{
"type": "string",
"description": "サーバー用インジェストキーの先頭部分"
},
{
"type": "null"
}
]
},
"verified_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"first_event_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_event_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"snippet": {
"type": "string",
"description": "HTMLの計測スニペット"
},
"favorite": {
"type": "boolean",
"description": "自分がスターを付けた"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/workspaces/:workspace_id/sites.json
ワークスペースのサイトを一覧表示
sites_list
権限: analytics.read
curl https://privatusanalytics.com/workspaces/:workspace_id/sites.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "ドメインまたは名前で絞り込む"
},
"label": {
"type": "string",
"description": "このラベルのサイトのみ"
},
"sort": {
"type": "string",
"description": "position(自分の並び順)、name、または過去30日間の訪問者数(多い順)",
"enum": [
"position",
"name",
"visitors"
],
"default": "position"
},
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
},
"page": {
"type": "integer",
"description": "ページ(1から)"
},
"per_page": {
"type": "integer",
"description": "1ページあたりの結果数(最大100)"
}
},
"required": [
"workspace_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "計測スニペットで使用するサイトID"
},
"workspace_id": {
"type": "string"
},
"domain": {
"type": "string"
},
"name": {
"type": "string"
},
"extra_domains": {
"type": "array",
"items": {
"type": "string"
}
},
"multi_domain_mode": {
"type": "string"
},
"timezone": {
"type": "string"
},
"currency": {
"type": "string"
},
"week_start": {
"type": "integer"
},
"labels": {
"type": "array",
"items": {
"type": "string"
}
},
"honor_dnt": {
"type": "boolean"
},
"honor_gpc": {
"type": "boolean"
},
"pii_scrubber": {
"type": "boolean"
},
"redaction_rules": {
"type": "array"
},
"allowed_params": {
"type": "array",
"items": {
"type": "string"
}
},
"path_masks": {
"type": "array"
},
"retention_months": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"bot_filtering": {
"type": "boolean"
},
"traffic_rule_modes": {
"type": "object"
},
"vitals_sample_rate": {
"type": "integer"
},
"conversion_denominator": {
"type": "string"
},
"public_dashboard": {
"type": "boolean"
},
"public_indexable": {
"type": "boolean"
},
"ingest_key_prefix": {
"anyOf": [
{
"type": "string",
"description": "サーバー用インジェストキーの先頭部分"
},
{
"type": "null"
}
]
},
"verified_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"first_event_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_event_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"snippet": {
"type": "string",
"description": "HTMLの計測スニペット"
},
"favorite": {
"type": "boolean",
"description": "自分がスターを付けた"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
}
GET
/sites/:id.json
サイトとそのすべての設定を取得
sites_get
権限: analytics.read
curl https://privatusanalytics.com/sites/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "計測スニペットで使用するサイトID"
},
"workspace_id": {
"type": "string"
},
"domain": {
"type": "string"
},
"name": {
"type": "string"
},
"extra_domains": {
"type": "array",
"items": {
"type": "string"
}
},
"multi_domain_mode": {
"type": "string"
},
"timezone": {
"type": "string"
},
"currency": {
"type": "string"
},
"week_start": {
"type": "integer"
},
"labels": {
"type": "array",
"items": {
"type": "string"
}
},
"honor_dnt": {
"type": "boolean"
},
"honor_gpc": {
"type": "boolean"
},
"pii_scrubber": {
"type": "boolean"
},
"redaction_rules": {
"type": "array"
},
"allowed_params": {
"type": "array",
"items": {
"type": "string"
}
},
"path_masks": {
"type": "array"
},
"retention_months": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"bot_filtering": {
"type": "boolean"
},
"traffic_rule_modes": {
"type": "object"
},
"vitals_sample_rate": {
"type": "integer"
},
"conversion_denominator": {
"type": "string"
},
"public_dashboard": {
"type": "boolean"
},
"public_indexable": {
"type": "boolean"
},
"ingest_key_prefix": {
"anyOf": [
{
"type": "string",
"description": "サーバー用インジェストキーの先頭部分"
},
{
"type": "null"
}
]
},
"verified_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"first_event_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_event_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"snippet": {
"type": "string",
"description": "HTMLの計測スニペット"
},
"favorite": {
"type": "boolean",
"description": "自分がスターを付けた"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
PATCH
/sites/:id.json
サイト設定を更新
sites_update
権限: sites.manage
curl -X PATCH https://privatusanalytics.com/sites/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "表示名"
},
"domain": {
"type": "string",
"description": "プライマリドメイン"
},
"extra_domains": {
"type": "array",
"items": {
"type": "string"
},
"description": "追加のホスト名"
},
"multi_domain_mode": {
"type": "string",
"description": "combined: ドメインをまたいで1人の訪問者として扱う",
"enum": [
"combined",
"separate"
]
},
"timezone": {
"type": "string",
"description": "レポートのタイムゾーン"
},
"currency": {
"type": "string",
"description": "収益の通貨(ISO 4217)"
},
"week_start": {
"type": "integer",
"description": "0 = 日曜日、1 = 月曜日"
},
"labels": {
"type": "array",
"items": {
"type": "string"
},
"description": "サイトをグループ化するためのラベル"
},
"honor_dnt": {
"type": "boolean",
"description": "DNTを送信する訪問者を除外する"
},
"honor_gpc": {
"type": "boolean",
"description": "GPCを送信する訪問者を除外する"
},
"pii_scrubber": {
"type": "boolean",
"description": "メールアドレス、トークン、IDを伏せる"
},
"redaction_rules": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"pattern": {
"type": "string"
}
}
},
"description": "カスタムの伏せ字用の正規表現"
},
"allowed_params": {
"type": "array",
"items": {
"type": "string"
},
"description": "パスに残すクエリパラメーター"
},
"path_masks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"pattern": {
"type": "string"
},
"replacement": {
"type": "string"
}
}
},
"description": "パスのマスキングルール(例: /u/* -> /u/:id)"
},
"retention_months": {
"type": "integer",
"description": "これより古いデータを削除する"
},
"bot_filtering": {
"type": "boolean",
"description": "ボットのトラフィックを除外する"
},
"traffic_rule_modes": {
"type": "object",
"additionalProperties": true,
"description": "トラフィックルールのリストごとの block または allow"
},
"vitals_sample_rate": {
"type": "integer",
"description": "Web Vitalsのサンプリング率(%)"
},
"conversion_denominator": {
"type": "string",
"description": "コンバージョン率の分母を訪問数にするか訪問者数にするか",
"enum": [
"visits",
"visitors"
]
},
"public_dashboard": {
"type": "boolean",
"description": "リンクを知っている人なら誰でも統計を閲覧できる"
},
"public_indexable": {
"type": "boolean",
"description": "公開ページを検索エンジンにインデックスさせる"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "計測スニペットで使用するサイトID"
},
"workspace_id": {
"type": "string"
},
"domain": {
"type": "string"
},
"name": {
"type": "string"
},
"extra_domains": {
"type": "array",
"items": {
"type": "string"
}
},
"multi_domain_mode": {
"type": "string"
},
"timezone": {
"type": "string"
},
"currency": {
"type": "string"
},
"week_start": {
"type": "integer"
},
"labels": {
"type": "array",
"items": {
"type": "string"
}
},
"honor_dnt": {
"type": "boolean"
},
"honor_gpc": {
"type": "boolean"
},
"pii_scrubber": {
"type": "boolean"
},
"redaction_rules": {
"type": "array"
},
"allowed_params": {
"type": "array",
"items": {
"type": "string"
}
},
"path_masks": {
"type": "array"
},
"retention_months": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"bot_filtering": {
"type": "boolean"
},
"traffic_rule_modes": {
"type": "object"
},
"vitals_sample_rate": {
"type": "integer"
},
"conversion_denominator": {
"type": "string"
},
"public_dashboard": {
"type": "boolean"
},
"public_indexable": {
"type": "boolean"
},
"ingest_key_prefix": {
"anyOf": [
{
"type": "string",
"description": "サーバー用インジェストキーの先頭部分"
},
{
"type": "null"
}
]
},
"verified_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"first_event_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_event_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"snippet": {
"type": "string",
"description": "HTMLの計測スニペット"
},
"favorite": {
"type": "boolean",
"description": "自分がスターを付けた"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
ステータスページ
GET
/status/:slug/confirm/:token.json
メールで届いたリンクから購読を確認
public_status_pages_confirm
権限: public
· HTTPのみ(MCPツールではありません)
curl https://privatusanalytics.com/status/:slug/confirm/:token.json
{
"type": "object",
"properties": {
"token": {
"type": "string",
"description": "リソースの Token"
},
"slug": {
"type": "string",
"description": "リソースの Slug"
}
},
"required": [
"token",
"slug"
]
}
{
"type": "object"
}
GET
/status/:slug.json
公開ステータスページ: 現在のステータス、90日間のアップタイムバー、インシデント、投稿
public_status_pages_get
権限: public
· HTTPのみ(MCPツールではありません)
curl https://privatusanalytics.com/status/:slug.json
{
"type": "object",
"properties": {
"slug": {
"type": "string",
"description": "リソースの Slug"
}
},
"required": [
"slug"
]
}
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"logo_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"brand_color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"description": "operational、degraded、outage のいずれか"
},
"checks": {
"type": "array",
"description": "各チェック: {name, status, uptime_90d, days: [{date, uptime, downtime_seconds}]}"
},
"posts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "投稿ID(spp_…)"
},
"title": {
"type": "string"
},
"body": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"description": "investigating、identified、monitoring、resolved のいずれか"
},
"posted_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
},
"incidents": {
"type": "array",
"description": "最近のインシデント: {check, started_at, resolved_at, duration_seconds}"
}
}
}
POST
/status/:slug/subscribers.json
メールアドレスを購読登録(ダブルオプトイン)
public_status_pages_subscribe
ブラウザクライアントは Cloudflare Turnstile のトークンを `cf-turnstile-response` として送信します。APIトークンを使うリクエストでは不要です。
権限: public
· HTTPのみ(MCPツールではありません)
curl -X POST https://privatusanalytics.com/status/:slug/subscribers.json \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"email": {
"type": "string",
"description": "通知先のメールアドレス",
"examples": [
"[email protected]"
]
},
"slug": {
"type": "string",
"description": "リソースの Slug"
}
},
"required": [
"email",
"slug"
]
}
{
"type": "object"
}
POST
/status/:slug/unsubscribe/:token.json
メールで届いたトークンで購読を解除
public_status_pages_unsubscribe
権限: public
· HTTPのみ(MCPツールではありません)
curl -X POST https://privatusanalytics.com/status/:slug/unsubscribe/:token.json \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"token": {
"type": "string",
"description": "リソースの Token"
},
"slug": {
"type": "string",
"description": "リソースの Slug"
}
},
"required": [
"token",
"slug"
]
}
{
"type": "object"
}
POST
/status_pages/:status_page_id/posts.json
インシデントの更新を投稿(購読者にメールが届きます)
status_page_posts_create
権限: uptime.manage
curl -X POST https://privatusanalytics.com/status_pages/:status_page_id/posts.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "見出し(例: 「エラー率の上昇」)"
},
"body": {
"type": "string",
"description": "更新の本文(プレーンテキスト)"
},
"status": {
"type": "string",
"description": "investigating、identified、monitoring、resolved のいずれか",
"enum": [
"investigating",
"identified",
"monitoring",
"resolved"
],
"default": "investigating"
},
"posted_at": {
"type": "string",
"format": "date-time",
"description": "発生した日時(デフォルトは現在)"
},
"notify": {
"type": "boolean",
"description": "確認済みの購読者にメールを送る",
"default": true
},
"status_page_id": {
"type": "string",
"description": "リソースの Status page"
}
},
"required": [
"title",
"status_page_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "投稿ID(spp_…)"
},
"title": {
"type": "string"
},
"body": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"description": "investigating、identified、monitoring、resolved のいずれか"
},
"posted_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/status_pages/:status_page_id/posts/:id.json
ステータスページの投稿を削除
status_page_posts_delete
権限: uptime.manage
curl -X DELETE https://privatusanalytics.com/status_pages/:status_page_id/posts/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"status_page_id": {
"type": "string",
"description": "リソースの Status page"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"status_page_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "投稿ID(spp_…)"
},
"title": {
"type": "string"
},
"body": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"description": "investigating、identified、monitoring、resolved のいずれか"
},
"posted_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/status_pages/:status_page_id/posts.json
ステータスページの投稿を一覧表示
status_page_posts_list
権限: analytics.read
curl https://privatusanalytics.com/status_pages/:status_page_id/posts.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"status": {
"type": "string",
"description": "このステータスの投稿のみ",
"enum": [
"investigating",
"identified",
"monitoring",
"resolved"
]
},
"status_page_id": {
"type": "string",
"description": "リソースの Status page"
},
"page": {
"type": "integer",
"description": "ページ(1から)"
},
"per_page": {
"type": "integer",
"description": "1ページあたりの結果数(最大100)"
}
},
"required": [
"status_page_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "投稿ID(spp_…)"
},
"title": {
"type": "string"
},
"body": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"description": "investigating、identified、monitoring、resolved のいずれか"
},
"posted_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
}
PATCH
/status_pages/:status_page_id/posts/:id.json
ステータスページの投稿を編集
status_page_posts_update
権限: uptime.manage
curl -X PATCH https://privatusanalytics.com/status_pages/:status_page_id/posts/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "見出し"
},
"body": {
"type": "string",
"description": "更新の本文(プレーンテキスト)"
},
"status": {
"type": "string",
"description": "investigating、identified、monitoring、resolved のいずれか",
"enum": [
"investigating",
"identified",
"monitoring",
"resolved"
]
},
"notify": {
"type": "boolean",
"description": "ステータスが変わった場合、確認済みの購読者にメールを送る",
"default": true
},
"status_page_id": {
"type": "string",
"description": "リソースの Status page"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"status_page_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "投稿ID(spp_…)"
},
"title": {
"type": "string"
},
"body": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"description": "investigating、identified、monitoring、resolved のいずれか"
},
"posted_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/status_pages/:status_page_id/subscribers/:id.json
購読者を削除
status_page_subscribers_delete
権限: uptime.manage
curl -X DELETE https://privatusanalytics.com/status_pages/:status_page_id/subscribers/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"status_page_id": {
"type": "string",
"description": "リソースの Status page"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"status_page_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"email": {
"type": "string"
},
"confirmed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/status_pages/:status_page_id/subscribers.json
ステータスページの購読者を一覧表示
status_page_subscribers_list
権限: uptime.manage
curl https://privatusanalytics.com/status_pages/:status_page_id/subscribers.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"confirmed": {
"type": "boolean",
"description": "true: 確認済みのみ、false: 保留中のみ"
},
"status_page_id": {
"type": "string",
"description": "リソースの Status page"
},
"page": {
"type": "integer",
"description": "ページ(1から)"
},
"per_page": {
"type": "integer",
"description": "1ページあたりの結果数(最大100)"
}
},
"required": [
"status_page_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"email": {
"type": "string"
},
"confirmed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
}
POST
/workspaces/:workspace_id/status_pages.json
ステータスページを作成
status_pages_create
権限: uptime.manage
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/status_pages.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "ページのタイトル(例: 「Acme ステータス」)"
},
"slug": {
"type": "string",
"description": "公開URLのスラッグ: /status/<slug>(デフォルトは名前から生成)"
},
"description": {
"type": "string",
"description": "タイトルの下の紹介文"
},
"logo_url": {
"type": "string",
"description": "ロゴ画像のHTTPS URL"
},
"brand_color": {
"type": "string",
"description": "アクセントカラー(例: #06755b)"
},
"custom_domain": {
"type": "string",
"description": "カスタムドメイン(当社ホストへのCNAME。例: status.example.com)。空で削除"
},
"check_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "表示するアップタイムチェックID(upc_…)"
},
"published": {
"type": "boolean",
"description": "一般に公開する",
"default": true
},
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
}
},
"required": [
"name",
"workspace_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ステータスページID(sp_…)"
},
"workspace_id": {
"type": "string"
},
"name": {
"type": "string"
},
"slug": {
"type": "string",
"description": "公開URL: /status/<slug>"
},
"custom_domain": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"logo_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"brand_color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"published": {
"type": "boolean"
},
"check_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "表示されるアップタイムチェックID"
},
"subscribers": {
"type": "integer",
"description": "確認済みの購読者"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/status_pages/:id.json
ステータスページを削除
status_pages_delete
権限: uptime.manage
curl -X DELETE https://privatusanalytics.com/status_pages/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ステータスページID(sp_…)"
},
"workspace_id": {
"type": "string"
},
"name": {
"type": "string"
},
"slug": {
"type": "string",
"description": "公開URL: /status/<slug>"
},
"custom_domain": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"logo_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"brand_color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"published": {
"type": "boolean"
},
"check_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "表示されるアップタイムチェックID"
},
"subscribers": {
"type": "integer",
"description": "確認済みの購読者"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/workspaces/:workspace_id/status_pages.json
ステータスページを一覧表示
status_pages_list
権限: analytics.read
curl https://privatusanalytics.com/workspaces/:workspace_id/status_pages.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "名前またはスラッグで絞り込む"
},
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
},
"page": {
"type": "integer",
"description": "ページ(1から)"
},
"per_page": {
"type": "integer",
"description": "1ページあたりの結果数(最大100)"
}
},
"required": [
"workspace_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ステータスページID(sp_…)"
},
"workspace_id": {
"type": "string"
},
"name": {
"type": "string"
},
"slug": {
"type": "string",
"description": "公開URL: /status/<slug>"
},
"custom_domain": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"logo_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"brand_color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"published": {
"type": "boolean"
},
"check_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "表示されるアップタイムチェックID"
},
"subscribers": {
"type": "integer",
"description": "確認済みの購読者"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
}
GET
/status_pages/:id.json
ステータスページを取得
status_pages_get
権限: analytics.read
curl https://privatusanalytics.com/status_pages/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ステータスページID(sp_…)"
},
"workspace_id": {
"type": "string"
},
"name": {
"type": "string"
},
"slug": {
"type": "string",
"description": "公開URL: /status/<slug>"
},
"custom_domain": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"logo_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"brand_color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"published": {
"type": "boolean"
},
"check_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "表示されるアップタイムチェックID"
},
"subscribers": {
"type": "integer",
"description": "確認済みの購読者"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
PATCH
/status_pages/:id.json
ステータスページを変更
status_pages_update
権限: uptime.manage
curl -X PATCH https://privatusanalytics.com/status_pages/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "ページのタイトル(例: 「Acme ステータス」)"
},
"slug": {
"type": "string",
"description": "公開URLのスラッグ: /status/<slug>(デフォルトは名前から生成)"
},
"description": {
"type": "string",
"description": "タイトルの下の紹介文"
},
"logo_url": {
"type": "string",
"description": "ロゴ画像のHTTPS URL"
},
"brand_color": {
"type": "string",
"description": "アクセントカラー(例: #06755b)"
},
"custom_domain": {
"type": "string",
"description": "カスタムドメイン(当社ホストへのCNAME。例: status.example.com)。空で削除"
},
"check_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "表示するアップタイムチェックID(upc_…)"
},
"published": {
"type": "boolean",
"description": "一般に公開する"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ステータスページID(sp_…)"
},
"workspace_id": {
"type": "string"
},
"name": {
"type": "string"
},
"slug": {
"type": "string",
"description": "公開URL: /status/<slug>"
},
"custom_domain": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"logo_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"brand_color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"published": {
"type": "boolean"
},
"check_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "表示されるアップタイムチェックID"
},
"subscribers": {
"type": "integer",
"description": "確認済みの購読者"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
セグメント
POST
/sites/:site_id/segments.json
フィルターをセグメントとして保存
segments_create
権限: content.write
curl -X POST https://privatusanalytics.com/sites/:site_id/segments.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "セグメント名。例: \"Mobile visitors from ads\"",
"examples": [
"Mobile visitors from ads"
]
},
"description": {
"type": "string",
"description": "セグメントの用途についての任意のメモ(300文字まで)",
"examples": [
"People who might buy the Pro plan"
]
},
"filters": {
"type": "array",
"items": {},
"description": "フィルター。すべてに一致する必要があります。各項目は条件 [\"dimension\", \"operator\", \"value\"]、または複数のうちいずれかに一致すればよい場合は {\"any\": [conditions]} です。ディメンション: page, entry_page, exit_page, hostname, channel, referrer, referrer_url, ref, utm_source, utm_medium, utm_campaign, utm_content, utm_term, country (ISOコード、例: US), language, device (desktop, mobile, tablet, tv, other), browser, browser_version, os, os_version, screen, goal (ゴールID), event (カスタムイベント名), prop:<key> (カスタムイベントのプロパティ)。演算子: is, is_not, contains, not_contains, starts_with, regex, not_regex, any_of と none_of (値はリスト), gt と lt (数値), between (2つの数値のリスト)。セグメントフォームの行も受け付けます: {\"dimension\", \"operator\", \"value\", \"property\" (ディメンションが prop の場合), \"join\": \"and\" または \"or\" (or はその行を直前の行と結合します)}。例: [[\"country\", \"is\", \"US\"], [\"device\", \"is\", \"mobile\"], {\"any\": [[\"page\", \"starts_with\", \"/pricing\"], [\"goal\", \"is\", \"goal_7Q2K9XH3AB\"]]}]",
"examples": [
[
[
"country",
"is",
"US"
],
[
"device",
"is",
"mobile"
],
{
"any": [
[
"page",
"starts_with",
"/pricing"
],
[
"goal",
"is",
"goal_7Q2K9XH3AB"
]
]
}
]
]
},
"shared": {
"type": "boolean",
"description": "サイトにアクセスできる全員に表示(false: 自分のみ)",
"default": true
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"name",
"filters",
"site_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "セグメントID(例: seg_7Q2K9XH3AB)"
},
"site_id": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string",
"description": "セグメントの用途、または null"
},
{
"type": "null"
}
]
},
"filters": {
"type": "array",
"description": "statsのフィルター形式によるフィルター: すべてが一致する必要のある条件 [\"dimension\", \"operator\", \"value\"] と、{\"any\": [conditions]} グループ"
},
"summary": {
"type": "string",
"description": "フィルターを自然な言葉で表したもの。例: \"Visitors from the United States on mobile who viewed /pricing\""
},
"shared": {
"type": "boolean",
"description": "サイトにアクセスできる全員に表示"
},
"mine": {
"type": "boolean",
"description": "自分が作成"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/sites/:site_id/segments/:id.json
セグメントを削除
segments_delete
権限: content.write
curl -X DELETE https://privatusanalytics.com/sites/:site_id/segments/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "セグメントID(例: seg_7Q2K9XH3AB)"
},
"site_id": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string",
"description": "セグメントの用途、または null"
},
{
"type": "null"
}
]
},
"filters": {
"type": "array",
"description": "statsのフィルター形式によるフィルター: すべてが一致する必要のある条件 [\"dimension\", \"operator\", \"value\"] と、{\"any\": [conditions]} グループ"
},
"summary": {
"type": "string",
"description": "フィルターを自然な言葉で表したもの。例: \"Visitors from the United States on mobile who viewed /pricing\""
},
"shared": {
"type": "boolean",
"description": "サイトにアクセスできる全員に表示"
},
"mine": {
"type": "boolean",
"description": "自分が作成"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/sites/:site_id/segments.json
サイトで使用できるセグメントを一覧表示
segments_list
権限: analytics.read
curl https://privatusanalytics.com/sites/:site_id/segments.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
},
"page": {
"type": "integer",
"description": "ページ(1から)"
},
"per_page": {
"type": "integer",
"description": "1ページあたりの結果数(最大100)"
}
},
"required": [
"site_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "セグメントID(例: seg_7Q2K9XH3AB)"
},
"site_id": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string",
"description": "セグメントの用途、または null"
},
{
"type": "null"
}
]
},
"filters": {
"type": "array",
"description": "statsのフィルター形式によるフィルター: すべてが一致する必要のある条件 [\"dimension\", \"operator\", \"value\"] と、{\"any\": [conditions]} グループ"
},
"summary": {
"type": "string",
"description": "フィルターを自然な言葉で表したもの。例: \"Visitors from the United States on mobile who viewed /pricing\""
},
"shared": {
"type": "boolean",
"description": "サイトにアクセスできる全員に表示"
},
"mine": {
"type": "boolean",
"description": "自分が作成"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
}
POST
/sites/:site_id/segments/preview.json
フィルターを自然な言葉で説明し、過去30日間に一致した訪問者数を数える
segments_preview
権限: analytics.read
curl -X POST https://privatusanalytics.com/sites/:site_id/segments/preview.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"filters": {
"type": "array",
"items": {},
"description": "フィルター。すべてに一致する必要があります。各項目は条件 [\"dimension\", \"operator\", \"value\"]、または複数のうちいずれかに一致すればよい場合は {\"any\": [conditions]} です。ディメンション: page, entry_page, exit_page, hostname, channel, referrer, referrer_url, ref, utm_source, utm_medium, utm_campaign, utm_content, utm_term, country (ISOコード、例: US), language, device (desktop, mobile, tablet, tv, other), browser, browser_version, os, os_version, screen, goal (ゴールID), event (カスタムイベント名), prop:<key> (カスタムイベントのプロパティ)。演算子: is, is_not, contains, not_contains, starts_with, regex, not_regex, any_of と none_of (値はリスト), gt と lt (数値), between (2つの数値のリスト)。セグメントフォームの行も受け付けます: {\"dimension\", \"operator\", \"value\", \"property\" (ディメンションが prop の場合), \"join\": \"and\" または \"or\" (or はその行を直前の行と結合します)}。例: [[\"country\", \"is\", \"US\"], [\"device\", \"is\", \"mobile\"], {\"any\": [[\"page\", \"starts_with\", \"/pricing\"], [\"goal\", \"is\", \"goal_7Q2K9XH3AB\"]]}]",
"examples": [
[
[
"country",
"is",
"US"
],
[
"device",
"is",
"mobile"
],
{
"any": [
[
"page",
"starts_with",
"/pricing"
],
[
"goal",
"is",
"goal_7Q2K9XH3AB"
]
]
}
]
],
"default": []
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"site_id"
]
}
{
"type": "object"
}
GET
/sites/:site_id/segments/:id.json
セグメントを取得
segments_get
権限: analytics.read
curl https://privatusanalytics.com/sites/:site_id/segments/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "セグメントID(例: seg_7Q2K9XH3AB)"
},
"site_id": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string",
"description": "セグメントの用途、または null"
},
{
"type": "null"
}
]
},
"filters": {
"type": "array",
"description": "statsのフィルター形式によるフィルター: すべてが一致する必要のある条件 [\"dimension\", \"operator\", \"value\"] と、{\"any\": [conditions]} グループ"
},
"summary": {
"type": "string",
"description": "フィルターを自然な言葉で表したもの。例: \"Visitors from the United States on mobile who viewed /pricing\""
},
"shared": {
"type": "boolean",
"description": "サイトにアクセスできる全員に表示"
},
"mine": {
"type": "boolean",
"description": "自分が作成"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
PATCH
/sites/:site_id/segments/:id.json
セグメントの名前、フィルター、共有設定を変更
segments_update
権限: content.write
curl -X PATCH https://privatusanalytics.com/sites/:site_id/segments/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "セグメント名"
},
"description": {
"type": "string",
"description": "セグメントの用途についての任意のメモ(300文字まで、空にするとクリア)"
},
"filters": {
"type": "array",
"items": {},
"description": "置き換えるフィルター。形式は作成時と同じです。フィルター。すべてに一致する必要があります。各項目は条件 [\"dimension\", \"operator\", \"value\"]、または複数のうちいずれかに一致すればよい場合は {\"any\": [conditions]} です。ディメンション: page, entry_page, exit_page, hostname, channel, referrer, referrer_url, ref, utm_source, utm_medium, utm_campaign, utm_content, utm_term, country (ISOコード、例: US), language, device (desktop, mobile, tablet, tv, other), browser, browser_version, os, os_version, screen, goal (ゴールID), event (カスタムイベント名), prop:<key> (カスタムイベントのプロパティ)。演算子: is, is_not, contains, not_contains, starts_with, regex, not_regex, any_of と none_of (値はリスト), gt と lt (数値), between (2つの数値のリスト)。セグメントフォームの行も受け付けます: {\"dimension\", \"operator\", \"value\", \"property\" (ディメンションが prop の場合), \"join\": \"and\" または \"or\" (or はその行を直前の行と結合します)}。例: [[\"country\", \"is\", \"US\"], [\"device\", \"is\", \"mobile\"], {\"any\": [[\"page\", \"starts_with\", \"/pricing\"], [\"goal\", \"is\", \"goal_7Q2K9XH3AB\"]]}]",
"examples": [
[
[
"country",
"is",
"US"
],
[
"device",
"is",
"mobile"
],
{
"any": [
[
"page",
"starts_with",
"/pricing"
],
[
"goal",
"is",
"goal_7Q2K9XH3AB"
]
]
}
]
]
},
"shared": {
"type": "boolean",
"description": "サイトにアクセスできる全員に表示"
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "セグメントID(例: seg_7Q2K9XH3AB)"
},
"site_id": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string",
"description": "セグメントの用途、または null"
},
{
"type": "null"
}
]
},
"filters": {
"type": "array",
"description": "statsのフィルター形式によるフィルター: すべてが一致する必要のある条件 [\"dimension\", \"operator\", \"value\"] と、{\"any\": [conditions]} グループ"
},
"summary": {
"type": "string",
"description": "フィルターを自然な言葉で表したもの。例: \"Visitors from the United States on mobile who viewed /pricing\""
},
"shared": {
"type": "boolean",
"description": "サイトにアクセスできる全員に表示"
},
"mine": {
"type": "boolean",
"description": "自分が作成"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
ダッシュボード
GET
/workspaces/:workspace_id/dashboards/:id/cards/:index.json
カスタムダッシュボードの1枚のカードのデータ
dashboards_card
権限: analytics.read
curl https://privatusanalytics.com/workspaces/:workspace_id/dashboards/:id/cards/:index.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
},
"id": {
"type": "string",
"description": "リソースの Id"
},
"index": {
"type": "string",
"description": "リソースの Index"
}
},
"required": [
"workspace_id",
"id",
"index"
]
}
{
"type": "object"
}
POST
/workspaces/:workspace_id/dashboards.json
カスタムダッシュボードを作成
dashboards_create
権限: content.write
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/dashboards.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "ダッシュボード名",
"examples": [
"Client: Acme"
]
},
"cards": {
"type": "array",
"items": {},
"description": "カードを順番に指定(最大40件): [{\"type\": \"metric|chart|breakdown|goal|live|funnel|uptime|vitals\", \"site_id\": \"pa_…\", \"title\": \"optional\", \"params\": {\"period\": \"30d\", \"metric\": \"visitors\", \"dimension\": \"page\", \"funnel_id\": \"fun_…\"}}]。タイプで使われないparamsは無視されます",
"default": []
},
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
}
},
"required": [
"name",
"workspace_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ダッシュボードID(例: dash_7Q2K9XH3AB)"
},
"name": {
"type": "string"
},
"cards": {
"type": "array",
"items": {
"type": "object"
},
"description": "カードを順番に: [{type, site_id, title, params}]"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/workspaces/:workspace_id/dashboards/:id.json
カスタムダッシュボードを削除
dashboards_delete
権限: content.write
curl -X DELETE https://privatusanalytics.com/workspaces/:workspace_id/dashboards/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"workspace_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ダッシュボードID(例: dash_7Q2K9XH3AB)"
},
"name": {
"type": "string"
},
"cards": {
"type": "array",
"items": {
"type": "object"
},
"description": "カードを順番に: [{type, site_id, title, params}]"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/workspaces/:workspace_id/dashboards.json
カスタムダッシュボードを一覧表示
dashboards_list
権限: analytics.read
curl https://privatusanalytics.com/workspaces/:workspace_id/dashboards.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
},
"page": {
"type": "integer",
"description": "ページ(1から)"
},
"per_page": {
"type": "integer",
"description": "1ページあたりの結果数(最大100)"
}
},
"required": [
"workspace_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ダッシュボードID(例: dash_7Q2K9XH3AB)"
},
"name": {
"type": "string"
},
"cards": {
"type": "array",
"items": {
"type": "object"
},
"description": "カードを順番に: [{type, site_id, title, params}]"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
}
GET
/workspaces/:workspace_id/dashboards/:id.json
カスタムダッシュボードとそのカードを取得
dashboards_get
権限: analytics.read
curl https://privatusanalytics.com/workspaces/:workspace_id/dashboards/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"workspace_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ダッシュボードID(例: dash_7Q2K9XH3AB)"
},
"name": {
"type": "string"
},
"cards": {
"type": "array",
"items": {
"type": "object"
},
"description": "カードを順番に: [{type, site_id, title, params}]"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
PATCH
/workspaces/:workspace_id/dashboards/:id.json
カスタムダッシュボードの名前を変更、またはカードを置き換え
dashboards_update
権限: content.write
curl -X PATCH https://privatusanalytics.com/workspaces/:workspace_id/dashboards/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "新しい名前(空の場合は変更なし)"
},
"cards": {
"type": "array",
"items": {},
"description": "すべてのカードを置き換えます。カードを順番に指定(最大40件): [{\"type\": \"metric|chart|breakdown|goal|live|funnel|uptime|vitals\", \"site_id\": \"pa_…\", \"title\": \"optional\", \"params\": {\"period\": \"30d\", \"metric\": \"visitors\", \"dimension\": \"page\", \"funnel_id\": \"fun_…\"}}]。タイプで使われないparamsは無視されます"
},
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"workspace_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ダッシュボードID(例: dash_7Q2K9XH3AB)"
},
"name": {
"type": "string"
},
"cards": {
"type": "array",
"items": {
"type": "object"
},
"description": "カードを順番に: [{type, site_id, title, params}]"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
チャネルルール
POST
/sites/:site_id/channel_rules.json
チャネルルールを追加
channel_rules_create
権限: sites.manage
curl -X POST https://privatusanalytics.com/sites/:site_id/channel_rules.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"channel": {
"type": "string",
"description": "割り当てるチャネル名(例: Partners)"
},
"conditions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"operator": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"description": "すべて一致する必要がある条件: [{\"field\": \"utm_source\", \"operator\": \"is\", \"value\": \"newsletter\"}]。フィールド: referrer_host、utm_source、utm_medium、utm_campaign、ref、path。演算子: is、contains、starts_with、regex。"
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"channel",
"conditions",
"site_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "ルールID"
},
"channel": {
"type": "string",
"description": "すべての条件が一致したときに割り当てられるチャネル"
},
"position": {
"type": "integer",
"description": "評価順(最初に一致したものが優先)"
},
"conditions": {
"type": "array",
"description": "条件: field、operator、value"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/sites/:site_id/channel_rules/:id.json
チャネルルールを削除
channel_rules_delete
権限: sites.manage
curl -X DELETE https://privatusanalytics.com/sites/:site_id/channel_rules/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "ルールID"
},
"channel": {
"type": "string",
"description": "すべての条件が一致したときに割り当てられるチャネル"
},
"position": {
"type": "integer",
"description": "評価順(最初に一致したものが優先)"
},
"conditions": {
"type": "array",
"description": "条件: field、operator、value"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/sites/:site_id/channel_rules.json
チャネルルールを順番に一覧表示
channel_rules_list
権限: analytics.read
curl https://privatusanalytics.com/sites/:site_id/channel_rules.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"site_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "ルールID"
},
"channel": {
"type": "string",
"description": "すべての条件が一致したときに割り当てられるチャネル"
},
"position": {
"type": "integer",
"description": "評価順(最初に一致したものが優先)"
},
"conditions": {
"type": "array",
"description": "条件: field、operator、value"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
PATCH
/sites/:site_id/channel_rules/:id/move.json
チャネルルールを上または下へ移動
channel_rules_move
権限: sites.manage
curl -X PATCH https://privatusanalytics.com/sites/:site_id/channel_rules/:id/move.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"direction": {
"type": "string",
"description": "ルールの移動先",
"enum": [
"up",
"down",
"top",
"bottom"
]
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"direction",
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "ルールID"
},
"channel": {
"type": "string",
"description": "すべての条件が一致したときに割り当てられるチャネル"
},
"position": {
"type": "integer",
"description": "評価順(最初に一致したものが優先)"
},
"conditions": {
"type": "array",
"description": "条件: field、operator、value"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
POST
/sites/:site_id/channel_rules/preview.json
サンプルのリファラーとUTMタグに対するチャネルをプレビュー
channel_rules_preview
権限: analytics.read
curl -X POST https://privatusanalytics.com/sites/:site_id/channel_rules/preview.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"referrer": {
"type": "string",
"description": "リファラーのURLまたはホスト名"
},
"utm_source": {
"type": "string",
"description": "utm_source の値"
},
"utm_medium": {
"type": "string",
"description": "utm_medium の値"
},
"utm_campaign": {
"type": "string",
"description": "utm_campaign の値"
},
"ref": {
"type": "string",
"description": "ref / via / source パラメーター"
},
"path": {
"type": "string",
"description": "ランディングページのパス(例: /pricing)"
},
"paid_click": {
"type": "boolean",
"description": "URLに gclid などのクリックIDが含まれていた",
"default": false
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"site_id"
]
}
{
"type": "object"
}
PATCH
/sites/:site_id/channel_rules/:id.json
チャネルルールを変更
channel_rules_update
権限: sites.manage
curl -X PATCH https://privatusanalytics.com/sites/:site_id/channel_rules/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"channel": {
"type": "string",
"description": "割り当てるチャネル名"
},
"conditions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"operator": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"description": "すべて一致する必要がある条件: [{\"field\": \"utm_source\", \"operator\": \"is\", \"value\": \"newsletter\"}]。フィールド: referrer_host、utm_source、utm_medium、utm_campaign、ref、path。演算子: is、contains、starts_with、regex。"
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "ルールID"
},
"channel": {
"type": "string",
"description": "すべての条件が一致したときに割り当てられるチャネル"
},
"position": {
"type": "integer",
"description": "評価順(最初に一致したものが優先)"
},
"conditions": {
"type": "array",
"description": "条件: field、operator、value"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
トラフィックルール
POST
/sites/:site_id/traffic_rules.json
トラフィックルールを追加
traffic_rules_create
権限: sites.manage
curl -X POST https://privatusanalytics.com/sites/:site_id/traffic_rules.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"list": {
"type": "string",
"description": "hostnames、paths、referrers、countries、ip_ranges、user_agents、events のいずれか",
"enum": [
"hostnames",
"paths",
"referrers",
"countries",
"ip_ranges",
"user_agents",
"events"
]
},
"pattern": {
"type": "string",
"description": "一致させる値。* はワイルドカード。ip_ranges にはIPまたはCIDR(v4/v6)、countries にはISOコード",
"examples": [
"/admin/*"
]
},
"label": {
"type": "string",
"description": "任意のメモ(例: 「オフィス」)"
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"list",
"pattern",
"site_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "ルールID"
},
"list": {
"type": "string",
"description": "hostnames、paths、referrers、countries、ip_ranges、user_agents、events のいずれか"
},
"pattern": {
"type": "string",
"description": "パターン(* はワイルドカード、ip_ranges にはCIDR)"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"mode": {
"type": "string",
"description": "block または allow(そのリストのモード)"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/sites/:site_id/traffic_rules/:id.json
トラフィックルールを削除
traffic_rules_delete
権限: sites.manage
curl -X DELETE https://privatusanalytics.com/sites/:site_id/traffic_rules/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "ルールID"
},
"list": {
"type": "string",
"description": "hostnames、paths、referrers、countries、ip_ranges、user_agents、events のいずれか"
},
"pattern": {
"type": "string",
"description": "パターン(* はワイルドカード、ip_ranges にはCIDR)"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"mode": {
"type": "string",
"description": "block または allow(そのリストのモード)"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/sites/:site_id/traffic_rules.json
トラフィックルールを一覧表示
traffic_rules_list
権限: analytics.read
curl https://privatusanalytics.com/sites/:site_id/traffic_rules.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"list": {
"type": "string",
"description": "このリストのルールのみ",
"enum": [
"hostnames",
"paths",
"referrers",
"countries",
"ip_ranges",
"user_agents",
"events"
]
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"site_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "ルールID"
},
"list": {
"type": "string",
"description": "hostnames、paths、referrers、countries、ip_ranges、user_agents、events のいずれか"
},
"pattern": {
"type": "string",
"description": "パターン(* はワイルドカード、ip_ranges にはCIDR)"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"mode": {
"type": "string",
"description": "block または allow(そのリストのモード)"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
POST
/sites/:site_id/traffic_rules/test.json
サイトの現在のルールでヒットがカウントされるかをテスト
traffic_rules_test
権限: analytics.read
curl -X POST https://privatusanalytics.com/sites/:site_id/traffic_rules/test.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "ページのURL(例: https://example.com/a)"
},
"referrer": {
"type": "string",
"description": "リファラーのURLまたはホスト名"
},
"country": {
"type": "string",
"description": "ISOの国コード(例: US)"
},
"ip": {
"type": "string",
"description": "ip_ranges に対してテストするIPアドレス(保存されません)"
},
"user_agent": {
"type": "string",
"description": "User-Agent文字列(インジェスト時と同様に、ブラウザとメジャーバージョンに縮約されます)"
},
"event": {
"type": "string",
"description": "カスタムイベント名"
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"site_id"
]
}
{
"type": "object"
}
PATCH
/sites/:site_id/traffic_rules/:id.json
トラフィックルールを変更
traffic_rules_update
権限: sites.manage
curl -X PATCH https://privatusanalytics.com/sites/:site_id/traffic_rules/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"pattern": {
"type": "string",
"description": "新しいパターン"
},
"label": {
"type": "string",
"description": "新しいラベル"
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "ルールID"
},
"list": {
"type": "string",
"description": "hostnames、paths、referrers、countries、ip_ranges、user_agents、events のいずれか"
},
"pattern": {
"type": "string",
"description": "パターン(* はワイルドカード、ip_ranges にはCIDR)"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"mode": {
"type": "string",
"description": "block または allow(そのリストのモード)"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
ドキュメント
GET
/docs/api.json
すべてのAPI操作とMCPツールを一覧表示
docs_api
権限: public
curl https://privatusanalytics.com/docs/api.json
{
"type": "object",
"properties": {
"page": {
"type": "integer",
"description": "ページ(1から)"
},
"per_page": {
"type": "integer",
"description": "1ページあたりの結果数(最大100)"
}
},
"required": []
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"tool_name": {
"type": "string",
"description": "MCPのツール名とOpenAPIのoperationId"
},
"summary": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"group": {
"type": "string"
},
"verb": {
"type": "string",
"description": "HTTPメソッド"
},
"path": {
"type": "string",
"description": "パスのテンプレート。JSONには .json を付けます"
},
"permission": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"input_schema": {
"type": "object",
"description": "入力のJSON Schema"
},
"response_schema": {
"type": "object",
"description": "`data` のJSON Schema"
}
}
}
}
GET
/docs.json
ドキュメントページを一覧表示
docs_list
権限: public
curl https://privatusanalytics.com/docs.json
{
"type": "object",
"properties": {
"page": {
"type": "integer",
"description": "ページ(1から)"
},
"per_page": {
"type": "integer",
"description": "1ページあたりの結果数(最大100)"
}
},
"required": []
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "ページのタイトル"
},
"description": {
"type": "string",
"description": "1行の要約"
},
"path": {
"type": "string",
"description": "ページのパス。Markdownには .md、JSONには .json を付けます"
},
"section": {
"type": "string",
"description": "セクションのスラッグ(例: tracker)"
}
}
}
}
GET
/openapi.json
API全体のOpenAPI 3.1ドキュメント
docs_openapi
権限: public
curl https://privatusanalytics.com/openapi.json
{
"type": "object",
"properties": {},
"required": []
}
{
"type": "object"
}
GET
/docs/search.json
ドキュメントを検索
docs_search
権限: public
curl https://privatusanalytics.com/docs/search.json
{
"type": "object",
"properties": {
"q": {
"type": "string",
"description": "検索テキスト。空欄の場合はすべてのページを返します。",
"examples": [
"content security policy"
]
},
"limit": {
"type": "integer",
"description": "最大件数(デフォルト: q ありは20件、なしはすべて)"
}
},
"required": []
}
{
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "ページのタイトル"
},
"path": {
"type": "string",
"description": "ページのパス"
},
"section": {
"type": "string",
"description": "セクションのタイトル"
},
"headings": {
"type": "array",
"items": {
"type": "object"
},
"description": "ページ内の見出し: { id, text }"
},
"excerpt": {
"type": "string",
"description": "説明または最初の数文"
},
"score": {
"anyOf": [
{
"type": "integer",
"description": "関連度(q で検索した場合のみ)"
},
{
"type": "null"
}
]
}
}
}
GET
/docs/:section/:page.json
ドキュメントページを読む(MarkdownとHTML)
docs_get
section と page はページのパス /docs/<section>/<page> から決まります。セクションの概要には page に "index" を指定します。
権限: public
curl https://privatusanalytics.com/docs/:section/:page.json
{
"type": "object",
"properties": {
"section": {
"type": "string",
"description": "リソースの Section"
},
"page": {
"type": "string",
"description": "リソースの Page"
}
},
"required": [
"section",
"page"
]
}
{
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "ページのタイトル"
},
"description": {
"type": "string",
"description": "1行の要約"
},
"path": {
"type": "string",
"description": "ページのパス。Markdownには .md、JSONには .json を付けます"
},
"section": {
"type": "string",
"description": "セクションのスラッグ(例: tracker)"
},
"headings": {
"type": "array",
"items": {
"type": "object"
},
"description": "ページ内のセクション(idとテキスト)"
},
"full_markdown": {
"type": "string",
"description": "Markdown形式のページ(タイトルを含む)"
},
"html": {
"type": "string",
"description": "HTMLとしてレンダリングしたページ本文"
}
}
}
パフォーマンス
GET
/sites/:site_id/performance.json
Web Vitals: p75のスコアカード、日次推移、ページ、デバイス、ブラウザ、国別の内訳
performance_report
権限: analytics.read
curl https://privatusanalytics.com/sites/:site_id/performance.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"period": {
"type": "string",
"description": "期間のプリセット。from/to を使うには custom を指定",
"enum": [
"today",
"yesterday",
"24h",
"7d",
"14d",
"28d",
"30d",
"90d",
"mtd",
"last_month",
"qtd",
"last_quarter",
"ytd",
"12mo",
"last_year",
"all",
"custom"
],
"default": "30d"
},
"from": {
"type": "string",
"format": "date",
"description": "カスタム期間の開始(サイトのタイムゾーン)"
},
"to": {
"type": "string",
"format": "date",
"description": "カスタム期間の終了(この日を含む)"
},
"compare": {
"type": "string",
"description": "比較期間",
"enum": [
"none",
"previous_period",
"previous_year",
"custom"
],
"default": "none"
},
"compare_from": {
"type": "string",
"format": "date",
"description": "カスタム比較の開始"
},
"compare_to": {
"type": "string",
"format": "date",
"description": "カスタム比較の終了"
},
"match_weekday": {
"type": "boolean",
"description": "比較する日の曜日をそろえる",
"default": false
},
"filters": {
"type": "array",
"items": {},
"description": "フィルター: [[\"dimension\",\"operator\",\"value\"], …]。演算子: is、is_not、any_of、none_of、contains、not_contains、starts_with、regex、not_regex、gt、lt、between。OR条件にする場合は {\"any\": [...]} で条件をまとめます。",
"default": []
},
"segment_id": {
"type": "string",
"description": "保存済みのセグメントを適用(seg_…)"
},
"include_imported": {
"type": "boolean",
"description": "インポートした過去データを追加(最初のネイティブイベントより前の日付が対象。フィルターやセグメントを適用している場合は無視されます)",
"default": false
},
"metric": {
"type": "string",
"description": "推移と内訳に使う指標",
"enum": [
"LCP",
"INP",
"CLS",
"FCP",
"TTFB"
],
"default": "LCP"
},
"limit": {
"type": "integer",
"description": "内訳ごとの行数(最大100)",
"default": 10
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"site_id"
]
}
{
"type": "object"
}
ファネル
POST
/sites/:site_id/funnels.json
ファネルを作成
funnels_create
権限: content.write
curl -X POST https://privatusanalytics.com/sites/:site_id/funnels.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "ファネル名",
"examples": [
"Signup flow"
]
},
"steps": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
},
"description": "ステップを順番に指定(2〜プランの上限): [{\"type\": \"page|event|goal\", \"value\": \"/pricing | Signup | goal_…\", \"match\": \"exact|prefix|glob|regex\" (pageステップ), \"name\": \"optional label\"}]"
},
"order_mode": {
"type": "string",
"description": "strict: この順序のステップ、any: 順不同",
"enum": [
"strict",
"any"
],
"default": "strict"
},
"window": {
"type": "string",
"description": "コンバージョンウィンドウ: visit、または day(訪問内で測定され、UTCの日をまたぐことはありません)",
"enum": [
"visit",
"day"
],
"default": "visit"
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"name",
"steps",
"site_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ファネルID(例: fun_7Q2K9XH3AB)"
},
"name": {
"type": "string"
},
"steps": {
"type": "array",
"items": {
"type": "object"
},
"description": "ステップ: {type: page|event|goal, value, match, name}"
},
"order_mode": {
"type": "string",
"description": "strict または any"
},
"window": {
"type": "string",
"description": "visit または day"
},
"stats": {
"anyOf": [
{
"type": "object",
"properties": {
"entered": {
"type": "integer",
"description": "ステップ1に到達した訪問"
},
"completed": {
"type": "integer",
"description": "最後のステップに到達した訪問"
},
"conversion_rate": {
"type": "number",
"description": "完了 ÷ 流入(%)"
}
},
"description": "期間の統計(一覧のみ)"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/sites/:site_id/funnels/:id.json
ファネルを削除
funnels_delete
権限: content.write
curl -X DELETE https://privatusanalytics.com/sites/:site_id/funnels/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ファネルID(例: fun_7Q2K9XH3AB)"
},
"name": {
"type": "string"
},
"steps": {
"type": "array",
"items": {
"type": "object"
},
"description": "ステップ: {type: page|event|goal, value, match, name}"
},
"order_mode": {
"type": "string",
"description": "strict または any"
},
"window": {
"type": "string",
"description": "visit または day"
},
"stats": {
"anyOf": [
{
"type": "object",
"properties": {
"entered": {
"type": "integer",
"description": "ステップ1に到達した訪問"
},
"completed": {
"type": "integer",
"description": "最後のステップに到達した訪問"
},
"conversion_rate": {
"type": "number",
"description": "完了 ÷ 流入(%)"
}
},
"description": "期間の統計(一覧のみ)"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/sites/:site_id/funnels.json
流入数、完了数、率を含むファネルを一覧表示
funnels_list
権限: analytics.read
curl https://privatusanalytics.com/sites/:site_id/funnels.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"period": {
"type": "string",
"description": "期間のプリセット。from/to を使うには custom を指定",
"enum": [
"today",
"yesterday",
"24h",
"7d",
"14d",
"28d",
"30d",
"90d",
"mtd",
"last_month",
"qtd",
"last_quarter",
"ytd",
"12mo",
"last_year",
"all",
"custom"
],
"default": "30d"
},
"from": {
"type": "string",
"format": "date",
"description": "カスタム期間の開始(サイトのタイムゾーン)"
},
"to": {
"type": "string",
"format": "date",
"description": "カスタム期間の終了(この日を含む)"
},
"compare": {
"type": "string",
"description": "比較期間",
"enum": [
"none",
"previous_period",
"previous_year",
"custom"
],
"default": "none"
},
"compare_from": {
"type": "string",
"format": "date",
"description": "カスタム比較の開始"
},
"compare_to": {
"type": "string",
"format": "date",
"description": "カスタム比較の終了"
},
"match_weekday": {
"type": "boolean",
"description": "比較する日の曜日をそろえる",
"default": false
},
"filters": {
"type": "array",
"items": {},
"description": "フィルター: [[\"dimension\",\"operator\",\"value\"], …]。演算子: is、is_not、any_of、none_of、contains、not_contains、starts_with、regex、not_regex、gt、lt、between。OR条件にする場合は {\"any\": [...]} で条件をまとめます。",
"default": []
},
"segment_id": {
"type": "string",
"description": "保存済みのセグメントを適用(seg_…)"
},
"include_imported": {
"type": "boolean",
"description": "インポートした過去データを追加(最初のネイティブイベントより前の日付が対象。フィルターやセグメントを適用している場合は無視されます)",
"default": false
},
"page": {
"type": "integer",
"description": "ページ番号",
"default": 1
},
"per_page": {
"type": "integer",
"description": "1ページあたりのファネル数(最大100)",
"default": 25
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"site_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ファネルID(例: fun_7Q2K9XH3AB)"
},
"name": {
"type": "string"
},
"steps": {
"type": "array",
"items": {
"type": "object"
},
"description": "ステップ: {type: page|event|goal, value, match, name}"
},
"order_mode": {
"type": "string",
"description": "strict または any"
},
"window": {
"type": "string",
"description": "visit または day"
},
"stats": {
"anyOf": [
{
"type": "object",
"properties": {
"entered": {
"type": "integer",
"description": "ステップ1に到達した訪問"
},
"completed": {
"type": "integer",
"description": "最後のステップに到達した訪問"
},
"conversion_rate": {
"type": "number",
"description": "完了 ÷ 流入(%)"
}
},
"description": "期間の統計(一覧のみ)"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
}
GET
/sites/:site_id/funnels/:id.json
ファネルレポート: ステップごとの数、コンバージョン、離脱、ステップ間の所要時間、代わりに訪問が向かった先
funnels_get
権限: analytics.read
curl https://privatusanalytics.com/sites/:site_id/funnels/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"period": {
"type": "string",
"description": "期間のプリセット。from/to を使うには custom を指定",
"enum": [
"today",
"yesterday",
"24h",
"7d",
"14d",
"28d",
"30d",
"90d",
"mtd",
"last_month",
"qtd",
"last_quarter",
"ytd",
"12mo",
"last_year",
"all",
"custom"
],
"default": "30d"
},
"from": {
"type": "string",
"format": "date",
"description": "カスタム期間の開始(サイトのタイムゾーン)"
},
"to": {
"type": "string",
"format": "date",
"description": "カスタム期間の終了(この日を含む)"
},
"compare": {
"type": "string",
"description": "比較期間",
"enum": [
"none",
"previous_period",
"previous_year",
"custom"
],
"default": "none"
},
"compare_from": {
"type": "string",
"format": "date",
"description": "カスタム比較の開始"
},
"compare_to": {
"type": "string",
"format": "date",
"description": "カスタム比較の終了"
},
"match_weekday": {
"type": "boolean",
"description": "比較する日の曜日をそろえる",
"default": false
},
"filters": {
"type": "array",
"items": {},
"description": "フィルター: [[\"dimension\",\"operator\",\"value\"], …]。演算子: is、is_not、any_of、none_of、contains、not_contains、starts_with、regex、not_regex、gt、lt、between。OR条件にする場合は {\"any\": [...]} で条件をまとめます。",
"default": []
},
"segment_id": {
"type": "string",
"description": "保存済みのセグメントを適用(seg_…)"
},
"include_imported": {
"type": "boolean",
"description": "インポートした過去データを追加(最初のネイティブイベントより前の日付が対象。フィルターやセグメントを適用している場合は無視されます)",
"default": false
},
"breakdown": {
"type": "string",
"description": "ステップごとの数を訪問のディメンションで分割する",
"enum": [
"channel",
"device",
"country",
"utm_campaign",
"utm_source",
"browser",
"os"
]
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"period": {
"type": "object",
"description": "期間の from/to(UTC)"
},
"funnel": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ファネルID(例: fun_7Q2K9XH3AB)"
},
"name": {
"type": "string"
},
"steps": {
"type": "array",
"items": {
"type": "object"
},
"description": "ステップ: {type: page|event|goal, value, match, name}"
},
"order_mode": {
"type": "string",
"description": "strict または any"
},
"window": {
"type": "string",
"description": "visit または day"
},
"stats": {
"anyOf": [
{
"type": "object",
"properties": {
"entered": {
"type": "integer",
"description": "ステップ1に到達した訪問"
},
"completed": {
"type": "integer",
"description": "最後のステップに到達した訪問"
},
"conversion_rate": {
"type": "number",
"description": "完了 ÷ 流入(%)"
}
},
"description": "期間の統計(一覧のみ)"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
},
"description": "ファネルの定義"
},
"order_mode": {
"type": "string",
"description": "strict または any"
},
"window": {
"type": "string",
"description": "visit または day(day は訪問内で測定されます)"
},
"steps": {
"type": "array",
"items": {
"type": "object"
},
"description": "ステップごと: index、name、type、value、count、step_conversion_rate、overall_conversion_rate、dropoff、dropoff_rate、median_seconds_from_previous、next_pages [{value, count}]"
},
"overall_conversion_rate": {
"type": "number",
"description": "最後のステップ ÷ 最初のステップ(%)"
},
"breakdown": {
"anyOf": [
{
"type": "object",
"description": "dimension、label、rows [{value, counts, overall_conversion_rate}]"
},
{
"type": "null"
}
]
},
"comparison": {
"anyOf": [
{
"type": "object",
"description": "period、ステップごとのcounts、overall_conversion_rate、change(%)"
},
{
"type": "null"
}
]
}
}
}
PATCH
/sites/:site_id/funnels/:id.json
ファネルを更新
funnels_update
権限: content.write
curl -X PATCH https://privatusanalytics.com/sites/:site_id/funnels/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "ファネル名",
"examples": [
"Signup flow"
]
},
"steps": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
},
"description": "ステップを順番に指定(2〜プランの上限): [{\"type\": \"page|event|goal\", \"value\": \"/pricing | Signup | goal_…\", \"match\": \"exact|prefix|glob|regex\" (pageステップ), \"name\": \"optional label\"}]"
},
"order_mode": {
"type": "string",
"description": "strict: この順序のステップ、any: 順不同",
"enum": [
"strict",
"any"
]
},
"window": {
"type": "string",
"description": "コンバージョンウィンドウ: visit、または day(訪問内で測定され、UTCの日をまたぐことはありません)",
"enum": [
"visit",
"day"
]
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ファネルID(例: fun_7Q2K9XH3AB)"
},
"name": {
"type": "string"
},
"steps": {
"type": "array",
"items": {
"type": "object"
},
"description": "ステップ: {type: page|event|goal, value, match, name}"
},
"order_mode": {
"type": "string",
"description": "strict または any"
},
"window": {
"type": "string",
"description": "visit または day"
},
"stats": {
"anyOf": [
{
"type": "object",
"properties": {
"entered": {
"type": "integer",
"description": "ステップ1に到達した訪問"
},
"completed": {
"type": "integer",
"description": "最後のステップに到達した訪問"
},
"conversion_rate": {
"type": "number",
"description": "完了 ÷ 流入(%)"
}
},
"description": "期間の統計(一覧のみ)"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
プラン
GET
/plans.json
プラン、料金、上限を一覧表示
plans_list
権限: public
curl https://privatusanalytics.com/plans.json
{
"type": "object",
"properties": {
"page": {
"type": "integer",
"description": "ページ(1から)"
},
"per_page": {
"type": "integer",
"description": "1ページあたりの結果数(最大100)"
}
},
"required": []
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "free、pro、business、enterprise のいずれか"
},
"events": {
"anyOf": [
{
"type": "integer",
"description": "含まれる月間イベント数(無料プランのみ)"
},
{
"type": "null"
}
]
},
"badge_bonus": {
"anyOf": [
{
"type": "integer",
"description": "バッジを表示した場合に追加される月間イベント数(無料プラン)"
},
{
"type": "null"
}
]
},
"limits": {
"type": "object",
"description": "プランの上限。null は無制限を意味します"
},
"tiers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"events": {
"type": "integer",
"description": "含まれる月間イベント数"
},
"monthly": {
"type": "integer",
"description": "月額(USD)、月払い"
},
"yearly": {
"type": "integer",
"description": "年額(USD)、年払い(2か月分無料)"
},
"monthly_price_id": {
"anyOf": [
{
"type": "string",
"description": "Paddleの価格id(月額)"
},
{
"type": "null"
}
]
},
"yearly_price_id": {
"anyOf": [
{
"type": "string",
"description": "Paddleの価格id(年額)"
},
{
"type": "null"
}
]
}
}
},
"description": "月間イベント数ごとの料金の段階"
},
"contact_sales": {
"type": "boolean",
"description": "契約ごとの料金"
}
}
}
}
ヘルプとフィードバック
POST
/help.json
Privatus Analytics チームに質問やフィードバックを送信
support_message_send
メッセージは、アカウント、ワークスペース、プランの詳細を添えてチームにメールで届きます。返信と受領確認はアカウントのメールアドレスに送られます。1日10件まで。
権限: member
curl -X POST https://privatusanalytics.com/help.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"subject": {
"type": "string",
"description": "メッセージの件名(150文字まで)",
"examples": [
"Funnel shows no data"
]
},
"message": {
"type": "string",
"description": "質問またはフィードバック(10〜5,000文字)"
}
},
"required": [
"subject",
"message"
]
}
{
"type": "object",
"properties": {
"received": {
"type": "boolean",
"description": "送信が受け付けられた場合は常に true"
},
"message": {
"type": "string",
"description": "この後の流れ"
}
}
}
メモ
POST
/sites/:site_id/notes.json
サイトにメモを追加(リリースのwebhookには source "deploy" を使用)
notes_create
権限: content.write
curl -X POST https://privatusanalytics.com/sites/:site_id/notes.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"date": {
"type": "string",
"format": "date",
"description": "メモの日付(サイトのタイムゾーン)。デフォルトは今日"
},
"end_date": {
"type": "string",
"format": "date",
"description": "期間指定の場合の最後の日"
},
"title": {
"type": "string",
"description": "グラフに表示される短いタイトル",
"examples": [
"Launched new pricing"
]
},
"body": {
"type": "string",
"description": "詳細(Markdown)"
},
"url": {
"type": "string",
"description": "リンク(例: PRや更新履歴)"
},
"color": {
"type": "string",
"description": "ピンの色",
"enum": [
"neutral",
"brand",
"blue",
"amber",
"red",
"violet"
]
},
"source": {
"type": "string",
"description": "manual、またはリリースのwebhook用の deploy",
"enum": [
"manual",
"deploy",
"system",
"import",
"incident"
],
"default": "manual"
},
"version": {
"type": "string",
"description": "デプロイ: リリースバージョンまたはコミット。デフォルトのタイトルに使用"
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"site_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "メモID(例: note_7Q2K9XH3AB)"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "サイト。ワークスペース全体のメモでは null"
},
{
"type": "null"
}
]
},
"date": {
"type": "string",
"format": "date"
},
"end_date": {
"anyOf": [
{
"type": "string",
"format": "date"
},
{
"type": "null"
}
]
},
"title": {
"type": "string"
},
"body": {
"anyOf": [
{
"type": "string",
"description": "Markdown"
},
{
"type": "null"
}
]
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"color": {
"type": "string",
"description": "neutral、brand、blue、amber、red、violet のいずれか"
},
"source": {
"type": "string",
"description": "manual、deploy、system、import、incident のいずれか"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/sites/:site_id/notes/:id.json
メモを削除
notes_delete
権限: content.write
curl -X DELETE https://privatusanalytics.com/sites/:site_id/notes/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "メモID(例: note_7Q2K9XH3AB)"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "サイト。ワークスペース全体のメモでは null"
},
{
"type": "null"
}
]
},
"date": {
"type": "string",
"format": "date"
},
"end_date": {
"anyOf": [
{
"type": "string",
"format": "date"
},
{
"type": "null"
}
]
},
"title": {
"type": "string"
},
"body": {
"anyOf": [
{
"type": "string",
"description": "Markdown"
},
{
"type": "null"
}
]
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"color": {
"type": "string",
"description": "neutral、brand、blue、amber、red、violet のいずれか"
},
"source": {
"type": "string",
"description": "manual、deploy、system、import、incident のいずれか"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/sites/:site_id/notes.json
サイトのメモを一覧表示(ワークスペース全体のメモを含む)
notes_list
権限: analytics.read
curl https://privatusanalytics.com/sites/:site_id/notes.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"from": {
"type": "string",
"format": "date",
"description": "この日付以降のメモのみ"
},
"to": {
"type": "string",
"format": "date",
"description": "この日付以前のメモのみ"
},
"source": {
"type": "string",
"description": "このソースのメモのみ",
"enum": [
"manual",
"deploy",
"system",
"import",
"incident"
]
},
"query": {
"type": "string",
"description": "タイトル、本文、リンクを検索"
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
},
"page": {
"type": "integer",
"description": "ページ(1から)"
},
"per_page": {
"type": "integer",
"description": "1ページあたりの結果数(最大100)"
}
},
"required": [
"site_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "メモID(例: note_7Q2K9XH3AB)"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "サイト。ワークスペース全体のメモでは null"
},
{
"type": "null"
}
]
},
"date": {
"type": "string",
"format": "date"
},
"end_date": {
"anyOf": [
{
"type": "string",
"format": "date"
},
{
"type": "null"
}
]
},
"title": {
"type": "string"
},
"body": {
"anyOf": [
{
"type": "string",
"description": "Markdown"
},
{
"type": "null"
}
]
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"color": {
"type": "string",
"description": "neutral、brand、blue、amber、red、violet のいずれか"
},
"source": {
"type": "string",
"description": "manual、deploy、system、import、incident のいずれか"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
}
GET
/sites/:site_id/notes/:id.json
メモを取得
notes_get
権限: analytics.read
curl https://privatusanalytics.com/sites/:site_id/notes/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "メモID(例: note_7Q2K9XH3AB)"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "サイト。ワークスペース全体のメモでは null"
},
{
"type": "null"
}
]
},
"date": {
"type": "string",
"format": "date"
},
"end_date": {
"anyOf": [
{
"type": "string",
"format": "date"
},
{
"type": "null"
}
]
},
"title": {
"type": "string"
},
"body": {
"anyOf": [
{
"type": "string",
"description": "Markdown"
},
{
"type": "null"
}
]
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"color": {
"type": "string",
"description": "neutral、brand、blue、amber、red、violet のいずれか"
},
"source": {
"type": "string",
"description": "manual、deploy、system、import、incident のいずれか"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
PATCH
/sites/:site_id/notes/:id.json
メモを編集
notes_update
権限: content.write
curl -X PATCH https://privatusanalytics.com/sites/:site_id/notes/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"date": {
"type": "string",
"format": "date",
"description": "メモの日付"
},
"end_date": {
"type": "string",
"format": "date",
"description": "期間指定の場合の最後の日"
},
"title": {
"type": "string",
"description": "グラフに表示される短いタイトル"
},
"body": {
"type": "string",
"description": "詳細(Markdown)"
},
"url": {
"type": "string",
"description": "リンク"
},
"color": {
"type": "string",
"description": "ピンの色",
"enum": [
"neutral",
"brand",
"blue",
"amber",
"red",
"violet"
]
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "メモID(例: note_7Q2K9XH3AB)"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "サイト。ワークスペース全体のメモでは null"
},
{
"type": "null"
}
]
},
"date": {
"type": "string",
"format": "date"
},
"end_date": {
"anyOf": [
{
"type": "string",
"format": "date"
},
{
"type": "null"
}
]
},
"title": {
"type": "string"
},
"body": {
"anyOf": [
{
"type": "string",
"description": "Markdown"
},
{
"type": "null"
}
]
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"color": {
"type": "string",
"description": "neutral、brand、blue、amber、red、violet のいずれか"
},
"source": {
"type": "string",
"description": "manual、deploy、system、import、incident のいずれか"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
POST
/workspaces/:workspace_id/notes.json
ワークスペース全体のメモを追加(すべてのサイトに表示)
workspace_notes_create
権限: content.write
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/notes.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"date": {
"type": "string",
"format": "date",
"description": "メモの日付(サイトのタイムゾーン)。デフォルトは今日"
},
"end_date": {
"type": "string",
"format": "date",
"description": "期間指定の場合の最後の日"
},
"title": {
"type": "string",
"description": "グラフに表示される短いタイトル",
"examples": [
"Launched new pricing"
]
},
"body": {
"type": "string",
"description": "詳細(Markdown)"
},
"url": {
"type": "string",
"description": "リンク(例: PRや更新履歴)"
},
"color": {
"type": "string",
"description": "ピンの色",
"enum": [
"neutral",
"brand",
"blue",
"amber",
"red",
"violet"
]
},
"source": {
"type": "string",
"description": "manual、またはリリースのwebhook用の deploy",
"enum": [
"manual",
"deploy",
"system",
"import",
"incident"
],
"default": "manual"
},
"version": {
"type": "string",
"description": "デプロイ: リリースバージョンまたはコミット。デフォルトのタイトルに使用"
},
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
}
},
"required": [
"workspace_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "メモID(例: note_7Q2K9XH3AB)"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "サイト。ワークスペース全体のメモでは null"
},
{
"type": "null"
}
]
},
"date": {
"type": "string",
"format": "date"
},
"end_date": {
"anyOf": [
{
"type": "string",
"format": "date"
},
{
"type": "null"
}
]
},
"title": {
"type": "string"
},
"body": {
"anyOf": [
{
"type": "string",
"description": "Markdown"
},
{
"type": "null"
}
]
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"color": {
"type": "string",
"description": "neutral、brand、blue、amber、red、violet のいずれか"
},
"source": {
"type": "string",
"description": "manual、deploy、system、import、incident のいずれか"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/workspaces/:workspace_id/notes/:id.json
ワークスペースのメモを削除
workspace_notes_delete
権限: content.write
curl -X DELETE https://privatusanalytics.com/workspaces/:workspace_id/notes/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"workspace_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "メモID(例: note_7Q2K9XH3AB)"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "サイト。ワークスペース全体のメモでは null"
},
{
"type": "null"
}
]
},
"date": {
"type": "string",
"format": "date"
},
"end_date": {
"anyOf": [
{
"type": "string",
"format": "date"
},
{
"type": "null"
}
]
},
"title": {
"type": "string"
},
"body": {
"anyOf": [
{
"type": "string",
"description": "Markdown"
},
{
"type": "null"
}
]
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"color": {
"type": "string",
"description": "neutral、brand、blue、amber、red、violet のいずれか"
},
"source": {
"type": "string",
"description": "manual、deploy、system、import、incident のいずれか"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/workspaces/:workspace_id/notes.json
ワークスペース全体のメモを一覧表示
workspace_notes_list
権限: analytics.read
curl https://privatusanalytics.com/workspaces/:workspace_id/notes.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"from": {
"type": "string",
"format": "date",
"description": "この日付以降のメモのみ"
},
"to": {
"type": "string",
"format": "date",
"description": "この日付以前のメモのみ"
},
"source": {
"type": "string",
"description": "このソースのメモのみ",
"enum": [
"manual",
"deploy",
"system",
"import",
"incident"
]
},
"query": {
"type": "string",
"description": "タイトル、本文、リンクを検索"
},
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
},
"page": {
"type": "integer",
"description": "ページ(1から)"
},
"per_page": {
"type": "integer",
"description": "1ページあたりの結果数(最大100)"
}
},
"required": [
"workspace_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "メモID(例: note_7Q2K9XH3AB)"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "サイト。ワークスペース全体のメモでは null"
},
{
"type": "null"
}
]
},
"date": {
"type": "string",
"format": "date"
},
"end_date": {
"anyOf": [
{
"type": "string",
"format": "date"
},
{
"type": "null"
}
]
},
"title": {
"type": "string"
},
"body": {
"anyOf": [
{
"type": "string",
"description": "Markdown"
},
{
"type": "null"
}
]
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"color": {
"type": "string",
"description": "neutral、brand、blue、amber、red、violet のいずれか"
},
"source": {
"type": "string",
"description": "manual、deploy、system、import、incident のいずれか"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
}
PATCH
/workspaces/:workspace_id/notes/:id.json
ワークスペースのメモを編集
workspace_notes_update
権限: content.write
curl -X PATCH https://privatusanalytics.com/workspaces/:workspace_id/notes/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"date": {
"type": "string",
"format": "date",
"description": "メモの日付"
},
"end_date": {
"type": "string",
"format": "date",
"description": "期間指定の場合の最後の日"
},
"title": {
"type": "string",
"description": "グラフに表示される短いタイトル"
},
"body": {
"type": "string",
"description": "詳細(Markdown)"
},
"url": {
"type": "string",
"description": "リンク"
},
"color": {
"type": "string",
"description": "ピンの色",
"enum": [
"neutral",
"brand",
"blue",
"amber",
"red",
"violet"
]
},
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"workspace_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "メモID(例: note_7Q2K9XH3AB)"
},
"site_id": {
"anyOf": [
{
"type": "string",
"description": "サイト。ワークスペース全体のメモでは null"
},
{
"type": "null"
}
]
},
"date": {
"type": "string",
"format": "date"
},
"end_date": {
"anyOf": [
{
"type": "string",
"format": "date"
},
{
"type": "null"
}
]
},
"title": {
"type": "string"
},
"body": {
"anyOf": [
{
"type": "string",
"description": "Markdown"
},
{
"type": "null"
}
]
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"color": {
"type": "string",
"description": "neutral、brand、blue、amber、red、violet のいずれか"
},
"source": {
"type": "string",
"description": "manual、deploy、system、import、incident のいずれか"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
メンバー
POST
/workspaces/:workspace_id/invitations.json
メールで招待
invitations_create
権限: members.manage
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/invitations.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"emails": {
"type": "array",
"items": {
"type": "string"
},
"description": "招待するメールアドレス"
},
"role": {
"type": "string",
"description": "新しいメンバーのロール(custom には custom_role_id が必要)",
"enum": [
"admin",
"editor",
"analyst",
"viewer",
"billing",
"custom"
],
"default": "viewer"
},
"custom_role_id": {
"type": "string",
"description": "カスタムロールID(Business)"
},
"all_sites": {
"type": "boolean",
"description": "今後追加されるサイトを含む、すべてのサイトへのアクセス",
"default": true
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "all_sites が false の場合のサイトID(pa_…)",
"default": []
},
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
}
},
"required": [
"emails",
"workspace_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"email": {
"type": "string"
},
"role": {
"type": "string"
},
"custom_role": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"all_sites": {
"type": "boolean"
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
}
},
"invited_by": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"expires_at": {
"type": "string",
"format": "date-time"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/workspaces/:workspace_id/invitations/:id.json
保留中の招待を取り消す
invitations_delete
権限: members.manage
curl -X DELETE https://privatusanalytics.com/workspaces/:workspace_id/invitations/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"workspace_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"email": {
"type": "string"
},
"role": {
"type": "string"
},
"custom_role": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"all_sites": {
"type": "boolean"
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
}
},
"invited_by": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"expires_at": {
"type": "string",
"format": "date-time"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/workspaces/:workspace_id/invitations.json
保留中の招待を一覧表示
invitations_list
権限: members.manage
curl https://privatusanalytics.com/workspaces/:workspace_id/invitations.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
},
"page": {
"type": "integer",
"description": "ページ(1から)"
},
"per_page": {
"type": "integer",
"description": "1ページあたりの結果数(最大100)"
}
},
"required": [
"workspace_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"email": {
"type": "string"
},
"role": {
"type": "string"
},
"custom_role": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"all_sites": {
"type": "boolean"
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
}
},
"invited_by": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"expires_at": {
"type": "string",
"format": "date-time"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
}
DELETE
/workspaces/:workspace_id/members/:id.json
メンバーを削除(またはワークスペースから退出)
members_delete
権限: member
curl -X DELETE https://privatusanalytics.com/workspaces/:workspace_id/members/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"workspace_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "メンバーID(メンバーの更新や削除に使用)"
},
"email": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"role": {
"type": "string",
"description": "owner、admin、editor、analyst、viewer、billing、custom のいずれか"
},
"custom_role": {
"anyOf": [
{
"type": "string",
"description": "カスタムロール名"
},
{
"type": "null"
}
]
},
"custom_role_id": {
"anyOf": [
{
"type": "string",
"format": "uuid"
},
{
"type": "null"
}
]
},
"all_sites": {
"type": "boolean",
"description": "すべてのサイトへのアクセス"
},
"include_future_sites": {
"type": "boolean"
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "all_sites が false の場合のサイトID"
},
"two_factor": {
"type": "boolean",
"description": "2FAまたはパスキーを設定済み"
},
"last_active_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "参加日時"
}
}
}
GET
/workspaces/:workspace_id/members.json
ワークスペースのメンバーを一覧表示
members_list
権限: member
curl https://privatusanalytics.com/workspaces/:workspace_id/members.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "名前またはメールアドレスで絞り込む"
},
"role": {
"type": "string",
"description": "このロールのメンバーのみ",
"enum": [
"owner",
"admin",
"editor",
"analyst",
"viewer",
"billing",
"custom"
]
},
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
},
"page": {
"type": "integer",
"description": "ページ(1から)"
},
"per_page": {
"type": "integer",
"description": "1ページあたりの結果数(最大100)"
}
},
"required": [
"workspace_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "メンバーID(メンバーの更新や削除に使用)"
},
"email": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"role": {
"type": "string",
"description": "owner、admin、editor、analyst、viewer、billing、custom のいずれか"
},
"custom_role": {
"anyOf": [
{
"type": "string",
"description": "カスタムロール名"
},
{
"type": "null"
}
]
},
"custom_role_id": {
"anyOf": [
{
"type": "string",
"format": "uuid"
},
{
"type": "null"
}
]
},
"all_sites": {
"type": "boolean",
"description": "すべてのサイトへのアクセス"
},
"include_future_sites": {
"type": "boolean"
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "all_sites が false の場合のサイトID"
},
"two_factor": {
"type": "boolean",
"description": "2FAまたはパスキーを設定済み"
},
"last_active_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "参加日時"
}
}
}
}
PATCH
/workspaces/:workspace_id/members/:id.json
メンバーのロールまたはサイトへのアクセス権を変更
members_update
権限: members.manage
curl -X PATCH https://privatusanalytics.com/workspaces/:workspace_id/members/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"role": {
"type": "string",
"description": "新しいロール(custom には custom_role_id が必要)",
"enum": [
"admin",
"editor",
"analyst",
"viewer",
"billing",
"custom"
]
},
"custom_role_id": {
"type": "string",
"description": "カスタムロールID(Business)"
},
"all_sites": {
"type": "boolean",
"description": "今後追加されるサイトを含む、すべてのサイトへのアクセス"
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "all_sites が false の場合のサイトID(pa_…)"
},
"include_future_sites": {
"type": "boolean",
"description": "後から追加されるサイトにもアクセス権を付与する"
},
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"workspace_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "メンバーID(メンバーの更新や削除に使用)"
},
"email": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"role": {
"type": "string",
"description": "owner、admin、editor、analyst、viewer、billing、custom のいずれか"
},
"custom_role": {
"anyOf": [
{
"type": "string",
"description": "カスタムロール名"
},
{
"type": "null"
}
]
},
"custom_role_id": {
"anyOf": [
{
"type": "string",
"format": "uuid"
},
{
"type": "null"
}
]
},
"all_sites": {
"type": "boolean",
"description": "すべてのサイトへのアクセス"
},
"include_future_sites": {
"type": "boolean"
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "all_sites が false の場合のサイトID"
},
"two_factor": {
"type": "boolean",
"description": "2FAまたはパスキーを設定済み"
},
"last_active_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "参加日時"
}
}
}
POST
/workspaces/:workspace_id/ownership_transfer.json
ワークスペースの所有権を別のメンバーに移管(オーナーのみ。あなたは管理者になります)
ownership_transfers_create
権限: member
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/ownership_transfer.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"membership_id": {
"type": "string",
"description": "新しいオーナーのメンバーID"
},
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
}
},
"required": [
"membership_id",
"workspace_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "メンバーID(メンバーの更新や削除に使用)"
},
"email": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"role": {
"type": "string",
"description": "owner、admin、editor、analyst、viewer、billing、custom のいずれか"
},
"custom_role": {
"anyOf": [
{
"type": "string",
"description": "カスタムロール名"
},
{
"type": "null"
}
]
},
"custom_role_id": {
"anyOf": [
{
"type": "string",
"format": "uuid"
},
{
"type": "null"
}
]
},
"all_sites": {
"type": "boolean",
"description": "すべてのサイトへのアクセス"
},
"include_future_sites": {
"type": "boolean"
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "all_sites が false の場合のサイトID"
},
"two_factor": {
"type": "boolean",
"description": "2FAまたはパスキーを設定済み"
},
"last_active_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "参加日時"
}
}
}
メールレポート
DELETE
/recipients/:id.json
メールレポートから受信者を削除
email_report_recipients_delete
権限: content.write
curl -X DELETE https://privatusanalytics.com/recipients/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "受信者ID(例: rcp_7Q2K9XH3AB)"
},
"email": {
"type": "string",
"description": "アドレス"
},
"status": {
"type": "string",
"description": "active、pending、declined、unsubscribed のいずれか"
},
"invited_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "最後に招待を送信した日時"
},
{
"type": "null"
}
]
},
"expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "保留中の招待の有効期限"
},
{
"type": "null"
}
]
},
"confirmed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "アドレスが有効になった日時"
},
{
"type": "null"
}
]
}
}
}
GET
/reports/:report_id/recipients.json
メールレポートの受信者とそのステータスを一覧表示
email_report_recipients_list
ステータス: active(レポートを受信)、pending(招待済み、未承諾)、declined、unsubscribed。アドレスの追加や削除は、レポートの受信者リストから行います。
権限: analytics.read
curl https://privatusanalytics.com/reports/:report_id/recipients.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"status": {
"type": "string",
"description": "このステータスの受信者のみ",
"enum": [
"pending",
"active",
"declined",
"unsubscribed"
]
},
"report_id": {
"type": "string",
"description": "リソースの Report"
},
"page": {
"type": "integer",
"description": "ページ(1から)"
},
"per_page": {
"type": "integer",
"description": "1ページあたりの結果数(最大100)"
}
},
"required": [
"report_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "受信者ID(例: rcp_7Q2K9XH3AB)"
},
"email": {
"type": "string",
"description": "アドレス"
},
"status": {
"type": "string",
"description": "active、pending、declined、unsubscribed のいずれか"
},
"invited_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "最後に招待を送信した日時"
},
{
"type": "null"
}
]
},
"expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "保留中の招待の有効期限"
},
{
"type": "null"
}
]
},
"confirmed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "アドレスが有効になった日時"
},
{
"type": "null"
}
]
}
}
}
}
POST
/recipients/:id/resend.json
保留中のレポート招待を再送信
email_report_recipients_resend
新しいリンクで招待を再送信します。レポートごと、アドレスごとに7日に1回まで可能です。
権限: content.write
curl -X POST https://privatusanalytics.com/recipients/:id/resend.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "受信者ID(例: rcp_7Q2K9XH3AB)"
},
"email": {
"type": "string",
"description": "アドレス"
},
"status": {
"type": "string",
"description": "active、pending、declined、unsubscribed のいずれか"
},
"invited_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "最後に招待を送信した日時"
},
{
"type": "null"
}
]
},
"expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "保留中の招待の有効期限"
},
{
"type": "null"
}
]
},
"confirmed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "アドレスが有効になった日時"
},
{
"type": "null"
}
]
}
}
}
POST
/workspaces/:workspace_id/reports.json
メールレポートを作成
email_reports_create
権限: content.write
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/reports.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "レポートに含めるサイトID(pa_…)"
},
"frequency": {
"type": "string",
"description": "daily、weekly(曜日指定)、monthly(1日)のいずれか",
"enum": [
"daily",
"weekly",
"monthly"
]
},
"hour": {
"type": "integer",
"description": "送信する時刻(0〜23、ワークスペースのタイムゾーン)"
},
"weekday": {
"type": "integer",
"description": "週次レポート: 0 = 日曜日 … 6 = 土曜日"
},
"recipients": {
"type": "array",
"items": {
"type": "string"
},
"description": "メールアドレス(アカウントは不要)。カンマまたは改行で区切れます。ワークスペースのメンバーはすぐに追加されます。それ以外の人には招待が届き、承諾した後にのみレポートを受信します。レポートの配信を停止したアドレスは拒否されます"
},
"blocks": {
"type": "array",
"items": {
"type": "string"
},
"description": "内容: kpis、chart、pages、sources、goals、campaigns、vitals、uptime"
},
"attach_pdf": {
"type": "boolean",
"description": "PDF版を添付する"
},
"intro": {
"type": "string",
"description": "カスタムの冒頭テキスト(最大2000文字)"
},
"enabled": {
"type": "boolean",
"description": "スケジュールどおりに送信する"
},
"name": {
"type": "string",
"description": "レポート名",
"examples": [
"Weekly traffic"
]
},
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
}
},
"required": [
"name",
"workspace_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "レポートID(例: rep_7Q2K9XH3AB)"
},
"name": {
"type": "string"
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "レポートに含まれるサイトID"
},
"frequency": {
"type": "string",
"description": "daily、weekly、monthly のいずれか"
},
"hour": {
"type": "integer",
"description": "送信する時刻(ワークスペースのタイムゾーン)"
},
"weekday": {
"type": "integer",
"description": "週次: 0 = 日曜日 … 6 = 土曜日"
},
"recipients": {
"type": "array",
"items": {
"type": "string"
},
"description": "ステータスを問わず、レポートに登録されたすべてのアドレス"
},
"recipient_details": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "受信者ID(例: rcp_7Q2K9XH3AB)"
},
"email": {
"type": "string",
"description": "アドレス"
},
"status": {
"type": "string",
"description": "active、pending、declined、unsubscribed のいずれか"
},
"invited_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "最後に招待を送信した日時"
},
{
"type": "null"
}
]
},
"expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "保留中の招待の有効期限"
},
{
"type": "null"
}
]
},
"confirmed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "アドレスが有効になった日時"
},
{
"type": "null"
}
]
}
}
},
"description": "各受信者とそのオプトイン状況(レポートを受信するのは active の受信者のみ)"
},
"blocks": {
"type": "array",
"items": {
"type": "string"
},
"description": "コンテンツブロック"
},
"attach_pdf": {
"type": "boolean"
},
"intro": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"enabled": {
"type": "boolean"
},
"last_sent_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"next_run_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/reports/:id/deliveries.json
メールレポートの配信ログ
email_reports_deliveries
権限: analytics.read
curl https://privatusanalytics.com/reports/:id/deliveries.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"status": {
"type": "string",
"description": "このステータスの配信のみ",
"enum": [
"sent",
"test",
"failed",
"skipped"
]
},
"id": {
"type": "string",
"description": "リソースの Id"
},
"page": {
"type": "integer",
"description": "ページ(1から)"
},
"per_page": {
"type": "integer",
"description": "1ページあたりの結果数(最大100)"
}
},
"required": [
"id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"status": {
"type": "string",
"description": "sent、test、failed、skipped のいずれか"
},
"recipients_count": {
"type": "integer"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"sent_at": {
"type": "string",
"format": "date-time"
}
}
}
}
DELETE
/reports/:id.json
メールレポートを削除
email_reports_delete
権限: content.write
curl -X DELETE https://privatusanalytics.com/reports/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "レポートID(例: rep_7Q2K9XH3AB)"
},
"name": {
"type": "string"
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "レポートに含まれるサイトID"
},
"frequency": {
"type": "string",
"description": "daily、weekly、monthly のいずれか"
},
"hour": {
"type": "integer",
"description": "送信する時刻(ワークスペースのタイムゾーン)"
},
"weekday": {
"type": "integer",
"description": "週次: 0 = 日曜日 … 6 = 土曜日"
},
"recipients": {
"type": "array",
"items": {
"type": "string"
},
"description": "ステータスを問わず、レポートに登録されたすべてのアドレス"
},
"recipient_details": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "受信者ID(例: rcp_7Q2K9XH3AB)"
},
"email": {
"type": "string",
"description": "アドレス"
},
"status": {
"type": "string",
"description": "active、pending、declined、unsubscribed のいずれか"
},
"invited_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "最後に招待を送信した日時"
},
{
"type": "null"
}
]
},
"expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "保留中の招待の有効期限"
},
{
"type": "null"
}
]
},
"confirmed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "アドレスが有効になった日時"
},
{
"type": "null"
}
]
}
}
},
"description": "各受信者とそのオプトイン状況(レポートを受信するのは active の受信者のみ)"
},
"blocks": {
"type": "array",
"items": {
"type": "string"
},
"description": "コンテンツブロック"
},
"attach_pdf": {
"type": "boolean"
},
"intro": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"enabled": {
"type": "boolean"
},
"last_sent_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"next_run_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/workspaces/:workspace_id/reports.json
メールレポートを一覧表示
email_reports_list
権限: analytics.read
curl https://privatusanalytics.com/workspaces/:workspace_id/reports.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"frequency": {
"type": "string",
"description": "この頻度のレポートのみ",
"enum": [
"daily",
"weekly",
"monthly"
]
},
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
},
"page": {
"type": "integer",
"description": "ページ(1から)"
},
"per_page": {
"type": "integer",
"description": "1ページあたりの結果数(最大100)"
}
},
"required": [
"workspace_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "レポートID(例: rep_7Q2K9XH3AB)"
},
"name": {
"type": "string"
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "レポートに含まれるサイトID"
},
"frequency": {
"type": "string",
"description": "daily、weekly、monthly のいずれか"
},
"hour": {
"type": "integer",
"description": "送信する時刻(ワークスペースのタイムゾーン)"
},
"weekday": {
"type": "integer",
"description": "週次: 0 = 日曜日 … 6 = 土曜日"
},
"recipients": {
"type": "array",
"items": {
"type": "string"
},
"description": "ステータスを問わず、レポートに登録されたすべてのアドレス"
},
"recipient_details": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "受信者ID(例: rcp_7Q2K9XH3AB)"
},
"email": {
"type": "string",
"description": "アドレス"
},
"status": {
"type": "string",
"description": "active、pending、declined、unsubscribed のいずれか"
},
"invited_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "最後に招待を送信した日時"
},
{
"type": "null"
}
]
},
"expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "保留中の招待の有効期限"
},
{
"type": "null"
}
]
},
"confirmed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "アドレスが有効になった日時"
},
{
"type": "null"
}
]
}
}
},
"description": "各受信者とそのオプトイン状況(レポートを受信するのは active の受信者のみ)"
},
"blocks": {
"type": "array",
"items": {
"type": "string"
},
"description": "コンテンツブロック"
},
"attach_pdf": {
"type": "boolean"
},
"intro": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"enabled": {
"type": "boolean"
},
"last_sent_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"next_run_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
}
POST
/reports/:id/send_test.json
メールレポートをテストとして今すぐ送信
email_reports_send_test
権限: content.write
curl -X POST https://privatusanalytics.com/reports/:id/send_test.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"recipient": {
"type": "string",
"description": "テストの送信先(デフォルト: あなたのメールアドレス)"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"status": {
"type": "string",
"description": "sent、test、failed、skipped のいずれか"
},
"recipients_count": {
"type": "integer"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"sent_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/reports/:id.json
メールレポートを取得
email_reports_get
権限: analytics.read
curl https://privatusanalytics.com/reports/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "レポートID(例: rep_7Q2K9XH3AB)"
},
"name": {
"type": "string"
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "レポートに含まれるサイトID"
},
"frequency": {
"type": "string",
"description": "daily、weekly、monthly のいずれか"
},
"hour": {
"type": "integer",
"description": "送信する時刻(ワークスペースのタイムゾーン)"
},
"weekday": {
"type": "integer",
"description": "週次: 0 = 日曜日 … 6 = 土曜日"
},
"recipients": {
"type": "array",
"items": {
"type": "string"
},
"description": "ステータスを問わず、レポートに登録されたすべてのアドレス"
},
"recipient_details": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "受信者ID(例: rcp_7Q2K9XH3AB)"
},
"email": {
"type": "string",
"description": "アドレス"
},
"status": {
"type": "string",
"description": "active、pending、declined、unsubscribed のいずれか"
},
"invited_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "最後に招待を送信した日時"
},
{
"type": "null"
}
]
},
"expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "保留中の招待の有効期限"
},
{
"type": "null"
}
]
},
"confirmed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "アドレスが有効になった日時"
},
{
"type": "null"
}
]
}
}
},
"description": "各受信者とそのオプトイン状況(レポートを受信するのは active の受信者のみ)"
},
"blocks": {
"type": "array",
"items": {
"type": "string"
},
"description": "コンテンツブロック"
},
"attach_pdf": {
"type": "boolean"
},
"intro": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"enabled": {
"type": "boolean"
},
"last_sent_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"next_run_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
PATCH
/reports/:id.json
メールレポートを更新
email_reports_update
権限: content.write
curl -X PATCH https://privatusanalytics.com/reports/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "レポートに含めるサイトID(pa_…)"
},
"frequency": {
"type": "string",
"description": "daily、weekly(曜日指定)、monthly(1日)のいずれか",
"enum": [
"daily",
"weekly",
"monthly"
]
},
"hour": {
"type": "integer",
"description": "送信する時刻(0〜23、ワークスペースのタイムゾーン)"
},
"weekday": {
"type": "integer",
"description": "週次レポート: 0 = 日曜日 … 6 = 土曜日"
},
"recipients": {
"type": "array",
"items": {
"type": "string"
},
"description": "メールアドレス(アカウントは不要)。カンマまたは改行で区切れます。ワークスペースのメンバーはすぐに追加されます。それ以外の人には招待が届き、承諾した後にのみレポートを受信します。レポートの配信を停止したアドレスは拒否されます"
},
"blocks": {
"type": "array",
"items": {
"type": "string"
},
"description": "内容: kpis、chart、pages、sources、goals、campaigns、vitals、uptime"
},
"attach_pdf": {
"type": "boolean",
"description": "PDF版を添付する"
},
"intro": {
"type": "string",
"description": "カスタムの冒頭テキスト(最大2000文字)"
},
"enabled": {
"type": "boolean",
"description": "スケジュールどおりに送信する"
},
"name": {
"type": "string",
"description": "レポート名"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "レポートID(例: rep_7Q2K9XH3AB)"
},
"name": {
"type": "string"
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "レポートに含まれるサイトID"
},
"frequency": {
"type": "string",
"description": "daily、weekly、monthly のいずれか"
},
"hour": {
"type": "integer",
"description": "送信する時刻(ワークスペースのタイムゾーン)"
},
"weekday": {
"type": "integer",
"description": "週次: 0 = 日曜日 … 6 = 土曜日"
},
"recipients": {
"type": "array",
"items": {
"type": "string"
},
"description": "ステータスを問わず、レポートに登録されたすべてのアドレス"
},
"recipient_details": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "受信者ID(例: rcp_7Q2K9XH3AB)"
},
"email": {
"type": "string",
"description": "アドレス"
},
"status": {
"type": "string",
"description": "active、pending、declined、unsubscribed のいずれか"
},
"invited_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "最後に招待を送信した日時"
},
{
"type": "null"
}
]
},
"expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "保留中の招待の有効期限"
},
{
"type": "null"
}
]
},
"confirmed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "アドレスが有効になった日時"
},
{
"type": "null"
}
]
}
}
},
"description": "各受信者とそのオプトイン状況(レポートを受信するのは active の受信者のみ)"
},
"blocks": {
"type": "array",
"items": {
"type": "string"
},
"description": "コンテンツブロック"
},
"attach_pdf": {
"type": "boolean"
},
"intro": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"enabled": {
"type": "boolean"
},
"last_sent_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"next_run_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
POST
/reports/invites/:token/accept.json
レポートの招待を承諾
report_invites_accept
権限: public
· HTTPのみ(MCPツールではありません)
curl -X POST https://privatusanalytics.com/reports/invites/:token/accept.json \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"token": {
"type": "string",
"description": "リソースの Token"
}
},
"required": [
"token"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "受信者ID(例: rcp_7Q2K9XH3AB)"
},
"email": {
"type": "string",
"description": "アドレス"
},
"status": {
"type": "string",
"description": "active、pending、declined、unsubscribed のいずれか"
},
"invited_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "最後に招待を送信した日時"
},
{
"type": "null"
}
]
},
"expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "保留中の招待の有効期限"
},
{
"type": "null"
}
]
},
"confirmed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "アドレスが有効になった日時"
},
{
"type": "null"
}
]
}
}
}
POST
/reports/invites/:token/decline.json
レポートの招待を辞退
report_invites_decline
権限: public
· HTTPのみ(MCPツールではありません)
curl -X POST https://privatusanalytics.com/reports/invites/:token/decline.json \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"token": {
"type": "string",
"description": "リソースの Token"
}
},
"required": [
"token"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "受信者ID(例: rcp_7Q2K9XH3AB)"
},
"email": {
"type": "string",
"description": "アドレス"
},
"status": {
"type": "string",
"description": "active、pending、declined、unsubscribed のいずれか"
},
"invited_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "最後に招待を送信した日時"
},
{
"type": "null"
}
]
},
"expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "保留中の招待の有効期限"
},
{
"type": "null"
}
]
},
"confirmed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "アドレスが有効になった日時"
},
{
"type": "null"
}
]
}
}
}
POST
/reports/resubscribe/:token.json
配信停止後にレポートの受信を再開
report_resubscribes_confirm
権限: public
· HTTPのみ(MCPツールではありません)
curl -X POST https://privatusanalytics.com/reports/resubscribe/:token.json \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"token": {
"type": "string",
"description": "リソースの Token"
}
},
"required": [
"token"
]
}
{
"type": "object"
}
POST
/reports/unsubscribe/:token/resubscribe.json
レポートの受信を再開するためのリンクをアドレスにメールで送信
report_resubscribes_create
権限: public
· HTTPのみ(MCPツールではありません)
curl -X POST https://privatusanalytics.com/reports/unsubscribe/:token/resubscribe.json \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"token": {
"type": "string",
"description": "リソースの Token"
}
},
"required": [
"token"
]
}
{
"type": "object"
}
POST
/reports/unsubscribe/:token.json
メールレポートの配信停止をアドレス単位で登録
report_unsubscribes_create
権限: public
· HTTPのみ(MCPツールではありません)
curl -X POST https://privatusanalytics.com/reports/unsubscribe/:token.json \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"token": {
"type": "string",
"description": "リソースの Token"
}
},
"required": [
"token"
]
}
{
"type": "object"
}
ライブ
GET
/sites/:site_id/live.json
ライブ訪問者、アクティビティストリーム、今人気のもの(直近30分)
live_get
権限: analytics.read
curl https://privatusanalytics.com/sites/:site_id/live.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"feed": {
"type": "string",
"description": "アクティビティストリーム: すべてのヒット、ページビュー、またはカスタムイベント",
"enum": [
"all",
"pageviews",
"events"
],
"default": "all"
},
"limit": {
"type": "integer",
"description": "アクティビティストリームのエントリ数(最大100)",
"default": 50
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"site_id"
]
}
{
"type": "object"
}
GET
/sites/:site_id/live/wallboard.json
1つ以上のサイトのウォールボードカード(ライブと今日)
live_wallboard
権限: analytics.read
curl https://privatusanalytics.com/sites/:site_id/live/wallboard.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "切り替えて表示するサイトID(デフォルトはこのサイト)",
"default": []
},
"rotate_seconds": {
"type": "integer",
"description": "各サイトを画面に表示する秒数(5〜300)",
"default": 20
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"site_id"
]
}
{
"type": "object"
}
GET
/wallboard/:token.json
ウォールボードトークンによるウォールボード(ログイン不要)
live_public_wallboard
権限: public
· HTTPのみ(MCPツールではありません)
curl https://privatusanalytics.com/wallboard/:token.json
{
"type": "object",
"properties": {
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "切り替えて表示するサイトID(デフォルトはこのサイト)",
"default": []
},
"rotate_seconds": {
"type": "integer",
"description": "各サイトを画面に表示する秒数(5〜300)",
"default": 20
},
"token": {
"type": "string",
"description": "リソースの Token"
}
},
"required": [
"token"
]
}
{
"type": "object"
}
POST
/sites/:site_id/live/wallboard/links.json
ウォールボードリンクを作成(読み取り専用、無効化可能)
wallboard_links_create
権限: sites.manage
curl -X POST https://privatusanalytics.com/sites/:site_id/live/wallboard/links.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "ラベル(例: オフィスのテレビ)"
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "切り替えて表示する追加のサイト(このサイトは常に含まれます)",
"default": []
},
"rotate_seconds": {
"type": "integer",
"description": "切り替え時のサイトごとの秒数(5〜300)",
"default": 20
},
"expires_at": {
"type": "string",
"format": "date-time",
"description": "この日時以降、無効になる"
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"site_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "リンクID(例: shr_7Q2K9XH3AB)"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"url": {
"type": "string",
"description": "テレビで開いてください。ログイン不要です"
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "切り替えて表示するサイト"
},
"rotate_seconds": {
"type": "integer"
},
"expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"revoked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/sites/:site_id/live/wallboard/links/:id.json
ウォールボードリンクを無効化
wallboard_links_delete
権限: sites.manage
curl -X DELETE https://privatusanalytics.com/sites/:site_id/live/wallboard/links/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"site_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "リンクID(例: shr_7Q2K9XH3AB)"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"url": {
"type": "string",
"description": "テレビで開いてください。ログイン不要です"
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "切り替えて表示するサイト"
},
"rotate_seconds": {
"type": "integer"
},
"expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"revoked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/sites/:site_id/live/wallboard/links.json
サイトのウォールボードリンクを一覧表示
wallboard_links_list
権限: sites.manage
curl https://privatusanalytics.com/sites/:site_id/live/wallboard/links.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
},
"page": {
"type": "integer",
"description": "ページ(1から)"
},
"per_page": {
"type": "integer",
"description": "1ページあたりの結果数(最大100)"
}
},
"required": [
"site_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "リンクID(例: shr_7Q2K9XH3AB)"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"url": {
"type": "string",
"description": "テレビで開いてください。ログイン不要です"
},
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "切り替えて表示するサイト"
},
"rotate_seconds": {
"type": "integer"
},
"expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"revoked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
}
ロール
POST
/workspaces/:workspace_id/roles.json
カスタムロールを作成
roles_create
権限: members.manage
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/roles.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "ロール名",
"examples": [
"Client reviewer"
]
},
"permissions": {
"type": "array",
"items": {
"type": "string",
"enum": [
"analytics.read",
"analytics.export",
"content.write",
"sites.manage",
"uptime.manage",
"members.manage",
"tokens.manage",
"billing.manage",
"workspace.manage"
]
},
"description": "ロールに付与する権限"
},
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
}
},
"required": [
"name",
"permissions",
"workspace_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "カスタムロールID(メンバーの custom_role_id)"
},
"name": {
"type": "string"
},
"permissions": {
"type": "array",
"items": {
"type": "string"
},
"description": "付与された権限"
},
"members": {
"type": "integer",
"description": "このロールのメンバー"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/workspaces/:workspace_id/roles/:id.json
カスタムロールを削除(未使用である必要があります)
roles_delete
権限: members.manage
curl -X DELETE https://privatusanalytics.com/workspaces/:workspace_id/roles/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"workspace_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "カスタムロールID(メンバーの custom_role_id)"
},
"name": {
"type": "string"
},
"permissions": {
"type": "array",
"items": {
"type": "string"
},
"description": "付与された権限"
},
"members": {
"type": "integer",
"description": "このロールのメンバー"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/workspaces/:workspace_id/roles.json
カスタムロールを一覧表示
roles_list
権限: member
curl https://privatusanalytics.com/workspaces/:workspace_id/roles.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
},
"page": {
"type": "integer",
"description": "ページ(1から)"
},
"per_page": {
"type": "integer",
"description": "1ページあたりの結果数(最大100)"
}
},
"required": [
"workspace_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "カスタムロールID(メンバーの custom_role_id)"
},
"name": {
"type": "string"
},
"permissions": {
"type": "array",
"items": {
"type": "string"
},
"description": "付与された権限"
},
"members": {
"type": "integer",
"description": "このロールのメンバー"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
}
PATCH
/workspaces/:workspace_id/roles/:id.json
カスタムロールを更新
roles_update
権限: members.manage
curl -X PATCH https://privatusanalytics.com/workspaces/:workspace_id/roles/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "ロール名"
},
"permissions": {
"type": "array",
"items": {
"type": "string",
"enum": [
"analytics.read",
"analytics.export",
"content.write",
"sites.manage",
"uptime.manage",
"members.manage",
"tokens.manage",
"billing.manage",
"workspace.manage"
]
},
"description": "ロールに付与する権限"
},
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"workspace_id",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "カスタムロールID(メンバーの custom_role_id)"
},
"name": {
"type": "string"
},
"permissions": {
"type": "array",
"items": {
"type": "string"
},
"description": "付与された権限"
},
"members": {
"type": "integer",
"description": "このロールのメンバー"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
ワークスペース
GET
/workspaces/:workspace_id/white_label.json
ホワイトラベルのブランドを取得
white_label_get
権限: workspace.manage
curl https://privatusanalytics.com/workspaces/:workspace_id/white_label.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
}
},
"required": [
"workspace_id"
]
}
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string"
},
"brand_name": {
"anyOf": [
{
"type": "string",
"description": "Privatus Analytics の代わりに表示される名前"
},
{
"type": "null"
}
]
},
"brand_logo_url": {
"anyOf": [
{
"type": "string",
"description": "ロゴ画像のURL"
},
{
"type": "null"
}
]
},
"brand_color": {
"anyOf": [
{
"type": "string",
"description": "アクセントカラー"
},
{
"type": "null"
}
]
},
"hide_branding": {
"type": "boolean",
"description": "Privatus Analyticsのブランド表示は非表示"
},
"available": {
"type": "boolean",
"description": "プランにホワイトラベルが含まれている"
},
"active": {
"type": "boolean",
"description": "ブランドが現在適用されている"
}
}
}
PATCH
/workspaces/:workspace_id/white_label.json
共有ダッシュボードとメールレポート用のホワイトラベルのブランドを設定(Business)
white_label_update
権限: workspace.manage
curl -X PATCH https://privatusanalytics.com/workspaces/:workspace_id/white_label.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"brand_name": {
"type": "string",
"description": "Privatus Analytics の代わりに表示する名前(空欄で削除)"
},
"brand_logo_url": {
"type": "string",
"description": "ロゴ画像のhttps URL(空欄で削除)"
},
"brand_color": {
"type": "string",
"description": "アクセントカラー(例: #06755b)"
},
"hide_branding": {
"type": "boolean",
"description": "共有ダッシュボードとメールレポートの「Privatus Analytics」を非表示にする"
},
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
}
},
"required": [
"workspace_id"
]
}
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string"
},
"brand_name": {
"anyOf": [
{
"type": "string",
"description": "Privatus Analytics の代わりに表示される名前"
},
{
"type": "null"
}
]
},
"brand_logo_url": {
"anyOf": [
{
"type": "string",
"description": "ロゴ画像のURL"
},
{
"type": "null"
}
]
},
"brand_color": {
"anyOf": [
{
"type": "string",
"description": "アクセントカラー"
},
{
"type": "null"
}
]
},
"hide_branding": {
"type": "boolean",
"description": "Privatus Analyticsのブランド表示は非表示"
},
"available": {
"type": "boolean",
"description": "プランにホワイトラベルが含まれている"
},
"active": {
"type": "boolean",
"description": "ブランドが現在適用されている"
}
}
}
GET
/workspaces/:workspace_id/security.json
ワークスペースのセキュリティ設定を取得
workspace_security_get
権限: workspace.manage
curl https://privatusanalytics.com/workspaces/:workspace_id/security.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
}
},
"required": [
"workspace_id"
]
}
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string"
},
"enforce_2fa": {
"type": "boolean",
"description": "メンバーは2FAの設定が必須"
},
"login_methods": {
"type": "array",
"items": {
"type": "string"
},
"description": "許可するログイン方法"
},
"session_ttl_hours": {
"anyOf": [
{
"type": "integer",
"description": "セッションの有効期間(null = なし)"
},
{
"type": "null"
}
]
},
"app_ip_allowlist": {
"type": "array",
"items": {
"type": "string"
},
"description": "許可するIP/CIDR(空 = どこからでも)"
},
"support_access_until": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Privatus Analyticsサポートがワークスペースを閲覧できる期限"
},
{
"type": "null"
}
]
}
}
}
PATCH
/workspaces/:workspace_id/security.json
ワークスペースのセキュリティ設定を更新(2FA、ログイン方法、セッションの有効期間、IP許可リスト、サポートアクセス)
workspace_security_update
権限: workspace.manage
curl -X PATCH https://privatusanalytics.com/workspaces/:workspace_id/security.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"enforce_2fa": {
"type": "boolean",
"description": "メンバーに2FAの設定を必須にする"
},
"login_methods": {
"type": "array",
"items": {
"type": "string",
"enum": [
"password",
"magic_link",
"passkey",
"google",
"github",
"sso"
]
},
"description": "許可するログイン方法"
},
"session_ttl_hours": {
"type": "integer",
"description": "この時間が経過したらメンバーをサインアウトする(0 = 無制限)"
},
"app_ip_allowlist": {
"type": "array",
"items": {
"type": "string"
},
"description": "これらのIP/CIDRからのみアプリとAPIへのアクセスを許可する(Business)。空 = どこからでも"
},
"support_access": {
"type": "boolean",
"description": "Privatus Analyticsサポートに7日間ワークスペースの閲覧を許可する"
},
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
}
},
"required": [
"workspace_id"
]
}
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string"
},
"enforce_2fa": {
"type": "boolean",
"description": "メンバーは2FAの設定が必須"
},
"login_methods": {
"type": "array",
"items": {
"type": "string"
},
"description": "許可するログイン方法"
},
"session_ttl_hours": {
"anyOf": [
{
"type": "integer",
"description": "セッションの有効期間(null = なし)"
},
{
"type": "null"
}
]
},
"app_ip_allowlist": {
"type": "array",
"items": {
"type": "string"
},
"description": "許可するIP/CIDR(空 = どこからでも)"
},
"support_access_until": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Privatus Analyticsサポートがワークスペースを閲覧できる期限"
},
{
"type": "null"
}
]
}
}
}
POST
/workspaces.json
ワークスペースを作成(あなたがオーナーになります)
workspaces_create
権限: member
· HTTPのみ(MCPツールではありません)
curl -X POST https://privatusanalytics.com/workspaces.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "ワークスペース名",
"examples": [
"Acme Inc"
]
},
"timezone": {
"type": "string",
"description": "デフォルトのレポートのタイムゾーン(デフォルトはユーザーのもの)"
},
"currency": {
"type": "string",
"description": "デフォルトの通貨(ISO 4217)",
"default": "USD"
},
"how_heard": {
"type": "string",
"description": "当社をどこで知りましたか"
}
},
"required": [
"name"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
},
"name": {
"type": "string"
},
"timezone": {
"type": "string",
"description": "デフォルトのレポートのタイムゾーン"
},
"currency": {
"type": "string",
"description": "デフォルトの通貨"
},
"plan": {
"type": "string",
"description": "free、pro、business、enterprise のいずれか"
},
"plan_events": {
"type": "integer",
"description": "プランに含まれる月間イベント数"
},
"subscription_status": {
"type": "string"
},
"role": {
"type": "string",
"description": "このワークスペースでのあなたのロール"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/workspaces/:id.json
ワークスペースとそのすべてのサイトを削除(オーナーのみ。サブスクリプションも解約されます)
workspaces_delete
権限: workspace.manage
curl -X DELETE https://privatusanalytics.com/workspaces/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"confirm": {
"type": "string",
"description": "確認のためワークスペース名を入力してください"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"confirm",
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
},
"name": {
"type": "string"
},
"timezone": {
"type": "string",
"description": "デフォルトのレポートのタイムゾーン"
},
"currency": {
"type": "string",
"description": "デフォルトの通貨"
},
"plan": {
"type": "string",
"description": "free、pro、business、enterprise のいずれか"
},
"plan_events": {
"type": "integer",
"description": "プランに含まれる月間イベント数"
},
"subscription_status": {
"type": "string"
},
"role": {
"type": "string",
"description": "このワークスペースでのあなたのロール"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/workspaces.json
あなたのワークスペースを一覧表示
workspaces_list
権限: member
curl https://privatusanalytics.com/workspaces.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"page": {
"type": "integer",
"description": "ページ(1から)"
},
"per_page": {
"type": "integer",
"description": "1ページあたりの結果数(最大100)"
}
},
"required": []
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
},
"name": {
"type": "string"
},
"timezone": {
"type": "string",
"description": "デフォルトのレポートのタイムゾーン"
},
"currency": {
"type": "string",
"description": "デフォルトの通貨"
},
"plan": {
"type": "string",
"description": "free、pro、business、enterprise のいずれか"
},
"plan_events": {
"type": "integer",
"description": "プランに含まれる月間イベント数"
},
"subscription_status": {
"type": "string"
},
"role": {
"type": "string",
"description": "このワークスペースでのあなたのロール"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
}
GET
/workspaces/:id.json
ワークスペースを取得
workspaces_get
権限: member
curl https://privatusanalytics.com/workspaces/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
},
"name": {
"type": "string"
},
"timezone": {
"type": "string",
"description": "デフォルトのレポートのタイムゾーン"
},
"currency": {
"type": "string",
"description": "デフォルトの通貨"
},
"plan": {
"type": "string",
"description": "free、pro、business、enterprise のいずれか"
},
"plan_events": {
"type": "integer",
"description": "プランに含まれる月間イベント数"
},
"subscription_status": {
"type": "string"
},
"role": {
"type": "string",
"description": "このワークスペースでのあなたのロール"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
PATCH
/workspaces/:id.json
ワークスペース設定を更新
workspaces_update
権限: workspace.manage
curl -X PATCH https://privatusanalytics.com/workspaces/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "ワークスペース名"
},
"timezone": {
"type": "string",
"description": "デフォルトのレポートのタイムゾーン"
},
"currency": {
"type": "string",
"description": "デフォルトの通貨(ISO 4217)"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
},
"name": {
"type": "string"
},
"timezone": {
"type": "string",
"description": "デフォルトのレポートのタイムゾーン"
},
"currency": {
"type": "string",
"description": "デフォルトの通貨"
},
"plan": {
"type": "string",
"description": "free、pro、business、enterprise のいずれか"
},
"plan_events": {
"type": "integer",
"description": "プランに含まれる月間イベント数"
},
"subscription_status": {
"type": "string"
},
"role": {
"type": "string",
"description": "このワークスペースでのあなたのロール"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
共有
GET
/badge/:site_id.json
公開サイト用の訪問者カウンターバッジ(SVG)
badges_get
権限: public
· HTTPのみ(MCPツールではありません)
curl https://privatusanalytics.com/badge/:site_id.json
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"site_id"
]
}
{
"type": "object"
}
収集
POST
/api/logs.json
AIクローラーのレポート用にサーバーアクセスログを送信(JSON {lines: [...]} または combined 形式のログテキスト。サイトのインジェストキーをBearerトークンとして使用)
crawler_logs_create
権限: public
· HTTPのみ(MCPツールではありません)
curl -X POST https://privatusanalytics.com/api/logs.json \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"lines": {
"type": "array",
"items": {
"type": "object",
"properties": {
"ts": {
"type": "string"
},
"path": {
"type": "string",
"default": "/"
},
"status": {
"type": "integer"
},
"user_agent": {
"type": "string",
"default": ""
}
}
},
"description": "ログ行: [{ts, path, status, user_agent}](最大1000件)"
}
},
"required": [
"lines"
]
}
{
"type": "object"
}
POST
/api/event.json
ブラウザのヒットを収集(/js/pa.js が使用)
ingest_event
権限: public
· HTTPのみ(MCPツールではありません)
curl -X POST https://privatusanalytics.com/api/event.json \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site": {
"type": "string",
"description": "サイトID(pa_…)"
},
"type": {
"type": "string",
"description": "ヒットのタイプ",
"enum": [
"pageview",
"event",
"engagement",
"vital",
"click"
]
},
"url": {
"type": "string",
"description": "ページの完全なURL"
},
"referrer": {
"type": "string",
"description": "document.referrer"
},
"name": {
"type": "string",
"description": "イベント名(type=event)またはvital名"
},
"props": {
"type": "object",
"additionalProperties": true,
"description": "イベントプロパティ: 文字列/数値/真偽値を最大30個",
"default": {}
},
"screen_width": {
"type": "integer",
"description": "画面の幅(ピクセル)"
},
"language": {
"type": "string",
"description": "navigator.language"
},
"engaged_ms": {
"type": "integer",
"description": "ページの表示時間(エンゲージメント)"
},
"scroll_depth": {
"type": "integer",
"description": "最大スクロール深度(%)(エンゲージメント)"
},
"value": {
"type": "number",
"description": "Web Vitalの値(type=vital)"
},
"selector": {
"type": "string",
"description": "クリックされた要素のセレクター(type=click)"
},
"hash_mode": {
"type": "boolean",
"description": "#フラグメントを保持する(ハッシュルーティングのサイト)",
"default": false
},
"dnt": {
"type": "boolean",
"description": "Do Not Trackが有効",
"default": false
},
"gpc": {
"type": "boolean",
"description": "Global Privacy Controlが有効",
"default": false
},
"interacted": {
"type": "boolean",
"description": "ページ上で信頼できる入力(ポインター、キー、タッチ、ホイール)が確認されたら 1、それ以前は 0。座標やタイミングは含みません"
},
"revenue": {
"type": "number",
"description": "収益(通貨の主単位、例: 49.99)"
},
"currency": {
"type": "string",
"description": "収益のISO 4217通貨"
}
},
"required": [
"site",
"type",
"url"
]
}
{
"type": "object"
}
POST
/api/events.json
サイトのインジェストキーでサーバーサイドのイベントを収集
ingest_events
権限: public
· HTTPのみ(MCPツールではありません)
curl -X POST https://privatusanalytics.com/api/events.json \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"events": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
},
"description": "最大100件のイベント"
}
},
"required": [
"events"
]
}
{
"type": "object"
}
GET
/api/pixel.json
JavaScriptなしでページビューを収集(1×1 GIF)
ingest_pixel
権限: public
· HTTPのみ(MCPツールではありません)
curl https://privatusanalytics.com/api/pixel.json
{
"type": "object",
"properties": {},
"required": []
}
{
"type": "object"
}
検索
GET
/sites/:site_id/search.json
検索レポート: クリック数、表示回数、CTR、掲載順位、上位のクエリ・ページ、ランディングページ、改善の機会
search_report
権限: analytics.read
curl https://privatusanalytics.com/sites/:site_id/search.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"period": {
"type": "string",
"description": "期間のプリセット。from/to を使うには custom を指定",
"enum": [
"today",
"yesterday",
"24h",
"7d",
"14d",
"28d",
"30d",
"90d",
"mtd",
"last_month",
"qtd",
"last_quarter",
"ytd",
"12mo",
"last_year",
"all",
"custom"
],
"default": "30d"
},
"from": {
"type": "string",
"format": "date",
"description": "カスタム期間の開始(サイトのタイムゾーン)"
},
"to": {
"type": "string",
"format": "date",
"description": "カスタム期間の終了(この日を含む)"
},
"compare": {
"type": "string",
"description": "比較期間",
"enum": [
"none",
"previous_period",
"previous_year",
"custom"
],
"default": "none"
},
"compare_from": {
"type": "string",
"format": "date",
"description": "カスタム比較の開始"
},
"compare_to": {
"type": "string",
"format": "date",
"description": "カスタム比較の終了"
},
"match_weekday": {
"type": "boolean",
"description": "比較する日の曜日をそろえる",
"default": false
},
"filters": {
"type": "array",
"items": {},
"description": "フィルター: [[\"dimension\",\"operator\",\"value\"], …]。演算子: is、is_not、any_of、none_of、contains、not_contains、starts_with、regex、not_regex、gt、lt、between。OR条件にする場合は {\"any\": [...]} で条件をまとめます。",
"default": []
},
"segment_id": {
"type": "string",
"description": "保存済みのセグメントを適用(seg_…)"
},
"include_imported": {
"type": "boolean",
"description": "インポートした過去データを追加(最初のネイティブイベントより前の日付が対象。フィルターやセグメントを適用している場合は無視されます)",
"default": false
},
"provider": {
"type": "string",
"description": "google(Search Console)または bing",
"enum": [
"google",
"bing"
],
"default": "google"
},
"limit": {
"type": "integer",
"description": "テーブルごとの行数(最大100)",
"default": 25
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"site_id"
]
}
{
"type": "object"
}
POST
/sites/:site_id/search/connections.json
Search Consoleのプロパティ、またはBingのサイトを接続
search_connect
権限: sites.manage
curl -X POST https://privatusanalytics.com/sites/:site_id/search/connections.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"provider": {
"type": "string",
"description": "google または bing",
"enum": [
"google",
"bing"
],
"default": "google"
},
"property": {
"type": "string",
"description": "Search Consoleのプロパティ(例: sc-domain:example.com)またはBingのサイトURL",
"examples": [
"sc-domain:example.com"
]
},
"bing_api_key": {
"type": "string",
"description": "ご自身の Bing Webmaster Tools APIキー(Settings > API access)。provider が bing の場合は必須です。暗号化して保存され、返されることはありません。"
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"property",
"site_id"
]
}
{
"type": "object",
"properties": {
"provider": {
"type": "string",
"description": "google または bing"
},
"property": {
"type": "string",
"description": "Search ConsoleのプロパティまたはBingのサイトURL"
},
"status": {
"type": "string",
"description": "active または error"
},
"last_synced_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/sites/:site_id/search/connections/:provider.json
Search ConsoleまたはBingの接続を解除し、そのデータを削除
search_disconnect
権限: sites.manage
curl -X DELETE https://privatusanalytics.com/sites/:site_id/search/connections/:provider.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
},
"provider": {
"type": "string",
"description": "リソースの Provider"
}
},
"required": [
"site_id",
"provider"
]
}
{
"type": "object",
"properties": {
"provider": {
"type": "string",
"description": "google または bing"
},
"property": {
"type": "string",
"description": "Search ConsoleのプロパティまたはBingのサイトURL"
},
"status": {
"type": "string",
"description": "active または error"
},
"last_synced_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
POST
/sites/:site_id/search/properties.json
接続可能なプロパティを一覧表示(Search ConsoleにはブラウザからのGoogleの許可が必要です)
search_properties
権限: sites.manage
curl -X POST https://privatusanalytics.com/sites/:site_id/search/properties.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"provider": {
"type": "string",
"description": "google または bing",
"enum": [
"google",
"bing"
],
"default": "google"
},
"bing_api_key": {
"type": "string",
"description": "ご自身の Bing Webmaster Tools APIキー(Settings > API access)。provider が bing の場合は必須です。そのキーで参照できるサイトの一覧取得にのみ使用します。"
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"site_id"
]
}
{
"type": "object"
}
POST
/sites/:site_id/search/sync.json
検索データを今すぐインポート
search_sync
権限: sites.manage
curl -X POST https://privatusanalytics.com/sites/:site_id/search/sync.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"provider": {
"type": "string",
"description": "google または bing",
"enum": [
"google",
"bing"
],
"default": "google"
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"site_id"
]
}
{
"type": "object",
"properties": {
"provider": {
"type": "string",
"description": "google または bing"
},
"property": {
"type": "string",
"description": "Search ConsoleのプロパティまたはBingのサイトURL"
},
"status": {
"type": "string",
"description": "active または error"
},
"last_synced_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
監査ログ
GET
/workspaces/:workspace_id/audit_log.json
監査ログのエントリを一覧表示(.csv を付けるとエクスポート)
audit_logs_get
権限: workspace.manage
curl https://privatusanalytics.com/workspaces/:workspace_id/audit_log.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"actor": {
"type": "string",
"description": "このメンバー(メールアドレス)による変更のみ"
},
"item_type": {
"type": "string",
"description": "この種類のレコードのみ(例: Site)"
},
"event": {
"type": "string",
"description": "このアクションのみ",
"enum": [
"create",
"update",
"destroy"
]
},
"from": {
"type": "string",
"format": "date",
"description": "開始日(この日を含む)"
},
"to": {
"type": "string",
"format": "date",
"description": "終了日(この日を含む)"
},
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
},
"page": {
"type": "integer",
"description": "ページ(1から)"
},
"per_page": {
"type": "integer",
"description": "1ページあたりの結果数(最大100)"
}
},
"required": [
"workspace_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "日時"
},
"event": {
"type": "string",
"description": "create、update、destroy のいずれか"
},
"item_type": {
"type": "string",
"description": "レコードの種類(例: Site)"
},
"item_id": {
"type": "string",
"format": "uuid"
},
"target": {
"type": "string",
"description": "対象のレコード(名前がわかる場合は名前)"
},
"actor_email": {
"anyOf": [
{
"type": "string",
"description": "変更を行ったメンバー"
},
{
"type": "null"
}
]
},
"actor_name": {
"type": "string"
},
"token_name": {
"anyOf": [
{
"type": "string",
"description": "使用したAPIトークン(ある場合)"
},
{
"type": "null"
}
]
},
"changes": {
"type": "object",
"description": "変更されたフィールド: { field: [変更前, 変更後] }"
},
"ip": {
"anyOf": [
{
"type": "string",
"description": "メンバーのIPアドレス"
},
{
"type": "null"
}
]
}
}
}
}
計測
POST
/sites/:site_id/tracking/ingest_key.json
サーバー用のインジェストキーを作成またはローテーション(一度だけ表示されます)
tracking_ingest_key_rotate
権限: sites.manage
curl -X POST https://privatusanalytics.com/sites/:site_id/tracking/ingest_key.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"site_id"
]
}
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "サイトID"
},
"key": {
"type": "string",
"description": "インジェストキー。一度だけ表示されるので、今すぐ保管してください。Bearerトークンとして POST /api/events に送信します"
},
"prefix": {
"type": "string",
"description": "設定に表示されるキーのプレフィックス"
}
}
}
DELETE
/sites/:site_id/tracking/ingest_key.json
サーバー用のインジェストキーを無効化
tracking_ingest_key_revoke
権限: sites.manage
curl -X DELETE https://privatusanalytics.com/sites/:site_id/tracking/ingest_key.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"site_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "計測スニペットで使用するサイトID"
},
"workspace_id": {
"type": "string"
},
"domain": {
"type": "string"
},
"name": {
"type": "string"
},
"extra_domains": {
"type": "array",
"items": {
"type": "string"
}
},
"multi_domain_mode": {
"type": "string"
},
"timezone": {
"type": "string"
},
"currency": {
"type": "string"
},
"week_start": {
"type": "integer"
},
"labels": {
"type": "array",
"items": {
"type": "string"
}
},
"honor_dnt": {
"type": "boolean"
},
"honor_gpc": {
"type": "boolean"
},
"pii_scrubber": {
"type": "boolean"
},
"redaction_rules": {
"type": "array"
},
"allowed_params": {
"type": "array",
"items": {
"type": "string"
}
},
"path_masks": {
"type": "array"
},
"retention_months": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"bot_filtering": {
"type": "boolean"
},
"traffic_rule_modes": {
"type": "object"
},
"vitals_sample_rate": {
"type": "integer"
},
"conversion_denominator": {
"type": "string"
},
"public_dashboard": {
"type": "boolean"
},
"public_indexable": {
"type": "boolean"
},
"ingest_key_prefix": {
"anyOf": [
{
"type": "string",
"description": "サーバー用インジェストキーの先頭部分"
},
{
"type": "null"
}
]
},
"verified_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"first_event_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"last_event_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"snippet": {
"type": "string",
"description": "HTMLの計測スニペット"
},
"favorite": {
"type": "boolean",
"description": "自分がスターを付けた"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
POST
/sites/:site_id/tracking/verify.json
サイトにトラッカーがインストールされているか確認(scriptタグ、サイトID、CSP、リファラーポリシー)
tracking_verify
権限: sites.manage
curl -X POST https://privatusanalytics.com/sites/:site_id/tracking/verify.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "チェックするページ(デフォルトは https://<domain>/)"
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"site_id"
]
}
{
"type": "object"
}
GET
/sites/:site_id/tracking/snippet.json
選択したオプションの計測スニペットを作成
tracking_snippet
権限: analytics.read
curl https://privatusanalytics.com/sites/:site_id/tracking/snippet.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"modules": {
"type": "array",
"items": {
"type": "string"
},
"description": "オプションのモジュール: auto(外部リンク、ダウンロード、フォーム、404)、engage(時間とスクロール)、vitals(Web Vitals)、clicks",
"default": [
"engage"
]
},
"manual": {
"type": "boolean",
"description": "自動のページビューをオフにする",
"default": false
},
"spa": {
"type": "string",
"description": "シングルページアプリのナビゲーション計測",
"enum": [
"auto",
"history",
"hash",
"off"
],
"default": "auto"
},
"domains": {
"type": "array",
"items": {
"type": "string"
},
"description": "これらのホスト名でのみ計測する",
"default": []
},
"exclude": {
"type": "array",
"items": {
"type": "string"
},
"description": "計測しないパスのglob(例: /admin/*)",
"default": []
},
"query_params": {
"type": "array",
"items": {
"type": "string"
},
"description": "追加で残すクエリパラメーター(例: page)",
"default": []
},
"mask": {
"type": "array",
"items": {
"type": "string"
},
"description": "クライアント側のパスマスク(例: /u/*->/u/:id)",
"default": []
},
"site_id": {
"type": "string",
"description": "サイトID(例: pa_7Q2K9XH3AB)"
}
},
"required": [
"site_id"
]
}
{
"type": "object"
}
請求
POST
/workspaces/:workspace_id/billing/badge.json
バッジ特典への参加・不参加を切り替え(無料プラン)
billing_badge
権限: billing.manage
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/billing/badge.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"enabled": {
"type": "boolean",
"description": "true でバッジを確認し、特典を獲得する"
},
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
}
},
"required": [
"enabled",
"workspace_id"
]
}
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string"
},
"plan": {
"type": "string",
"description": "free、pro、business、enterprise のいずれか"
},
"plan_events": {
"type": "integer",
"description": "有料ティアの月間イベント数"
},
"allowance": {
"type": "integer",
"description": "バッジ特典を含む月間イベント数"
},
"billing_interval": {
"anyOf": [
{
"type": "string",
"description": "month または year"
},
{
"type": "null"
}
]
},
"price": {
"anyOf": [
{
"type": "integer",
"description": "請求間隔ごとの料金(USD)"
},
{
"type": "null"
}
]
},
"subscription_status": {
"type": "string",
"description": "none、trialing、active、past_due、paused、canceled のいずれか"
},
"current_period_ends_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "更新または終了する日時"
},
{
"type": "null"
}
]
},
"cancel_at_period_end": {
"type": "boolean"
},
"canceled_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"auto_upgrade": {
"type": "boolean"
},
"discount": {
"anyOf": [
{
"type": "object",
"properties": {
"program": {
"type": "string",
"description": "nonprofit、education、open_source、open_source_free、agency のいずれか"
},
"status": {
"type": "string",
"description": "pending、approved(サブスクリプションには未適用)、active、rejected、revoked のいずれか"
},
"percent": {
"anyOf": [
{
"type": "integer",
"description": "ProとBusinessの割引率(無料のオープンソースプログラムでは null)"
},
{
"type": "null"
}
]
},
"comp_events": {
"anyOf": [
{
"type": "integer",
"description": "月間の無料イベント数(無料のオープンソースプログラムのみ)"
},
{
"type": "null"
}
]
},
"organization_name": {
"type": "string",
"description": "組織、学校、プロジェクト、代理店の名前"
},
"website": {
"anyOf": [
{
"type": "string",
"description": "ウェブサイト"
},
{
"type": "null"
}
]
},
"proof_url": {
"anyOf": [
{
"type": "string",
"description": "証明となるリンクまたはリポジトリのURL"
},
{
"type": "null"
}
]
},
"license": {
"anyOf": [
{
"type": "string",
"description": "OSIライセンス(オープンソース)"
},
{
"type": "null"
}
]
},
"note": {
"anyOf": [
{
"type": "string",
"description": "審査向けのメモ"
},
{
"type": "null"
}
]
},
"rejection_reason": {
"anyOf": [
{
"type": "string",
"description": "申請が承認されなかった理由"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "申請日時"
},
"reviewed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "審査日時"
},
{
"type": "null"
}
]
},
"applied_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "割引が有効になった日時"
},
{
"type": "null"
}
]
},
"revoked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "プログラムが終了した日時"
},
{
"type": "null"
}
]
}
},
"description": "最新の割引プログラム申請、または null"
},
{
"type": "null"
}
]
},
"discount_percent": {
"anyOf": [
{
"type": "integer",
"description": "承認済みプログラムによるProとBusinessの割引率、または null"
},
{
"type": "null"
}
]
},
"billing_emails": {
"type": "array",
"items": {
"type": "string"
}
},
"tax_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"badge": {
"type": "object",
"description": "バッジ特典(無料プラン)"
},
"usage": {
"type": "object",
"properties": {
"month": {
"type": "string",
"format": "date",
"description": "対象月の初日"
},
"events": {
"type": "integer",
"description": "課金対象のイベント(ページビューとカスタムイベント)"
},
"bots": {
"type": "integer",
"description": "除外されたボットのヒット(課金対象外)"
},
"allowance": {
"type": "integer",
"description": "バッジ特典を含む、プランに含まれるイベント数"
},
"percent": {
"type": "number",
"description": "上限に対するイベント数の割合(%)"
},
"forecast": {
"anyOf": [
{
"type": "integer",
"description": "月末時点のイベント数の予測"
},
{
"type": "null"
}
]
},
"forecast_percent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"days_left": {
"type": "integer",
"description": "今月の残り日数"
},
"status": {
"type": "string",
"description": "ok、warning(80%以上)、over(過去の月で上限以上)、locked、paused のいずれか"
},
"sites": {
"type": "array",
"items": {
"type": "object",
"properties": {
"site_id": {
"type": "string"
},
"domain": {
"type": "string"
},
"name": {
"type": "string"
},
"events": {
"type": "integer",
"description": "今月のページビューとカスタムイベント"
},
"share": {
"type": "number",
"description": "ワークスペース全体に占める割合(%)"
}
}
},
"description": "サイト別のイベント数"
},
"history": {
"type": "array",
"description": "過去の月(新しい順)"
},
"access_locked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Privatus Analyticsのスタッフがダッシュボードをロックした日時"
},
{
"type": "null"
}
]
},
"collection_paused": {
"type": "boolean",
"description": "新しいイベントが破棄されている間は true(月間上限に達した、またはスタッフが収集を一時停止した場合)"
},
"pause_reason": {
"anyOf": [
{
"type": "string",
"description": "収集が一時停止されている理由: limit(月間上限に達した)または staff。収集中は null"
},
{
"type": "null"
}
]
},
"collection_paused_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "スタッフが収集を一時停止した日時"
},
{
"type": "null"
}
]
},
"resumes_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "上限による一時停止が解除される日時: 翌月の開始時(UTC)、またはアップグレードした場合はそれより前。それ以外は null"
},
{
"type": "null"
}
]
}
},
"description": "今月のこれまでの使用量"
}
}
}
POST
/workspaces/:workspace_id/billing/cancel.json
請求期間の終了時に解約
billing_cancel
権限: billing.manage
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/billing/cancel.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"reason": {
"type": "string",
"description": "解約の主な理由(任意のアンケート)",
"enum": [
"too_expensive",
"missing_features",
"switching_tool",
"not_using",
"temporary",
"other"
]
},
"comment": {
"type": "string",
"description": "改善できる点があればお聞かせください"
},
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
}
},
"required": [
"workspace_id"
]
}
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string"
},
"plan": {
"type": "string",
"description": "free、pro、business、enterprise のいずれか"
},
"plan_events": {
"type": "integer",
"description": "有料ティアの月間イベント数"
},
"allowance": {
"type": "integer",
"description": "バッジ特典を含む月間イベント数"
},
"billing_interval": {
"anyOf": [
{
"type": "string",
"description": "month または year"
},
{
"type": "null"
}
]
},
"price": {
"anyOf": [
{
"type": "integer",
"description": "請求間隔ごとの料金(USD)"
},
{
"type": "null"
}
]
},
"subscription_status": {
"type": "string",
"description": "none、trialing、active、past_due、paused、canceled のいずれか"
},
"current_period_ends_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "更新または終了する日時"
},
{
"type": "null"
}
]
},
"cancel_at_period_end": {
"type": "boolean"
},
"canceled_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"auto_upgrade": {
"type": "boolean"
},
"discount": {
"anyOf": [
{
"type": "object",
"properties": {
"program": {
"type": "string",
"description": "nonprofit、education、open_source、open_source_free、agency のいずれか"
},
"status": {
"type": "string",
"description": "pending、approved(サブスクリプションには未適用)、active、rejected、revoked のいずれか"
},
"percent": {
"anyOf": [
{
"type": "integer",
"description": "ProとBusinessの割引率(無料のオープンソースプログラムでは null)"
},
{
"type": "null"
}
]
},
"comp_events": {
"anyOf": [
{
"type": "integer",
"description": "月間の無料イベント数(無料のオープンソースプログラムのみ)"
},
{
"type": "null"
}
]
},
"organization_name": {
"type": "string",
"description": "組織、学校、プロジェクト、代理店の名前"
},
"website": {
"anyOf": [
{
"type": "string",
"description": "ウェブサイト"
},
{
"type": "null"
}
]
},
"proof_url": {
"anyOf": [
{
"type": "string",
"description": "証明となるリンクまたはリポジトリのURL"
},
{
"type": "null"
}
]
},
"license": {
"anyOf": [
{
"type": "string",
"description": "OSIライセンス(オープンソース)"
},
{
"type": "null"
}
]
},
"note": {
"anyOf": [
{
"type": "string",
"description": "審査向けのメモ"
},
{
"type": "null"
}
]
},
"rejection_reason": {
"anyOf": [
{
"type": "string",
"description": "申請が承認されなかった理由"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "申請日時"
},
"reviewed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "審査日時"
},
{
"type": "null"
}
]
},
"applied_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "割引が有効になった日時"
},
{
"type": "null"
}
]
},
"revoked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "プログラムが終了した日時"
},
{
"type": "null"
}
]
}
},
"description": "最新の割引プログラム申請、または null"
},
{
"type": "null"
}
]
},
"discount_percent": {
"anyOf": [
{
"type": "integer",
"description": "承認済みプログラムによるProとBusinessの割引率、または null"
},
{
"type": "null"
}
]
},
"billing_emails": {
"type": "array",
"items": {
"type": "string"
}
},
"tax_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"badge": {
"type": "object",
"description": "バッジ特典(無料プラン)"
},
"usage": {
"type": "object",
"properties": {
"month": {
"type": "string",
"format": "date",
"description": "対象月の初日"
},
"events": {
"type": "integer",
"description": "課金対象のイベント(ページビューとカスタムイベント)"
},
"bots": {
"type": "integer",
"description": "除外されたボットのヒット(課金対象外)"
},
"allowance": {
"type": "integer",
"description": "バッジ特典を含む、プランに含まれるイベント数"
},
"percent": {
"type": "number",
"description": "上限に対するイベント数の割合(%)"
},
"forecast": {
"anyOf": [
{
"type": "integer",
"description": "月末時点のイベント数の予測"
},
{
"type": "null"
}
]
},
"forecast_percent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"days_left": {
"type": "integer",
"description": "今月の残り日数"
},
"status": {
"type": "string",
"description": "ok、warning(80%以上)、over(過去の月で上限以上)、locked、paused のいずれか"
},
"sites": {
"type": "array",
"items": {
"type": "object",
"properties": {
"site_id": {
"type": "string"
},
"domain": {
"type": "string"
},
"name": {
"type": "string"
},
"events": {
"type": "integer",
"description": "今月のページビューとカスタムイベント"
},
"share": {
"type": "number",
"description": "ワークスペース全体に占める割合(%)"
}
}
},
"description": "サイト別のイベント数"
},
"history": {
"type": "array",
"description": "過去の月(新しい順)"
},
"access_locked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Privatus Analyticsのスタッフがダッシュボードをロックした日時"
},
{
"type": "null"
}
]
},
"collection_paused": {
"type": "boolean",
"description": "新しいイベントが破棄されている間は true(月間上限に達した、またはスタッフが収集を一時停止した場合)"
},
"pause_reason": {
"anyOf": [
{
"type": "string",
"description": "収集が一時停止されている理由: limit(月間上限に達した)または staff。収集中は null"
},
{
"type": "null"
}
]
},
"collection_paused_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "スタッフが収集を一時停止した日時"
},
{
"type": "null"
}
]
},
"resumes_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "上限による一時停止が解除される日時: 翌月の開始時(UTC)、またはアップグレードした場合はそれより前。それ以外は null"
},
{
"type": "null"
}
]
}
},
"description": "今月のこれまでの使用量"
}
}
}
POST
/workspaces/:workspace_id/billing/change_plan.json
プラン、ティア、請求間隔を変更(日割り計算)
billing_change_plan
権限: billing.manage
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/billing/change_plan.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"plan": {
"type": "string",
"description": "切り替え先のプラン: pro または business",
"enum": [
"pro",
"business"
]
},
"events": {
"type": "integer",
"description": "ティアの月間イベント数(GET /plans から取得)",
"examples": [
1000000
]
},
"interval": {
"type": "string",
"description": "請求間隔。年払いは2か月分無料",
"enum": [
"month",
"year"
],
"default": "month"
},
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
}
},
"required": [
"plan",
"events",
"workspace_id"
]
}
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string"
},
"plan": {
"type": "string",
"description": "free、pro、business、enterprise のいずれか"
},
"plan_events": {
"type": "integer",
"description": "有料ティアの月間イベント数"
},
"allowance": {
"type": "integer",
"description": "バッジ特典を含む月間イベント数"
},
"billing_interval": {
"anyOf": [
{
"type": "string",
"description": "month または year"
},
{
"type": "null"
}
]
},
"price": {
"anyOf": [
{
"type": "integer",
"description": "請求間隔ごとの料金(USD)"
},
{
"type": "null"
}
]
},
"subscription_status": {
"type": "string",
"description": "none、trialing、active、past_due、paused、canceled のいずれか"
},
"current_period_ends_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "更新または終了する日時"
},
{
"type": "null"
}
]
},
"cancel_at_period_end": {
"type": "boolean"
},
"canceled_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"auto_upgrade": {
"type": "boolean"
},
"discount": {
"anyOf": [
{
"type": "object",
"properties": {
"program": {
"type": "string",
"description": "nonprofit、education、open_source、open_source_free、agency のいずれか"
},
"status": {
"type": "string",
"description": "pending、approved(サブスクリプションには未適用)、active、rejected、revoked のいずれか"
},
"percent": {
"anyOf": [
{
"type": "integer",
"description": "ProとBusinessの割引率(無料のオープンソースプログラムでは null)"
},
{
"type": "null"
}
]
},
"comp_events": {
"anyOf": [
{
"type": "integer",
"description": "月間の無料イベント数(無料のオープンソースプログラムのみ)"
},
{
"type": "null"
}
]
},
"organization_name": {
"type": "string",
"description": "組織、学校、プロジェクト、代理店の名前"
},
"website": {
"anyOf": [
{
"type": "string",
"description": "ウェブサイト"
},
{
"type": "null"
}
]
},
"proof_url": {
"anyOf": [
{
"type": "string",
"description": "証明となるリンクまたはリポジトリのURL"
},
{
"type": "null"
}
]
},
"license": {
"anyOf": [
{
"type": "string",
"description": "OSIライセンス(オープンソース)"
},
{
"type": "null"
}
]
},
"note": {
"anyOf": [
{
"type": "string",
"description": "審査向けのメモ"
},
{
"type": "null"
}
]
},
"rejection_reason": {
"anyOf": [
{
"type": "string",
"description": "申請が承認されなかった理由"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "申請日時"
},
"reviewed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "審査日時"
},
{
"type": "null"
}
]
},
"applied_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "割引が有効になった日時"
},
{
"type": "null"
}
]
},
"revoked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "プログラムが終了した日時"
},
{
"type": "null"
}
]
}
},
"description": "最新の割引プログラム申請、または null"
},
{
"type": "null"
}
]
},
"discount_percent": {
"anyOf": [
{
"type": "integer",
"description": "承認済みプログラムによるProとBusinessの割引率、または null"
},
{
"type": "null"
}
]
},
"billing_emails": {
"type": "array",
"items": {
"type": "string"
}
},
"tax_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"badge": {
"type": "object",
"description": "バッジ特典(無料プラン)"
},
"usage": {
"type": "object",
"properties": {
"month": {
"type": "string",
"format": "date",
"description": "対象月の初日"
},
"events": {
"type": "integer",
"description": "課金対象のイベント(ページビューとカスタムイベント)"
},
"bots": {
"type": "integer",
"description": "除外されたボットのヒット(課金対象外)"
},
"allowance": {
"type": "integer",
"description": "バッジ特典を含む、プランに含まれるイベント数"
},
"percent": {
"type": "number",
"description": "上限に対するイベント数の割合(%)"
},
"forecast": {
"anyOf": [
{
"type": "integer",
"description": "月末時点のイベント数の予測"
},
{
"type": "null"
}
]
},
"forecast_percent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"days_left": {
"type": "integer",
"description": "今月の残り日数"
},
"status": {
"type": "string",
"description": "ok、warning(80%以上)、over(過去の月で上限以上)、locked、paused のいずれか"
},
"sites": {
"type": "array",
"items": {
"type": "object",
"properties": {
"site_id": {
"type": "string"
},
"domain": {
"type": "string"
},
"name": {
"type": "string"
},
"events": {
"type": "integer",
"description": "今月のページビューとカスタムイベント"
},
"share": {
"type": "number",
"description": "ワークスペース全体に占める割合(%)"
}
}
},
"description": "サイト別のイベント数"
},
"history": {
"type": "array",
"description": "過去の月(新しい順)"
},
"access_locked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Privatus Analyticsのスタッフがダッシュボードをロックした日時"
},
{
"type": "null"
}
]
},
"collection_paused": {
"type": "boolean",
"description": "新しいイベントが破棄されている間は true(月間上限に達した、またはスタッフが収集を一時停止した場合)"
},
"pause_reason": {
"anyOf": [
{
"type": "string",
"description": "収集が一時停止されている理由: limit(月間上限に達した)または staff。収集中は null"
},
{
"type": "null"
}
]
},
"collection_paused_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "スタッフが収集を一時停止した日時"
},
{
"type": "null"
}
]
},
"resumes_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "上限による一時停止が解除される日時: 翌月の開始時(UTC)、またはアップグレードした場合はそれより前。それ以外は null"
},
{
"type": "null"
}
]
}
},
"description": "今月のこれまでの使用量"
}
}
}
POST
/workspaces/:workspace_id/billing/checkout.json
有料プランのPaddleチェックアウトを開始
billing_checkout
権限: billing.manage
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/billing/checkout.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"plan": {
"type": "string",
"description": "切り替え先のプラン: pro または business",
"enum": [
"pro",
"business"
]
},
"events": {
"type": "integer",
"description": "ティアの月間イベント数(GET /plans から取得)",
"examples": [
1000000
]
},
"interval": {
"type": "string",
"description": "請求間隔。年払いは2か月分無料",
"enum": [
"month",
"year"
],
"default": "month"
},
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
}
},
"required": [
"plan",
"events",
"workspace_id"
]
}
{
"type": "object",
"properties": {
"transaction_id": {
"type": "string",
"description": "Paddleのトランザクションid(txn_...)"
},
"url": {
"anyOf": [
{
"type": "string",
"description": "ホスト型チェックアウトのURL"
},
{
"type": "null"
}
]
},
"price_id": {
"type": "string"
},
"plan": {
"type": "string"
},
"events": {
"type": "integer"
},
"interval": {
"type": "string"
},
"amount": {
"type": "integer",
"description": "請求間隔ごとのUSD"
},
"client_token": {
"anyOf": [
{
"type": "string",
"description": "Paddle.jsのクライアント側トークン"
},
{
"type": "null"
}
]
},
"environment": {
"type": "string",
"description": "sandbox または production"
},
"custom_data": {
"type": "object",
"description": "サブスクリプションを紐付けるためにPaddleへ渡されます"
},
"discount_id": {
"anyOf": [
{
"type": "string",
"description": "承認済みプログラムのPaddle割引ID。このチェックアウトに適用されます"
},
{
"type": "null"
}
]
}
}
}
POST
/workspaces/:workspace_id/billing/discount.json
非営利団体、教育機関、オープンソース向け割引を申請
billing_discount
権限: billing.manage
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/billing/discount.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"program": {
"type": "string",
"description": "nonprofit、education、open_source(50%オフ)、open_source_free(月間1MイベントまでProが無料)、agency(所有するすべてのワークスペースが20%オフ)のいずれか",
"enum": [
"nonprofit",
"education",
"open_source",
"open_source_free",
"agency"
]
},
"organization_name": {
"type": "string",
"description": "組織、学校、プロジェクト、代理店の名前"
},
"website": {
"type": "string",
"description": "そのウェブサイト"
},
"proof_url": {
"type": "string",
"description": "証明となるリンク。オープンソースの場合はリポジトリのURL"
},
"license": {
"type": "string",
"description": "プロジェクトのOSIライセンス(オープンソースのみ)"
},
"note": {
"type": "string",
"description": "審査の参考になる情報(1,000文字まで)"
},
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
}
},
"required": [
"program",
"organization_name",
"workspace_id"
]
}
{
"type": "object",
"properties": {
"program": {
"type": "string",
"description": "nonprofit、education、open_source、open_source_free、agency のいずれか"
},
"status": {
"type": "string",
"description": "pending、approved(サブスクリプションには未適用)、active、rejected、revoked のいずれか"
},
"percent": {
"anyOf": [
{
"type": "integer",
"description": "ProとBusinessの割引率(無料のオープンソースプログラムでは null)"
},
{
"type": "null"
}
]
},
"comp_events": {
"anyOf": [
{
"type": "integer",
"description": "月間の無料イベント数(無料のオープンソースプログラムのみ)"
},
{
"type": "null"
}
]
},
"organization_name": {
"type": "string",
"description": "組織、学校、プロジェクト、代理店の名前"
},
"website": {
"anyOf": [
{
"type": "string",
"description": "ウェブサイト"
},
{
"type": "null"
}
]
},
"proof_url": {
"anyOf": [
{
"type": "string",
"description": "証明となるリンクまたはリポジトリのURL"
},
{
"type": "null"
}
]
},
"license": {
"anyOf": [
{
"type": "string",
"description": "OSIライセンス(オープンソース)"
},
{
"type": "null"
}
]
},
"note": {
"anyOf": [
{
"type": "string",
"description": "審査向けのメモ"
},
{
"type": "null"
}
]
},
"rejection_reason": {
"anyOf": [
{
"type": "string",
"description": "申請が承認されなかった理由"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "申請日時"
},
"reviewed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "審査日時"
},
{
"type": "null"
}
]
},
"applied_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "割引が有効になった日時"
},
{
"type": "null"
}
]
},
"revoked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "プログラムが終了した日時"
},
{
"type": "null"
}
]
}
}
}
POST
/workspaces/:workspace_id/billing/payment_method.json
お支払い方法を更新するためのリンクを取得
billing_payment_method
権限: billing.manage
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/billing/payment_method.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
}
},
"required": [
"workspace_id"
]
}
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"description": "portal、payment_method、invoice のいずれか"
},
"url": {
"anyOf": [
{
"type": "string",
"description": "有効期間の短いPaddleのURL"
},
{
"type": "null"
}
]
}
}
}
POST
/workspaces/:workspace_id/billing/portal.json
Paddleカスタマーポータルのリンクを取得
billing_portal
権限: billing.manage
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/billing/portal.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
}
},
"required": [
"workspace_id"
]
}
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"description": "portal、payment_method、invoice のいずれか"
},
"url": {
"anyOf": [
{
"type": "string",
"description": "有効期間の短いPaddleのURL"
},
{
"type": "null"
}
]
}
}
}
GET
/workspaces/:workspace_id/billing/preview.json
日割り計算付きでプラン変更をプレビュー
billing_preview
権限: billing.manage
curl https://privatusanalytics.com/workspaces/:workspace_id/billing/preview.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"plan": {
"type": "string",
"description": "切り替え先のプラン: pro または business",
"enum": [
"pro",
"business"
]
},
"events": {
"type": "integer",
"description": "ティアの月間イベント数(GET /plans から取得)",
"examples": [
1000000
]
},
"interval": {
"type": "string",
"description": "請求間隔。年払いは2か月分無料",
"enum": [
"month",
"year"
],
"default": "month"
},
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
}
},
"required": [
"plan",
"events",
"workspace_id"
]
}
{
"type": "object",
"properties": {
"plan": {
"type": "string"
},
"events": {
"type": "integer"
},
"interval": {
"type": "string"
},
"price_id": {
"type": "string"
},
"amount": {
"type": "integer",
"description": "請求間隔ごとの新しい料金(USD)"
},
"currency": {
"type": "string"
},
"charge_minor": {
"type": "integer",
"description": "今回請求される金額(最小単位)"
},
"credit_minor": {
"type": "integer",
"description": "未使用期間のクレジット(最小単位)"
},
"result_action": {
"anyOf": [
{
"type": "string",
"description": "charge または credit"
},
{
"type": "null"
}
]
},
"result_minor": {
"type": "integer",
"description": "正味の請求額またはクレジット(最小単位)"
},
"next_billed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"warnings": {
"type": "array",
"items": {
"type": "string"
},
"description": "新しいプランではカバーされない使用量や上限"
}
}
}
POST
/workspaces/:workspace_id/billing/resume.json
予定していた解約を取り消す、または一時停止を再開
billing_resume
権限: billing.manage
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/billing/resume.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
}
},
"required": [
"workspace_id"
]
}
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string"
},
"plan": {
"type": "string",
"description": "free、pro、business、enterprise のいずれか"
},
"plan_events": {
"type": "integer",
"description": "有料ティアの月間イベント数"
},
"allowance": {
"type": "integer",
"description": "バッジ特典を含む月間イベント数"
},
"billing_interval": {
"anyOf": [
{
"type": "string",
"description": "month または year"
},
{
"type": "null"
}
]
},
"price": {
"anyOf": [
{
"type": "integer",
"description": "請求間隔ごとの料金(USD)"
},
{
"type": "null"
}
]
},
"subscription_status": {
"type": "string",
"description": "none、trialing、active、past_due、paused、canceled のいずれか"
},
"current_period_ends_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "更新または終了する日時"
},
{
"type": "null"
}
]
},
"cancel_at_period_end": {
"type": "boolean"
},
"canceled_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"auto_upgrade": {
"type": "boolean"
},
"discount": {
"anyOf": [
{
"type": "object",
"properties": {
"program": {
"type": "string",
"description": "nonprofit、education、open_source、open_source_free、agency のいずれか"
},
"status": {
"type": "string",
"description": "pending、approved(サブスクリプションには未適用)、active、rejected、revoked のいずれか"
},
"percent": {
"anyOf": [
{
"type": "integer",
"description": "ProとBusinessの割引率(無料のオープンソースプログラムでは null)"
},
{
"type": "null"
}
]
},
"comp_events": {
"anyOf": [
{
"type": "integer",
"description": "月間の無料イベント数(無料のオープンソースプログラムのみ)"
},
{
"type": "null"
}
]
},
"organization_name": {
"type": "string",
"description": "組織、学校、プロジェクト、代理店の名前"
},
"website": {
"anyOf": [
{
"type": "string",
"description": "ウェブサイト"
},
{
"type": "null"
}
]
},
"proof_url": {
"anyOf": [
{
"type": "string",
"description": "証明となるリンクまたはリポジトリのURL"
},
{
"type": "null"
}
]
},
"license": {
"anyOf": [
{
"type": "string",
"description": "OSIライセンス(オープンソース)"
},
{
"type": "null"
}
]
},
"note": {
"anyOf": [
{
"type": "string",
"description": "審査向けのメモ"
},
{
"type": "null"
}
]
},
"rejection_reason": {
"anyOf": [
{
"type": "string",
"description": "申請が承認されなかった理由"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "申請日時"
},
"reviewed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "審査日時"
},
{
"type": "null"
}
]
},
"applied_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "割引が有効になった日時"
},
{
"type": "null"
}
]
},
"revoked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "プログラムが終了した日時"
},
{
"type": "null"
}
]
}
},
"description": "最新の割引プログラム申請、または null"
},
{
"type": "null"
}
]
},
"discount_percent": {
"anyOf": [
{
"type": "integer",
"description": "承認済みプログラムによるProとBusinessの割引率、または null"
},
{
"type": "null"
}
]
},
"billing_emails": {
"type": "array",
"items": {
"type": "string"
}
},
"tax_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"badge": {
"type": "object",
"description": "バッジ特典(無料プラン)"
},
"usage": {
"type": "object",
"properties": {
"month": {
"type": "string",
"format": "date",
"description": "対象月の初日"
},
"events": {
"type": "integer",
"description": "課金対象のイベント(ページビューとカスタムイベント)"
},
"bots": {
"type": "integer",
"description": "除外されたボットのヒット(課金対象外)"
},
"allowance": {
"type": "integer",
"description": "バッジ特典を含む、プランに含まれるイベント数"
},
"percent": {
"type": "number",
"description": "上限に対するイベント数の割合(%)"
},
"forecast": {
"anyOf": [
{
"type": "integer",
"description": "月末時点のイベント数の予測"
},
{
"type": "null"
}
]
},
"forecast_percent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"days_left": {
"type": "integer",
"description": "今月の残り日数"
},
"status": {
"type": "string",
"description": "ok、warning(80%以上)、over(過去の月で上限以上)、locked、paused のいずれか"
},
"sites": {
"type": "array",
"items": {
"type": "object",
"properties": {
"site_id": {
"type": "string"
},
"domain": {
"type": "string"
},
"name": {
"type": "string"
},
"events": {
"type": "integer",
"description": "今月のページビューとカスタムイベント"
},
"share": {
"type": "number",
"description": "ワークスペース全体に占める割合(%)"
}
}
},
"description": "サイト別のイベント数"
},
"history": {
"type": "array",
"description": "過去の月(新しい順)"
},
"access_locked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Privatus Analyticsのスタッフがダッシュボードをロックした日時"
},
{
"type": "null"
}
]
},
"collection_paused": {
"type": "boolean",
"description": "新しいイベントが破棄されている間は true(月間上限に達した、またはスタッフが収集を一時停止した場合)"
},
"pause_reason": {
"anyOf": [
{
"type": "string",
"description": "収集が一時停止されている理由: limit(月間上限に達した)または staff。収集中は null"
},
{
"type": "null"
}
]
},
"collection_paused_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "スタッフが収集を一時停止した日時"
},
{
"type": "null"
}
]
},
"resumes_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "上限による一時停止が解除される日時: 翌月の開始時(UTC)、またはアップグレードした場合はそれより前。それ以外は null"
},
{
"type": "null"
}
]
}
},
"description": "今月のこれまでの使用量"
}
}
}
GET
/workspaces/:workspace_id/billing.json
プラン、サブスクリプション、使用量を取得
billing_get
権限: billing.manage
curl https://privatusanalytics.com/workspaces/:workspace_id/billing.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
}
},
"required": [
"workspace_id"
]
}
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string"
},
"plan": {
"type": "string",
"description": "free、pro、business、enterprise のいずれか"
},
"plan_events": {
"type": "integer",
"description": "有料ティアの月間イベント数"
},
"allowance": {
"type": "integer",
"description": "バッジ特典を含む月間イベント数"
},
"billing_interval": {
"anyOf": [
{
"type": "string",
"description": "month または year"
},
{
"type": "null"
}
]
},
"price": {
"anyOf": [
{
"type": "integer",
"description": "請求間隔ごとの料金(USD)"
},
{
"type": "null"
}
]
},
"subscription_status": {
"type": "string",
"description": "none、trialing、active、past_due、paused、canceled のいずれか"
},
"current_period_ends_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "更新または終了する日時"
},
{
"type": "null"
}
]
},
"cancel_at_period_end": {
"type": "boolean"
},
"canceled_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"auto_upgrade": {
"type": "boolean"
},
"discount": {
"anyOf": [
{
"type": "object",
"properties": {
"program": {
"type": "string",
"description": "nonprofit、education、open_source、open_source_free、agency のいずれか"
},
"status": {
"type": "string",
"description": "pending、approved(サブスクリプションには未適用)、active、rejected、revoked のいずれか"
},
"percent": {
"anyOf": [
{
"type": "integer",
"description": "ProとBusinessの割引率(無料のオープンソースプログラムでは null)"
},
{
"type": "null"
}
]
},
"comp_events": {
"anyOf": [
{
"type": "integer",
"description": "月間の無料イベント数(無料のオープンソースプログラムのみ)"
},
{
"type": "null"
}
]
},
"organization_name": {
"type": "string",
"description": "組織、学校、プロジェクト、代理店の名前"
},
"website": {
"anyOf": [
{
"type": "string",
"description": "ウェブサイト"
},
{
"type": "null"
}
]
},
"proof_url": {
"anyOf": [
{
"type": "string",
"description": "証明となるリンクまたはリポジトリのURL"
},
{
"type": "null"
}
]
},
"license": {
"anyOf": [
{
"type": "string",
"description": "OSIライセンス(オープンソース)"
},
{
"type": "null"
}
]
},
"note": {
"anyOf": [
{
"type": "string",
"description": "審査向けのメモ"
},
{
"type": "null"
}
]
},
"rejection_reason": {
"anyOf": [
{
"type": "string",
"description": "申請が承認されなかった理由"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "申請日時"
},
"reviewed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "審査日時"
},
{
"type": "null"
}
]
},
"applied_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "割引が有効になった日時"
},
{
"type": "null"
}
]
},
"revoked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "プログラムが終了した日時"
},
{
"type": "null"
}
]
}
},
"description": "最新の割引プログラム申請、または null"
},
{
"type": "null"
}
]
},
"discount_percent": {
"anyOf": [
{
"type": "integer",
"description": "承認済みプログラムによるProとBusinessの割引率、または null"
},
{
"type": "null"
}
]
},
"billing_emails": {
"type": "array",
"items": {
"type": "string"
}
},
"tax_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"badge": {
"type": "object",
"description": "バッジ特典(無料プラン)"
},
"usage": {
"type": "object",
"properties": {
"month": {
"type": "string",
"format": "date",
"description": "対象月の初日"
},
"events": {
"type": "integer",
"description": "課金対象のイベント(ページビューとカスタムイベント)"
},
"bots": {
"type": "integer",
"description": "除外されたボットのヒット(課金対象外)"
},
"allowance": {
"type": "integer",
"description": "バッジ特典を含む、プランに含まれるイベント数"
},
"percent": {
"type": "number",
"description": "上限に対するイベント数の割合(%)"
},
"forecast": {
"anyOf": [
{
"type": "integer",
"description": "月末時点のイベント数の予測"
},
{
"type": "null"
}
]
},
"forecast_percent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"days_left": {
"type": "integer",
"description": "今月の残り日数"
},
"status": {
"type": "string",
"description": "ok、warning(80%以上)、over(過去の月で上限以上)、locked、paused のいずれか"
},
"sites": {
"type": "array",
"items": {
"type": "object",
"properties": {
"site_id": {
"type": "string"
},
"domain": {
"type": "string"
},
"name": {
"type": "string"
},
"events": {
"type": "integer",
"description": "今月のページビューとカスタムイベント"
},
"share": {
"type": "number",
"description": "ワークスペース全体に占める割合(%)"
}
}
},
"description": "サイト別のイベント数"
},
"history": {
"type": "array",
"description": "過去の月(新しい順)"
},
"access_locked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Privatus Analyticsのスタッフがダッシュボードをロックした日時"
},
{
"type": "null"
}
]
},
"collection_paused": {
"type": "boolean",
"description": "新しいイベントが破棄されている間は true(月間上限に達した、またはスタッフが収集を一時停止した場合)"
},
"pause_reason": {
"anyOf": [
{
"type": "string",
"description": "収集が一時停止されている理由: limit(月間上限に達した)または staff。収集中は null"
},
{
"type": "null"
}
]
},
"collection_paused_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "スタッフが収集を一時停止した日時"
},
{
"type": "null"
}
]
},
"resumes_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "上限による一時停止が解除される日時: 翌月の開始時(UTC)、またはアップグレードした場合はそれより前。それ以外は null"
},
{
"type": "null"
}
]
}
},
"description": "今月のこれまでの使用量"
}
}
}
PATCH
/workspaces/:workspace_id/billing.json
請求先メール、税ID、自動アップグレードを更新
billing_update
権限: billing.manage
curl -X PATCH https://privatusanalytics.com/workspaces/:workspace_id/billing.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"billing_emails": {
"type": "array",
"items": {
"type": "string"
},
"description": "請求書と請求関連のお知らせの追加送信先(最大5件)"
},
"tax_id": {
"type": "string",
"description": "請求書に表示するVAT/GST/税ID"
},
"auto_upgrade": {
"type": "boolean",
"description": "true にすると、月間上限に達したときに収集を一時停止する代わりに、次のティアへ移行して差額を請求します。デフォルトはオフです"
},
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
}
},
"required": [
"workspace_id"
]
}
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string"
},
"plan": {
"type": "string",
"description": "free、pro、business、enterprise のいずれか"
},
"plan_events": {
"type": "integer",
"description": "有料ティアの月間イベント数"
},
"allowance": {
"type": "integer",
"description": "バッジ特典を含む月間イベント数"
},
"billing_interval": {
"anyOf": [
{
"type": "string",
"description": "month または year"
},
{
"type": "null"
}
]
},
"price": {
"anyOf": [
{
"type": "integer",
"description": "請求間隔ごとの料金(USD)"
},
{
"type": "null"
}
]
},
"subscription_status": {
"type": "string",
"description": "none、trialing、active、past_due、paused、canceled のいずれか"
},
"current_period_ends_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "更新または終了する日時"
},
{
"type": "null"
}
]
},
"cancel_at_period_end": {
"type": "boolean"
},
"canceled_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"auto_upgrade": {
"type": "boolean"
},
"discount": {
"anyOf": [
{
"type": "object",
"properties": {
"program": {
"type": "string",
"description": "nonprofit、education、open_source、open_source_free、agency のいずれか"
},
"status": {
"type": "string",
"description": "pending、approved(サブスクリプションには未適用)、active、rejected、revoked のいずれか"
},
"percent": {
"anyOf": [
{
"type": "integer",
"description": "ProとBusinessの割引率(無料のオープンソースプログラムでは null)"
},
{
"type": "null"
}
]
},
"comp_events": {
"anyOf": [
{
"type": "integer",
"description": "月間の無料イベント数(無料のオープンソースプログラムのみ)"
},
{
"type": "null"
}
]
},
"organization_name": {
"type": "string",
"description": "組織、学校、プロジェクト、代理店の名前"
},
"website": {
"anyOf": [
{
"type": "string",
"description": "ウェブサイト"
},
{
"type": "null"
}
]
},
"proof_url": {
"anyOf": [
{
"type": "string",
"description": "証明となるリンクまたはリポジトリのURL"
},
{
"type": "null"
}
]
},
"license": {
"anyOf": [
{
"type": "string",
"description": "OSIライセンス(オープンソース)"
},
{
"type": "null"
}
]
},
"note": {
"anyOf": [
{
"type": "string",
"description": "審査向けのメモ"
},
{
"type": "null"
}
]
},
"rejection_reason": {
"anyOf": [
{
"type": "string",
"description": "申請が承認されなかった理由"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "申請日時"
},
"reviewed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "審査日時"
},
{
"type": "null"
}
]
},
"applied_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "割引が有効になった日時"
},
{
"type": "null"
}
]
},
"revoked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "プログラムが終了した日時"
},
{
"type": "null"
}
]
}
},
"description": "最新の割引プログラム申請、または null"
},
{
"type": "null"
}
]
},
"discount_percent": {
"anyOf": [
{
"type": "integer",
"description": "承認済みプログラムによるProとBusinessの割引率、または null"
},
{
"type": "null"
}
]
},
"billing_emails": {
"type": "array",
"items": {
"type": "string"
}
},
"tax_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"badge": {
"type": "object",
"description": "バッジ特典(無料プラン)"
},
"usage": {
"type": "object",
"properties": {
"month": {
"type": "string",
"format": "date",
"description": "対象月の初日"
},
"events": {
"type": "integer",
"description": "課金対象のイベント(ページビューとカスタムイベント)"
},
"bots": {
"type": "integer",
"description": "除外されたボットのヒット(課金対象外)"
},
"allowance": {
"type": "integer",
"description": "バッジ特典を含む、プランに含まれるイベント数"
},
"percent": {
"type": "number",
"description": "上限に対するイベント数の割合(%)"
},
"forecast": {
"anyOf": [
{
"type": "integer",
"description": "月末時点のイベント数の予測"
},
{
"type": "null"
}
]
},
"forecast_percent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"days_left": {
"type": "integer",
"description": "今月の残り日数"
},
"status": {
"type": "string",
"description": "ok、warning(80%以上)、over(過去の月で上限以上)、locked、paused のいずれか"
},
"sites": {
"type": "array",
"items": {
"type": "object",
"properties": {
"site_id": {
"type": "string"
},
"domain": {
"type": "string"
},
"name": {
"type": "string"
},
"events": {
"type": "integer",
"description": "今月のページビューとカスタムイベント"
},
"share": {
"type": "number",
"description": "ワークスペース全体に占める割合(%)"
}
}
},
"description": "サイト別のイベント数"
},
"history": {
"type": "array",
"description": "過去の月(新しい順)"
},
"access_locked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Privatus Analyticsのスタッフがダッシュボードをロックした日時"
},
{
"type": "null"
}
]
},
"collection_paused": {
"type": "boolean",
"description": "新しいイベントが破棄されている間は true(月間上限に達した、またはスタッフが収集を一時停止した場合)"
},
"pause_reason": {
"anyOf": [
{
"type": "string",
"description": "収集が一時停止されている理由: limit(月間上限に達した)または staff。収集中は null"
},
{
"type": "null"
}
]
},
"collection_paused_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "スタッフが収集を一時停止した日時"
},
{
"type": "null"
}
]
},
"resumes_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "上限による一時停止が解除される日時: 翌月の開始時(UTC)、またはアップグレードした場合はそれより前。それ以外は null"
},
{
"type": "null"
}
]
}
},
"description": "今月のこれまでの使用量"
}
}
}
GET
/workspaces/:workspace_id/billing/usage.json
今月の使用量、予測、サイトごとの内訳を取得
billing_usage
権限: billing.manage
curl https://privatusanalytics.com/workspaces/:workspace_id/billing/usage.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"month": {
"type": "string",
"format": "date",
"description": "レポートする月の任意の日(デフォルトは今月)",
"examples": [
"2026-09-01"
]
},
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
}
},
"required": [
"workspace_id"
]
}
{
"type": "object",
"properties": {
"month": {
"type": "string",
"format": "date",
"description": "対象月の初日"
},
"events": {
"type": "integer",
"description": "課金対象のイベント(ページビューとカスタムイベント)"
},
"bots": {
"type": "integer",
"description": "除外されたボットのヒット(課金対象外)"
},
"allowance": {
"type": "integer",
"description": "バッジ特典を含む、プランに含まれるイベント数"
},
"percent": {
"type": "number",
"description": "上限に対するイベント数の割合(%)"
},
"forecast": {
"anyOf": [
{
"type": "integer",
"description": "月末時点のイベント数の予測"
},
{
"type": "null"
}
]
},
"forecast_percent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"days_left": {
"type": "integer",
"description": "今月の残り日数"
},
"status": {
"type": "string",
"description": "ok、warning(80%以上)、over(過去の月で上限以上)、locked、paused のいずれか"
},
"sites": {
"type": "array",
"items": {
"type": "object",
"properties": {
"site_id": {
"type": "string"
},
"domain": {
"type": "string"
},
"name": {
"type": "string"
},
"events": {
"type": "integer",
"description": "今月のページビューとカスタムイベント"
},
"share": {
"type": "number",
"description": "ワークスペース全体に占める割合(%)"
}
}
},
"description": "サイト別のイベント数"
},
"history": {
"type": "array",
"description": "過去の月(新しい順)"
},
"access_locked_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "Privatus Analyticsのスタッフがダッシュボードをロックした日時"
},
{
"type": "null"
}
]
},
"collection_paused": {
"type": "boolean",
"description": "新しいイベントが破棄されている間は true(月間上限に達した、またはスタッフが収集を一時停止した場合)"
},
"pause_reason": {
"anyOf": [
{
"type": "string",
"description": "収集が一時停止されている理由: limit(月間上限に達した)または staff。収集中は null"
},
{
"type": "null"
}
]
},
"collection_paused_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "スタッフが収集を一時停止した日時"
},
{
"type": "null"
}
]
},
"resumes_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"description": "上限による一時停止が解除される日時: 翌月の開始時(UTC)、またはアップグレードした場合はそれより前。それ以外は null"
},
{
"type": "null"
}
]
}
}
}
GET
/workspaces/:workspace_id/billing/invoices.json
請求書を一覧表示
billing_invoices_list
権限: billing.manage
curl https://privatusanalytics.com/workspaces/:workspace_id/billing/invoices.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
},
"page": {
"type": "integer",
"description": "ページ(1から)"
},
"per_page": {
"type": "integer",
"description": "1ページあたりの結果数(最大100)"
}
},
"required": [
"workspace_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Paddleのトランザクションid"
},
"invoice_number": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"description": "paid、completed、payment_failed など"
},
"amount_minor": {
"type": "integer",
"description": "最小単位(セント)での合計"
},
"currency": {
"type": "string"
},
"billed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
}
}
}
}
GET
/workspaces/:workspace_id/billing/invoices/:id.json
請求書のPDFリンクを取得
billing_invoices_get
権限: billing.manage
curl https://privatusanalytics.com/workspaces/:workspace_id/billing/invoices/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"workspace_id",
"id"
]
}
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"description": "portal、payment_method、invoice のいずれか"
},
"url": {
"anyOf": [
{
"type": "string",
"description": "有効期間の短いPaddleのURL"
},
{
"type": "null"
}
]
}
}
}
通知チャネル
POST
/workspaces/:workspace_id/channels.json
通知チャネルを追加
notification_channels_create
権限: content.write
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/channels.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "Webhook URL(slack、teams、discord、webhook)、HTTPS"
},
"secret": {
"type": "string",
"description": "webhook: X-Privatus-Signature用のHMACシークレット"
},
"emails": {
"type": "array",
"items": {
"type": "string"
},
"description": "email: 受信者のアドレス(最大20件)"
},
"routing_key": {
"type": "string",
"description": "pagerduty: Events API v2の連携キー"
},
"api_key": {
"type": "string",
"description": "opsgenie: APIの連携キー"
},
"region": {
"type": "string",
"description": "opsgenie: アカウントのリージョン",
"enum": [
"us",
"eu"
]
},
"kind": {
"type": "string",
"description": "email、slack、teams、discord、webhook、pagerduty、opsgenie、push のいずれか",
"enum": [
"email",
"slack",
"teams",
"discord",
"webhook",
"pagerduty",
"opsgenie",
"push"
]
},
"name": {
"type": "string",
"description": "表示名",
"examples": [
"#alerts"
]
},
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
}
},
"required": [
"kind",
"name",
"workspace_id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "チャネルID(例: nch_7Q2K9XH3AB)"
},
"kind": {
"type": "string",
"description": "email、slack、teams、discord、webhook、pagerduty、opsgenie、push のいずれか"
},
"name": {
"type": "string"
},
"target": {
"type": "string",
"description": "マスクされた送信先"
},
"last_used_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/channels/:id.json
通知チャネルを削除
notification_channels_delete
権限: content.write
curl -X DELETE https://privatusanalytics.com/channels/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "チャネルID(例: nch_7Q2K9XH3AB)"
},
"kind": {
"type": "string",
"description": "email、slack、teams、discord、webhook、pagerduty、opsgenie、push のいずれか"
},
"name": {
"type": "string"
},
"target": {
"type": "string",
"description": "マスクされた送信先"
},
"last_used_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/workspaces/:workspace_id/channels.json
通知チャネルを一覧表示
notification_channels_list
権限: analytics.read
curl https://privatusanalytics.com/workspaces/:workspace_id/channels.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"description": "この種類のチャネルのみ",
"enum": [
"email",
"slack",
"teams",
"discord",
"webhook",
"pagerduty",
"opsgenie",
"push"
]
},
"workspace_id": {
"type": "string",
"description": "ワークスペースID(例: ws_7Q2K9XH3AB)"
},
"page": {
"type": "integer",
"description": "ページ(1から)"
},
"per_page": {
"type": "integer",
"description": "1ページあたりの結果数(最大100)"
}
},
"required": [
"workspace_id"
]
}
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "チャネルID(例: nch_7Q2K9XH3AB)"
},
"kind": {
"type": "string",
"description": "email、slack、teams、discord、webhook、pagerduty、opsgenie、push のいずれか"
},
"name": {
"type": "string"
},
"target": {
"type": "string",
"description": "マスクされた送信先"
},
"last_used_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
}
POST
/channels/:id/send_test.json
チャネル経由でテストメッセージを送信
notification_channels_send_test
権限: content.write
curl -X POST https://privatusanalytics.com/channels/:id/send_test.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "チャネルID(例: nch_7Q2K9XH3AB)"
},
"kind": {
"type": "string",
"description": "email、slack、teams、discord、webhook、pagerduty、opsgenie、push のいずれか"
},
"name": {
"type": "string"
},
"target": {
"type": "string",
"description": "マスクされた送信先"
},
"last_used_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
GET
/channels/:id.json
通知チャネルを取得
notification_channels_get
権限: analytics.read
curl https://privatusanalytics.com/channels/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN"
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "チャネルID(例: nch_7Q2K9XH3AB)"
},
"kind": {
"type": "string",
"description": "email、slack、teams、discord、webhook、pagerduty、opsgenie、push のいずれか"
},
"name": {
"type": "string"
},
"target": {
"type": "string",
"description": "マスクされた送信先"
},
"last_used_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
PATCH
/channels/:id.json
通知チャネルを更新
notification_channels_update
権限: content.write
curl -X PATCH https://privatusanalytics.com/channels/:id.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "Webhook URL(slack、teams、discord、webhook)、HTTPS"
},
"secret": {
"type": "string",
"description": "webhook: X-Privatus-Signature用のHMACシークレット"
},
"emails": {
"type": "array",
"items": {
"type": "string"
},
"description": "email: 受信者のアドレス(最大20件)"
},
"routing_key": {
"type": "string",
"description": "pagerduty: Events API v2の連携キー"
},
"api_key": {
"type": "string",
"description": "opsgenie: APIの連携キー"
},
"region": {
"type": "string",
"description": "opsgenie: アカウントのリージョン",
"enum": [
"us",
"eu"
]
},
"name": {
"type": "string",
"description": "表示名"
},
"id": {
"type": "string",
"description": "リソースの Id"
}
},
"required": [
"id"
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "チャネルID(例: nch_7Q2K9XH3AB)"
},
"kind": {
"type": "string",
"description": "email、slack、teams、discord、webhook、pagerduty、opsgenie、push のいずれか"
},
"name": {
"type": "string"
},
"target": {
"type": "string",
"description": "マスクされた送信先"
},
"last_used_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
POST
/push_subscription.json
プッシュ通知用にブラウザを登録
push_subscriptions_create
権限: member
curl -X POST https://privatusanalytics.com/push_subscription.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"endpoint": {
"type": "string",
"description": "ブラウザの PushSubscription.endpoint"
},
"p256dh": {
"type": "string",
"description": "PushSubscription keys.p256dh (base64url)"
},
"auth": {
"type": "string",
"description": "PushSubscription keys.auth (base64url)"
}
},
"required": [
"endpoint",
"p256dh",
"auth"
]
}
{
"type": "object",
"properties": {
"endpoint_host": {
"type": "string",
"description": "プッシュサービスのホスト"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}
DELETE
/push_subscription.json
ブラウザのプッシュ登録を削除
push_subscriptions_delete
権限: member
curl -X DELETE https://privatusanalytics.com/push_subscription.json \
-H "Authorization: Bearer $PRIVATUS_TOKEN" \
-H "Content-Type: application/json" -d '{…}'
{
"type": "object",
"properties": {
"endpoint": {
"type": "string",
"description": "削除する PushSubscription.endpoint"
}
},
"required": [
"endpoint"
]
}
{
"type": "object",
"properties": {
"endpoint_host": {
"type": "string",
"description": "プッシュサービスのホスト"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}