Unfortunately, advices for previous versions didn't work How to add global route prefix in asp.net core 3?
app.UsePathBase(new PathString("/api"));
nor this one
public static class MvcOptionsExtensions
{
public static void UseGeneralRoutePrefix(this MvcOptions opts, IRouteTemplateProvider routeAttribute)
{
opts.Conventions.Add(new RoutePrefixConvention(routeAttribute));
}
public static void UseGeneralRoutePrefix(this MvcOptions opts, string
prefix)
{
opts.UseGeneralRoutePrefix(new RouteAttribute(prefix));
}
}