Metadata
Use the metadata resource to return an EDMX document that contains the entities and attributes that the DF API recognizes.
The Service document identifies entities that are mapped and therefore can be queried for a specific queryable schema. The difference between results from the Metadata resource and Service resource identifies areas where you can add mappings to query more entities.
Syntax
- Resource
-
v4.0
1/dfs/apiVersion/MetadataRepository/repositoryVersion/queryableSchema/odata/$metadatav2.0 and v3.0
1/dfs/apiVersion/metadataRepository/repositoryVersion/$metadata - Availability
- 2.0
- Formats
- ODATA 4.0
- HTTP methods
- GET
- Authentication
-
Provided by Salesforce via Cloud to Cloud authentication. The named credential cannot be called directly and must be called via Salesforce. For example, via the developer console, an Apex resource, or a component.
- Request parameters
-
Parameter Description apiVersion Required. Version of the DF API to use. The current version is v3.0. This value is taken from the named credential configuration.
For example: v3.0
metadataRepository Required. Contact Customer Support for this value. This parameter identifies the repository that stores the mappings for your environment. It is unique per Customer 360 Data Manager environment.
repositoryVersion Mapping version activated in Customer 360 Data Manager. Salesforce recommends taking the value from the configuration of the DFS external data source. Using the metadata for the DFS external data source allows your code to use whatever version they have most recently configured.
For example: 1.2.0
Example
This gets the queryable entities for a specific version of the mappings in your environment. The results are the same, but the requests differ by the syntax of the API version.
1/dfs/v3.0/core%2fstmfpba44ice1%2f00DRM000000D1or2BC/1.2.0/org1connection/odata/$metadatav2.0 and 3.0 example
1/dfs/v3.0/core%2fstmfpba44ice1%2f00DRM000000D1or2BC/1.2.0/$metadata