Pass the API to the resource