API Statistiques
Endpoints pour le suivi des métriques et statistiques de votre application.
SDK: client.app.stats
Endpoints
Créer une statistique
Enregistre une nouvelle entrée statistique.
POST /app/{appId}/stats/createRequête
| Champ | Type | Requis | Description |
|---|---|---|---|
apiKey | string | Oui | Clé API |
type | string | Oui | Type de statistique |
year | number | Oui | Année |
month | number | Oui | Mois (1-12) |
amount | number | Oui | Valeur |
description | string | Non | Description |
plateform | string | Non | Plateforme source |
curl -X POST https://api.applite.ai/app/{appId}/stats/create \
-H "Content-Type: application/json" \
-d '{
"apiKey": "your_api_key",
"type": "page_views",
"year": 2024,
"month": 1,
"amount": 1500,
"description": "Vues de la page d accueil"
}'Obtenir une statistique
Récupère la valeur d’une statistique pour une période donnée.
POST /app/{appId}/stats/getRequête
| Champ | Type | Requis | Description |
|---|---|---|---|
apiKey | string | Oui | Clé API |
type | string | Oui | Type de statistique |
year | number | Oui | Année |
month | number | Oui | Mois (1-12) |
plateform | string | Non | Plateforme |
curl -X POST https://api.applite.ai/app/{appId}/stats/get \
-H "Content-Type: application/json" \
-d '{
"apiKey": "your_api_key",
"type": "page_views",
"year": 2024,
"month": 1
}'Définir une statistique
Crée ou remplace une statistique pour une période.
POST /app/{appId}/stats/setRequête
| Champ | Type | Requis | Description |
|---|---|---|---|
apiKey | string | Oui | Clé API |
type | string | Oui | Type de statistique |
year | number | Oui | Année |
month | number | Oui | Mois (1-12) |
amount | number | Oui | Nouvelle valeur |
description | string | Non | Description |
plateform | string | Non | Plateforme |
curl -X POST https://api.applite.ai/app/{appId}/stats/set \
-H "Content-Type: application/json" \
-d '{
"apiKey": "your_api_key",
"type": "page_views",
"year": 2024,
"month": 1,
"amount": 2000
}'Mettre à jour une statistique
Met à jour une statistique existante par son ID.
POST /app/{appId}/stats/{id}/updateRequête
| Champ | Type | Requis | Description |
|---|---|---|---|
apiKey | string | Oui | Clé API |
amount | number | Oui | Nouvelle valeur |
description | string | Non | Nouvelle description |
curl -X POST https://api.applite.ai/app/{appId}/stats/{statId}/update \
-H "Content-Type: application/json" \
-d '{
"apiKey": "your_api_key",
"amount": 2500,
"description": "Mise à jour mensuelle"
}'Last updated on