Skip to content

Retrieve Running Experiments

Retrieve all running experiments from your Storyblok space, with their variants and tested stories. The response has no pagination.

GET
https://api.storyblok.com/v2/cdn/experiments
  • cv integer

    Cached version Unix timestamp. Learn more in the Caching concept.

  • by_story_ids string

    Retrieve the experiments that test the original stories by story id. Supports a comma-separated string.

  • by_story_uuids string

    Retrieve the experiments that test the original stories by story uuid. Supports a comma-separated string.

  • by_story_full_slugs string

    Retrieve the experiments that test the original stories by story full_slug, for example campaigns/home. Supports a comma-separated string of exact matches. Matches only the default-language slug, so translated slugs return no experiments. With more than one by_story_* parameter, a story must match every parameter.

  • token required string

    A preview or public access token configured in a space.

  • experiments array<Experiment>

    An array of running experiment objects.

    Show child properties
    • id integer

      Numeric ID of the experiment.

    • name string

      Internal name (lowercase letters, numbers, and underscores).

    • display_name string

      Human-readable display name.

    • story_ids array<integer>

      An array of IDs of the original stories tested in the experiment, the same for every variant.

    • variants array<ExperimentVariant>

      Variants belonging to the experiment.

      Show child properties
      • name string

        Internal name (lowercase letters, numbers, and underscores).

      • display_name string

        Human-readable display name.

      • public_id string

        Public identifier for stable bucketing.

      • weight integer

        Traffic weight percentage (0-100).

      • is_control boolean

        Whether the variant is the control variant. Visitors assigned to the control variant view the original stories.

      • story_mappings array<object>

        Pairs each original story in the experiment with the story copy that replaces it in this variant. The list is empty for the control variant and for variants without copies. When a story has no entry, the variant shows the original story.

        Show child properties
        • original_story_id integer

          Numeric ID of the original story.

        • original_uuid string | null

          UUID of the original story.

        • original_slug string | null

          Slug of the original story without the folder path, for example post for a story at blog/post.

        • variant_story_id integer | null

          Numeric ID of the story copy shown in this variant.

        • variant_uuid string | null

          UUID of the story copy.

        • variant_slug string | null

          Full slug of the story copy, for example blog/post-variant-a.

    • stories array<object>

      An array of the original stories tested in the experiment, the same stories as story_ids, with their id and full_slug.

      Show child properties
      • id integer

        Numeric ID of the story.

      • full_slug string

        The story’s full slug, including parent folder and language paths.

  • cv integer | null

    Cached version Unix timestamp. Learn more in the Caching concept.

curl "https://api.storyblok.com/v2/cdn/experiments\
?token=YOUR_ACCESS_TOKEN"
Response
{
"experiments": [
{
"id": 501,
"name": "homepage_hero_test",
"display_name": "Homepage Hero Test",
"story_ids": [
371891025
],
"stories": [
{
"id": 371891025,
"full_slug": "home"
}
],
"variants": [
{
"name": "control",
"display_name": "Control",
"public_id": "var_abc123def456",
"weight": 50,
"is_control": true,
"story_mappings": []
},
{
"name": "variant_a",
"display_name": "Variant A",
"public_id": "var_789ghi012jkl",
"weight": 50,
"is_control": false,
"story_mappings": [
{
"original_story_id": 371891025,
"original_uuid": "73a1d66c-3f1e-4b6a-9d2e-5c8f0a1b2c3d",
"original_slug": "home",
"variant_story_id": 371891777,
"variant_uuid": "9f2b4c1a-6d3e-4f7a-8b9c-0d1e2f3a4b5c",
"variant_slug": "home-variant-a"
}
]
}
]
}
],
"cv": 1709500000
}

Was this page helpful?

What went wrong?

This site uses reCAPTCHA and Google's Privacy Policy (opens in a new window).Terms of Service (opens in a new window) apply.