Read dashboard templates
curl --request GET \
--url https://apiweb.mile.app/api/v3/dynamic-dashboard-templates \
--header 'Authorization: Bearer <token>'import requests
url = "https://apiweb.mile.app/api/v3/dynamic-dashboard-templates"
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/dynamic-dashboard-templates', 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/dynamic-dashboard-templates",
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/dynamic-dashboard-templates"
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/dynamic-dashboard-templates")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v3/dynamic-dashboard-templates")
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,
"code": 200,
"message": "Success.",
"data": [
{
"_id": "66e0b3f1c9a8d7e6f5a4b301",
"organizationId": "system",
"schemaVersion": 1,
"name": "dailyOperations",
"title": "Daily Operations",
"description": "Today's volume, what is done, what is still open.",
"grid": {
"columns": 12
},
"widgets": [
{
"widget": {
"schemaVersion": 1,
"name": "Total Tasks",
"description": "Tasks whose start time falls in the selected range, across every status.",
"category": "overview",
"viz": "kpi",
"spec": {
"specVersion": 1,
"dataSourceId": "task",
"timeField": "startTime",
"measures": [
{
"id": "m1",
"fn": "count"
}
],
"dimensions": [],
"filters": []
},
"composite": null,
"content": null,
"defaultLayout": {
"w": 3,
"h": null
}
},
"layout": {
"w": 3,
"h": null
}
},
{
"widget": {
"schemaVersion": 1,
"name": "Tasks by Status",
"description": "Task count per status in the selected range.",
"category": "taskStatus",
"viz": "donut",
"spec": {
"specVersion": 1,
"dataSourceId": "task",
"timeField": "startTime",
"measures": [
{
"id": "m1",
"fn": "count"
}
],
"dimensions": [
{
"id": "d1",
"kind": "terms",
"field": "status",
"limit": 3
}
],
"filters": []
},
"composite": null,
"content": null,
"defaultLayout": {
"w": 6,
"h": 6
}
},
"layout": {
"w": 6,
"h": 6
}
}
],
"createdBy": "system",
"updatedBy": "system",
"createdTime": "2026-09-30T03:00:00.000000Z",
"updatedTime": "2026-09-30T03:00:00.000000Z"
},
{
"_id": "66f9b0aa1d2e3f4a5b6c7d8e",
"organizationId": "6650c2a1f3b9e4001c7d2a10",
"schemaVersion": 1,
"name": "Hub morning view",
"description": "Volume, completion and backlog for one hub.",
"grid": {
"columns": 12
},
"widgets": [
{
"widget": {
"schemaVersion": 1,
"name": "Total Tasks",
"description": "Tasks whose start time falls in the selected range, across every status.",
"category": "overview",
"viz": "kpi",
"spec": {
"specVersion": 1,
"dataSourceId": "task",
"timeField": "startTime",
"measures": [
{
"id": "m1",
"fn": "count"
}
],
"dimensions": [],
"filters": []
},
"composite": null,
"content": null,
"defaultLayout": {
"w": 3,
"h": null
}
},
"layout": {
"w": 3,
"h": null
}
},
{
"widget": {
"schemaVersion": 1,
"name": "Tasks by Status",
"description": "Task count per status in the selected range.",
"category": "taskStatus",
"viz": "donut",
"spec": {
"specVersion": 1,
"dataSourceId": "task",
"timeField": "startTime",
"measures": [
{
"id": "m1",
"fn": "count"
}
],
"dimensions": [
{
"id": "d1",
"kind": "terms",
"field": "status",
"limit": 3
}
],
"filters": []
},
"composite": null,
"content": null,
"defaultLayout": {
"w": 6,
"h": 6
}
},
"layout": {
"w": 6,
"h": 6,
"x": 3,
"y": 0
}
}
],
"origin": {
"kind": "dashboard",
"sourceId": "66f9a1c2e4b0a7d3c1f20a11",
"sourceSchemaVersion": 1,
"copiedAt": "2026-09-30T10:02:11+07:00"
},
"createdBy": "[email protected]",
"updatedBy": "[email protected]",
"createdTime": "2026-09-30T03:02:11.338000Z",
"updatedTime": "2026-09-30T03:02:11.338000Z"
}
]
}{
"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,
"code": 500,
"message": "something_wrong",
"failedCode": "dydsh-045"
}Dashboard
Read dashboard templates
Retrieves the built-in templates plus the templates of the caller’s organization as one list, sorted by display name. Send a template’s name as templateId to create a dashboard from it.
GET
/
dynamic-dashboard-templates
Read dashboard templates
curl --request GET \
--url https://apiweb.mile.app/api/v3/dynamic-dashboard-templates \
--header 'Authorization: Bearer <token>'import requests
url = "https://apiweb.mile.app/api/v3/dynamic-dashboard-templates"
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/dynamic-dashboard-templates', 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/dynamic-dashboard-templates",
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/dynamic-dashboard-templates"
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/dynamic-dashboard-templates")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v3/dynamic-dashboard-templates")
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,
"code": 200,
"message": "Success.",
"data": [
{
"_id": "66e0b3f1c9a8d7e6f5a4b301",
"organizationId": "system",
"schemaVersion": 1,
"name": "dailyOperations",
"title": "Daily Operations",
"description": "Today's volume, what is done, what is still open.",
"grid": {
"columns": 12
},
"widgets": [
{
"widget": {
"schemaVersion": 1,
"name": "Total Tasks",
"description": "Tasks whose start time falls in the selected range, across every status.",
"category": "overview",
"viz": "kpi",
"spec": {
"specVersion": 1,
"dataSourceId": "task",
"timeField": "startTime",
"measures": [
{
"id": "m1",
"fn": "count"
}
],
"dimensions": [],
"filters": []
},
"composite": null,
"content": null,
"defaultLayout": {
"w": 3,
"h": null
}
},
"layout": {
"w": 3,
"h": null
}
},
{
"widget": {
"schemaVersion": 1,
"name": "Tasks by Status",
"description": "Task count per status in the selected range.",
"category": "taskStatus",
"viz": "donut",
"spec": {
"specVersion": 1,
"dataSourceId": "task",
"timeField": "startTime",
"measures": [
{
"id": "m1",
"fn": "count"
}
],
"dimensions": [
{
"id": "d1",
"kind": "terms",
"field": "status",
"limit": 3
}
],
"filters": []
},
"composite": null,
"content": null,
"defaultLayout": {
"w": 6,
"h": 6
}
},
"layout": {
"w": 6,
"h": 6
}
}
],
"createdBy": "system",
"updatedBy": "system",
"createdTime": "2026-09-30T03:00:00.000000Z",
"updatedTime": "2026-09-30T03:00:00.000000Z"
},
{
"_id": "66f9b0aa1d2e3f4a5b6c7d8e",
"organizationId": "6650c2a1f3b9e4001c7d2a10",
"schemaVersion": 1,
"name": "Hub morning view",
"description": "Volume, completion and backlog for one hub.",
"grid": {
"columns": 12
},
"widgets": [
{
"widget": {
"schemaVersion": 1,
"name": "Total Tasks",
"description": "Tasks whose start time falls in the selected range, across every status.",
"category": "overview",
"viz": "kpi",
"spec": {
"specVersion": 1,
"dataSourceId": "task",
"timeField": "startTime",
"measures": [
{
"id": "m1",
"fn": "count"
}
],
"dimensions": [],
"filters": []
},
"composite": null,
"content": null,
"defaultLayout": {
"w": 3,
"h": null
}
},
"layout": {
"w": 3,
"h": null
}
},
{
"widget": {
"schemaVersion": 1,
"name": "Tasks by Status",
"description": "Task count per status in the selected range.",
"category": "taskStatus",
"viz": "donut",
"spec": {
"specVersion": 1,
"dataSourceId": "task",
"timeField": "startTime",
"measures": [
{
"id": "m1",
"fn": "count"
}
],
"dimensions": [
{
"id": "d1",
"kind": "terms",
"field": "status",
"limit": 3
}
],
"filters": []
},
"composite": null,
"content": null,
"defaultLayout": {
"w": 6,
"h": 6
}
},
"layout": {
"w": 6,
"h": 6,
"x": 3,
"y": 0
}
}
],
"origin": {
"kind": "dashboard",
"sourceId": "66f9a1c2e4b0a7d3c1f20a11",
"sourceSchemaVersion": 1,
"copiedAt": "2026-09-30T10:02:11+07:00"
},
"createdBy": "[email protected]",
"updatedBy": "[email protected]",
"createdTime": "2026-09-30T03:02:11.338000Z",
"updatedTime": "2026-09-30T03:02:11.338000Z"
}
]
}{
"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,
"code": 500,
"message": "something_wrong",
"failedCode": "dydsh-045"
}