Skip to Main Content
Builder.io Ideas
Created by Ulisses Alves
Created on Jul 24, 2024

Support for long list of user attributes

We have a situation in which retrieving content for page while using a long list of targeting attributes exceeds the length allowed for a URL. For example:


https://cdn.builder.io/api/v3/query/{key}/page?userAttributes.targetGroup=women&userAttributes.targetGroup=beauty&userAttributes.targetGroup=cosmetics&userAttributes.targetGroup=skincare&userAttributes.targetGroup=...

In this case, the number of targetGroups a user is member of can be extensive, leading to a failing request due to URL overflow.

A future-proof solution to this problem would be to support a request body through POST.

An alternative solution could be allowing userAttributes of the same key to be provided in a single list using a separator:

?userAttributes.targetGroup=women,beauty,skincare
  • Attach files