Get Data Graph Data with Lookup Keys

Queries data from a specific data graph using lookup keys. This endpoint allows you to retrieve records based on primary keys or lookup keys from any participating data model object (DMO).

  • HTTP Method: GET
  • Availability: Data Cloud v1.0, Salesforce v51.0
  • Format: REST
  • URI: /api/v1/dataGraph/{dataGraphEntityName}?lookupKeys=[]&live=true/false
ParameterTypeDescription
dataGraphEntityNamestringRequired. The unique identifier of the data graph. Example: individual_eng_dg
ParameterTypeDescription
lookupKeysstringRequired. The lookup key in the format [DMO__dlm.field__c=value]. Example: [UnifiedLinkssotIndividualIr1__dlm.SourceRecordId__c=10000001]
livebooleanRetrieves the latest data graph data if set to true. Retrieves the precalculated data graph data by default.

You can use a combination of DMO values included in the data graph to query your data. For all DMOs you can search by the primary key and key qualifier. The following are notes about specific search options. Realtime data graphs doesn't support non-primary key lookups.

  • Value DMO: The value DMO is the materialized table in the data graph that contains the full data payload.
  • Primary DMO: The primary DMO is the DMO the data graph is built from.
  • Link table DMO: The link table is a junction table that links a unified DMO to another DMO.
  • Participating DMO: You can use this type of DMO to store many-to-many relationships and perform reverse lookups from the DMO to the data graph.
  • Cross table search: You can search data graph data using a combination of the primary key and key qualifier from a value DMO with one or more fields from the primary DMO. To use cross table search, pass multiple values to the search call [primaryKeyFieldOfValueDMO=value, columnOfPrimaryDMO=value], [primaryKeyFieldOfValueDMO=value, column1OfPrimaryDMO=value, column2OfPrimaryDMO=value]. You can also use the primary key of a participating table in cross table search. Realtime data graphs don't support cross table search.
Search ScenarioPrimary KeyPrimary Key and Key QualifierNon-primary Key Fields
Primary DMO[primaryDMO__dlm.PrimaryKeyField=value][primaryDMO__dlm.PrimaryKeyField=value, primaryDMO__dlm.keyQualifierField=value]\[primaryDMO__dlm.anyField=value, primaryDMO__dlm.anyField2=value]
Value DMO[valueDMO__dlm.PrimaryKeyField=value][valueDMO__dlm.PrimaryKeyField=value, valueDMO__dlm.keyQualifierField=value]Not supported
Link Table DMO[DMO__dlm.primaryKeyField=value][DMO__dlm.primaryKeyField=value, DMO__dlm.keyQualifierField=value][linkTableDMO__dlm.anyField=value, linkTableDMO__dlm.anyField2=value]
Participating DMO[Participating__dlm.primaryKey=value]Not supportedNot supported

To help build lookup keys, use the GET /dataGraph/metadata?entityName={DataGraphName} API to explore a data graph schema and retrieve the full DMO and field definitions.

ParameterTypeDescription
dataspacestringThe dataspace that the query executes in.

The response includes:

  • data: Array of objects containing the requested data
  • done: boolean indicating if all results have been returned

This example shows the data graph UnifiedIndividual_DG queried using the field SourceRecordIdc=10000001 on the related object UnifiedLinkssotIndividualIr1dlm. The request to query the data graph is made using these elements:

  • DMO: UnifiedLinkssotIndividualIr1
  • Primary Key name: SourceRecordId
  • Primary Key value: 10000001

Request

Response

This example shows the data graph Individual_DG queried using the field SourceRecordIdc=10000001 on the related object LinkssotIndividualIr1dlm with the key qualifier kq_id__c=123. The request to query the data graph is made using these elements:

  • DMO: LinkssotIndividualIr1
  • Primary Key name: SourceRecordId
  • Primary Key value: 10000001
  • Key Qualifier ID: 123

Request

Response