1

I am querying a data extension

Method:

GET
https://xxxx.rest.marketingcloudapis.com/contacts/v1/attributeSets/name:Test_Journey_4_DataExtension_Copy

Response

{
    "id": "xxxxx",
    "key": "Test_Journey_4_DataExtension_Copy",
    "customerKey": "Test_Journey_4_DataExtension_Copy",
    "name": "Test_Journey_4_DataExtension_Copy",
    "page": 1,
    "pageSize": 50,
    "count": 4,
    "items": [
        {
            "values": [
                {
                    "id": "xxxxxxxx-xxxx-xxxx-a2de-1402ec8ca7a1",
                    "key": "Test_Journey_4_DataExtension_Copy.Id",
                    "name": "Id"
                },
                {
                    "id": "xxxxxxxx-xxxx-xxxx-a2de-1402ec8ca7a1",
                    "key": "Test_Journey_4_DataExtension_Copy.Entered",
                    "name": "Entered"
                },
                {
                    "id": "xxxxxxxx-xxxx-xxxx-a2de-1402ec8ca7a1",
                    "key": "Test_Journey_4_DataExtension_Copy.EmailAddress",
                    "name": "EmailAddress"
                },
                {
                    "id": "xxxxxxxx-xxxx-xxxx-a2de-1402ec8ca7a1",
                    "key": "Test_Journey_4_DataExtension_Copy.PersonContactID",
                    "name": "PersonContactID"
                }
            ]
        },
        {
            "values": [
                {
                    "id": "xxxxxxxx-xxxx-xxxx-a2de-1402ec8ca7a1",
                    "key": "Test_Journey_4_DataExtension_Copy.Id",
                    "name": "Id",
                    "value": "cc"
                },
                {
                    "id": "xxxxxxxx-xxxx-xxxx-a2de-1402ec8ca7a1",
                    "key": "Test_Journey_4_DataExtension_Copy.Entered",
                    "name": "Entered",
                    "value": "True"
                },
                {
                    "id": "xxxxxxxx-xxxx-xxxx-a2de-1402ec8ca7a1",
                    "key": "Test_Journey_4_DataExtension_Copy.EmailAddress",
                    "name": "EmailAddress",
                    "value": "emailaddress"
                },
                {
                    "id": "xxxxxxxx-xxxx-xxxx-a2de-1402ec8ca7a1",
                    "key": "Test_Journey_4_DataExtension_Copy.PersonContactID",
                    "name": "PersonContactID",
                    "value": "xx12"
                }
            ]
        },
        {
            "values": [
                {
                    "id": "xxxxxxxx-xxxx-xxxx-a2de-1402ec8ca7a1",
                    "key": "Test_Journey_4_DataExtension_Copy.Id",
                    "name": "Id",
                    "value": "cc1"
                },
                {
                    "id": "xxxxxxxx-xxxx-xxxx-a2de-1402ec8ca7a1",
                    "key": "Test_Journey_4_DataExtension_Copy.Entered",
                    "name": "Entered",
                    "value": "True"
                },
                {
                    "id": "xxxxxxxx-xxxx-xxxx-a2de-1402ec8ca7a1",
                    "key": "Test_Journey_4_DataExtension_Copy.EmailAddress",
                    "name": "EmailAddress",
                    "value": "emailaddress"
                },
                {
                    "id": "xxxxxxxx-xxxx-xxxx-a2de-1402ec8ca7a1",
                    "key": "Test_Journey_4_DataExtension_Copy.PersonContactID",
                    "name": "PersonContactID",
                    "value": "xx13"
                }
            ]
        },
        {
            "values": [
                {
                    "id": "xxxxxxxx-xxxx-xxxx-a2de-1402ec8ca7a1",
                    "key": "Test_Journey_4_DataExtension_Copy.Id",
                    "name": "Id",
                    "value": "cc2"
                },
                {
                    "id": "xxxxxxxx-xxxx-xxxx-a2de-1402ec8ca7a1",
                    "key": "Test_Journey_4_DataExtension_Copy.Entered",
                    "name": "Entered",
                    "value": "True"
                },
                {
                    "id": "xxxxxxxx-xxxx-xxxx-a2de-1402ec8ca7a1",
                    "key": "Test_Journey_4_DataExtension_Copy.EmailAddress",
                    "name": "EmailAddress",
                    "value": "emailaddress"
                },
                {
                    "id": "xxxxxxxx-xxxx-xxxx-a2de-1402ec8ca7a1",
                    "key": "Test_Journey_4_DataExtension_Copy.PersonContactID",
                    "name": "PersonContactID",
                    "value": "xx14"
                }
            ]
        }
    ],
    "links": {},
    "requestServiceMessageID": "xxxxxxx",
    "responseDateTime": "2019-07-11T00:01:08.8915021-06:00",
    "resultMessages": [],
    "serviceMessageID": "xxxxxx"
}

However I just want to filter the response based on the particular key value, say in this instance I would just like to get response filtered on

"id": "xxxxxxxx-xxxx-xxxx-a2de-1402ec8ca7a1",
                    "key": "Test_Journey_4_DataExtension_Copy.PersonContactID",
                    "name": "PersonContactID",
                    "value": "xx12"

I have already tried the following:

 GET
    https://xxxx.rest.marketingcloudapis.com/contacts/v1/attributeSets/name:Test_Journey_4_DataExtension_Copy?$filter=PersonContactID%20eq%20'xx12'

But still getting the unfiltered response. Thanks

1
  • try checking out: attributeSets/name:{name}/search. This requires a 'filterJSON' to filter your results. As this endpoint is undocumented, you will need to try and build this filterJSON from scratch. This might be a good starting point though: developer.salesforce.com/docs/… Jul 11, 2019 at 13:04

0

You must log in to answer this question.

Browse other questions tagged .