このページでは

Experiment Management APIのホールドアウトグループエンドポイント

EUデータレジデンシー

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

List

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

ホールドアウトグループのリストとその設定の詳細を取得します。

クエリパラメータ

レスポンス

リクエストが成功すると、200 OKレスポンスと、レスポンス本文にJSONとしてエンコードされたホールドアウトグループのリストが返されます。

curl --request GET \
--url 'https://experiment.amplitude.com/api/1/holdout?limit=1000' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <management-api-key>'

詳細を取得する

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

ホールドアウトグループの設定の詳細を取得します。

パス変数

レスポンス

リクエストが成功すると、200 OKレスポンスとホールドアウトグループの詳細を含むJSONオブジェクトが返されます。

curl --request GET \
    --url 'https://experiment.amplitude.com/api/1/holdouts/<id>' \
    --header 'Accept: application/json' \
    --header 'Authorization: Bearer <management-api-key>'

Edit

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

ホールドアウトグループを編集します。

パス変数

リクエスト本文

リクエスト例

json
{
  "name": "updated name",
  "description": "updated description",
  "experiments": [123],
  "individualInclusion": ["x@amplitude.com"]
}

レスポンス

リクエストに成功すると、200 OKレスポンスが返されます。

リクエスト

curl
curl --request PATCH \
    --url 'https://experiment.amplitude.com/api/1/holdouts/<id>' \
    --header 'Content-Type: application/json' \
    --header 'Accept: application/json' \
    --header 'Authorization: Bearer <management-api-key>' \
    --data '{"name": "updated name"}'

Create

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

新しいホールドアウトグループを作成します。

リクエスト本文

リクエスト例

json
{
    "projectId": <projectId>,
    "name": "Example Holdout",
  	"key": "example-holdout",
    "holdoutPercentage": 5,
    "evaluationMode": "local",
    "bucketingKey": "device_id",
    "experiments": [21197],
    "individualInclusion": ["x@amplitude.com"],
    "individualExclusion": ["y@amplitude.com"],
}

レスポンス

リクエストが成功すると、200 OKレスポンスとホールドアウトグループのIDとURLを含むJSONオブジェクトが返されます。

curl --request POST \
    --url 'https://experiment.amplitude.com/api/1/holdouts' \
    --header 'Content-Type: application/json' \
    --header 'Accept: application/json' \
    --header 'Authorization: Bearer <management-api-key>' \
    --data '{"projectId":"<projectId>","name":"Example Holdout","holdoutPercentage":5}'

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