How to replace tasks in batches

Now I want to do a search function. I looked for the API and saw that only deletion and batch update can be done. So what do I need to do to replace tasks in batch

You don’t need to replace or delete existing tasks, you can display the required tasks by onBeforeTaskDisplay handler: ;
There is an article about filtering tasks, that might help you: ;
In this article, you can look at the video guide that shows how to implement filtering tasks.
Please check the example of how it might be implemented: ;

Hello, maybe I didn’t describe it clearly. In fact, I need to make a network request to update the requested data to the Gantt view, not simply filter it.

You can use the built-in Ajax module to make a request. Please check the article about it: ;
But in your case, you need to implement a custom solution.
Here is an example of how it can be implemented: