Goals
GET https://oohbe.com/api/goals/
curl --request GET \
--url 'https://oohbe.com/api/goals/' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://oohbe.com/api/goals/' \
--header 'Authorization: Bearer {api_key}' \
| Parametry | Szczegóły | Opis |
|---|---|---|
| website_id | Opcjonalny Całkowity | |
| type | Opcjonalny Ciąg | Dozwolone wartości: pageview, custom |
| search | Opcjonalny Ciąg | Ciężar wyszukiwania. |
| search_by | Opcjonalny Ciąg | Jakie pole przeszukujesz? Dozwolone wartości to: name, path, key. |
| datetime_field | Opcjonalny Ciąg | Dozwolone wartości: datetime, last_datetime |
| datetime_start | Opcjonalny Ciąg | Data rozpoczęcia |
| datetime_end | Opcjonalny Ciąg | Data zakończenia |
| order_by | Opcjonalny Ciąg | Jakie pole użyć do sortowania wyników. Dozwolone wartości to: goal_id, last_datetime, datetime, name, path, key. |
| order_type | Opcjonalny Ciąg | Kolejność wyników. Dozwolone wartości to: ASC dla porządku rosnącego i DESC dla porządku malejącego. |
| page | Opcjonalny Całkowity | Numer strony, z której chcesz uzyskać wyniki. Domyślnie 1. |
| results_per_page | Opcjonalny Całkowity | Ile wyników chcesz na stronę. Dozwolone wartości to: 10, 25, 50, 100, 250, 500, 1000. Domyślnie 25. |
{
"data": [
{
"id": 1,
"website_id": 1,
"user_id": 1,
"key": "123456789",
"type": "custom",
"path": null,
"name": "Example",
"datetime": "2026-05-17 03:07:54",
"last_datetime": null
},
],
"meta": {
"page": 1,
"results_per_page": 25,
"total": 1,
"total_pages": 1
},
"links": {
"first": "https://oohbe.com/api/goals?page=1",
"last": "https://oohbe.com/api/goals?page=1",
"next": null,
"prev": null,
"self": "https://oohbe.com/api/goals?page=1"
}
}
GET https://oohbe.com/api/goals/{goal_id}
curl --request GET \
--url 'https://oohbe.com/api/goals/{goal_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://oohbe.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,
"name": "Example",
"datetime": "2026-05-17 03:07:54",
"last_datetime": null
}
}
POST https://oohbe.com/api/goals
| Parametry | Szczegóły | Opis |
|---|---|---|
| website_id | Wymagane Całkowity | - |
| type | Wymagane Ciąg | Dozwolone wartości: pageview, custom |
| name | Wymagane Ciąg | - |
| path | Opcjonalny Ciąg | Dostępne kiedy: type = pageview |
| key | Opcjonalny Ciąg | - |
curl --request POST \
--url 'https://oohbe.com/api/goals' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example' \
--form 'chart_datetime=2026-05-17 03:07:54' \
--url 'https://oohbe.com/api/goals' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example' \
--form 'chart_datetime=2026-05-17 03:07:54' \
{
"data": {
"id": 1
}
}
POST https://oohbe.com/api/goals/{goal_id}
| Parametry | Szczegóły | Opis |
|---|---|---|
| website_id | Opcjonalny Całkowity | - |
| type | Opcjonalny Ciąg | Dozwolone wartości: pageview, custom |
| name | Opcjonalny Ciąg | - |
| path | Opcjonalny Ciąg | Dostępne kiedy: type = pageview |
| key | Opcjonalny Ciąg | - |
curl --request POST \
--url 'https://oohbe.com/api/goals/{goal_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example' \
--form 'is_enabled=0' \
--url 'https://oohbe.com/api/goals/{goal_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example' \
--form 'is_enabled=0' \
{
"data": {
"id": 1
}
}
DELETE https://oohbe.com/api/goals/{goal_id}
curl --request DELETE \
--url 'https://oohbe.com/api/goals/{goal_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://oohbe.com/api/goals/{goal_id}' \
--header 'Authorization: Bearer {api_key}' \