Be sure to check out the documentation for retrieving the build parameters for a given job
https://javadoc.jenkins-ci.org/hudson/model/ParametersDefinitionProperty.html
You can follow the example given below if you already have a reference to a specific Jenkins job
def paramsProp = job.getProperty(ParametersDefinitionProperty.class)
if ( paramsProp ) {
// Single out specific build param
myBuildParam = paramsProp.getParameterDefinition( 'MY_BUILD_PARAM' )
println 'Default value for ' + myBuildParam.getDisplayName() + ': ' + myBuildParam.getDefaultParameterValue().value
println 'Param Type ' + myBuildParam.getClass()
// Get all build params
myBuildParams = paramsProp.getParameterDefinitions()
// ... GET VALUES ETC
}
The specific items you can retrieve from the build parameter will be contingent on what that parameter type is. You'll need to look up the API for each, for example a ChoiceParameter
https://javadoc.jenkins.io/hudson/model/ChoiceParameterDefinition.html