My api controller need to implement a simple GET action using 2 parameters: an ItemID and a SectionID. The return type ItemInSection contains data about the item in the section.
A same item can be in multiple sections. It's why the SectionID is required.
If the item has been moved and is no longer in the corresponding section, I need to return a redirect code 301 with a location url corresponding to one of the sections containing the item.
What is the best way to do this?
For other errors (eg 404, 401 ...) code, I use HttpResponseException. But for 301 case, how to specify the redirection url?