Interact with former Greenhopper API

I currently would like to use a script runner console (https://scriptrunner.adaptavist.com/latest/jira/ScriptConsole.html?utm_source=product-help) run to detect why a user is not allowed to close and create sprints in an agile board.

In the API doc for our JIRA version (7.13.2) there is no package for accessing the whole agile objects, see NOT_ALLOWED_TO_PUT_MORE_THAN_2_LINKS

I found (I guess) an older API doc of the Greenhopper API at NOT_ALLOWED_TO_PUT_MORE_THAN_2_LINKS but I am not able to instantiate e.g. a RapidViewService.

Here in the forum I found a related thread at How do I create the Scrum Board (rapidView) for the project using Java in the JIRA Plugin? but the workaround to instantiate this class via Osgi fails.

Any idea how I can interact with this former Greenhopper API in the scriptrunner console?

link to API doc JIRA software: https://docs.atlassian.com/software/jira/docs/api/7.13.2/
link to Greenhopper API: https://docs.atlassian.com/jira-software/6.5.0/index.html