MCPcopy Create free account
hub / github.com/AgentOps-AI/agentops / get_by_id

Method get_by_id

app/api/agentops/opsboard/models.py:322–333  ·  view source on GitHub ↗

Get an organization by ID with relationships preloaded.

(cls, orm: orm.Session, org_id: str | UUID)

Source from the content-addressed store, hash-verified

320
321 @classmethod
322 def get_by_id(cls, orm: orm.Session, org_id: str | UUID) -> Optional['OrgModel']:
323 """Get an organization by ID with relationships preloaded."""
324 return (
325 orm.query(cls)
326 .options(
327 joinedload(cls.users),
328 joinedload(cls.invites),
329 joinedload(cls.projects),
330 )
331 .filter(cls.id == normalize_uuid(org_id))
332 .first()
333 )
334
335 @classmethod
336 def get_all_for_user(cls, orm: orm.Session, user_id: str | UUID) -> Optional[list['OrgModel']]:

Callers 15

get_projectMethod · 0.45
get_hosted_projectMethod · 0.45
get_projectMethod · 0.45
create_orgFunction · 0.45
invite_to_orgFunction · 0.45
get_org_invitesFunction · 0.45
accept_org_inviteFunction · 0.45
remove_from_orgFunction · 0.45
change_member_roleFunction · 0.45
delete_orgFunction · 0.45
update_member_licensesFunction · 0.45
validate_discount_codeFunction · 0.45

Calls 2

normalize_uuidFunction · 0.70
filterMethod · 0.45