In your WebApiConfig.cs , you need to have -
config.Routes.MapHttpRoute(
name: "DefaultApi",
routeTemplate: "api/{version}/{controller}/{action}/{id}",
defaults: new { version = 1, id = RouteParameter.Optional }
);
And when you execute the values controler getjson action -
public string GetJson(string id)
{
return "me";
}
You get following output -
If you want to version your WebAPI endpoints, then use this namespaces approach. Alternatively, you can also use Http header approach. Or else simply route approach.