The REST API documentation doesn't have any method to read from a data extension while it has a couple of writing into it.
So is SOAP is the only API to read from a DE?
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.
Sign up to join this communityIt's not documented save for a call to GET https://www.exacttargetapis.com/data/v1/rest
, but GET https://www.exacttargetapis.com/data/v1/customobjectdata/key/[DE CustomerKey]/rowset/
will do exactly what you want, and it's not limited to data extensions linked to the contact model.
I've also found it will accept at least the same query string parameters as the ContentBuilder simple asset query plus $top
. You can build more complex filters with AND
, OR
, and parentheses. Property IS [NOT] NULL
works too.
GET https://www.exacttargetapis.com/<module>/v1/rest
. They're poorly (not) documented, and I wouldn't rely on them for mission critical stuff, but they've proven exceptionally useful in specific situations. For instance, I once had a broken ContactBuilder relationship that was causing the web interface to hang; I resolved it by modifying the contact model with an undocumented route. Obviously, it'll give you more power than SFMC intended, so be careful with how you use it.
Dec 7, 2018 at 23:24
first-name%20eq%20'John'%20or%20last-name%20eq%20'Smith'
, using LIKE: first-name%20like%20'Jess%'
, ** using IN:** first-name%20in%20('Jesse','John')
Probably best bet is something like https://developer.salesforce.com/docs/atlas.en-us.mc-apis.meta/mc-apis/fetchAttributes.htm which allows you to go through DEs with are in the contact model.
For example:
Host: https://www.exacttargetapis.com
POST /contacts/v1/attributes/search
Content-Type: application/json
Authorization: Bearer YOUR_ACCESS_TOKEN
{
"request": {
"attributes": [{
"key": "MobileConnect Demographics.First Name"
},
{
"key": "MobileConnect Demographics.Last Name"
},
{
"key": "Retail Orders.Order Number"
},
{
"key": "Retail Orders.Order Total"
}]
},
"conditionSet": {
"operator": "And",
"conditionSets": [],
"conditions": [{
"attribute": {
"key": "Retail Orders.Order Total"
},
"operator": "GreaterThan",
"value": {
"items": ["1,000.00"]
}
}]
}
}