For AI agents: a documentation index is available at /docs/llms.txt. Append .md to any page URL for markdown, or send Accept: text/markdown.
Experiment Management APIのMutexグループエンドポイント
| 名前 | 概要 |
|---|---|
| List | mutexグループのリスト(設定の詳細を含みます)。 |
| Edit Mutex Group | mutexグループを編集します。 |
| Edit Mutex Group Slots | mutexグループのスロットを編集します。 |
| Create | 新しいmutexを作成します。 |
List
bash
GET https://experiment.amplitude.com/api/1/mutexes
構成の詳細を含むミューテックスグループのリストを取得します。
クエリパラメータ
| 名前 | 概要 |
|---|---|
limit | 返されるミューテックスグループの最大数。上限は1000です。 |
cursor | 結果の「ページ」を開始するためのオフセットです。 |
レスポンス
リクエストが成功すると、200 OKレスポンスと、レスポンス本文にJSONとしてエンコードされたmutexグループのリストが返されます。
curl --request GET \
--url 'https://experiment.amplitude.com/api/1/mutexes?limit=1000' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <management-api-key>'
詳細を取得する
bash
GET https://experiment.amplitude.com/api/1/mutexes/<id>
mutexグループの設定の詳細を取得します。
パス変数
| 名前 | 概要 |
|---|---|
id | 必須です。 文字列です。 mutexグループのID。 |
レスポンス
リクエストが成功すると、200 OKレスポンスとmutexグループの詳細を含むJSONオブジェクトが返されます。
curl --request GET \
--url 'https://experiment.amplitude.com/api/1/mutexes/<id>' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <management-api-key>'
Edit Mutex Group
bash
PATCH https://experiment.amplitude.com/api/1/mutexes/{id}
mutexグループを編集します。
パス変数
| 名前 | 概要 |
|---|---|
id | 必須です。 文字列です。 mutexグループのID。 |
リクエスト本文
| 名前 | 概要 |
|---|---|
name | オプションです。タイプ:string。mutexグループ名。 |
description | オプションです。タイプ:string。mutexグループの説明。 |
archive | オプションです。タイプ:boolean。mutexグループをアーカイブまたはアーカイブ解除します。trueの場合、Amplitudeは他のすべての引数を無視し、mutexグループを削除済みとしてマークし、すべての子実験の親依存関係から削除します。 |
リクエスト例
json
{
"name": "updated name",
"description": "updated description"
}
レスポンス
リクエストに成功すると、200 OKレスポンスが返されます。
リクエスト
curl
curl --request PATCH \
--url 'https://experiment.amplitude.com/api/1/mutexes/<id>' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <management-api-key>' \
--data '{"name": "updated name"}'
Edit Mutex Group Slots
bash
PATCH https://experiment.amplitude.com/api/1/mutexes/{id}/slots/{slotIndex}
ミューテックスグループのスロットを編集します。
パス変数
| 名前 | 概要 |
|---|---|
id | 必須です。 文字列です。 mutexグループのID。 |
slotIndex | 必須です。 番号です。 このミューテックスのスロットインデックス。 |
リクエスト本文
| 名前 | 概要 |
|---|---|
experiments | オプションです。タイプ:number array。含める実験IDのリストです。 |
holdouts | オプションです。タイプ:number array。含めるホールドアウトグループIDのリスト。 |
individuals | オプションです。タイプ:string array。含めるユーザーIDまたはデバイスIDのリスト。 |
リクエスト例
json
{
"experiments": [123, 456],
"individuals": ["x@amplitude.com", "y@amplitude.com", "abcde-12345"]
}
レスポンス
リクエストに成功すると、200 OKレスポンスが返されます。
リクエスト
curl
curl --request PATCH \
--url 'https://experiment.amplitude.com/api/1/mutexes/<id>/slots/<slotIndex>' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <management-api-key>' \
--data '{"experiments": [123, 456]}'
Create
bash
POST https://experiment.amplitude.com/api/1/mutexes
新しいミューテックスグループを作成します。
リクエスト本文
| 名前 | 概要 |
|---|---|
projectId | 必須です。 タイプ:number。ミューテックスグループのプロジェクトID。 |
name | 必須です。 タイプ:string。mutexグループ名。 |
key | オプションです。タイプ:string。ミューテックスグループキー。すべてのフラグ、実験、ホールドアウトグループ、ミューテックスグループ間で一意である必要があります。 指定されていない場合、Amplitudeは1つを生成します。 |
description | オプションです。タイプ:string。ミューテックスグループの説明。 |
evaluationMode | オプションです。タイプ:string。ミューテックスグループ評価モード。オプションはlocalまたはremoteです。デフォルトはremoteです。 |
bucketingKey | オプションです。タイプ:string。ユーザーをバケットに分類するのに使用するユーザープロパティ。デフォルトはamplitude_idです。 |
bucketingSalt | オプションです。タイプ:string。Mutexグループのバケッティングソルト。デフォルトではランダム化された文字列です。 |
slots | 必須です。 タイプ:object array。slotsの配列。最大20スロット。順序は重要です。 |
スロット
slotsフィールドにはこれらのオブジェクトが含まれています。
| 名前 | 概要 |
|---|---|
percentage | 必須です。 タイプ:number。このスロットへのトラフィックの割合。 1〜100の整数です(1〜100の範囲内)。すべてのスロット全体のパーセンテージの合計は100に等しい必要があります。 |
experiments | オプションです。タイプ:string array。含める実験IDのリストです。 |
holdouts | オプションです。タイプ:number array。含めるホールドアウトグループIDのリスト。 |
individuals | オプションです。タイプ:number array。含めるユーザーIDまたはデバイスIDのリスト。 |
リクエスト例
json
{
"projectId":"<projectId>",
"name": "Example Mutex Group",
"key": "example-mutex",
"description": "An example mutex group",
"evaluationMode": "remote",
"slots": [
{
"percentage": 40,
"experiments": [123],
"holdouts": [456]
},
{
"percentage": 60,
"experiments": [789],
"individuals": ["x@amplitude.com"]
}
]
}
レスポンス
リクエストが成功すると、200 OK応答とmutexグループのIDとURLを含むJSONオブジェクトが返されます。
curl --request POST \
--url 'https://experiment.amplitude.com/api/1/mutexes' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <management-api-key>' \
--data '{"projectId":"<projectId>","slots":[{"percentage":40},{"percentage":60}]}'
これは役に立ちましたか?