ドキュメント
APIAPI リファレンス

サイト

サイトの一覧、作成、取得、更新、削除。

GET/api/v1/sites

サイトを一覧表示

Lists the team's sites that the API key can access, in pages of up to 200.

スコープsite:read
クエリパラメーター
limitinteger

Maximum number of results per page.

既定値 1001–200
cursorstring | 任意 | null

Opaque pagination cursor from the previous response.

レスポンス
POST/api/v1/sites

サイトを作成

Creates a site in the team and returns it. Install the tracking script from Get tracking script to start collecting data.

スコープsite:write
リクエストボディapplication/json
namestring必須

Display name of the site.

1–120 chars
domainstring必須

Domain of the website, without protocol, e.g. example.com.

1–255 chars
publicEnabledboolean必須

Whether the public shared dashboard is enabled.

既定値 false
publicSlugstring

Slug of the public dashboard URL. Omit it to have one generated.

≤ 120 chars
レスポンス
GET/api/v1/sites/{siteId}

サイトを取得

Returns one site.

スコープsite:read
パスパラメーター
siteIdstring必須

ID of the site (see List sites).

1–256 chars
レスポンス
PATCH/api/v1/sites/{siteId}

サイトを更新

Updates a site's name, domain, or public sharing. Send only the fields to change; at least one is required.

スコープsite:write
パスパラメーター
siteIdstring必須

ID of the site (see List sites).

1–256 chars
リクエストボディapplication/json
namestring
1–120 chars
domainstring
1–255 chars
publicEnabledboolean
publicSlugstring
≤ 120 chars
レスポンス
DELETE/api/v1/sites/{siteId}

サイトを削除

Deletes the site and all of its analytics data. This cannot be undone.

スコープsite:write
パスパラメーター
siteIdstring必須

ID of the site (see List sites).

1–256 chars
レスポンス