Add in pagination to the result and create metadata for the response.