Read insight report by ID
curl --request GET \
--url https://apiweb.mile.app/api/v3/ai-insight/results/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://apiweb.mile.app/api/v3/ai-insight/results/{id}"
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/ai-insight/results/{id}', 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/ai-insight/results/{id}",
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/ai-insight/results/{id}"
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/ai-insight/results/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v3/ai-insight/results/{id}")
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": "670fa1b2c3d4e5f6a7b8c9d0",
"name": "Delivery, first half of October",
"status": "done",
"objectType": "flow",
"objectId": "64ee1a2b3c4d5e6f7a8b9c0d",
"objectName": "Delivery",
"periodStart": "2026-10-01",
"periodEnd": "2026-10-15",
"generatedBy": "[email protected]",
"createdTime": "2026-10-16T02:00:00.000000Z",
"failureReason": null,
"timezone": "Asia/Jakarta",
"language": "en",
"generatedAt": "2026-10-16T02:03:10.000000Z",
"summary": "Deliveries grew 12% while on-time completion dropped in the last week.",
"baseline": [
{
"key": "totalTasks",
"title": "Total tasks",
"value": 1840
}
],
"insights": [
{
"key": "lateRise",
"section": "performance",
"severity": "high",
"title": "Late deliveries rose in week 2",
"description": "..."
}
],
"recommendations": [
{
"title": "Rebalance afternoon routes",
"description": "..."
}
],
"failureReasonKey": null
}
}{
"status": false,
"message": "Data not found"
}Insight
Read insight report by ID
Returns one insight report with its summary, baseline numbers, findings (insights) and suggested actions (recommendations). On a failed report, failureReason explains why.
On the Free plan only the first finding and the total tasks figure are returned, recommendations is empty, and locked: true with lockedSectionCounts tells how much is hidden.
Requires the view/ai-insight permission.
GET
/
ai-insight
/
results
/
{id}
Read insight report by ID
curl --request GET \
--url https://apiweb.mile.app/api/v3/ai-insight/results/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://apiweb.mile.app/api/v3/ai-insight/results/{id}"
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/ai-insight/results/{id}', 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/ai-insight/results/{id}",
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/ai-insight/results/{id}"
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/ai-insight/results/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v3/ai-insight/results/{id}")
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": "670fa1b2c3d4e5f6a7b8c9d0",
"name": "Delivery, first half of October",
"status": "done",
"objectType": "flow",
"objectId": "64ee1a2b3c4d5e6f7a8b9c0d",
"objectName": "Delivery",
"periodStart": "2026-10-01",
"periodEnd": "2026-10-15",
"generatedBy": "[email protected]",
"createdTime": "2026-10-16T02:00:00.000000Z",
"failureReason": null,
"timezone": "Asia/Jakarta",
"language": "en",
"generatedAt": "2026-10-16T02:03:10.000000Z",
"summary": "Deliveries grew 12% while on-time completion dropped in the last week.",
"baseline": [
{
"key": "totalTasks",
"title": "Total tasks",
"value": 1840
}
],
"insights": [
{
"key": "lateRise",
"section": "performance",
"severity": "high",
"title": "Late deliveries rose in week 2",
"description": "..."
}
],
"recommendations": [
{
"title": "Rebalance afternoon routes",
"description": "..."
}
],
"failureReasonKey": null
}
}{
"status": false,
"message": "Data not found"
}