Problem
After importing a run, we need to retrieve the Bublik run URL for use in external systems.
Currently, there's no direct way to obtain the run link once the import completes.
Current Behavior
When importing via curl, we receive links to the import log and Celery task:
curl "http://localhost:42000/importruns/source/?from=&to=&url=https://ts-factory.io/logs/net-drv-ts/2026/01&force=false&project_name=None"
Response:
{
"celery_task_id": "170326f2-faf7-438d-b701-eaef7d4c76e6",
"flower": "http://localhost:42000/flower/task/170326f2-faf7-438d-b701-eaef7d4c76e6",
"import_log": "http://localhost:42000/importlog/170326f2-faf7-438d-b701-eaef7d4c76e6"
}
These links provide visibility into the import process but don't include the actual run URL needed for external integrations.
Proposed Solution
Add a new API endpoint to retrieve run information by Celery task ID:
Endpoint: GET /api/v2/import/tasks/<celery_task_id>
Response:
{
"run_id": "<run_id>",
"run_url": "http://localhost:42000/v2/runs/<run_id>",
"status": "completed",
"celery_task_id": "170326f2-faf7-438d-b701-eaef7d4c76e6"
}
Error Cases:
404 - Task not found
202 - Import still in progress (task not completed yet)
Problem
After importing a run, we need to retrieve the Bublik run URL for use in external systems.
Currently, there's no direct way to obtain the run link once the import completes.
Current Behavior
When importing via
curl, we receive links to the import log and Celery task:curl "http://localhost:42000/importruns/source/?from=&to=&url=https://ts-factory.io/logs/net-drv-ts/2026/01&force=false&project_name=None"Response:
{ "celery_task_id": "170326f2-faf7-438d-b701-eaef7d4c76e6", "flower": "http://localhost:42000/flower/task/170326f2-faf7-438d-b701-eaef7d4c76e6", "import_log": "http://localhost:42000/importlog/170326f2-faf7-438d-b701-eaef7d4c76e6" }These links provide visibility into the import process but don't include the actual run URL needed for external integrations.
Proposed Solution
Add a new API endpoint to retrieve run information by Celery task ID:
Endpoint:
GET /api/v2/import/tasks/<celery_task_id>Response:
{ "run_id": "<run_id>", "run_url": "http://localhost:42000/v2/runs/<run_id>", "status": "completed", "celery_task_id": "170326f2-faf7-438d-b701-eaef7d4c76e6" }Error Cases:
404- Task not found202- Import still in progress (task not completed yet)