Thanks for your question. Try below method. Instead of using plain credentials, you can try using other auth methods. Example Session cookie.
You can find your session cookie in the browser cookies section.
curl 'http://<Jenkins server>/jenkins/api/json?pretty=true' \
-H 'Connection: keep-alive' \
-H 'Cache-Control: max-age=0' \
-H 'Upgrade-Insecure-Requests: 1' \
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.62 Safari/537.36' \
-H 'DNT: 1' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8' -H 'Accept-Encoding: gzip, deflate' \
-H 'Accept-Language: en-GB,en-US;q=0.9,en;q=0.8' \
-H 'Cookie: JSESSIONID=<Session ID>; screenResolution=1280x800' --compressed