Enabling the SSO redirection only applies to logins using a web browser (see How SAMLSingleSignOn works).
This mechanism can not work when only using the REST API since the login page is never visited.
So it is not possible to log in with your SSO credentials (your username/password on the Identity Provider) on the Data Center API via basic authentication.
However, it is still possible to use the REST API when your SAML SSO app for Jira or Confluence Data Center is enabled.

Depending on your use case, you will be able to benefit from the following options:

Option 1: Use API Token Authentication for Jira, Confluence and Bitbucket (Server & Data Center)

For Jira, Confluence and Bitbucket Server and Data Center, we provide an app called API Token Authentication: 

It allows you to create multiple, secure API tokens per user which can be used instead of a users password, which is not available in a SSO enabled Atlassian application anymore.
Please find more details in the documentation linked below:

API Token Authentication Documentation
Admin Guide
User Guide

In the upcoming releases, more features will be added, including tokens for specific endpoint paths.

Looking for API Token Authentication for Bamboo?

API Tokens can be created with built-in functionality for these, please follow the links below.

Option 2: Use OAuth

As documented in https://developer.atlassian.com/jiradev/jira-apis/about-the-jira-rest-apis#AbouttheJIRARESTAPIs-Authenticationandauthorization , you should be able to use OAuth for your REST API scripts.
This can be useful for allowing regular users to use the REST API, but requires a bigger setup work on both the admin's part and the user's part before running the script (for the first time).
Atlassian has a very comprehensive tutorial here: https://developer.atlassian.com/jiradev/jira-platform/jira-architecture/security-overview/oauth 

Option 3: Use HTTP Basic Authentication with local Passwords

Our SAML SSO app does not prevent admins from setting password in the user management system or creating local user accounts. That means that using REST calls with HTTP Basic authentication and their username and password will still work.
This option has the downside of basically circumventing SAML SSO at this level, but if you only need credentials for a script to run, then this might be okay for you. Atlassian puts it like this:

Considering basic authentication with local passwords? We recommend that you don't use that method at all, except for tools like personal scripts or bots.
It may be easier to implement, but it is much less secure. The username and password are sent repeatedly with requests and cached on the web browser.
Even if the credentials are sent via SSL/TLS, these protocols can still be compromised.