On this page

Experiment Management API Mutex Group Endpoints

List

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

Fetch a list of mutex groups including their configuration details.

Query parameters

Response

A successful request returns a 200 OK response and a list of mutex groups encoded as JSON in the response body.

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

Get details

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

Fetch the configuration details of a mutex group.

Path variables

Response

A successful request returns a 200 OK response and a JSON object with the mutex group's details.

bash
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}

Edit a mutex group.

Path variables

Request body

Example request

json
{
    "name": "updated name",
    "description": "updated description"
}

Response

A successful request returns a 200 OK response.

Request

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}

Edit a mutex group slot.

Path variables

Request body

Example request

json
{
    "experiments": [123, 456],
    "individuals": ["x@amplitude.com", "y@amplitude.com", "abcde-12345"]
}

Response

A successful request returns a 200 OK response.

Request

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

Create a new mutex group.

Request body

slots

The slots field contains these objects.

Example request

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

Response

A successful request returns a 200 OK response and a JSON object with the mutex group's id and url.

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

Was this helpful?