Skip to Content
Nouvelle documentation Applite - JS SDK, Dart SDK & REST API
REST APIStatistiques

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/create
ChampTypeRequisDescription
apiKeystringOuiClé API
typestringOuiType de statistique
yearnumberOuiAnnée
monthnumberOuiMois (1-12)
amountnumberOuiValeur
descriptionstringNonDescription
plateformstringNonPlateforme 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/get
ChampTypeRequisDescription
apiKeystringOuiClé API
typestringOuiType de statistique
yearnumberOuiAnnée
monthnumberOuiMois (1-12)
plateformstringNonPlateforme
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/set
ChampTypeRequisDescription
apiKeystringOuiClé API
typestringOuiType de statistique
yearnumberOuiAnnée
monthnumberOuiMois (1-12)
amountnumberOuiNouvelle valeur
descriptionstringNonDescription
plateformstringNonPlateforme
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}/update
ChampTypeRequisDescription
apiKeystringOuiClé API
amountnumberOuiNouvelle valeur
descriptionstringNonNouvelle 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