APIs & Integrations

OndrejKoula
Membro

Need help with getting AB variant via Page API

Hello everyone,

I am getting stuck on obtaining the AB test variant content of the website page. 

The problem is, that my web page is in state of AB testing, so I have MASTER version and particular VARIANT version related to the master. When I call API to obtain the master, everything is correct, however when I try to obtain the variant version, which has different ID than its master, then API returns JSON containing all metadata for the variant, however the content of the page (widgets, descriptions, sections etc.) are of master version. 

 

Is there any possibility to get AB variant content via HubSpot API, or always when I call Get Page for the variant, I always get master page content ONLY?

 

The API cal I use is :

content/api/v2/pages/{pageId}

 

I tried to find any API parameter thatcould configure, which content should be returned (master or variant) however it seems there is no such API configuration for this.

 

Is there any way how to solve it?

 

Thank you for your answers.

 

Ondrej K

0 Avaliação positiva
2 Respostas 2
KospeKaspa
Participante

Need help with getting AB variant via Page API

Hello, i want to achieve precisely the same but i am using version 3. I get both variations only if i get the full list of pages:

`curl --request GET --url https://api.hubapi.com/cms/v3/pages/site-pages --header 'authorization: Bearer xxx'`

If i try to filter by page ID i only get variant MASTER

0 Avaliação positiva
dennisedson
Equipe de Produto da HubSpot
Equipe de Produto da HubSpot

Need help with getting AB variant via Page API

@theAndreyK , any chance you have explored this?

0 Avaliação positiva