Read widgets
curl --request GET \
--url https://apiweb.mile.app/api/v3/dynamic-dashboard-widgets \
--header 'Authorization: Bearer <token>'import requests
url = "https://apiweb.mile.app/api/v3/dynamic-dashboard-widgets"
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-widgets', 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-widgets",
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-widgets"
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-widgets")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v3/dynamic-dashboard-widgets")
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": "66e0b3f1c9a8d7e6f5a4b201",
"organizationId": "system",
"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
},
"createdBy": "system",
"updatedBy": "system",
"createdTime": "2026-09-30T03:00:00.000000Z",
"updatedTime": "2026-09-30T03:00:00.000000Z"
},
{
"_id": "66e0b3f1c9a8d7e6f5a4b202",
"organizationId": "system",
"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
},
"createdBy": "system",
"updatedBy": "system",
"createdTime": "2026-09-30T03:00:00.000000Z",
"updatedTime": "2026-09-30T03:00:00.000000Z"
},
{
"_id": "66e0b3f1c9a8d7e6f5a4b210",
"organizationId": "system",
"schemaVersion": 1,
"name": "Text / Note",
"description": "A free-text widget for notes, instructions, or context next to the numbers.",
"category": "utility",
"viz": "text",
"spec": null,
"content": {
"body": ""
},
"defaultLayout": {
"w": 6,
"h": null
},
"createdBy": "system",
"updatedBy": "system",
"createdTime": "2026-09-30T03:00:00.000000Z",
"updatedTime": "2026-09-30T03:00:00.000000Z"
},
{
"_id": "66fcd2a1e4b0a7d3c1f20c01",
"organizationId": "6650c2a1f3b9e4001c7d2a10",
"schemaVersion": 1,
"name": "Done tasks per hub",
"description": "Completed tasks per hub in the selected range.",
"category": "custom",
"viz": "bar",
"spec": {
"specVersion": 1,
"dataSourceId": "task",
"timeField": "doneTime",
"measures": [
{
"id": "m1",
"fn": "count"
}
],
"dimensions": [
{
"id": "d1",
"kind": "terms",
"field": "hubName",
"limit": 10
}
],
"filters": [
{
"id": "f1",
"field": "status",
"operator": "eq",
"value": "DONE"
}
]
},
"composite": null,
"content": null,
"defaultLayout": {
"w": 6,
"h": 6
},
"isCustom": true,
"createdBy": "[email protected]",
"updatedBy": "[email protected]",
"createdTime": "2026-10-02T03:00:00.000000Z",
"updatedTime": "2026-10-02T03:00:00.000000Z"
}
]
}{
"status": false,
"message": "The selected `category` is invalid. Please select from the available options.",
"failedCode": "dydsh-017"
}{
"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 widgets
Retrieves the widget catalogue offered when adding a card: the built-in widgets plus the custom widgets of the caller’s organization. Pick a widget by _id or name when creating or updating a dashboard; the card gets its own copy of it.
GET
/
dynamic-dashboard-widgets
Read widgets
curl --request GET \
--url https://apiweb.mile.app/api/v3/dynamic-dashboard-widgets \
--header 'Authorization: Bearer <token>'import requests
url = "https://apiweb.mile.app/api/v3/dynamic-dashboard-widgets"
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-widgets', 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-widgets",
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-widgets"
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-widgets")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v3/dynamic-dashboard-widgets")
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": "66e0b3f1c9a8d7e6f5a4b201",
"organizationId": "system",
"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
},
"createdBy": "system",
"updatedBy": "system",
"createdTime": "2026-09-30T03:00:00.000000Z",
"updatedTime": "2026-09-30T03:00:00.000000Z"
},
{
"_id": "66e0b3f1c9a8d7e6f5a4b202",
"organizationId": "system",
"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
},
"createdBy": "system",
"updatedBy": "system",
"createdTime": "2026-09-30T03:00:00.000000Z",
"updatedTime": "2026-09-30T03:00:00.000000Z"
},
{
"_id": "66e0b3f1c9a8d7e6f5a4b210",
"organizationId": "system",
"schemaVersion": 1,
"name": "Text / Note",
"description": "A free-text widget for notes, instructions, or context next to the numbers.",
"category": "utility",
"viz": "text",
"spec": null,
"content": {
"body": ""
},
"defaultLayout": {
"w": 6,
"h": null
},
"createdBy": "system",
"updatedBy": "system",
"createdTime": "2026-09-30T03:00:00.000000Z",
"updatedTime": "2026-09-30T03:00:00.000000Z"
},
{
"_id": "66fcd2a1e4b0a7d3c1f20c01",
"organizationId": "6650c2a1f3b9e4001c7d2a10",
"schemaVersion": 1,
"name": "Done tasks per hub",
"description": "Completed tasks per hub in the selected range.",
"category": "custom",
"viz": "bar",
"spec": {
"specVersion": 1,
"dataSourceId": "task",
"timeField": "doneTime",
"measures": [
{
"id": "m1",
"fn": "count"
}
],
"dimensions": [
{
"id": "d1",
"kind": "terms",
"field": "hubName",
"limit": 10
}
],
"filters": [
{
"id": "f1",
"field": "status",
"operator": "eq",
"value": "DONE"
}
]
},
"composite": null,
"content": null,
"defaultLayout": {
"w": 6,
"h": 6
},
"isCustom": true,
"createdBy": "[email protected]",
"updatedBy": "[email protected]",
"createdTime": "2026-10-02T03:00:00.000000Z",
"updatedTime": "2026-10-02T03:00:00.000000Z"
}
]
}{
"status": false,
"message": "The selected `category` is invalid. Please select from the available options.",
"failedCode": "dydsh-017"
}{
"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"
}Authorizations
Use a valid Bearer token to authenticate.
Query Parameters
Only widgets of this category. An unknown value is 400 dydsh-017, never an empty list.
Available options:
overview, taskStatus, productivity, timeDuration, team, hub, trend, utility, custom