Pass API from one module to another module

I need to generate the API conditionally.
API: https://1.2.345.678:0000/abc/myCategory?${appVersion}=${4.55.7}
but I need to move it from one module to another. how can i make it.