API: Get child tables with single call?

I’d like to return the members of the ‘Participants’ Child Table when I query Events. Since Participants is a child table, it can’t be returned without (I think) a remote procedure made for it.

Has anybody done something like this before?

Do you want entire document for linked participant or some fields?

  • 1+n calls: call API to get data about participants
  • 2 calls: get all participants and use list query to fetch fields of all participants. GET /api/resource/User?fields=["*"]&filters=[["name", "in", [...]]]
  • 1 call: you’ll have to write custom endpoint in server script or app.

Ideally I’d return some Participant fields when I query the Events, something like

{
“name”:“Event-1234”,
“participants”:[
{“docType”:“Lead”,
“name”:“Lead-1234”},
{"docType:“Contact”,
“name”:“Contact-1234”
}]
}

Then, I’d also like to be able to get the Events that are related to the Leads (or Contacts or Opportunities).

So, when I call fappeapi.com/Lead/Lead-1234 I would get

{
“name”:“Lead-1234”,
“Events”:[
{“name”:“Event-3412”,
“event_category”:“Call”
}
]
}

Has anyone managed to get the child table using the API?