On the API design, you shouldn't be returning URIs as part of the data in an HTTP API response. There's a header field for that if your resource is available from multiple URIs, and the domain logic of your application alongside good naming of the URIs on your part should allow guessing of the resource location.
For instance, if {'name':'foo', 'id':100}
is a Foo
, you (and users) would usually expect its URI to be /foos/100
, so why would you need to return the URI inside the response data?
Now more pragmatically, since supporting those fancy HTTP headers could make it harder for your clients to adopt your API, I believe you should store URIs in a 1:many relationship with your resources if you expect your resources to change URI a lot (I hope they don't), so it might be easier for you to support redirects with 301 Moved Permanently
for old ones. Other than that, I don't see the reason not to generate them on the fly, since you're going to have to implement redirects on old controller actions that respond to old URIs manually, assuming you're using a MVC structure.