GET /api/v3/analytics/constants/timeframes¶
Summary¶
GET /analytics/constants/timeframes
Description¶
Return a list of valid timeframe constants for querying the analytics endpoints
Tags: analytics
Parameters¶
Header Parameters¶
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
Authorization |
string |
✓ Yes | Bearer {AuthToken} |
|
Content-Type |
string |
✓ Yes | application/json |
|
Accept |
string |
✓ Yes | application/json |
|
AppIdV3 |
string |
✓ Yes | LCUID-LAP-********-****-****-****-************ |
Responses¶
Response: 200¶
Content Type: application/json¶
Schema¶
Type: object
Properties:
success(boolean)timeframes(array)-
Array items:
objectType:objectProperties:
timeframe(string)name(string)allowable_periods(array)- Array items:
string allowable_analytics_views(array)- Array items:
string selectable(boolean)
Example Response¶
{
"success": true,
"timeframes": [
{
"timeframe": "all",
"name": "All Time",
"allowable_periods": [
"daily",
"weekly",
"monthly"
],
"allowable_analytics_views": [
"plays_by_period",
"plays_by_item",
"plays_by_campaign",
"plays_by_board",
"feed_runs_by_period",
"third_party_api_transactions_by_period"
],
"selectable": true
},
{
"timeframe": "last_minute",
"name": "Last Minute",
"allowable_periods": [
"per-second"
],
"allowable_analytics_views": [],
"selectable": false
},
{
"timeframe": "last_5_minutes",
"name": "Last 5 Minutes",
"allowable_periods": [
"per-second",
"per-minute"
],
"allowable_analytics_views": [],
"selectable": false
},
{
"timeframe": "last_half_hour",
"name": "Last Half Hour",
"allowable_periods": [
"per-second",
"per-minute"
],
"allowable_analytics_views": [
"plays_by_period",
"plays_by_item"
],
"selectable": true
},
{
"timeframe": "last_hour",
"name": "Last Hour",
"allowable_periods": [
"per-minute"
],
"allowable_analytics_views": [
"plays_by_period",
"plays_by_item",
"plays_by_campaign",
"feed_runs_by_period"
],
"selectable": true
},
{
"timeframe": "last_2_hours",
"name": "Last 2 Hours",
"allowable_periods": [
"per-minute"
],
"allowable_analytics_views": [
"plays_by_period",
"plays_by_item",
"plays_by_campaign",
"feed_runs_by_period"
],
"selectable": true
},
{
"timeframe": "last_6_hours",
"name": "Last 6 Hours",
"allowable_periods": [
"hourly",
"per-minute"
],
"allowable_analytics_views": [
"plays_by_period",
"plays_by_item",
"plays_by_campaign",
"feed_runs_by_period"
],
"selectable": true
},
{
"timeframe": "last_24_hours",
"name": "Last 24 Hours",
"allowable_periods": [
"hourly"
],
"allowable_analytics_views": [
"plays_by_period",
"plays_by_item",
"plays_by_campaign",
"feed_runs_by_period"
],
"selectable": true
},
{
"timeframe": "today",
"name": "Today",
"allowable_periods": [
"hourly"
],
"allowable_analytics_views": [
"plays_by_period",
"plays_by_item",
"plays_by_campaign",
"plays_by_board",
"feed_runs_by_period",
"third_party_api_transactions_by_period"
],
"selectable": true
},
{
"timeframe": "yesterday",
"name": "Yesterday",
"allowable_periods": [
"hourly"
],
"allowable_analytics_views": [
"plays_by_period",
"plays_by_item",
"plays_by_campaign",
"plays_by_board",
"feed_runs_by_period",
"third_party_api_transactions_by_period"
],
"selectable": true
},
{
"timeframe": "this_week",
"name": "This Week",
"allowable_periods": [
"hourly",
"daily"
],
"allowable_analytics_views": [
"plays_by_period",
"plays_by_item",
"plays_by_campaign",
"plays_by_board",
"feed_runs_by_period",
"third_party_api_transactions_by_period"
],
"selectable": true
},
{
"timeframe": "last_week",
"name": "Last Week",
"allowable_periods": [
"hourly",
"daily"
],
"allowable_analytics_views": [
"plays_by_period",
"plays_by_item",
"plays_by_campaign",
"plays_by_board",
"feed_runs_by_period",
"third_party_api_transactions_by_period"
],
"selectable": true
},
{
"timeframe": "this_month",
"name": "This Month",
"allowable_periods": [
"daily",
"weekly"
],
"allowable_analytics_views": [
"plays_by_period",
"plays_by_item",
"plays_by_campaign",
"plays_by_board",
"feed_runs_by_period",
"third_party_api_transactions_by_period"
],
"selectable": true
},
{
"timeframe": "last_month",
"name": "Last Month",
"allowable_periods": [
"daily",
"weekly"
],
"allowable_analytics_views": [
"plays_by_period",
"plays_by_item",
"plays_by_campaign",
"plays_by_board",
"feed_runs_by_period",
"third_party_api_transactions_by_period"
],
"selectable": true
},
{
"timeframe": "2_months_ago",
"name": "2 Months Ago",
"allowable_periods": [
"daily",
"weekly"
],
"allowable_analytics_views": [
"plays_by_period",
"plays_by_item",
"plays_by_campaign",
"plays_by_board",
"feed_runs_by_period",
"third_party_api_transactions_by_period"
],
"selectable": true
},
{
"timeframe": "3_months_ago",
"name": "3 Months Ago",
"allowable_periods": [
"daily",
"weekly"
],
"allowable_analytics_views": [
"plays_by_period",
"plays_by_item",
"plays_by_campaign",
"plays_by_board",
"feed_runs_by_period",
"third_party_api_transactions_by_period"
],
"selectable": true
},
{
"timeframe": "last_7_days",
"name": "Last 7 Days",
"allowable_periods": [
"hourly",
"daily"
],
"allowable_analytics_views": [
"plays_by_period",
"plays_by_item",
"plays_by_campaign",
"plays_by_board",
"feed_runs_by_period",
"third_party_api_transactions_by_period"
],
"selectable": true
},
{
"timeframe": "last_28_days",
"name": "Last 28 Days (4 weeks)",
"allowable_periods": [
"hourly",
"daily",
"weekly"
],
"allowable_analytics_views": [
"plays_by_period",
"plays_by_item",
"plays_by_campaign",
"plays_by_board",
"feed_runs_by_period",
"third_party_api_transactions_by_period"
],
"selectable": true
},
{
"timeframe": "last_30_days",
"name": "Last 30 Days",
"allowable_periods": [
"daily",
"weekly"
],
"allowable_analytics_views": [
"plays_by_period",
"plays_by_item",
"plays_by_campaign",
"plays_by_board",
"feed_runs_by_period",
"third_party_api_transactions_by_period"
],
"selectable": true
},
{
"timeframe": "last_90_days",
"name": "Last 90 Days",
"allowable_periods": [
"daily",
"weekly",
"monthly"
],
"allowable_analytics_views": [
"plays_by_period",
"plays_by_item",
"plays_by_campaign",
"plays_by_board",
"feed_runs_by_period",
"third_party_api_transactions_by_period"
],
"selectable": true
},
{
"timeframe": "last_180_days",
"name": "Last 180 Days",
"allowable_periods": [
"daily",
"weekly",
"monthly"
],
"allowable_analytics_views": [
"plays_by_period",
"plays_by_item",
"plays_by_campaign",
"plays_by_board",
"feed_runs_by_period",
"third_party_api_transactions_by_period"
],
"selectable": true
},
{
"timeframe": "this_quarter",
"name": "This Quarter",
"allowable_periods": [
"daily",
"weekly",
"monthly"
],
"allowable_analytics_views": [
"plays_by_period",
"plays_by_item",
"plays_by_campaign",
"plays_by_board",
"feed_runs_by_period",
"third_party_api_transactions_by_period"
],
"selectable": true
},
{
"timeframe": "last_quarter",
"name": "Last Quarter",
"allowable_periods": [
"daily",
"weekly",
"monthly"
],
"allowable_analytics_views": [
"plays_by_period",
"plays_by_item",
"plays_by_campaign",
"plays_by_board",
"feed_runs_by_period",
"third_party_api_transactions_by_period"
],
"selectable": true
},
{
"timeframe": "this_year",
"name": "This Year",
"allowable_periods": [
"daily",
"weekly",
"monthly"
],
"allowable_analytics_views": [
"plays_by_period",
"plays_by_item",
"plays_by_campaign",
"plays_by_board",
"feed_runs_by_period",
"third_party_api_transactions_by_period"
],
"selectable": true
},
{
"timeframe": "last_year",
"name": "Last Year",
"allowable_periods": [
"daily",
"weekly",
"monthly"
],
"allowable_analytics_views": [
"plays_by_period",
"plays_by_item",
"plays_by_campaign",
"plays_by_board",
"feed_runs_by_period",
"third_party_api_transactions_by_period"
],
"selectable": true
},
{
"timeframe": "custom",
"name": "Custom",
"allowable_periods": [
"hourly",
"daily",
"weekly",
"monthly"
],
"allowable_analytics_views": [
"plays_by_period",
"plays_by_item",
"plays_by_campaign",
"plays_by_board",
"feed_runs_by_period",
"third_party_api_transactions_by_period"
],
"selectable": true
}
]
}
Example Implementations¶
Bash (cURL)¶
curl --request GET \
--get "https://api.lucit.app/api/v3/analytics/constants/timeframes" \
--header "Authorization: Bearer {AuthToken}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "AppIdV3: LCUID-LAP-********-****-****-****-************"
JavaScript (Fetch API)¶
const url = new URL(
"https://api.lucit.app/api/v3/analytics/constants/timeframes"
);
const headers = {
"Authorization": "Bearer {AuthToken}",
"Content-Type": "application/json",
"Accept": "application/json",
"AppIdV3": "LCUID-LAP-********-****-****-****-************",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
PHP (Guzzle)¶
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.lucit.app/api/v3/analytics/constants/timeframes',
[
'headers' => [
'Authorization' => 'Bearer {AuthToken}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'AppIdV3' => 'LCUID-LAP-********-****-****-****-************',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Python (Requests)¶
import requests
import json
url = 'https://api.lucit.app/api/v3/analytics/constants/timeframes'
headers = {
'Authorization': 'Bearer {AuthToken}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'AppIdV3': 'LCUID-LAP-********-****-****-****-************'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example Responses¶
200 Response¶
{
"success": true,
"timeframes": [
{
"timeframe": "all",
"name": "All Time",
"allowable_periods": [
"daily",
"weekly",
"monthly"
],
"allowable_analytics_views": [
"plays_by_period",
"plays_by_item",
"plays_by_campaign",
"plays_by_board",
"feed_runs_by_period",
"third_party_api_transactions_by_period"
],
"selectable": true
},
{
"timeframe": "last_minute",
"name": "Last Minute",
"allowable_periods": [
"per-second"
],
"allowable_analytics_views": [],
"selectable": false
},
{
"timeframe": "last_5_minutes",
"name": "Last 5 Minutes",
"allowable_periods": [
"per-second",
"per-minute"
],
"allowable_analytics_views": [],
"selectable": false
},
{
"timeframe": "last_half_hour",
"name": "Last Half Hour",
"allowable_periods": [
"per-second",
"per-minute"
],
"allowable_analytics_views": [
"plays_by_period",
"plays_by_item"
],
"selectable": true
},
{
"timeframe": "last_hour",
"name": "Last Hour",
"allowable_periods": [
"per-minute"
],
"allowable_analytics_views": [
"plays_by_period",
"plays_by_item",
"plays_by_campaign",
"feed_runs_by_period"
],
"selectable": true
},
{
"timeframe": "last_2_hours",
"name": "Last 2 Hours",
"allowable_periods": [
"per-minute"
],
"allowable_analytics_views": [
"plays_by_period",
"plays_by_item",
"plays_by_campaign",
"feed_runs_by_period"
],
"selectable": true
},
{
"timeframe": "last_6_hours",
"name": "Last 6 Hours",
"allowable_periods": [
"hourly",
"per-minute"
],
"allowable_analytics_views": [
"plays_by_period",
"plays_by_item",
"plays_by_campaign",
"feed_runs_by_period"
],
"selectable": true
},
{
"timeframe": "last_24_hours",
"name": "Last 24 Hours",
"allowable_periods": [
"hourly"
],
"allowable_analytics_views": [
"plays_by_period",
"plays_by_item",
"plays_by_campaign",
"feed_runs_by_period"
],
"selectable": true
},
{
"timeframe": "today",
"name": "Today",
"allowable_periods": [
"hourly"
],
"allowable_analytics_views": [
"plays_by_period",
"plays_by_item",
"plays_by_campaign",
"plays_by_board",
"feed_runs_by_period",
"third_party_api_transactions_by_period"
],
"selectable": true
},
{
"timeframe": "yesterday",
"name": "Yesterday",
"allowable_periods": [
"hourly"
],
"allowable_analytics_views": [
"plays_by_period",
"plays_by_item",
"plays_by_campaign",
"plays_by_board",
"feed_runs_by_period",
"third_party_api_transactions_by_period"
],
"selectable": true
},
{
"timeframe": "this_week",
"name": "This Week",
"allowable_periods": [
"hourly",
"daily"
],
"allowable_analytics_views": [
"plays_by_period",
"plays_by_item",
"plays_by_campaign",
"plays_by_board",
"feed_runs_by_period",
"third_party_api_transactions_by_period"
],
"selectable": true
},
{
"timeframe": "last_week",
"name": "Last Week",
"allowable_periods": [
"hourly",
"daily"
],
"allowable_analytics_views": [
"plays_by_period",
"plays_by_item",
"plays_by_campaign",
"plays_by_board",
"feed_runs_by_period",
"third_party_api_transactions_by_period"
],
"selectable": true
},
{
"timeframe": "this_month",
"name": "This Month",
"allowable_periods": [
"daily",
"weekly"
],
"allowable_analytics_views": [
"plays_by_period",
"plays_by_item",
"plays_by_campaign",
"plays_by_board",
"feed_runs_by_period",
"third_party_api_transactions_by_period"
],
"selectable": true
},
{
"timeframe": "last_month",
"name": "Last Month",
"allowable_periods": [
"daily",
"weekly"
],
"allowable_analytics_views": [
"plays_by_period",
"plays_by_item",
"plays_by_campaign",
"plays_by_board",
"feed_runs_by_period",
"third_party_api_transactions_by_period"
],
"selectable": true
},
{
"timeframe": "2_months_ago",
"name": "2 Months Ago",
"allowable_periods": [
"daily",
"weekly"
],
"allowable_analytics_views": [
"plays_by_period",
"plays_by_item",
"plays_by_campaign",
"plays_by_board",
"feed_runs_by_period",
"third_party_api_transactions_by_period"
],
"selectable": true
},
{
"timeframe": "3_months_ago",
"name": "3 Months Ago",
"allowable_periods": [
"daily",
"weekly"
],
"allowable_analytics_views": [
"plays_by_period",
"plays_by_item",
"plays_by_campaign",
"plays_by_board",
"feed_runs_by_period",
"third_party_api_transactions_by_period"
],
"selectable": true
},
{
"timeframe": "last_7_days",
"name": "Last 7 Days",
"allowable_periods": [
"hourly",
"daily"
],
"allowable_analytics_views": [
"plays_by_period",
"plays_by_item",
"plays_by_campaign",
"plays_by_board",
"feed_runs_by_period",
"third_party_api_transactions_by_period"
],
"selectable": true
},
{
"timeframe": "last_28_days",
"name": "Last 28 Days (4 weeks)",
"allowable_periods": [
"hourly",
"daily",
"weekly"
],
"allowable_analytics_views": [
"plays_by_period",
"plays_by_item",
"plays_by_campaign",
"plays_by_board",
"feed_runs_by_period",
"third_party_api_transactions_by_period"
],
"selectable": true
},
{
"timeframe": "last_30_days",
"name": "Last 30 Days",
"allowable_periods": [
"daily",
"weekly"
],
"allowable_analytics_views": [
"plays_by_period",
"plays_by_item",
"plays_by_campaign",
"plays_by_board",
"feed_runs_by_period",
"third_party_api_transactions_by_period"
],
"selectable": true
},
{
"timeframe": "last_90_days",
"name": "Last 90 Days",
"allowable_periods": [
"daily",
"weekly",
"monthly"
],
"allowable_analytics_views": [
"plays_by_period",
"plays_by_item",
"plays_by_campaign",
"plays_by_board",
"feed_runs_by_period",
"third_party_api_transactions_by_period"
],
"selectable": true
},
{
"timeframe": "last_180_days",
"name": "Last 180 Days",
"allowable_periods": [
"daily",
"weekly",
"monthly"
],
"allowable_analytics_views": [
"plays_by_period",
"plays_by_item",
"plays_by_campaign",
"plays_by_board",
"feed_runs_by_period",
"third_party_api_transactions_by_period"
],
"selectable": true
},
{
"timeframe": "this_quarter",
"name": "This Quarter",
"allowable_periods": [
"daily",
"weekly",
"monthly"
],
"allowable_analytics_views": [
"plays_by_period",
"plays_by_item",
"plays_by_campaign",
"plays_by_board",
"feed_runs_by_period",
"third_party_api_transactions_by_period"
],
"selectable": true
},
{
"timeframe": "last_quarter",
"name": "Last Quarter",
"allowable_periods": [
"daily",
"weekly",
"monthly"
],
"allowable_analytics_views": [
"plays_by_period",
"plays_by_item",
"plays_by_campaign",
"plays_by_board",
"feed_runs_by_period",
"third_party_api_transactions_by_period"
],
"selectable": true
},
{
"timeframe": "this_year",
"name": "This Year",
"allowable_periods": [
"daily",
"weekly",
"monthly"
],
"allowable_analytics_views": [
"plays_by_period",
"plays_by_item",
"plays_by_campaign",
"plays_by_board",
"feed_runs_by_period",
"third_party_api_transactions_by_period"
],
"selectable": true
},
{
"timeframe": "last_year",
"name": "Last Year",
"allowable_periods": [
"daily",
"weekly",
"monthly"
],
"allowable_analytics_views": [
"plays_by_period",
"plays_by_item",
"plays_by_campaign",
"plays_by_board",
"feed_runs_by_period",
"third_party_api_transactions_by_period"
],
"selectable": true
},
{
"timeframe": "custom",
"name": "Custom",
"allowable_periods": [
"hourly",
"daily",
"weekly",
"monthly"
],
"allowable_analytics_views": [
"plays_by_period",
"plays_by_item",
"plays_by_campaign",
"plays_by_board",
"feed_runs_by_period",
"third_party_api_transactions_by_period"
],
"selectable": true
}
]
}