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}' \
| Parâmetros | Detalhes | Descrição |
|---|---|---|
| website_id | Opcional Inteiro | |
| type | Opcional String | Valores permitidos: pageview, custom |
| search | Opcional String | A string de busca. |
| search_by | Opcional String | Qual campo você está pesquisando? Os valores permitidos são: name, path, key. |
| datetime_field | Opcional String | Valores permitidos: datetime, last_datetime |
| datetime_start | Opcional String | Data de início |
| datetime_end | Opcional String | Data de fim |
| order_by | Opcional String | Qual campo ordenar os resultados. Os valores permitidos são: goal_id, last_datetime, datetime, name, path, key. |
| order_type | Opcional String | A ordenação dos resultados. Os valores permitidos são: ASC para ordenação ascendente e DESC para ordenação descendente. |
| page | Opcional Inteiro | O número da página de onde você deseja os resultados. O padrão é 1. |
| results_per_page | Opcional Inteiro | Quantos resultados você deseja por página. Os valores permitidos são: 10, 25, 50, 100, 250, 500, 1000. O padrão é 25. |
{
"data": [
{
"id": 1,
"website_id": 1,
"user_id": 1,
"key": "123456789",
"type": "custom",
"path": null,
"name": "Example",
"datetime": "2026-05-17 03:07:52",
"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:52",
"last_datetime": null
}
}
POST https://oohbe.com/api/goals
| Parâmetros | Detalhes | Descrição |
|---|---|---|
| website_id | Requerido Inteiro | - |
| type | Requerido String | Valores permitidos: pageview, custom |
| name | Requerido String | - |
| path | Opcional String | Disponível quando: type = pageview |
| key | Opcional String | - |
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:52' \
--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:52' \
{
"data": {
"id": 1
}
}
POST https://oohbe.com/api/goals/{goal_id}
| Parâmetros | Detalhes | Descrição |
|---|---|---|
| website_id | Opcional Inteiro | - |
| type | Opcional String | Valores permitidos: pageview, custom |
| name | Opcional String | - |
| path | Opcional String | Disponível quando: type = pageview |
| key | Opcional String | - |
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}' \