Passer au contenu principal
PATCH
https://{tenantDomain}/api/v2
/
experimentation
/
experiments
/
{id}
Update an experiment.
curl --request PATCH \
  --url https://{tenantDomain}/api/v2/experimentation/experiments/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "allocations": [
    {
      "variation_id": "<string>",
      "is_control": true,
      "weight": 50,
      "segment_id": "<string>",
      "priority": 2,
      "is_fallback": true
    }
  ]
}
'
{
  "id": "<string>",
  "name": "<string>",
  "feature_flag_id": "<string>",
  "authentication_flow": "<string>",
  "allocation_strategy": "percentage",
  "assignment_config": {
    "subject": "device"
  },
  "status": "draft",
  "is_valid": true,
  "allocations": [
    {
      "variation_id": "<string>",
      "segment_id": "<string>",
      "weight": 123,
      "priority": 123,
      "is_control": true,
      "is_fallback": true
    }
  ],
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "description": "<string>",
  "started_at": "2023-11-07T05:31:56Z",
  "ended_at": "2023-11-07T05:31:56Z"
}

Documentation Index

Fetch the complete documentation index at: https://auth0.com/llms.txt

Use this file to discover all available pages before exploring further.

Autorisations

Authorization
string
header
requis

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Paramètres de chemin

id
string
requis

The ID of the experiment to update.

Corps

Partial update of an experiment. Only provided fields are updated. Providing allocations replaces the entire allocations set.

name
string

A human-readable name for the experiment

Required string length: 3 - 255
Pattern: ^(?!.*\x00)\S(.*\S)?$
description
string | null

A description of the experiment

Required string length: 3 - 1024
Pattern: ^(?!.*\x00)\S(.*\S)?$
assignment_config
object

Configuration for how users are assigned to variations

allocations
object[]

Replaces all traffic allocations. Cannot be modified while the experiment is active.

Minimum array length: 1

Réponse

Experiment successfully updated.

id
string
requis
Pattern: ^exp_[A-HJ-NP-Za-km-z1-9]+$
name
string
requis
feature_flag_id
string
requis
authentication_flow
string
requis
allocation_strategy
enum<string>
requis
Options disponibles:
percentage,
segment
assignment_config
object
requis
status
enum<string>
requis

Filter by status. Exact match.

Options disponibles:
draft,
active,
paused,
completed,
archived
is_valid
boolean
requis
allocations
object[]
requis
created_at
string<date-time>
requis
updated_at
string<date-time>
requis
description
string
started_at
string<date-time>
ended_at
string<date-time>