List values inside the custom field (single select) using the External API

I am trying to list values inside the custom field (single select) using the external API below is the behavior I created but it’s not working:

import com.onresolve.jira.groovy.user.FieldBehaviours
import com.atlassian.jira.issue.priority.Priority
import groovy.transform.BaseScript
import com.atlassian.jira.issue.fields.CustomField
import com.atlassian.jira.component.ComponentAccessor

def customFieldManager = ComponentAccessor.getCustomFieldManager()
def optionsManager = ComponentAccessor.getOptionsManager()

import groovy.json.JsonBuilder
import groovy.json.StreamingJsonBuilder;
import static*
import static*
import groovy.json.JsonSlurper
import net.sf.json.groovy.JsonSlurper

@BaseScript FieldBehaviours fieldBehaviours

def serviceProvider= getFieldByName(“Service Provider”).getValue()

def supplierAPI = new JsonSlurper().parse(new URL(“”))
def searchsupplier = supplierAPI.findAll{"${serviceProvider}"}

String SP =searchsupplier[0].name

Can you please help me for correcting the code