Read data by hub, data type name and Title
curl --request GET \
--url https://apiweb.mile.app/api/v4/data/hub/{hubId}/type/{dataTypeName}/{data_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://apiweb.mile.app/api/v4/data/hub/{hubId}/type/{dataTypeName}/{data_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/v4/data/hub/{hubId}/type/{dataTypeName}/{data_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/v4/data/hub/{hubId}/type/{dataTypeName}/{data_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/v4/data/hub/{hubId}/type/{dataTypeName}/{data_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/v4/data/hub/{hubId}/type/{dataTypeName}/{data_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v4/data/hub/{hubId}/type/{dataTypeName}/{data_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,
"message": "Success",
"data": {
"_id": "6aec2e6974e959b1f2094655",
"dataTypeId": "6abcadb6a138a6318d023ec5",
"hubId": "65c1f68ea735b522d370ea25",
"dataId": "OUT-0012",
"outletName": "Toko Sumber Rejeki",
"channel": "retail",
"region": {
"_id": "6abcadb6a138a6318d02a001",
"dataId": "JBR",
"regionName": "West Java"
},
"limitUser": [
"all"
],
"organizationId": "65c1f4eeca7c4816d94587b2",
"createdBy": "admin@example.com",
"createdTime": "2026-11-05 07:21:13",
"updatedTime": "2026-11-05 07:21:13",
"data_type": {
"_id": "6abcadb6a138a6318d023ec5",
"name": "Outlet"
}
}
}{
"status": false,
"message": "Data not found"
}{
"status": false,
"message": "Internal server error, please contact support@mile.app."
}Data Source
Read data by hub, data type name and Title
Returns one record found by its hub, its data type name and its Title (dataId), with relations expanded as in Read data by ID. Encode a space in the Title as %20.
Requires permission view/data.
GET
/
data
/
hub
/
{hubId}
/
type
/
{dataTypeName}
/
{data_id}
Read data by hub, data type name and Title
curl --request GET \
--url https://apiweb.mile.app/api/v4/data/hub/{hubId}/type/{dataTypeName}/{data_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://apiweb.mile.app/api/v4/data/hub/{hubId}/type/{dataTypeName}/{data_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/v4/data/hub/{hubId}/type/{dataTypeName}/{data_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/v4/data/hub/{hubId}/type/{dataTypeName}/{data_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/v4/data/hub/{hubId}/type/{dataTypeName}/{data_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/v4/data/hub/{hubId}/type/{dataTypeName}/{data_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v4/data/hub/{hubId}/type/{dataTypeName}/{data_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,
"message": "Success",
"data": {
"_id": "6aec2e6974e959b1f2094655",
"dataTypeId": "6abcadb6a138a6318d023ec5",
"hubId": "65c1f68ea735b522d370ea25",
"dataId": "OUT-0012",
"outletName": "Toko Sumber Rejeki",
"channel": "retail",
"region": {
"_id": "6abcadb6a138a6318d02a001",
"dataId": "JBR",
"regionName": "West Java"
},
"limitUser": [
"all"
],
"organizationId": "65c1f4eeca7c4816d94587b2",
"createdBy": "admin@example.com",
"createdTime": "2026-11-05 07:21:13",
"updatedTime": "2026-11-05 07:21:13",
"data_type": {
"_id": "6abcadb6a138a6318d023ec5",
"name": "Outlet"
}
}
}{
"status": false,
"message": "Data not found"
}{
"status": false,
"message": "Internal server error, please contact support@mile.app."
}Path Parameters
Response
Success
The response is of type object.