Goals
GET https://analyticse.com/api/goals/
curl --request GET \
--url 'https://analyticse.com/api/goals/' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://analyticse.com/api/goals/' \
--header 'Authorization: Bearer {api_key}' \
| パラメータ | 詳細 | 説明 |
|---|---|---|
| website_id | オプション 整数 | |
| type | オプション 文字列 | 許可された値: pageview, custom, scroll |
| search | オプション 文字列 | 検索文字列。 |
| search_by | オプション 文字列 | 検索するフィールドは何ですか。許可されている値は:name, path, key。 |
| datetime_field | オプション 文字列 | 許可された値: datetime, last_datetime |
| datetime_start | オプション 文字列 | 開始日時 |
| datetime_end | オプション 文字列 | 終了日時 |
| order_by | オプション 文字列 | 結果をどのフィールドで並べ替えるか。許可されている値は:goal_id, last_datetime, datetime, name, path, key, scroll_percentage。 |
| order_type | オプション 文字列 | 結果の並び順。許可されている値は、昇順のためのASCと、降順のためのDESCです。 |
| page | オプション 整数 | 結果を取得したいページ番号。デフォルトは1です。 |
| results_per_page | オプション 整数 | 1ページあたりの結果数はどのくらいにしますか。許可されている値は:10, 25, 50, 100, 250, 500, 1000。デフォルトは25です。 |
{
"data": [
{
"id": 1,
"website_id": 1,
"user_id": 1,
"key": "123456789",
"type": "custom",
"path": null,
"scroll_percentage": null,
"name": "Example",
"last_datetime": null,
"datetime": "2026-09-12 00:49:01"
}
],
"meta": {
"page": 1,
"total_pages": 1,
"results_per_page": 25,
"total_results": 1
},
"links": {
"first": "https://analyticse.com/api/goals?page=1",
"last": "https://analyticse.com/api/goals?page=1",
"next": null,
"prev": null,
"self": "https://analyticse.com/api/goals?page=1"
}
}
GET https://analyticse.com/api/goals/{goal_id}
curl --request GET \
--url 'https://analyticse.com/api/goals/{goal_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://analyticse.com/api/goals/{goal_id}' \
--header 'Authorization: Bearer {api_key}' \
{
"data": {
"id": 1,
"website_id": 1,
"user_id": 1,
"key": "123456789",
"type": "custom",
"path": null,
"scroll_percentage": null,
"name": "Example",
"last_datetime": null,
"datetime": "2026-09-12 00:49:01"
}
}
POST https://analyticse.com/api/goals
| パラメータ | 詳細 | 説明 |
|---|---|---|
| website_id | 必須 整数 | - |
| type | 必須 文字列 | 許可された値: pageview, custom, scroll |
| name | 必須 文字列 | - |
| path | オプション 文字列 | 利用可能な時期: type = pageview, scroll |
| scroll_percentage | オプション 整数 | 利用可能な時期: type = scroll |
| key | オプション 文字列 | - |
curl --request POST \
--url 'https://analyticse.com/api/goals' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'website_id=1' \
--form 'name=Example' \
--form 'type=scroll' \
--form 'path=blog/*' \
--form 'scroll_percentage=75' \
--url 'https://analyticse.com/api/goals' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'website_id=1' \
--form 'name=Example' \
--form 'type=scroll' \
--form 'path=blog/*' \
--form 'scroll_percentage=75' \
{
"data": {
"id": 1,
"website_id": 1,
"user_id": 1,
"key": "123456789",
"type": "scroll",
"path": "/blog/*",
"scroll_percentage": 75,
"name": "Example",
"last_datetime": null,
"datetime": "2026-09-12 00:49:01"
}
}
POST https://analyticse.com/api/goals/{goal_id}
| パラメータ | 詳細 | 説明 |
|---|---|---|
| website_id | オプション 整数 | - |
| type | オプション 文字列 | 許可された値: pageview, custom, scroll |
| name | オプション 文字列 | - |
| path | オプション 文字列 | 利用可能な時期: type = pageview, scroll |
| scroll_percentage | オプション 整数 | 利用可能な時期: type = scroll |
| key | オプション 文字列 | - |
curl --request POST \
--url 'https://analyticse.com/api/goals/{goal_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example' \
--form 'type=scroll' \
--form 'path=blog/*' \
--form 'scroll_percentage=75' \
--url 'https://analyticse.com/api/goals/{goal_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example' \
--form 'type=scroll' \
--form 'path=blog/*' \
--form 'scroll_percentage=75' \
{
"data": {
"id": 1,
"website_id": 1,
"user_id": 1,
"key": "123456789",
"type": "scroll",
"path": "/blog/*",
"scroll_percentage": 75,
"name": "Example",
"last_datetime": "2026-09-12 00:49:01",
"datetime": "2026-09-12 00:49:01"
}
}
DELETE https://analyticse.com/api/goals/{goal_id}
curl --request DELETE \
--url 'https://analyticse.com/api/goals/{goal_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://analyticse.com/api/goals/{goal_id}' \
--header 'Authorization: Bearer {api_key}' \