Getting Started
Welcome to the AppAmbit API! This guide will help you quickly get up and running with our API, whether you are sending analytics, reading published content, or querying your app database.
Quick Overview
The AppAmbit API allows you to:
- 📊 Track user events and interactions
- 🚨 Monitor application logs and crashes
- 👥 Manage user sessions and consumers
- 📈 Collect analytics data for insights
- 📝 Read CMS content published from the dashboard
- 🗄️ Query your app database with SQL
Prerequisites
Before you begin, make sure you have:
- [x] A registered AppAmbit account
- [x] An application created in the AppAmbit dashboard
- [x] Your
APP_KEY(found in your application settings)
Quick Start Steps
1. Register Your Device/Consumer
First, register your device as a consumer to get authentication credentials:
POST /api/consumer
Request Body:
{
"app_key": "YOUR_APP_KEY",
"device_id": "unique-device-identifier",
"user_id": "user-identifier",
"platform": "iOS/Android/Web"
}
Response:
{
"consumer_id": "consumer-uuid",
"auth_token": "bearer-token-here"
}
2. Authenticate Your Requests
Include the Bearer token in all subsequent API requests:
| Header | Value |
|---|---|
| Authorization | Bearer {YOUR_AUTH_TOKEN} |
| Content-Type | application/json |
| Accept | application/json |
3. Start Sending Data
Now you can send events, logs, and session data:
Track an Event:
POST /api/events
Log Application Data:
POST /api/logs
Manage Sessions:
POST /api/sessions
What's Next?
Now that you have the basics down, explore these sections for detailed implementation:
- Authentication - Complete authentication flow and security guidelines
- Consumers - Device registration and management
- Events - Track user interactions and custom events
- Logs - Monitor errors, crashes, and application health
- Sessions - Manage user session lifecycles
- Breadcrumbs - Trace user journey and navigation steps
- CMS API - Read the content types and entries you publish from the dashboard
- Database - Run SQL against the database linked to your app
Need Help?
- 📖 Full Documentation: Continue reading through each section for complete implementation details
- 🛠️ Testing: Use tools like Postman or cURL to test your API integration
- 🔍 Troubleshooting: Check authentication tokens and request formats if you encounter issues
Ready to dive deeper? Start with Authentication to understand the complete security flow.