Querying multiple tables with joins

From DreamFactory
Jump to: navigation, search
DreamFactoryTutorialsQuerying multiple tables with joins
      1. Tutorial

Query a SQL database for records in different tables joined by key. Try these examples in the 'API Docs' tab of the DreamFactory Admin Console or from the command line with cURL.

Note that passing * as the 'related' parameter will return all records by foreign key.

      1. API Endpoint
GET https://{url}/api/v2/{api_name}/_table/{table_name}?related={foreign_key_field}
      1. API Docs Screenshot


      1. Example - Fetch contact and contact_info_by_contact_id records in one API call. Each contact has zero or more contact_info_by_contact_id records.
  • Table name: contact
  • Related parameter in API call:
  • Request URL:
      1. Example - Fetch contact and all related records by foreign key in one API call.
  • Table name: contact
  • Filter parameter in API call:
  • Request URL: