0

I am trying to use the Marketing Cloud Rest API to search content for a literal string. For example “make my day”. When I submit my request using Postman I receive a response that has content that includes each individual word rather the entire phrase.

How can I perform a literal content query?

If I submit the followingent body as a POST I get "bootcamp" and "OTC". How can I just jet OTC with a space on either side of the search value?

POST https://{{et_subdomain}}.rest.marketingcloudapis.com/asset/v1/content/assets/query

{ "page": { "page": 1, "pageSize": 50 }, 
"query": { "property": "content", "simpleOperator": "mustcontain", "value": "OTC" }, 
"fields": [ "AssetType", "Views", "Content" ]

1 Answer 1

0

You can achieve that using Simple Query and adding all your filters directly to the GET request URL:

https://[your_domain].rest.marketingcloudapis.com/asset/v1/content/assets?$page=1&$pagesize=50&$filter=Content%20like%20'%20OTC%20'&$fields=AssetType,Views,Content

The main filter here would be Content%20like%20'%20OTC%20', which would search for content that has the " OTC " part (with two before and after spaces that are represented by "%20"). This way you would skip "bootcamp" values.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .