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"{
"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": "john.doe@mile.app",
"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": "jane.smith@mile.app",
"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
}
}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:
Polling Recommendation: For real-time status updates of ongoing imports, poll this endpoint every 3-5 seconds while import status is āonprocessā.
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"{
"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": "john.doe@mile.app",
"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": "jane.smith@mile.app",
"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
}
}Use a valid Bearer token to authenticate.
Page number for pagination.
Example: 1
Default: 1
Number of records per page.
Example: 20
Default: 20
Max: 100
Filter by import type. Comma-separated for multiple types.
enum: datasource, task, visit, route
Example: datasource,task
Filter by import status. Comma-separated for multiple statuses.
enum: onprocess, success, partially, failed
Example: onprocess,success
Filter by data type ID (for datasource imports only). Use GET /data-types API to get the list of Data Type IDs.
Example: 63db2fb476bc679c540369c4
Sort by field.
Example: createdTime, updatedTime, status
Default: createdTime
Sort order.
enum: asc, desc
Default: desc
Success
Status of response.
Message of API response.
Paginated list of import monitoring records.
Show child attributes
Current page number
Array of import monitoring records
Show child attributes
Unique identifier for the import monitoring record generated by system.
Example: 65f8a4c2d9e3b1234567890a
Organization ID that owns this import.
Example: 63c61d865347e356d05e3052
The input type of the component (e.g., string, number, date, etc.)
Hub ID associated with this import (if applicable).
Example: 63c63ab1b6972d3150348172
Original filename of the uploaded file.
Example: outlets_import.xlsx
Total number of rows in the imported file (excluding header).
Example: 150
Total number of valid rows successfully imported.
Example: 145
Total number of invalid rows that failed validation or import.
Example: 5
Current status of the import process.
onprocess: Import is currently being processedsuccess: All rows imported successfullypartially: Some rows succeeded, some failedfailed: Import completely failed
enum: onprocess, success, partially, failed
Example: partiallyonprocess, success, partially, failed URL to download the template file for this import type. Template is generated based on data type schema or flow configuration.
Example: https://staticdev.mile.app/dev-mile/templates/template_OutletDetail.xlsx
URL to download file containing failed records. Only available when status is 'partially' or 'failed' and there are invalid rows. File includes error messages for each failed row.
Example: https://staticdev.mile.app/dev-mile/failed/failed_outlets_import_65f8a4c2d9e3b1234567890a.xlsx
[Datasource Import Only] Data type ID for datasource imports. This field is populated only when type='datasource'.
Use GET /data-types API to get valid data type IDs.
Example: 63db2fb476bc679c540369c4
[Datasource Import Only] Data type name for datasource imports. This field is populated only when type='datasource'.
Example: OutletDetail
[Task Import Only] Flow ID for task imports. This field is populated only when type='task'. Note: Full task import implementation may still be in progress.
Use GET /flows API to get valid flow IDs.
Example: 63d8c9b0dbd5ef20a627dd86
[Task Import Only] Flow name for task imports. This field is populated only when type='task'. Note: Full task import implementation may still be in progress.
Example: Delivery
[Visit Import Only - Future] Visit type ID for visit imports. This field will be populated when type='visit'. Feature may be under development.
Example: 64a5c8d2e9f1b2345678901c
[Visit Import Only - Future] Visit type name for visit imports. This field will be populated when type='visit'. Feature may be under development.
Example: Customer Visit
[Route Import Only - Future] Route configuration ID for route imports. This field will be populated when type='route'. Feature may be under development.
Example: 65b6d9e3f0a2c3456789012d
[Route Import Only - Future] Route configuration name for route imports. This field will be populated when type='route'. Feature may be under development.
Example: Daily Route Config
Error message if the import completely failed. Populated when status='failed'.
Example: File validation failed: Invalid data type ID
Timestamp when the import processing was completed. Format: Y-m-d H:i:s
Example: 2024-03-18 10:32:15
Duration of import processing in seconds. Calculated as difference between processedAt and createdTime.
Example: 90
Total number of chunks the file was divided into for processing. Large files are processed in chunks for better performance.
Example: 3
Number of chunks that have been processed. Use this with totalChunks to calculate processing progress.
Example: 3
Email of the user who initiated the import.
Example: john.doe@mile.app
Email of the user/system that last updated this record. Usually 'system' for background processing updates.
Example: system
Timestamp when the import was created. Format: Y-m-d H:i:s
Example: 2024-03-18 10:30:45
Timestamp when the record was last updated. Format: Y-m-d H:i:s
Example: 2024-03-18 10:32:15
URL to first page
Starting record number
Last page number
URL to last page
Pagination links
URL to next page
Base path for pagination
Records per page
URL to previous page
Ending record number
Total records