このページでは

Experiment Management API Mutexグループエンドポイント

EUデータレジデンシー

このページの例では、デフォルトのベースURLを使用しています。https://experiment.amplitude.comプロジェクトでAmplitudeのEUデータセンターを使用している場合は、代わりにhttps://experiment.eu.amplitude.comを使用してください。詳細については、地域を参照してください。

List mutex groups

bash
GET https://experiment.amplitude.com/api/1/mutexes

mutexグループのリストを返します(構成の詳細を含む)。

クエリパラメータ

レスポンス

リクエストが成功すると、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>'

Get mutex group details

bash
GET https://experiment.amplitude.com/api/1/mutexes/<id>

単一mutexグループの設定の詳細を返します。

パス変数

レスポンス

リクエストが成功すると、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 a mutex group

bash
PATCH https://experiment.amplitude.com/api/1/mutexes/{id}

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}

mutexグループスロットの内容を更新します。

パス変数

リクエスト本文

リクエスト例

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 a mutex group

bash
POST https://experiment.amplitude.com/api/1/mutexes

新しいmutexグループを作成します。

リクエスト本文

スロット

slotsフィールドにはこれらのオブジェクトが含まれています。

リクエスト例

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}]}'

これは役に立ちましたか?