api transactions added

This should create transaction for api/v1/<ControllerName>
@SebastianMarzjan @wladekb 
please put it in a separate "if" and add a comment with the explanation and the advise to never change the condition