Skip to main content

Explore Pages API (Legacy)

Legacy A/B testing page system. Hierarchical: Page → Experiment → Variant → Device → Section.

Base path: /api/v1/admin/explore-pages

note

This is the legacy system. New pages should use SDUI Templates instead.


Get Page with Full Hierarchy

GET /api/v1/admin/explore-pages/{slug}
{
"page": {
"id": 1,
"slug": "home",
"name": "Home Page",
"status": "ACTIVE"
},
"experiments": [
{
"experiment": {
"id": 1,
"name": "Hero A/B Test",
"selectionType": "WEIGHTED"
},
"variants": [
{
"variant": { "variantId": "v1", "weightPercentage": 50, "isDefault": true },
"devices": [
{
"device": { "deviceType": "ALL" },
"sections": [
{ "type": "HERO", "position": 1, "config": { "title": "Welcome" } }
]
}
]
}
]
}
]
}

Create Page

POST /api/v1/admin/explore-pages
{
"page": { "slug": "home", "name": "Home Page", "status": "ACTIVE" },
"experiments": []
}

Clone Page

POST /api/v1/admin/explore-pages/clone
{ "slug": "home" }

Sample Page Template

GET /api/v1/admin/explore-pages/sample

Returns a complete sample page with all 14 section types pre-configured.

Get Available Enums

GET /api/v1/admin/explore-pages/meta/enums
{
"sectionTypes": ["HERO", "CAROUSEL", "GRID", "BANNER", "DESTINATION_EXPLORER", ...],
"deviceTypes": ["ALL", "MOBILE", "DESKTOP", "TABLET"],
"selectionTypes": ["RANDOM", "WEIGHTED", "RULE_BASED"],
"statuses": ["ACTIVE", "INACTIVE", "DRAFT", "DELETED"]
}

CRUD Summary

ResourceMethods
PagesGET /, GET /{slug}, POST /, PUT /{slug}, DELETE /{slug}, POST /clone
ExperimentsPOST /experiments/{pageId}, PUT /experiments, DELETE /experiments/{id}, POST /experiments/{id}/clone
VariantsPOST /variants/{experimentId}, PUT /variants, DELETE /variants/{id}, POST /variants/{id}/clone
DevicesPOST /devices/{variantId}, PUT /devices, DELETE /devices/{id}, POST /devices/{id}/clone
SectionsPOST /sections/{deviceId}, PUT /sections, DELETE /sections/{id}