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}' \
| Parametrar | Detaljer | Beskrivning |
|---|---|---|
| website_id | Valfritt Heltal | |
| type | Valfritt StrÀng | TillÄtna vÀrden: pageview, custom |
| search | Valfritt StrÀng | SökstrÀngen. |
| search_by | Valfritt StrÀng | Vilket fÀlt söker du efter? TillÄtna vÀrden Àr: name, path, key. |
| datetime_field | Valfritt StrÀng | TillÄtna vÀrden: datetime, last_datetime |
| datetime_start | Valfritt StrÀng | Startdatum |
| datetime_end | Valfritt StrÀng | Slutdatum |
| order_by | Valfritt StrÀng | Vilket fÀlt att sortera resultaten efter. TillÄtna vÀrden Àr: goal_id, last_datetime, datetime, name, path, key. |
| order_type | Valfritt StrÀng | Ordningen av resultaten. TillÄtna vÀrden Àr: ASC för stigande ordning, och DESC för fallande ordning. |
| page | Valfritt Heltal | Sidanummeret som du vill ha resultat frÄn. StandardinstÀllning Àr 1. |
| results_per_page | Valfritt Heltal | Hur mÄnga resultat vill du ha per sida. TillÄtna vÀrden Àr: 10, 25, 50, 100, 250, 500, 1000. StandardvÀrde Àr 25. |
{
"data": [
{
"id": 1,
"website_id": 1,
"user_id": 1,
"key": "123456789",
"type": "custom",
"path": null,
"name": "Example",
"datetime": "2026-05-17 03:07:51",
"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:51",
"last_datetime": null
}
}
POST https://oohbe.com/api/goals
| Parametrar | Detaljer | Beskrivning |
|---|---|---|
| website_id | Obligatoriskt Heltal | - |
| type | Obligatoriskt StrÀng | TillÄtna vÀrden: pageview, custom |
| name | Obligatoriskt StrÀng | - |
| path | Valfritt StrÀng | TillgÀnglig nÀr: type = pageview |
| key | Valfritt StrÀng | - |
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:51' \
--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:51' \
{
"data": {
"id": 1
}
}
POST https://oohbe.com/api/goals/{goal_id}
| Parametrar | Detaljer | Beskrivning |
|---|---|---|
| website_id | Valfritt Heltal | - |
| type | Valfritt StrÀng | TillÄtna vÀrden: pageview, custom |
| name | Valfritt StrÀng | - |
| path | Valfritt StrÀng | TillgÀnglig nÀr: type = pageview |
| key | Valfritt StrÀng | - |
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}' \