For other authentication mechanisms like SPNEGO or login identity providers, there are end-points like /access/token
or /access/kerberos
where you can obtain a token.
I don't think there is a way to do that for Knox since it requires the SSO workflow of being redirected a login page in your browser.
You would have to first authenticate to the NiFi UI via Knox SSO, and then use something like Chrome Dev tools to look in the browser's local storage and find the token that the NiFi UI has for the current user.
Then you can use that token to make API calls by passing it in the Bearer header like:
curl -k --header "Authorization: Bearer $token" https://<nifi-host>:<port>/nifi-api/flow/cluster/summary