Can we access masked secret keys via the Jira DC Java or REST APIs for use in Scriptrunner?

Hi - is there a way to access masked secret keys (added in Jira Automation 9.0) via the REST or Java APIs? We moved to Confluence Cloud, which broke OAuth with impersonation, so I’m in the process of transitioning some Scriptrunner workflows to Automation, but could use an interim step of being able to access secrets from within Jira instead of having to use an external secrets manager.