SentinelPro API Documentation

Complete guide to integrating with the SentinelPro Analytics API

Overview

The SentinelPro API provides programmatic access to your analytics data. Use it to build custom dashboards, automate reports, or integrate analytics into your applications.

Base Configuration

  • Base URL: https://{AccountName}.sentinelpro.com/api/v1/
  • Authorization: API Key (passed via SENTINEL-API-KEY header)
  • Content-Type: JSON (via data query parameter, URL-encoded)
  • Rate limit: 1 request per second
  • API Version: v1

Authentication

Include your API key in the request headers for all API calls:

SENTINEL-API-KEY: your_api_key_here

Endpoints

1. Events Endpoint

Fetch aggregated event data based on dimensions, metrics, and filters.

Method GET
Endpoint /api/v1/events/
Query Param data=<url_encoded_json>

Example Request (cURL):

curl -G "https://{AccountName}.sentinelpro.com/api/v1/events/" \
--data-urlencode 'data={
 "filters": {
   "date": {"gt": "2025-04-29 21:00:00", "lt": "2025-05-02 23:00:00"},
   "device": {"in": ["Mobile", "Desktop"]},
   "propertyId": {"in": ["www.domain1.com", "www.domain2.com"]},
   "eventName": {"eq": "loadedLandingPage"},
   "intent": {"in": ["Evergreen", "Feed"]}
 },
 "metrics": ["events"],
 "dimensions": ["date", "device"],
 "granularity": "hourly",
 "orderBy": {"date": "asc"},
 "pagination": {
   "pageSize": 1000,
   "pageNumber": 1
 }
}' \
-H "SENTINEL-API-KEY: your_api_key_here"

2. Traffic Endpoint

Retrieve traffic insights like sessions, visits, page views, and engagement metrics.

Method GET
Endpoint /api/v1/traffic/
Query Param data=<url_encoded_json>

Common Request Body Structure:

{
 "filters": {
   "dimension": {
     "operator": "value"
   }
 },
 "metrics": ["metric1", "metric2"],
 "dimensions": ["dimension1", "dimension2"],
 "granularity": "hourly|daily",
 "orderBy": {
   "dimensionOrMetric": "asc|desc"
 },
 "pagination": {
   "pageSize": 100,
   "pageNumber": 1
 }
}

Supported Metrics

Events Endpoint

Metric Description
events Total event count

Traffic Endpoint

Metric Description
sessions Total session count
visits Total Visits
views Total Pageviews
pagesPerSession views divided by sessions
averageEngagedDuration Avg engaged time (seconds)
averageEngagedDepth Avg scroll depth (%)
averageConnectionSpeed Avg connection speed (Mbps)

Supported Dimensions

Common Dimensions

  • date
  • propertyId
  • pagePath (Traffic Endpoint only)
  • geo
  • device
  • referrer
  • os
  • browser
  • plan
  • loginStatus
  • utmCampaign
  • utmMedium
  • utmSource
  • subdomain
  • {Custom dimensions}

Events-specific Dimensions

  • eventCategory
  • eventName
  • eventValue

Supported Granularity

  • hourly
  • daily
  • fiveMinutes

Filter Operators

Operator Description
eqEquals
neqNot equals
inIn list
notInNot in list
gtGreater than
gteGreater than or equal
ltLess than
lteLess than or equal
containsSubstring match
startsWithBegins with
endsWithEnds with

Example PHP Request

<?php

$json = '{
 "filters": {
   "date": {"gt": "2025-01-01 00:00:00", "lt": "2025-02-01 00:00:00"},
   "device": {"in": ["Mobile", "Desktop"]}
 },
 "granularity": "hourly",
 "metrics": ["events"],
 "dimensions": ["date", "device", "eventName"],
 "orderBy": {"date": "asc", "events": "asc"},
 "pagination": {
   "pageSize": 100,
   "pageNumber": 1
 }
}';

$encodedData = urlencode($json);

$curl = curl_init();

curl_setopt_array($curl, [
   CURLOPT_URL => "https://{AccountName}.sentinelpro.com/api/v1/events/?data=" . $encodedData,
   CURLOPT_RETURNTRANSFER => true,
   CURLOPT_HTTPHEADER => [
       "SENTINEL-API-KEY: your_api_key_here"
   ],
]);

$response = curl_exec($curl);
curl_close($curl);

echo $response;

Response Structure

{
 "totalCount": 146,
 "totalPage": 1,
 "currentPage": 1,
 "extraData": [],
 "totals": [],
 "data": [
   {
     "date": "2025-04-29 22:00:00",
     "device": "Desktop",
     "events": "53"
   },
   ...
 ]
}

Response Fields:

  • totalCount: Total rows matching the query
  • totalPage: Total number of pages available
  • currentPage: Current page number
  • data: Array of metric breakdowns by dimensions
  • totals: Reserved for future total aggregations
  • extraData: Reserved for additional metadata