0

Step 1 I am passing the Journey ID in the call to get the data extension ID

 Get
https://xxxxxxxx.rest.marketingcloudapis.com/interaction/v1/eventDefinitions/{5b3c1a00-0bbc-4484-b7be-21234567890}

Sample Response:

    {
"id": "xxxxx",
"type": "EmailAudience",
"name": "xxxxxx",
"description": "",
"createdDate": "2019-07-02T21:41:53.4",
"createdBy": 100169002,
"modifiedDate": "2019-07-02T21:41:53.4",
"modifiedBy": 100169002,
"mode": "Production",
"eventDefinitionKey": "DEAudience-xxxx",
"dataExtensionId": "xxxxxxx",
"dataExtensionName": "xxxxxxxxxx",
"sourceApplicationExtensionId": "xxxxx",
"filterDefinitionId": "00000000-0000-0000-0000-000000000000",
"filterDefinitionTemplate": "",
"iconUrl": "/images/icon-data-extension.svg",
"arguments":
Unknown macro: { "serializedObjectType"}
,
"configurationArguments":
Unknown macro: { "unconfigured"}
,
"metaData":
Unknown macro: { "criteriaDescription"}
,
"interactionCount": 1,
"isVisibleInPicker": false,
"isPlatformObject": false,
"category": "Audience",
"publishedInteractionCount": 1,
"automationId": "xxxxxxx"
}

Now I want to retrieve the External key for the data extension via rest API. Are there any sample calls to retrieve the External key based on the dataExtensionId got from the above response?

  • @Chandan--> its not possible to retrieve the Dataextensions fields uisng Rest api use Soap api its possible – pkharries Jul 9 '19 at 6:19
  • We are not asking to retrieve the data extension fields. We want to get the External Key. From UI whenever you create the data extensiion, you can also get see the external key. In this instance we would like to get the external key by passing the dataextensionid via REST API. – Chandan Jul 9 '19 at 6:25
1

The REST and SOAP APIs do not have full parity at this stage. ( Source: https://developer.salesforce.com/docs/atlas.en-us.mc-apis.meta/mc-apis/index-api.htm ). Data Extensions go as "Most other email activities", filed under SOAP. (You can only deduce this as they aren't listed as one of the positive options for either REST or SOAP...)

So, unfortunately, for retrieving a key, you'd have to go for SOAP as of today. Using WS Proxy, SOAP feels a lot less cumbersome though. This example from the docs finds the CustomerKey for a DE:

https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-programmatic-content.meta/mc-programmatic-content/ssjs_WSProxy_advanced_retrieve.htm

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.