I'm trying to access Data Extensions' Data (Rows, columns, etc...) through Node API.
const ET_Client = require('../node_modules/sfmc-fuelsdk-node');
const clientId = 'clientId'
const clientSecret = 'clientSecret'
const stack = 'S10'
const obj = {
origin: 'https://XXXXXXXXXXXXXX.rest.marketingcloudapis.com/',
authOrigin: 'https://XXXXXXXXXXXXXX.auth.marketingcloudapis.com/',
soapOrigin: 'https://XXXXXXXXXXXXXX.soap.marketingcloudapis.com/',
authOptions: {
authVersion: 2,
accountId: XXXXXXXXXXXXXX
}
}
const client = new ET_Client(clientId, clientSecret, stack, obj);
const props = [
'Name',
'FieldType',
'MaxLength',
'DataExtension.CustomerKey',
'IsPrimaryKey'
];
const filter = {
leftOperand: 'DataExtension.CustomerKey',
operator: 'equals',
rightOperand: 'XXXXXXXXXXXXXX'
}
client.dataExtensionColumn({props, filter}).get((err, resp) => {
if(err){
console.log("\n\nerror \n\n")
console.log(err)
}else{
console.log(resp)
}
});
but I don't know for sure what props I can Send in client.dataExtensionColumn({props })
. When I remove this props from the "request" (client.dataExtensionColumn({props, filter}
) I get the following error:
{ error: 'A property list is required for DE column retrieval.', documentation: 'https://code.exacttarget.com/apis-sdks/fuel-sdks/data-extension-columns/data-extension-column-retrieve.html' }
And then, when I try to access the link received, I get Internal Server Error
The docs are a little confusing, Where can I find the properties I can send in this (and to others Objects: DataExtension, DataExtensionRow, etc...) request?