Skip to content

Commit

Permalink
[Improve][RestAPI] always return jobId when call getJobInfoById API
Browse files Browse the repository at this point in the history
  • Loading branch information
liunaijie committed Feb 29, 2024
1 parent 9009b2a commit 0729bbf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions docs/en/seatunnel-engine/rest-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,14 @@ network:
}
```

When we can't get the job info, the response will be:

```json
{
"jobId" : ""
}
```

</details>

------------------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ private void handleJobInfoById(HttpGetCommand command, String uri) {
if (!jobId.isEmpty() && jobInfo != null) {
this.prepareResponse(command, convertToJson(jobInfo, Long.parseLong(jobId)));
} else {
this.prepareResponse(command, new JsonObject());
this.prepareResponse(command, new JsonObject().add(RestConstant.JOB_ID, jobId));
}
}

Expand Down

0 comments on commit 0729bbf

Please sign in to comment.