I have a requirement to create get rest api class in script runner using groovy
Your statement does not make any sense, it's not even a question to begin with. We all have requirements?
The only thing that I can infer from it is you're trying to create a REST endpoint - https://docs.adaptavist.com/sr4js/latest/features/rest-endpoints
It looks like you're new here. Sign in or register to get started.