Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save simonmorley/5c19bb51b65c6fd4997e07b476879acc to your computer and use it in GitHub Desktop.
Save simonmorley/5c19bb51b65c6fd4997e07b476879acc to your computer and use it in GitHub Desktop.
SESSION TIMELINES
Includes the timeline of sessions, average session, max, count etc.
curl 'https://api.ctapp.io/api/v1/reports?interval=day&sessions=true' -H 'origin: https://my.ctapp.io' -H "authorization: Bearer $BEARER" --compressed
SESSIONS
curl 'https://api.ctapp.io/api/v1/sessions' -H "authorization: Bearer $bearer" --compressed
SOCIAL
curl 'https://api.ctapp.io/api/v1/reports?interval=day&social=true' -H "authorization: Bearer $bearer" --compressed
DASHING
curl 'https://api.ctapp.io/api/v1/locations?dashing=true' -H "authorization: Bearer $bearer
PERISCOPE
curl 'https://api.ctapp.io/api/v1/reports?periscope=true' -H "authorization: Bearer $bearer"
LOCATION STATS
location_id=your-slug
curl 'https://api.ctapp.io/api/v1/locations/$location_id/stats' -H "authorization: Bearer $bearer"
SENSE ANALYTICS
Stats
Get the key from your location -> settings. It will look like this:
key=a9b58d98dsad3cd8b7e6f1d12629fb5dv
curl "https://api.ctapp.io/api/v1/sense?key=$key&period=daily&query=periodic&type=stats"" -H "authorization: Bearer $bearer"
Averages
curl 'https://api.ctapp.io/api/v1/sense?key=$key&query=averages&type=stats' -H "authorization: Bearer $bearer"
Here now
curl 'https://api.ctapp.io/api/v1/sense?key=key&type=here_now' -H "authorization: Bearer $bearer"
Timeline
curl 'https://api.ctapp.io/api/v1/sense?key=$key&min_duration=60&type=uniques' -H "authorization: Bearer $bearer"
Aggregates
curl 'https://api.ctapp.io/api/v1/sense?key=key&min_duration=60&period=daily&type=dwells' -H "authorization: Bearer $bearer"
Visits
curl 'https://api.ctapp.io/api/v1/sense?key=key&type=visits' -H "authorization: Bearer $bearer"
Heatmap
curl 'https://api.ctapp.io/api/v1/sense?key=key&query=uniques&type=heatmap' -H "authorization: Bearer $bearer"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment