Using scope filters we can get "selectedBoardId" param in the URL as mentioned here (under Advanced methods for extending the sidebar):
<a href="https://developer.atlassian.com/server/jira/platform/developing-for-the-jira-project-centric-view/" target="_blank" rel="nofollow noopener noreferrer">Developing for the JIRA project-centric view</a>
Not sure what are other params available this way. Need to get the current selected sprint ID to use in my plugin.