public IActionResult GetApiKeys([FromQuery] int page = 1, [FromQuery] int elementsPerPage = 10) { IEnumerable <ApiKey> keys = ApiKeyService.GetAllApiKeys(); IEnumerable <ApiKey> paginatedKeys = keys.Skip((page - 1) * elementsPerPage).Take(elementsPerPage); return(Ok(new PaginatedResponse(paginatedKeys.Select(k => new ApiKeyResponse(k)), keys.Count()))); }