cURL
curl -X GET "https://apiweb.mile.app/api/v3/import-monitoring?type=datasource&status=onprocess&limit=20&page=1" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"import requests
url = "https://apiweb.mile.app/api/v3/import-monitoring"
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/import-monitoring', 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/import-monitoring",
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/import-monitoring"
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/import-monitoring")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v3/import-monitoring")
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": {
"current_page": 1,
"data": [
{
"_id": "65f8a4c2d9e3b1234567890a",
"organizationId": "63c61d865347e356d05e3052",
"type": "string",
"hubId": "63c63ab1b6972d3150348172",
"filename": "outlets_import.xlsx",
"totalRows": 150,
"totalValid": 145,
"totalInvalid": 5,
"status": "partially",
"dataTypeId": "63db2fb476bc679c540369c4",
"dataTypeName": "OutletDetail",
"fileTemplate": "https://staticdev.mile.app/dev-mile/templates/template_OutletDetail.xlsx",
"fileFailedImported": "https://staticdev.mile.app/dev-mile/failed/failed_outlets_import_65f8a4c2d9e3b1234567890a.xlsx",
"processedAt": "2024-03-18 10:32:15",
"processingDuration": 90,
"totalChunks": 3,
"processedChunks": 3,
"createdBy": "[email protected]",
"updatedBy": "system",
"createdTime": "2024-03-18 10:30:45",
"updatedTime": "2024-03-18 10:32:15"
},
{
"_id": "65f8a3b1c8d2a0123456789b",
"organizationId": "63c61d865347e356d05e3052",
"type": "string",
"hubId": "63c63ab1b6972d3150348172",
"filename": "tasks_import.csv",
"totalRows": 500,
"totalValid": 500,
"totalInvalid": 0,
"status": "success",
"flowId": "63d8c9b0dbd5ef20a627dd86",
"flowName": "Delivery",
"fileTemplate": "https://staticdev.mile.app/dev-mile/templates/template_task_import.xlsx",
"processedAt": "2024-03-18 10:25:30",
"processingDuration": 120,
"totalChunks": 5,
"processedChunks": 5,
"createdBy": "[email protected]",
"updatedBy": "system",
"createdTime": "2024-03-18 10:23:30",
"updatedTime": "2024-03-18 10:25:30"
}
],
"first_page_url": "https://apiweb.mile.app/api/v3/import-monitoring?page=1",
"from": 1,
"last_page": 5,
"last_page_url": "https://apiweb.mile.app/api/v3/import-monitoring?page=5",
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "https://apiweb.mile.app/api/v3/import-monitoring?page=1",
"label": "1",
"active": true
},
{
"url": "https://apiweb.mile.app/api/v3/import-monitoring?page=2",
"label": "2",
"active": false
},
{
"url": "https://apiweb.mile.app/api/v3/import-monitoring?page=2",
"label": "Next »",
"active": false
}
],
"next_page_url": "https://apiweb.mile.app/api/v3/import-monitoring?page=2",
"path": "https://apiweb.mile.app/api/v3/import-monitoring",
"per_page": 20,
"prev_page_url": null,
"to": 20,
"total": 95
}
}{
"status": false,
"message": "Invalid status value",
"failedCode": "import-003"
}{
"status": false,
"message": "Unauthorized",
"failedCode": "auth-001"
}{
"status": false,
"message": "Internal server error",
"failedCode": "import-045"
}Import
Read import monitoring records
This endpoint retrieves a paginated list of import monitoring records. These records track the status and progress of all data import operations initiated by users in the organization. You can filter by import type, status, data type, and other criteria.
Use Cases:
- Monitor ongoing imports
- Review completed imports
- Download failed records for correction
- Track import history
Polling Recommendation: For real-time status updates of ongoing imports, poll this endpoint every 3-5 seconds while import status is ‘onprocess’.
GET
/
import-monitoring
cURL
curl -X GET "https://apiweb.mile.app/api/v3/import-monitoring?type=datasource&status=onprocess&limit=20&page=1" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"import requests
url = "https://apiweb.mile.app/api/v3/import-monitoring"
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/import-monitoring', 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/import-monitoring",
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/import-monitoring"
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/import-monitoring")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v3/import-monitoring")
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": {
"current_page": 1,
"data": [
{
"_id": "65f8a4c2d9e3b1234567890a",
"organizationId": "63c61d865347e356d05e3052",
"type": "string",
"hubId": "63c63ab1b6972d3150348172",
"filename": "outlets_import.xlsx",
"totalRows": 150,
"totalValid": 145,
"totalInvalid": 5,
"status": "partially",
"dataTypeId": "63db2fb476bc679c540369c4",
"dataTypeName": "OutletDetail",
"fileTemplate": "https://staticdev.mile.app/dev-mile/templates/template_OutletDetail.xlsx",
"fileFailedImported": "https://staticdev.mile.app/dev-mile/failed/failed_outlets_import_65f8a4c2d9e3b1234567890a.xlsx",
"processedAt": "2024-03-18 10:32:15",
"processingDuration": 90,
"totalChunks": 3,
"processedChunks": 3,
"createdBy": "[email protected]",
"updatedBy": "system",
"createdTime": "2024-03-18 10:30:45",
"updatedTime": "2024-03-18 10:32:15"
},
{
"_id": "65f8a3b1c8d2a0123456789b",
"organizationId": "63c61d865347e356d05e3052",
"type": "string",
"hubId": "63c63ab1b6972d3150348172",
"filename": "tasks_import.csv",
"totalRows": 500,
"totalValid": 500,
"totalInvalid": 0,
"status": "success",
"flowId": "63d8c9b0dbd5ef20a627dd86",
"flowName": "Delivery",
"fileTemplate": "https://staticdev.mile.app/dev-mile/templates/template_task_import.xlsx",
"processedAt": "2024-03-18 10:25:30",
"processingDuration": 120,
"totalChunks": 5,
"processedChunks": 5,
"createdBy": "[email protected]",
"updatedBy": "system",
"createdTime": "2024-03-18 10:23:30",
"updatedTime": "2024-03-18 10:25:30"
}
],
"first_page_url": "https://apiweb.mile.app/api/v3/import-monitoring?page=1",
"from": 1,
"last_page": 5,
"last_page_url": "https://apiweb.mile.app/api/v3/import-monitoring?page=5",
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "https://apiweb.mile.app/api/v3/import-monitoring?page=1",
"label": "1",
"active": true
},
{
"url": "https://apiweb.mile.app/api/v3/import-monitoring?page=2",
"label": "2",
"active": false
},
{
"url": "https://apiweb.mile.app/api/v3/import-monitoring?page=2",
"label": "Next »",
"active": false
}
],
"next_page_url": "https://apiweb.mile.app/api/v3/import-monitoring?page=2",
"path": "https://apiweb.mile.app/api/v3/import-monitoring",
"per_page": 20,
"prev_page_url": null,
"to": 20,
"total": 95
}
}{
"status": false,
"message": "Invalid status value",
"failedCode": "import-003"
}{
"status": false,
"message": "Unauthorized",
"failedCode": "auth-001"
}{
"status": false,
"message": "Internal server error",
"failedCode": "import-045"
}Query Parameters
Filter by data type ID (for datasource imports only). Use GET /data-types API to get the list of Data Type IDs.
Example: 63db2fb476bc679c540369c4