I have one request to get all the unclosed tickets under one project and close them. I googled and found some useful links in atlassian. How-to-get-more-than-50-issues-with-search-API
The call looks like this:
rest/api/2/search?jql=SOME_JQL&fields=summary,duedate,issuetype&startAt=51
If I enter below in the JIRA board.

I should replace the AND with & when calling the search API right? If there any other character I need to escape also? And If I want to get all the tickets back, what is the best way to do? I tried with below ones, the performance is very slow and it is not a good way to set the maxResults to a static value.
rest/api/2/search?jql=TestProject&resolution=Unresolved ORDER BY priority DESC, updated DESC&maxResults=5000
Thanks in advance!