Objectifs
GET https://analytics.ipcidr.com/api/goals/
curl --request GET \
--url 'https://analytics.ipcidr.com/api/goals/' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://analytics.ipcidr.com/api/goals/' \
--header 'Authorization: Bearer {api_key}' \
| Paramètres | Détails | Description |
|---|---|---|
| website_id | Facultatif Entier | |
| type | Facultatif Chaîne | Valeurs autorisées : pageview, custom |
| search | Facultatif Chaîne | La chaîne de recherche. |
| search_by | Facultatif Chaîne | Par quel champ vous recherchez. Les valeurs autorisées sont : name, path, key. |
| datetime_field | Facultatif Chaîne | Valeurs autorisées : datetime, last_datetime |
| datetime_start | Facultatif Chaîne | Filtrer les résultats à partir de cette date/heure. Format Y-m-d H:i:s. |
| datetime_end | Facultatif Chaîne | Filtrer les résultats jusqu'à cette date/heure. Format Y-m-d H:i:s. |
| order_by | Facultatif Chaîne | Par quel champ ordonner les résultats. Les valeurs autorisées sont : goal_id, last_datetime, datetime, name, path, key. |
| order_type | Facultatif Chaîne | L'ordre des résultats. Les valeurs autorisées sont : ASC pour l'ordre croissant, et DESC pour l'ordre décroissant. |
| page | Facultatif Entier | Le numéro de page à partir duquel vous voulez les résultats. Par défaut 1. |
| results_per_page | Facultatif Entier | Combien de résultats vous voulez par page. Les valeurs autorisées sont : 10, 25, 50, 100, 250, 500, 1000. Par défaut 25. |
{
"data": [
{
"id": 1,
"website_id": 1,
"user_id": 1,
"key": "123456789",
"type": "custom",
"path": null,
"name": "Example",
"datetime": "2026-06-04 01:56:22",
"last_datetime": null
},
],
"meta": {
"page": 1,
"results_per_page": 25,
"total": 1,
"total_pages": 1
},
"links": {
"first": "https://analytics.ipcidr.com/api/goals?page=1",
"last": "https://analytics.ipcidr.com/api/goals?page=1",
"next": null,
"prev": null,
"self": "https://analytics.ipcidr.com/api/goals?page=1"
}
}
GET https://analytics.ipcidr.com/api/goals/{goal_id}
curl --request GET \
--url 'https://analytics.ipcidr.com/api/goals/{goal_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://analytics.ipcidr.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-06-04 01:56:22",
"last_datetime": null
}
}
POST https://analytics.ipcidr.com/api/goals
| Paramètres | Détails | Description |
|---|---|---|
| website_id | Requis Entier | - |
| type | Requis Chaîne | Valeurs autorisées : pageview, custom |
| name | Requis Chaîne | - |
| path | Facultatif Chaîne | Disponible quand : type = pageview |
| key | Facultatif Chaîne | - |
curl --request POST \
--url 'https://analytics.ipcidr.com/api/goals' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example' \
--form 'chart_datetime=2026-06-04 01:56:22' \
--url 'https://analytics.ipcidr.com/api/goals' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example' \
--form 'chart_datetime=2026-06-04 01:56:22' \
{
"data": {
"id": 1
}
}
POST https://analytics.ipcidr.com/api/goals/{goal_id}
| Paramètres | Détails | Description |
|---|---|---|
| website_id | Facultatif Entier | - |
| type | Facultatif Chaîne | Valeurs autorisées : pageview, custom |
| name | Facultatif Chaîne | - |
| path | Facultatif Chaîne | Disponible quand : type = pageview |
| key | Facultatif Chaîne | - |
curl --request POST \
--url 'https://analytics.ipcidr.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://analytics.ipcidr.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://analytics.ipcidr.com/api/goals/{goal_id}
curl --request DELETE \
--url 'https://analytics.ipcidr.com/api/goals/{goal_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://analytics.ipcidr.com/api/goals/{goal_id}' \
--header 'Authorization: Bearer {api_key}' \