Fixed resource api in v2-api.

This fixed the bug #1119035.

Change-Id: Icddb3ed55672440b37ddc1acca536d1f0d1b3ab4
Merge "Fixed resource api in v2-api."