curl --request GET \
--url https://apiweb.mile.app/api/v3/analytics/catalog \
--header 'Authorization: Bearer <token>'import requests
url = "https://apiweb.mile.app/api/v3/analytics/catalog"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apiweb.mile.app/api/v3/analytics/catalog', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apiweb.mile.app/api/v3/analytics/catalog",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://apiweb.mile.app/api/v3/analytics/catalog"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://apiweb.mile.app/api/v3/analytics/catalog")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v3/analytics/catalog")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": true,
"data": {
"id": "task",
"kind": "builtin",
"label": "data_source.task",
"specVersion": 1,
"timeFieldCandidates": [
"createdTime",
"updatedTime",
"startTime",
"endTime",
"doneTime"
],
"defaultTimeField": "startTime",
"aggregations": {
"measures": {
"count": "supported",
"cardinality": "supported",
"avg": "supported",
"sum": "supported",
"min": "supported",
"max": "supported",
"avgDuration": "supported",
"avgAge": "supported",
"doneShare": "supported"
},
"dimensions": {
"terms": "supported",
"dateHistogram": "supported",
"geoGrid": "supported",
"range": "unsupported",
"filters": "unsupported",
"ageBucket": "supported",
"hourOfDay": "supported",
"dayOfWeek": "supported"
}
},
"limits": {
"maxMeasures": 3,
"maxDimensions": 2,
"maxNestingDepth": 2,
"maxBuckets": 5000,
"maxTermsSize": 50,
"maxTermsSizeHardCap": 1000,
"maxTimeRangeDays": 31,
"maxQueriesPerBatch": 12,
"maxRows": 1000,
"queryTimeoutSeconds": 10,
"batchBudgetSeconds": 20,
"tuningStatus": "untuned_defaults"
},
"scope": {
"commonData": false,
"rowLevelSecurity": "none"
},
"requiresBigData": false,
"availability": {
"available": true,
"reason": null,
"description": null
},
"fields": [
{
"name": "status",
"label": "field.task.status",
"optionData": [
"UNASSIGNED",
"ONGOING",
"DONE"
],
"isArray": false,
"unit": null,
"capability": {
"filterable": true,
"groupable": true,
"metricable": false,
"distinctCountable": true,
"timeFieldEligible": false,
"sortable": true
},
"valuePicker": "list",
"valuePickerField": null,
"cardinality": "low",
"fanOut": false,
"availability": {
"available": true,
"blockedReason": null
},
"quality": {
"level": "ok",
"fillRate": null,
"zeroRate": null,
"measuredAt": null,
"sampleSize": null,
"note": null
}
},
{
"name": "travelDuration",
"label": "field.task.travelDuration",
"optionData": null,
"isArray": false,
"unit": "duration",
"capability": {
"filterable": true,
"groupable": false,
"metricable": true,
"distinctCountable": true,
"timeFieldEligible": false,
"sortable": true
},
"valuePicker": "none",
"valuePickerField": null,
"cardinality": "high",
"fanOut": false,
"availability": {
"available": true,
"blockedReason": null
},
"quality": {
"level": "unverified",
"fillRate": null,
"zeroRate": null,
"measuredAt": null,
"sampleSize": null,
"note": "field_quality.unverified"
}
}
],
"durationPairs": [
{
"id": "createdToDone",
"from": "createdTime",
"to": "doneTime",
"labelKey": "pair.createdToDone",
"requireStatus": [
"DONE"
],
"signed": false,
"suggested": true
},
{
"id": "endToDone",
"from": "endTime",
"to": "doneTime",
"labelKey": "pair.endToDone",
"requireStatus": [
"DONE"
],
"signed": true,
"suggested": true
},
{
"id": "startToDone",
"from": "startTime",
"to": "doneTime",
"labelKey": "pair.startToDone",
"requireStatus": [
"DONE"
],
"signed": true,
"suggested": true
},
{
"id": "createdToStart",
"from": "createdTime",
"to": "startTime",
"labelKey": "pair.createdToStart",
"requireStatus": null,
"signed": false,
"suggested": true
},
{
"id": "startToEnd",
"from": "startTime",
"to": "endTime",
"labelKey": "pair.startToEnd",
"requireStatus": null,
"signed": false,
"suggested": true
},
{
"id": "createdToEnd",
"from": "createdTime",
"to": "endTime",
"labelKey": null,
"requireStatus": null,
"signed": false,
"suggested": false
}
],
"ageFields": [
{
"field": "createdTime",
"labelKey": "age_field.createdTime",
"statuses": [
"UNASSIGNED",
"ONGOING"
]
},
{
"field": "endTime",
"labelKey": "age_field.endTime",
"statuses": [
"UNASSIGNED",
"ONGOING"
]
}
],
"bucketPresets": {
"age_default": [
{
"key": "lt1d"
},
{
"key": "1to3d"
},
{
"key": "3to7d"
},
{
"key": "gte7d"
}
]
}
}
}{
"status": false,
"message": "Unauthenticated.",
"failedCode": "auth-034"
}{
"status": false,
"message": "Access denied. You do not have permission for view dashboard. Please contact your admin to request access.",
"failedCode": "sys-035"
}{
"status": false,
"message": "Unknown data source 'data:6ae2116a2fd54630640965ff'.",
"error": {
"code": "data_source_unknown",
"message": "Unknown data source 'data:6ae2116a2fd54630640965ff'.",
"field": "dataSourceId"
}
}Read analytics catalog
Retrieves the data sources available to analytics queries and their availability for the caller’s organization. With dataSource, returns that source’s full descriptor: time fields, measure functions, dimension kinds, limits, every field with its capabilities, and the time vocabulary (durationPairs, ageFields, bucketPresets). The list carries one task:<flowId> summary per flow of the organization (kind: flow, flowId, flowName; the client labels it “Task - ”) for organizations with Big Data, and one data:<dataTypeId> summary per internal data type for every organization (kind: dataType, dataTypeId, dataTypeName, commonData; the client labels it “Data - ”); a data type that extends a user record is listed unavailable (data_source_blocked.extends_entity), an external data type is not listed. task_detail is listed only for organizations without Big Data (always unavailable).
Task columns follow the product field list, the same list Report and Export show: Task (all) has _id (Id), flow, flowId (filter only), hubName (Hub), hubIdentifier (Hub id), title, content, label, status, startTime, endTime, updatedTime, assignee, assignedBy, createdBy, createdFrom, createdTime, doneBy, doneCoordinate, doneTime, travelDuration and refId (Ref id, the client’s own task id). Hub id is named hubIdentifier because hubId stays a protected field (protected_field_rejected); a filter on hubName or hubIdentifier can only narrow the hub scope the server applies. No Task column is listed unavailable. The old Task fields docId, organizationName, organizationEmail, hubCountry, hubLat, hubLng and year are no longer listed; a stored card that names one fails only its own card with field_unavailable, and saving such a spec is refused.
User columns are a fixed list, in this order: status (account status: active, pending, disable, reject, inactive, unverified), roleId (the stored role id), roleName (the role name), teamId (team ids, several values, fans out), hub (the user’s hub ids, several values, fans out; picked from the caller’s hubs), email, name, language, firstLogin (true / false), userId (the user id), and the dates createdTime, verifiedTime, updatedTime, lastLogin. teamId and hub stay ids in the result; the item carries valueLabels with their names. Every User column filters and groups; count is the only measure. The Users source is listed for every organization, with or without Big Data. Secret and contact fields of a user (phone number, avatar, activation code, authenticator, permissions and the like) are never listed, and a spec naming one, or a removed field such as lastActivity, is 422 field_unknown.
Columns are typed by the search index, not by the form or data type definition: a per-flow descriptor has every Task (all) column except flow, with the same behaviour and always available (a column the flow’s tasks never filled answers empty), plus the flow’s own reserved keys the index maps (for example travelDistance), one pageNDoneTime column per page (title like “Page1Done Time”), and every flow component (origin: component), and a Data descriptor has the data type fields (origin: data) plus the system fields createdTime, updatedTime, createdBy, updatedBy (origin: core). A column the index stores as keyword filters and groups, as a number is a measure field, as a date is a time field and a date grouping, as a geolocation (type: geolocation, for example doneCoordinate or a Geolocation component) is one raw “lat, lng” Sample rows column with no filter, grouping or measure; any other storage is not listed. A date column is type: date (no time of day) when its flow component input type is Date or its data type field is date, else dateTime; a date column offers no hourly grouping. Photo, signature, voice, video, bill and list components are never offered. Components and data type fields hidden for a role in Field Accessibility are NOT removed: they appear like any other column. A data type field no record carries yet is listed unavailable with field_blocked.no_values_yet; when the index could not be checked every data type field is listed unavailable with field_blocked.unconfirmed and componentStatus is unchecked.
curl --request GET \
--url https://apiweb.mile.app/api/v3/analytics/catalog \
--header 'Authorization: Bearer <token>'import requests
url = "https://apiweb.mile.app/api/v3/analytics/catalog"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apiweb.mile.app/api/v3/analytics/catalog', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apiweb.mile.app/api/v3/analytics/catalog",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://apiweb.mile.app/api/v3/analytics/catalog"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://apiweb.mile.app/api/v3/analytics/catalog")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v3/analytics/catalog")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": true,
"data": {
"id": "task",
"kind": "builtin",
"label": "data_source.task",
"specVersion": 1,
"timeFieldCandidates": [
"createdTime",
"updatedTime",
"startTime",
"endTime",
"doneTime"
],
"defaultTimeField": "startTime",
"aggregations": {
"measures": {
"count": "supported",
"cardinality": "supported",
"avg": "supported",
"sum": "supported",
"min": "supported",
"max": "supported",
"avgDuration": "supported",
"avgAge": "supported",
"doneShare": "supported"
},
"dimensions": {
"terms": "supported",
"dateHistogram": "supported",
"geoGrid": "supported",
"range": "unsupported",
"filters": "unsupported",
"ageBucket": "supported",
"hourOfDay": "supported",
"dayOfWeek": "supported"
}
},
"limits": {
"maxMeasures": 3,
"maxDimensions": 2,
"maxNestingDepth": 2,
"maxBuckets": 5000,
"maxTermsSize": 50,
"maxTermsSizeHardCap": 1000,
"maxTimeRangeDays": 31,
"maxQueriesPerBatch": 12,
"maxRows": 1000,
"queryTimeoutSeconds": 10,
"batchBudgetSeconds": 20,
"tuningStatus": "untuned_defaults"
},
"scope": {
"commonData": false,
"rowLevelSecurity": "none"
},
"requiresBigData": false,
"availability": {
"available": true,
"reason": null,
"description": null
},
"fields": [
{
"name": "status",
"label": "field.task.status",
"optionData": [
"UNASSIGNED",
"ONGOING",
"DONE"
],
"isArray": false,
"unit": null,
"capability": {
"filterable": true,
"groupable": true,
"metricable": false,
"distinctCountable": true,
"timeFieldEligible": false,
"sortable": true
},
"valuePicker": "list",
"valuePickerField": null,
"cardinality": "low",
"fanOut": false,
"availability": {
"available": true,
"blockedReason": null
},
"quality": {
"level": "ok",
"fillRate": null,
"zeroRate": null,
"measuredAt": null,
"sampleSize": null,
"note": null
}
},
{
"name": "travelDuration",
"label": "field.task.travelDuration",
"optionData": null,
"isArray": false,
"unit": "duration",
"capability": {
"filterable": true,
"groupable": false,
"metricable": true,
"distinctCountable": true,
"timeFieldEligible": false,
"sortable": true
},
"valuePicker": "none",
"valuePickerField": null,
"cardinality": "high",
"fanOut": false,
"availability": {
"available": true,
"blockedReason": null
},
"quality": {
"level": "unverified",
"fillRate": null,
"zeroRate": null,
"measuredAt": null,
"sampleSize": null,
"note": "field_quality.unverified"
}
}
],
"durationPairs": [
{
"id": "createdToDone",
"from": "createdTime",
"to": "doneTime",
"labelKey": "pair.createdToDone",
"requireStatus": [
"DONE"
],
"signed": false,
"suggested": true
},
{
"id": "endToDone",
"from": "endTime",
"to": "doneTime",
"labelKey": "pair.endToDone",
"requireStatus": [
"DONE"
],
"signed": true,
"suggested": true
},
{
"id": "startToDone",
"from": "startTime",
"to": "doneTime",
"labelKey": "pair.startToDone",
"requireStatus": [
"DONE"
],
"signed": true,
"suggested": true
},
{
"id": "createdToStart",
"from": "createdTime",
"to": "startTime",
"labelKey": "pair.createdToStart",
"requireStatus": null,
"signed": false,
"suggested": true
},
{
"id": "startToEnd",
"from": "startTime",
"to": "endTime",
"labelKey": "pair.startToEnd",
"requireStatus": null,
"signed": false,
"suggested": true
},
{
"id": "createdToEnd",
"from": "createdTime",
"to": "endTime",
"labelKey": null,
"requireStatus": null,
"signed": false,
"suggested": false
}
],
"ageFields": [
{
"field": "createdTime",
"labelKey": "age_field.createdTime",
"statuses": [
"UNASSIGNED",
"ONGOING"
]
},
{
"field": "endTime",
"labelKey": "age_field.endTime",
"statuses": [
"UNASSIGNED",
"ONGOING"
]
}
],
"bucketPresets": {
"age_default": [
{
"key": "lt1d"
},
{
"key": "1to3d"
},
{
"key": "3to7d"
},
{
"key": "gte7d"
}
]
}
}
}{
"status": false,
"message": "Unauthenticated.",
"failedCode": "auth-034"
}{
"status": false,
"message": "Access denied. You do not have permission for view dashboard. Please contact your admin to request access.",
"failedCode": "sys-035"
}{
"status": false,
"message": "Unknown data source 'data:6ae2116a2fd54630640965ff'.",
"error": {
"code": "data_source_unknown",
"message": "Unknown data source 'data:6ae2116a2fd54630640965ff'.",
"field": "dataSourceId"
}
}Query Parameters
Response
Success - data-source list, or one full descriptor. The example is the Task descriptor. A Data source descriptor (?dataSource=data:<dataTypeId>, excerpt: some fields and keys left out) reads:
{
"id": "data:6ae211692fd5463064096512",
"kind": "dataType",
"label": "data_source.data_type",
"timeFieldCandidates": [
"launchDate",
"createdTime",
"updatedTime"
],
"defaultTimeField": "createdTime",
"aggregations": {
"measures": {
"count": "supported",
"cardinality": "supported",
"avg": "supported",
"sum": "supported",
"min": "supported",
"max": "supported",
"avgDuration": "supported",
"avgAge": "unsupported",
"doneShare": "unsupported"
},
"dimensions": {
"terms": "supported",
"dateHistogram": "supported",
"geoGrid": "unsupported",
"range": "unsupported",
"filters": "unsupported",
"ageBucket": "unsupported",
"hourOfDay": "supported",
"dayOfWeek": "supported"
}
},
"scope": {
"commonData": false,
"rowLevelSecurity": "none"
},
"requiresBigData": false,
"availability": {
"available": true,
"reason": null,
"description": null
},
"fields": [
{
"name": "status",
"label": "Status",
"optionData": [
"open",
"closed",
"hold"
],
"unit": null,
"capability": {
"filterable": true,
"groupable": true,
"metricable": false,
"distinctCountable": true,
"timeFieldEligible": false,
"sortable": true
},
"valuePicker": "list",
"cardinality": "low",
"origin": "data",
"availability": {
"available": true,
"blockedReason": null
}
},
{
"name": "qty",
"label": "Quantity",
"optionData": null,
"unit": "plain",
"capability": {
"filterable": true,
"groupable": false,
"metricable": true,
"distinctCountable": false,
"timeFieldEligible": false,
"sortable": true
},
"valuePicker": "none",
"cardinality": "high",
"origin": "data",
"availability": {
"available": true,
"blockedReason": null
}
},
{
"name": "launchDate",
"label": "Launch date",
"optionData": null,
"unit": null,
"capability": {
"filterable": true,
"groupable": true,
"metricable": false,
"distinctCountable": false,
"timeFieldEligible": true,
"sortable": true
},
"valuePicker": "none",
"cardinality": "high",
"origin": "data",
"availability": {
"available": true,
"blockedReason": null
}
},
{
"name": "postalCode",
"label": "Postal code",
"optionData": null,
"unit": null,
"capability": {
"filterable": false,
"groupable": false,
"metricable": false,
"distinctCountable": false,
"timeFieldEligible": false,
"sortable": false
},
"valuePicker": "none",
"cardinality": "unknown",
"origin": "data",
"availability": {
"available": false,
"blockedReason": "field_blocked.no_values_yet"
}
},
{
"name": "createdTime",
"label": "field.data.createdTime",
"optionData": null,
"unit": null,
"capability": {
"filterable": true,
"groupable": true,
"metricable": false,
"distinctCountable": false,
"timeFieldEligible": true,
"sortable": true
},
"valuePicker": "none",
"cardinality": "high",
"origin": "core",
"availability": {
"available": true,
"blockedReason": null
}
}
],
"durationPairs": [],
"ageFields": [],
"bucketPresets": {},
"viewPermission": "view/data",
"previewColumns": [
"status",
"qty",
"launchDate",
"createdTime",
"updatedTime",
"createdBy",
"updatedBy"
],
"durationEndpoints": [
"launchDate",
"createdTime"
],
"flowId": null,
"flowName": null,
"componentStatus": "ok",
"timeless": true,
"dataTypeId": "6ae211692fd5463064096512",
"dataTypeName": "Outlets"
}