    def server_model(self, spawner):
        """Truncated server model for use in shares

        - Adds "user" field (just name for now)
        - Limits fields to "name", "url", "full_url", "ready"
          from standard server model
        """
        user = self.users[spawner.user.id]
        if spawner.name in user.spawners:
            # use Spawner wrapper if it's active
            spawner = user.spawners[spawner.name]
        full_model = super().server_model(spawner, user=user)
        # filter out subset of fields
        server_model = {
            "user": {
                "name": spawner.user.name,
            }
        }
        # subset keys for sharing
        for key in ["name", "url", "full_url", "ready"]:
            if key in full_model:
                server_model[key] = full_model[key]

        return server_model
Truncated server model for use in shares

- Adds "user" field (just name for now)
- Limits fields to "name", "url", "full_url", "ready"
from standard server model
jupyterhub/apihandlers/shares.py