Asynchronous import task,can't get status by given url

I have done this in dhis2 2.42: :slight_smile:
URL: http://100.64.0.3:10003/dhis/api/tracker?async=true&importStrategy=CREATE_AND_UPDATE
METHOD: POST
USERNAME: admin

[HEADERS]

[PARAMETERS]

[CONTENT]
{
“trackedEntities”: [
{
“trackedEntity”: “DrUkTj7AAAA”,
“trackedEntityType”: “hLJq6b6YiUZ”,
“createdAt”: “2025-11-18T02:01:52.943Z”,
“updatedAt”: “2025-11-18T02:01:52.943Z”,
“orgUnit”: “McrNKRGSWIU”,
“attributes”: [
{。。。。。

===============

the response :slight_smile:
{
“httpStatus” : “OK”,
“httpStatusCode” : 200,
“status” : “OK”,
“message” : “Tracker job added”,
“response” : {
“id” : “aZtXvqDl3zf”,
“location” : “http://100.64.0.x:10003/dhis/tracker/jobs/aZtXvqDl3zf”,
“responseType” : “TrackerJobWebMessageResponse”
}
}

================
when open http://100.64.0.x:10003/dhis/tracker/jobs/aZtXvqDl3zf

HTTP状态 404 - 未找到


类型 状态报告

消息 No static resource tracker/jobs/aZtXvqDl3zf.

描述 源服务器未能找到目标资源的表示或者是不愿公开一个已经存在的资源表示。


Apache Tomcat/11.0.9

in db:
54839477 “aZtXvqDl3zf” “2025-11-18 10:01:00.335” “2025-11-18 10:01:48.593828” 1 “TRACKER_IMPORT_JOB (1763431260333)” “2025-11-18 10:01:00.537829” false “[”“org.hisp.dhis.tracker.imports.TrackerImportParams”“, {”“flushMode”“: ““AUTO””, ““idSchemes””: {”“idScheme”“: {”“idScheme”“: ““UID””}, ““orgUnitIdScheme””: {”“idScheme”“: ““UID””}, ““programIdScheme””: {”“idScheme”“: ““UID””}, ““dataElementIdScheme””: {”“idScheme”“: ““UID””}, ““programStageIdScheme””: {”“idScheme”“: ““UID””}, ““categoryOptionIdScheme””: {”“idScheme”“: ““UID””}, ““categoryOptionComboIdScheme””: {”“idScheme”“: ““UID””}}, ““atomicMode””: ““ALL””, ““importMode””: ““COMMIT””, ““reportMode””: ““ERRORS””, ““importStrategy””: ““CREATE_AND_UPDATE””, ““skipRuleEngine””: false, ““validationMode””: ““FULL””, ““skipSideEffects””: false, ““skipPatternValidation””: false}]” “TRACKER_IMPORT_JOB” “DISABLED” “COMPLETED” “M5zQapPyTZI” “ONCE_ASAP” “2025-11-18 10:01:48.593828” false “{”“sequence”“: [{”“jobId”“: ““aZtXvqDl3zf””, ““stages””: [{”“items”“: , ““status””: ““SUCCESS””, ““complete””: true, ““duration””: 6, ““onFailure””: ““FAIL””, ““totalItems””: 0, ““description””: ““Loading file resource””, ““startedTime””: ““2025-11-18T10:01:00.577””, ““completedTime””: ““2025-11-18T10:01:00.583"”}, {”“items””: , ““status””: ““SUCCESS””, ““complete””: true, ““duration””: 2, ““onFailure””: ““FAIL””, ““totalItems””: 0, ““description””: ““Loading file content””, ““startedTime””: ““2025-11-18T10:01:00.584"”, ““completedTime””: ““2025-11-18T10:01:00.586"”}, {”“items””: , ““status””: ““SUCCESS””, ““complete””: true, ““duration””: 1069, ““onFailure””: ““FAIL””, ““totalItems””: 0, ““description””: ““Running PreHeat””, ““startedTime””: ““2025-11-18T10:01:00.634"”, ““completedTime””: ““2025-11-18T10:01:01.703"”}, {”“items””: , ““status””: ““SUCCESS””, ““complete””: true, ““duration””: 1, ““onFailure””: ““FAIL””, ““totalItems””: 0, ““description””: ““Calculating Payload Size””, ““startedTime””: ““2025-11-18T10:01:01.703"”, ““completedTime””: ““2025-11-18T10:01:01.704"”}, {”“items””: , ““status””: ““SUCCESS””, ““complete””: true, ““duration””: 0, ““onFailure””: ““FAIL””, ““totalItems””: 0, ““description””: ““Running PreProcess””, ““startedTime””: ““2025-11-18T10:01:01.704"”, ““completedTime””: ““2025-11-18T10:01:01.704"”}, {”“items””: , ““status””: ““SUCCESS””, ““complete””: true, ““duration””: 20591, ““onFailure””: ““FAIL””, ““totalItems””: 0, ““description””: ““Running Validation””, ““startedTime””: ““2025-11-18T10:01:01.704"”, ““completedTime””: ““2025-11-18T10:01:22.295"”}, {”“items””: , ““status””: ““SUCCESS””, ““complete””: true, ““duration””: 0, ““onFailure””: ““FAIL””, ““totalItems””: 0, ““description””: ““Running Rule Engine””, ““startedTime””: ““2025-11-18T10:01:22.296"”, ““completedTime””: ““2025-11-18T10:01:22.296"”}, {”“items””: , ““status””: ““SUCCESS””, ““complete””: true, ““duration””: 25279, ““onFailure””: ““FAIL””, ““totalItems””: 0, ““description””: ““Running Rule Engine Validation””, ““startedTime””: ““2025-11-18T10:01:22.296"”, ““completedTime””: ““2025-11-18T10:01:47.575"”}, {”“items””: , ““status””: ““SUCCESS””, ““complete””: true, ““duration””: 1006, ““onFailure””: ““FAIL””, ““totalItems””: 0, ““description””: ““Commit Transaction””, ““startedTime””: ““2025-11-18T10:01:47.575"”, ““completedTime””: ““2025-11-18T10:01:48.581"”}, {”“items””: , ““status””: ““SUCCESS””, ““complete””: true, ““duration””: 0, ““onFailure””: ““FAIL””, ““totalItems””: 0, ““description””: ““PostCommit””, ““startedTime””: ““2025-11-18T10:01:48.581””, ““completedTime””: ““2025-11-18T10:01:48.581””}], ““status””: ““SUCCESS””, ““userId””: ““M5zQapPyTZI””, ““summary””: ““Import complete with status OK, 0 created, 100 updated, 0 deleted, 0 ignored””, ““complete””: true, ““duration””: 48009, ““description””: ““Tracker import started””, ““startedTime””: ““2025-11-18T10:01:00.576””, ““completedTime””: ““2025-11-18T10:01:48.585"”}]}”

Hi @linxd

It looks like you tried to request from http://100.64.0.x:10003/dhis/tracker/jobs/ … instead of the Web API path http://100.64.0.x:10003/dhis/api/tracker/jobs/. Please make sure not to skip api in the URL. :slight_smile:

Please check and let us know if it works. Thanks!

so ,the api return reponse has error, it omited “api”

1 Like

Your tracker import itself worked. The job was created, processed, and completed successfully. The issue is only with the job status URL returning 404, not with the tracker payload.

This behaviour usually happens in DHIS2 2.41+ because the async tracker import endpoint changed, and the job status is no longer exposed under /dhis/tracker/jobs/{id}.

Why you’re seeing 404

The link returned in the response:

/dhis/tracker/jobs/aZtXvqDl3zf

is no longer a valid static endpoint. The job is stored and processed internally (as you confirmed in the DB), but the URL provided by the API is not pointing to an active route — so Tomcat returns 404 Not Found.

This is a known issue in 2.42:
The job runs correctly, but the job-status URL is not implemented for tracker imports.

Quick checks to confirm everything is okay

  1. Your DB entry shows:
  • Status: COMPLETED
  • Summary: Import complete with status OK, 0 created, 100 updated
    This means the import actually succeeded.
  1. No errors or ignored items appear in the job summary.

What to use instead

To check the results of async tracker jobs in 2.42, use:

System → Data Administration → Jobs → Job History (UI)

You will see the tracker import job and its full output.

  1. Or API endpoint:
/api/jobConfigurations

Filter by job type: TRACKER_IMPORT_JOB.