C#
using Auth0.ManagementApi;
using System.Threading.Tasks;
using Auth0.ManagementApi.Experimentation;
public partial class Examples
{
public async Task Example() {
var client = new ManagementApiClient(
token: "<token>",
clientOptions: new ClientOptions { BaseUrl = "https://{YOUR_DOMAIN}/api/v2" }
);
await client.Experimentation.Experiments.UpdateAsync(
id: "id",
request: new UpdateExperimentRequestParameters()
);
}
}package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.experimentation.types.UpdateExperimentRequestParameters;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.domain("{YOUR_DOMAIN}")
.token("<token>")
.build();
client.experimentation().experiments().update(
"id",
UpdateExperimentRequestParameters
.builder()
.build()
);
}
}<?php
namespace Example;
use Auth0\SDK\API\Management\Wrapper\ManagementClient;
use Auth0\SDK\API\Management\Wrapper\ManagementClientOptions;
use Auth0\SDK\API\Management\Experimentation\Experiments\Requests\UpdateExperimentRequestParameters;
$client = new ManagementClient(new ManagementClientOptions(
domain: '{YOUR_DOMAIN}',
token: '<token>',
));
$client->experimentation->experiments->update(
'id',
new UpdateExperimentRequestParameters([]),
);
from auth0.management import ManagementClient
client = ManagementClient(
domain="{YOUR_DOMAIN}",
token="<token>",
)
client.experimentation.experiments.update(
id="id",
)
require "auth0"
client = Auth0::Management.new(token: "<token>", base_url: "https://{YOUR_DOMAIN}/api/v2")
client.experimentation.experiments.update(id: "id")
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
}
]
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
allocations: [
{
variation_id: '<string>',
is_control: true,
weight: 50,
segment_id: '<string>',
priority: 2,
is_fallback: true
}
]
})
};
fetch('https://{tenantDomain}/api/v2/experimentation/experiments/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{tenantDomain}/api/v2/experimentation/experiments/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"allocations\": [\n {\n \"variation_id\": \"<string>\",\n \"is_control\": true,\n \"weight\": 50,\n \"segment_id\": \"<string>\",\n \"priority\": 2,\n \"is_fallback\": true\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "<string>",
"name": "<string>",
"feature_flag_id": "<string>",
"authentication_flow": "<string>",
"assignment_config": {
"subject": "device"
},
"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"
}Update an experiment.
Partially update an experiment by ID. Only provided fields are updated. Providing allocations replaces the entire allocations set.
PATCH
https://{tenantDomain}/api/v2
/
experimentation
/
experiments
/
{id}
C#
using Auth0.ManagementApi;
using System.Threading.Tasks;
using Auth0.ManagementApi.Experimentation;
public partial class Examples
{
public async Task Example() {
var client = new ManagementApiClient(
token: "<token>",
clientOptions: new ClientOptions { BaseUrl = "https://{YOUR_DOMAIN}/api/v2" }
);
await client.Experimentation.Experiments.UpdateAsync(
id: "id",
request: new UpdateExperimentRequestParameters()
);
}
}package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.experimentation.types.UpdateExperimentRequestParameters;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.domain("{YOUR_DOMAIN}")
.token("<token>")
.build();
client.experimentation().experiments().update(
"id",
UpdateExperimentRequestParameters
.builder()
.build()
);
}
}<?php
namespace Example;
use Auth0\SDK\API\Management\Wrapper\ManagementClient;
use Auth0\SDK\API\Management\Wrapper\ManagementClientOptions;
use Auth0\SDK\API\Management\Experimentation\Experiments\Requests\UpdateExperimentRequestParameters;
$client = new ManagementClient(new ManagementClientOptions(
domain: '{YOUR_DOMAIN}',
token: '<token>',
));
$client->experimentation->experiments->update(
'id',
new UpdateExperimentRequestParameters([]),
);
from auth0.management import ManagementClient
client = ManagementClient(
domain="{YOUR_DOMAIN}",
token="<token>",
)
client.experimentation.experiments.update(
id="id",
)
require "auth0"
client = Auth0::Management.new(token: "<token>", base_url: "https://{YOUR_DOMAIN}/api/v2")
client.experimentation.experiments.update(id: "id")
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
}
]
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
allocations: [
{
variation_id: '<string>',
is_control: true,
weight: 50,
segment_id: '<string>',
priority: 2,
is_fallback: true
}
]
})
};
fetch('https://{tenantDomain}/api/v2/experimentation/experiments/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{tenantDomain}/api/v2/experimentation/experiments/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"allocations\": [\n {\n \"variation_id\": \"<string>\",\n \"is_control\": true,\n \"weight\": 50,\n \"segment_id\": \"<string>\",\n \"priority\": 2,\n \"is_fallback\": true\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "<string>",
"name": "<string>",
"feature_flag_id": "<string>",
"authentication_flow": "<string>",
"assignment_config": {
"subject": "device"
},
"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"
}承認
bearerAuthoAuth2ClientCredentials
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
パスパラメータ
The ID of the experiment to update.
ボディ
application/jsonapplication/x-www-form-urlencoded
Partial update of an experiment. Only provided fields are updated. Providing allocations replaces the entire allocations set.
A human-readable name for the experiment
Required string length:
3 - 255Pattern:
^(?!.*\x00)\S(.*\S)?$A description of the experiment
Required string length:
3 - 1024Pattern:
^(?!.*\x00)\S(.*\S)?$Configuration for how users are assigned to variations
Show child attributes
Show child attributes
Replaces all traffic allocations. Cannot be modified while the experiment is active.
Minimum array length:
1Show child attributes
Show child attributes
レスポンス
Experiment successfully updated.
Pattern:
^exp_[A-HJ-NP-Za-km-z1-9]+$利用可能なオプション:
percentage, segment Show child attributes
Show child attributes
Filter by status. Exact match.
利用可能なオプション:
draft, active, paused, completed, archived Show child attributes
Show child attributes
⌘I