api and resource design