def METHOD_NAME(api_id: Optional[str] = None,
                             resource_group_name: Optional[str] = None,
                             schema_id: Optional[str] = None,
                             service_name: Optional[str] = None,
                             workspace_id: Optional[str] = None,
                             opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetWorkspaceApiSchemaResult:
    """
    Get the schema configuration at the API level.
    Azure REST API version: 2022-09-01-preview.
    :param str api_id: API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
    :param str resource_group_name: The name of the resource group. The name is case insensitive.
    :param str schema_id: Schema id identifier. Must be unique in the current API Management service instance.
    :param str service_name: The name of the API Management service.
    :param str workspace_id: Workspace identifier. Must be unique in the current API Management service instance.
    """
    __args__ = dict()
    __args__['apiId'] = api_id
    __args__['resourceGroupName'] = resource_group_name
    __args__['schemaId'] = schema_id
    __args__['serviceName'] = service_name
    __args__['workspaceId'] = workspace_id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('azure-native:apimanagement:getWorkspaceApiSchema', __args__, opts=opts, typ=GetWorkspaceApiSchemaResult).value
    return AwaitableGetWorkspaceApiSchemaResult(
        components=pulumi.get(__ret__, 'components'),
        content_type=pulumi.get(__ret__, 'content_type'),
        definitions=pulumi.get(__ret__, 'definitions'),
        id=pulumi.get(__ret__, 'id'),
        name=pulumi.get(__ret__, 'name'),
        type=pulumi.get(__ret__, 'type'),
        value=pulumi.get(__ret__, 'value'))