v4

latestOpenAPI 3.0.02026-08-04109113304.5 KB
Pages

Read a page

Get metadata for a single Page.

get/pages/{page_id}

Path parameters

page_idinteger required

The Page ID of the Page you want to get

Response

Return Page info

activation_codestring

Stringified Javascript function that determines when the Page is activated. Only required when activation_type is 'polling' or 'callback'.

activation_type'immediate' | 'manual' | 'polling' | 'callback' | 'dom_changed' | 'url_changed'

Page activation type is a trigger that determines when the page is activated. Triggers tell Optimizely when to start checking whether certain conditions are true 'Immediate' activation mode activates the page as soon as the snippet loads. 'Polling' activation mode polls every 50ms until 'activation_code' evaluates to True, then activates the page. 'Callback' activation mode activates the page when the event defined by 'activation_code' is triggered. 'Manual' activation mode requires code within the subject app to explicitly trigger page activation. 'DOM Changed' sets the page to trigger when the DOM changes Learn more. 'URL Changed' sets the page to trigger when the URL changes Learn more.

archivedboolean

Whether the Page has been archived

category'article' | 'cart' | 'category' | 'checkout' | 'home' | 'landing_page' | 'pricing' | 'product_detail' | 'search_results' | 'other'

The category this Page is grouped under

conditionsstring

Stringified array of the conditions that activate the Page. The array contains Page Condition JSON dicts joined by "and" and "or". Each individual Page Condition dict has format {"type": "url", "match_type": <match_type>, "value": <value>} where match_types are: "simple" match type will match if "value" matches the hostname and path of the Page URL. "exact" match type will match only an exact string match between "value" and the Page URL. "substring" match type will match if "value" is a substring of the Page URL. "regex" match type will match if "value" is a regular expression match for the Page URL.

createdstring date-time

Date created

edit_urlstring required

URL of the Page

experiment_countinteger

Number of experiments that reference this Page across all statuses (running, paused, draft, archived). Computed by the upstream service.

idinteger

The unique identifier of the Page

keystring

Unique string identifier for this Page within the Project

last_modifiedstring date-time

Date last modified

namestring required

Name of the Page

page_type'single_url' | 'url_set' | 'global'

Type of Page

project_idinteger required

ID of the Page's Project

single_useboolean

Whether the Page is a single-use page created for URL targeting

Example response

{
  "activation_code": "function callbackFn(activate, options) { activate(); }",
  "activation_type": "callback",
  "conditions": "[\"and\", {\"type\": \"url\", \"match_type\": \"substring\", \"value\": \"optimize\"}]",
  "edit_url": "https://www.optimizely.com",
  "experiment_count": 3,
  "id": 4000,
  "key": "home_page",
  "name": "Home Page",
  "project_id": 1000
}