SnykSelf
Model for Snyk Self (Current User).
Overview
This model represents the current authenticated user or service account making the API request.
Uses the Snyk v2 REST API endpoint: /self
import clearskies
from clearskies_snyk.models import SnykSelf
def my_handler(snyk_self: SnykSelf):
# Get the current user
self_user = snyk_self.find("id=self")
print(f"Current user: {self_user.name} ({self_user.email})")